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

From: Jürgen Groß
Date: Mon Mar 10 2025 - 12:24:07 EST


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: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature