This fixes driver autoloading
Fixes: fce96cf04430 ("virt: Add SEV-SNP guest driver")
Signed-off-by: Cole Robinson <[email protected]>
---
drivers/virt/coco/sev-guest/sev-guest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/virt/coco/sev-guest/sev-guest.c b/drivers/virt/coco/sev-guest/sev-guest.c
index f422f9c58ba7..4c426dbcd166 100644
--- a/drivers/virt/coco/sev-guest/sev-guest.c
+++ b/drivers/virt/coco/sev-guest/sev-guest.c
@@ -744,3 +744,4 @@ MODULE_AUTHOR("Brijesh Singh <[email protected]>");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");
MODULE_DESCRIPTION("AMD SEV Guest Driver");
+MODULE_ALIAS("platform:sev-guest");
--
2.37.3
On Fri, Nov 04, 2022 at 04:42:45PM -0400, Cole Robinson wrote:
> This fixes driver autoloading
What is the scenario where this needs to be autoloaded?
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
(HRB 36809, AG Nürnberg)
On 11/4/22 4:53 PM, Borislav Petkov wrote:
> On Fri, Nov 04, 2022 at 04:42:45PM -0400, Cole Robinson wrote:
>> This fixes driver autoloading
>
> What is the scenario where this needs to be autoloaded?
>
Any use case that needs /dev/sev-guest, I guess. Saves software from
having to do the modprobe manually. For example, nothing I can find in
https://github.com/AMDESE/sev-guest loads the driver, it expects
/dev/sev-guest to be there already
Mostly I assumed lack of autoloading was an oversight. Was it
intentionally omitted?
Thanks,
Cole
On 11/5/22 11:08, Cole Robinson wrote:
> On 11/4/22 4:53 PM, Borislav Petkov wrote:
>> On Fri, Nov 04, 2022 at 04:42:45PM -0400, Cole Robinson wrote:
>>> This fixes driver autoloading
>>
>> What is the scenario where this needs to be autoloaded?
>>
>
> Any use case that needs /dev/sev-guest, I guess. Saves software from
> having to do the modprobe manually. For example, nothing I can find in
> https://github.com/AMDESE/sev-guest loads the driver, it expects
> /dev/sev-guest to be there already
>
> Mostly I assumed lack of autoloading was an oversight. Was it
> intentionally omitted?
It probably was an oversight. To me, it makes sense to auto-load the
module if the SNP support created the platform device as part of SNP
initialization.
Thanks,
Tom
>
> Thanks,
> Cole
>
On 11/4/22 15:42, Cole Robinson wrote:
> This fixes driver autoloading
>
> Fixes: fce96cf04430 ("virt: Add SEV-SNP guest driver")
> Signed-off-by: Cole Robinson <[email protected]>
Acked-by: Tom Lendacky <[email protected]>
> ---
> drivers/virt/coco/sev-guest/sev-guest.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/virt/coco/sev-guest/sev-guest.c b/drivers/virt/coco/sev-guest/sev-guest.c
> index f422f9c58ba7..4c426dbcd166 100644
> --- a/drivers/virt/coco/sev-guest/sev-guest.c
> +++ b/drivers/virt/coco/sev-guest/sev-guest.c
> @@ -744,3 +744,4 @@ MODULE_AUTHOR("Brijesh Singh <[email protected]>");
> MODULE_LICENSE("GPL");
> MODULE_VERSION("1.0.0");
> MODULE_DESCRIPTION("AMD SEV Guest Driver");
> +MODULE_ALIAS("platform:sev-guest");
The following commit has been merged into the x86/sev branch of tip:
Commit-ID: 2874529b3513bdc90299c90f40713602da685e35
Gitweb: https://git.kernel.org/tip/2874529b3513bdc90299c90f40713602da685e35
Author: Cole Robinson <[email protected]>
AuthorDate: Fri, 04 Nov 2022 16:42:45 -04:00
Committer: Borislav Petkov <[email protected]>
CommitterDate: Tue, 08 Nov 2022 15:54:34 +01:00
virt/sev-guest: Add a MODULE_ALIAS
Autoload the driver when, for example, SNP init code creates the
corresponding platform device.
[ bp: Rewrite commit message. ]
Fixes: fce96cf04430 ("virt: Add SEV-SNP guest driver")
Signed-off-by: Cole Robinson <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Acked-by: Tom Lendacky <[email protected]>
Link: https://lore.kernel.org/r/ff480c5e688eb0a72a4db0a29c7b1bb54c45bfd4.1667594253.git.crobinso@redhat.com
---
drivers/virt/coco/sev-guest/sev-guest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/virt/coco/sev-guest/sev-guest.c b/drivers/virt/coco/sev-guest/sev-guest.c
index e9704ae..13911b9 100644
--- a/drivers/virt/coco/sev-guest/sev-guest.c
+++ b/drivers/virt/coco/sev-guest/sev-guest.c
@@ -742,3 +742,4 @@ MODULE_AUTHOR("Brijesh Singh <[email protected]>");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");
MODULE_DESCRIPTION("AMD SEV Guest Driver");
+MODULE_ALIAS("platform:sev-guest");