Re: [PATCH] x86/sev: Make SEV_STATUS available via SYSFS

Jürgen Groß
2025-03-10T16:23:56Z

[-- Attachment #1.1.1: Type: text/plain, Size: 1103 bytes --]

On 10.03.25 17:06, Borislav Petkov wrote:
> On Mon, Mar 10, 2025 at 05:00:50PM +0100, Juergen Gross wrote:
>> There is work in progress for SEV guests at least.
>
> Nice.
>
>> Shouldn't the coco related information be the same regardless of the
>> hypervisor beneath?
>
> Right, but...
>
>> IOW: do you envision the coding for populating the coco related sysfs guest
>> nodes to be different when running as a KVM or a Hyper-V guest?
>
> ... if you have some coco tools which need to read out HV info - for whatever
> reason - then they'll have to do:
>
> if (HV == KVM)
> read /sys/kvm
> else if (HV == Xen)
> read /sys/xen
> else
> ...
>
> which we might save them upfront...

In case there is the need for such information in a guest (and it can only
be in a guest, as every Linux under Xen is a guest, same applies to Hyper-V
and VMWare), the information should be under /sys/hypervisor.

If Linux supports running as a hypervisor using something different than KVM
then we should add something like /sys/virt-platform for such data.

Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]