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

Jürgen Groß
2025-03-11T10:22:26Z

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

On 11.03.25 10:43, Joerg Roedel wrote:
> On Mon, Mar 10, 2025 at 04:43:59PM +0100, Alexey Gladkov wrote:
>> If in the /sys/hypervisor we have information for guest (for running under
>> a hypervisor), where do you propose to put the information for the
>> host-side (for running as a hypervisor) ?
>
> Okay, so let's not mix things up too much here. The only (upstream) case
> where Linux _is_ the hypervisor is when running KVM guests. What
> information needs to be provided for this case in SYSFS that is not
> already provided elsewhere, e.g. by the KVM modules or, in case of SEV,
> by /dev/sev? What does Intel expose for TDX?
>
> Back to the guest-side, I agree with introducing a new directory in
> SYSFS with sub-directories for each detected hypervisor. To maximise
> confusion, it can be called '/sys/hypervisors/', or just /sys/guest/ (as
> Boris suggested).

I can live with that, as long as we make it possible to make e.g.
/sys/guest/xen a link to /sys/hypervisor (if xen is the hypervisor
the guest is directly running on). This means that /sys/guest/*/type
should not conflict with /sys/hypervisor/type.

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 --]