Re: [PATCH] x86/sev: Make SEV_STATUS available via SYSFS
From: Alexey Gladkov
Date: Mon Mar 10 2025 - 12:05:28 EST
On Mon, Mar 10, 2025 at 04:52:37PM +0100, Juergen Gross wrote:
> On 10.03.25 16:43, Alexey Gladkov wrote:
> > On Mon, Mar 10, 2025 at 04:33:08PM +0100, Jürgen Groß wrote:
> >> On 10.03.25 16:11, Borislav Petkov wrote:
> >>> On Mon, Mar 10, 2025 at 03:50:09PM +0100, Alexey Gladkov wrote:
> >>>> Am I understand correctly that you and Joerg are proposing
> >>>>
> >>>> /sys/guest/tdx/...
> >>>> /sys/guest/sev/...
> >>>>
> >>>> ?
> >>>>
> >>>> Which path to use for the host side ?
> >>>>
> >>>> For guest: /sys/coco/guest/{tdx,sev}/...
> >>>> For host: /sys/coco/host/{tdx,sev}/...
> >>>>
> >>>> Maybe it would be better to add the "coco" subdirectory or something like
> >>>> that ?
> >>>
> >>> Hmm, so we can do
> >>>
> >>> /sys/guest
> >>>
> >>> and extend
> >>>
> >>> /sys/hypervisor
> >>>
> >>> Or we can do what you're suggesting.
> >>>
> >>> If we do /sys/coco/host, then we'll have two different places to read HV info.
> >>>
> >>> Or we can stick *everything* coco needs in
> >>>
> >>> /sys/coco/{sev,tdx}
> >>>
> >>> but then it is coco-specific and if other guest types want to put stuff in
> >>> sysfs, it'll get ugly.
> >>>
> >>> So I guess having
> >>>
> >>> /sys/guest
> >>> and
> >>> /sys/hypervisor
> >>>
> >>> kinda keeps it all clean, hierarchy-wise...
> >>>
> >>> Right?
> >>
> >> Kind of.
> >>
> >> /sys/hypervisor is meant to provide data for running under a hypervisor.
> >>
> >> It is NOT meant to provide data for running as a hypervisor.
> >>
> >> So far when running either under Xen or under z/VM /sys/hypervisor is being
> >> populated.
> >>
> >> I'm not feeling really strong here. I just want to state the status quo.
> >
> > OK, so I misunderstood.
> >
> > 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) ?
> >
>
> /sys/kvm/ might be a good fit when using KVM?
As far as I can see /sys/hypervisor should contain information about both
host-side and guest-side. If of course we would use the same files as
described in the ABI xen team.
Why do we need /sys/kvm/{tdx,sev}/ ?
I keep mentioning tdx and sev because they will have a different set of
files.
--
Rgrds, legion