public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Gladkov <legion@kernel.org>
To: Joerg Roedel <joro@8bytes.org>
Cc: "Alexey Gladkov (Intel)" <alexey.gladkov@intel.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Borislav Petkov <bp@alien8.de>, Joerg Roedel <jroedel@suse.de>,
	Ingo Molnar <mingo@kernel.org>,
	x86@kernel.org, hpa@zytor.com,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Nikunj A Dadhania <nikunj@amd.com>,
	linux-kernel@vger.kernel.org, Larry.Dewey@amd.com
Subject: Re: [PATCH] x86/sev: Make SEV_STATUS available via SYSFS
Date: Mon, 10 Mar 2025 12:24:01 +0100	[thread overview]
Message-ID: <Z87L0bRi8tcAIsDw@example.org> (raw)
In-Reply-To: <Z86-3n1-MArVLM9Z@8bytes.org>

On Mon, Mar 10, 2025 at 11:28:46AM +0100, Joerg Roedel wrote:
> On Thu, Mar 06, 2025 at 11:37:28AM +0100, Alexey Gladkov (Intel) wrote:
> > I was thinking to suggest something like that
> > 
> > /sys/firmware/coco/tdx/...
> > /sys/firmware/coco/sev/...
> 
> So on a second thought I'd like to vote for the /sys/hypervisor/
> hierarchy. The `firmware` term is a bit amibious here, the TDX module
> can be seen as a kind of firmware for the guest OS, but realistically it
> is more like another hypervisor sitting between KVM and the guest.
> 
> Also the settings on the SEV side that need to be exposed (VMPL and
> SEV_STATUS) are CPU properties, but on the other side also set by some
> form of hypervisor (either KVM/QEMU, the SVSM, or some other paravisor
> in-between).
> 
> Overall /sys/hypervisor/ seems to be the best-fitting location for all
> this data. To avoid ambiguation I propose:
> 
> 	/sys/hypervisor/common/[coco/]tdx/
> 	/sys/hypervisor/common/[coco/]sev/

The /sys/hypervisor requires CONFIG_SYS_HYPERVISOR=y. Now, this parameter
is not required for the minimum TDX guest configuration.

As I can see right now [1] this directory is used exclusively by xen team.
It's part of their ABI stable. I'm not sure we can go in there.

/sys/hypervisor/compilation/compile_date
/sys/hypervisor/compilation/compiled_by
/sys/hypervisor/compilation/compiler
/sys/hypervisor/properties/capabilities
/sys/hypervisor/properties/changeset
/sys/hypervisor/properties/features
/sys/hypervisor/properties/pagesize
/sys/hypervisor/properties/virtual_start
/sys/hypervisor/type
/sys/hypervisor/uuid
/sys/hypervisor/version/extra
/sys/hypervisor/version/major
/sys/hypervisor/version/minor
/sys/hypervisor/start_flags/*
/sys/hypervisor/guest_type
/sys/hypervisor/pmu/pmu_mode
/sys/hypervisor/pmu/pmu_features
/sys/hypervisor/properties/buildid

[1] Documentation/ABI/stable/sysfs-hypervisor-xen

> Using `common` makes it clear that this directory does not point to some
> sort of Hypervisor, but to data common to all hypervisors. Using another
> `coco` subdirectory is not necessary in my view, but if people think it
> should exist I am fine with that.
> 
> Is this something we can agree on?
> 
> Regards,
> 
> 	Joerg

-- 
Rgrds, legion


  parent reply	other threads:[~2025-03-10 11:24 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 10:52 [PATCH] x86/sev: Make SEV_STATUS available via SYSFS Joerg Roedel
2025-03-05 11:11 ` [tip: x86/sev] " tip-bot2 for Joerg Roedel
2025-03-05 11:12 ` [PATCH] " Borislav Petkov
2025-03-05 11:26   ` Ingo Molnar
2025-03-05 11:31     ` Borislav Petkov
2025-03-05 11:35       ` Juergen Gross
2025-03-05 11:41         ` Borislav Petkov
2025-03-05 11:48           ` Jürgen Groß
2025-03-05 11:53             ` Borislav Petkov
2025-03-05 11:42       ` Ingo Molnar
2025-03-05 11:50         ` Borislav Petkov
2025-03-05 13:56           ` Joerg Roedel
2025-03-05 15:37             ` Borislav Petkov
2025-03-05 16:37               ` Dave Hansen
2025-03-05 16:40               ` Dave Hansen
2025-03-05 16:55                 ` Borislav Petkov
2025-03-05 17:09                   ` Dave Hansen
2025-03-05 17:51                     ` Joerg Roedel
2025-03-05 20:07                     ` Borislav Petkov
2025-03-06  8:01                 ` Kirill A. Shutemov
2025-03-06  8:38                   ` Joerg Roedel
2025-03-06 10:31                     ` Borislav Petkov
2025-03-06 13:36                       ` Kirill A. Shutemov
2025-03-06 13:56                         ` Borislav Petkov
2025-03-06 10:37                     ` Alexey Gladkov (Intel)
2025-03-10 10:28                       ` Joerg Roedel
2025-03-10 11:02                         ` Borislav Petkov
2025-03-10 12:46                           ` Joerg Roedel
2025-03-10 13:36                             ` Borislav Petkov
2025-03-10 11:24                         ` Alexey Gladkov [this message]
2025-03-10 12:28                           ` Juergen Gross
2025-03-10 12:35                             ` Joerg Roedel
2025-03-10 12:49                               ` Juergen Gross
2025-03-10 13:38                                 ` Borislav Petkov
2025-03-10 14:39                                   ` Tom Lendacky
2025-03-10 14:50                                   ` Alexey Gladkov
2025-03-10 15:11                                     ` Borislav Petkov
2025-03-10 15:33                                       ` Jürgen Groß
2025-03-10 15:41                                         ` Borislav Petkov
2025-03-10 15:50                                           ` Alexey Gladkov
2025-03-10 15:43                                         ` Alexey Gladkov
2025-03-10 15:52                                           ` Juergen Gross
2025-03-10 15:55                                             ` Borislav Petkov
2025-03-10 16:00                                               ` Juergen Gross
2025-03-10 16:06                                                 ` Borislav Petkov
2025-03-10 16:23                                                   ` Jürgen Groß
2025-03-10 16:05                                             ` Alexey Gladkov
2025-03-11  9:43                                           ` Joerg Roedel
2025-03-11 10:22                                             ` Jürgen Groß
2025-03-11 11:07                                               ` Borislav Petkov
2025-03-11 11:14                                                 ` Juergen Gross
2025-03-11 18:24                                                 ` Alexey Gladkov
2025-03-11 18:40                                                   ` Joerg Roedel
2025-03-11 20:37                                                     ` Alexey Gladkov
2025-03-12  7:19                                                     ` Kirill A. Shutemov
2025-03-12  8:23                                                       ` Joerg Roedel
2025-03-12  8:48                                                         ` Kirill A. Shutemov
2025-03-12  9:07                                                           ` Joerg Roedel
2025-03-12 10:59                                                             ` Kirill A. Shutemov
2025-03-12 11:44                                                               ` Joerg Roedel
2025-03-11 18:13                                             ` Alexey Gladkov
2025-03-05 13:50 ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z87L0bRi8tcAIsDw@example.org \
    --to=legion@kernel.org \
    --cc=Larry.Dewey@amd.com \
    --cc=alexey.gladkov@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=joro@8bytes.org \
    --cc=jroedel@suse.de \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nikunj@amd.com \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox