summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/sev.c
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2022-04-20 09:14:13 -0500
committerBorislav Petkov <bp@suse.de>2022-04-21 11:48:24 +0200
commit2bf93ffbb97e0614cfc431d2ea33b7eae7481eb2 (patch)
tree795262f066a0700d17988258d9bb17332ffeccea /arch/x86/kernel/sev.c
parent6044d159b5d826259a7397d42fa3ad0bfc4dbd13 (diff)
downloadlwn-2bf93ffbb97e0614cfc431d2ea33b7eae7481eb2.tar.gz
lwn-2bf93ffbb97e0614cfc431d2ea33b7eae7481eb2.zip
virt: sevguest: Change driver name to reflect generic SEV support
During patch review, it was decided the SNP guest driver name should not be SEV-SNP specific, but should be generic for use with anything SEV. However, this feedback was missed and the driver name, and many of the driver functions and structures, are SEV-SNP name specific. Rename the driver to "sev-guest" (to match the misc device that is created) and update some of the function and structure names, too. While in the file, adjust the one pr_err() message to be a dev_err() message so that the message, if issued, uses the driver name. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/307710bb5515c9088a19fd0b930268c7300479b2.1650464054.git.thomas.lendacky@amd.com
Diffstat (limited to 'arch/x86/kernel/sev.c')
-rw-r--r--arch/x86/kernel/sev.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c
index f01f4550e2c6..2fa87a07ab30 100644
--- a/arch/x86/kernel/sev.c
+++ b/arch/x86/kernel/sev.c
@@ -2166,8 +2166,8 @@ e_restore_irq:
}
EXPORT_SYMBOL_GPL(snp_issue_guest_request);
-static struct platform_device guest_req_device = {
- .name = "snp-guest",
+static struct platform_device sev_guest_device = {
+ .name = "sev-guest",
.id = -1,
};
@@ -2197,7 +2197,7 @@ static u64 get_secrets_page(void)
static int __init snp_init_platform_device(void)
{
- struct snp_guest_platform_data data;
+ struct sev_guest_platform_data data;
u64 gpa;
if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
@@ -2208,10 +2208,10 @@ static int __init snp_init_platform_device(void)
return -ENODEV;
data.secrets_gpa = gpa;
- if (platform_device_add_data(&guest_req_device, &data, sizeof(data)))
+ if (platform_device_add_data(&sev_guest_device, &data, sizeof(data)))
return -ENODEV;
- if (platform_device_register(&guest_req_device))
+ if (platform_device_register(&sev_guest_device))
return -ENODEV;
pr_info("SNP guest platform device initialized.\n");