public inbox for linux-coco@lists.linux.dev
 help / color / mirror / Atom feed
* "Paravisor" Feature Enumeration
@ 2026-01-05 21:42 Dave Hansen
  2026-01-06  0:01 ` dan.j.williams
  2026-01-06  1:44 ` Andrew Cooper
  0 siblings, 2 replies; 17+ messages in thread
From: Dave Hansen @ 2026-01-05 21:42 UTC (permalink / raw)
  To: Lange, Jon
  Cc: Williams, Dan J, Sean Christopherson, Paolo Bonzini, john.starks,
	Will Deacon, Mark Rutland, linux-coco@lists.linux.dev, LKML,
	Kirill A. Shutemov, Edgecombe, Rick P, Andrew Cooper

First,

Jon and John gave a talk in Tokyo about feature enumeration under
paravisors:

> https://lpc.events/event/19/contributions/2188/attachments/1896/4057/05-Paravisor-Integration-with-Confidential-Services.pdf

The tl;dr for me at least was that they'd like a common and consistent
means of enumerating these features in OSes, regardless of the
environment: TDX, SEV-SNP or even ARM CCA.

I wanted to explore one corner of the solution space a bit. There was a
pretty limited audience of folks in the room. Please feel free to flesh
out the cc list with anyone I missed.

Dan Williams' first thought seemed to revolve around having some kind of
platform-independent device that could do the enumeration. Maybe a
synthetic PCI device. I'm sure Dan can chime in to fill in the details
that I missed.

I immediately just thought of CPUID. We already have a whole region of
CPUID (0x40000000) that hypervisors use to enumerate stuff to guests by
convention. It wouldn't be a large leap at all to carve out a chunk of
that so that paravisors can use it.

But the biggest barrier I see there is that our ARM friends don't have
CPUID. It seems like they _mostly_ have bit-by-bit aliases in ACPI or
DeviceTree for the x86 CPUID bits, like:

	X86_FEATURE_KVM_CLOCKSOURCE in arm,pvclock
or
	X86_FEATURE_KVM_STEAL_TIME  in arm,kvm-steal-time

As far as I can tell, these aliases are all done ad-hoc. This approach
could obviously be extended to paravisor features, but it would probably
be on the slow side to do it for each new feature.

It _seems_ like we could pick a chunk of CPUID space (say 32-bits of it)
and alias it 1:1 with some DeviceTree/ACPI property, say
"arm,paravisor-features". Kernel code would just be written to say
"check feature 13" and the arch-specific helpers would either steer that
to CPUID or DeviceTree.

Is there anything like that today that's cross-architecture and
cross-hypervisor? Is there anything stopping us from carving out a chunk
of CPUID for this purpose?

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-01-08  6:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05 21:42 "Paravisor" Feature Enumeration Dave Hansen
2026-01-06  0:01 ` dan.j.williams
2026-01-06  0:10   ` [EXTERNAL] " Jon Lange
2026-01-06  0:46     ` Dave Hansen
2026-01-06  0:36   ` Dave Hansen
2026-01-06  1:08     ` Sean Christopherson
2026-01-06  3:24     ` dan.j.williams
2026-01-06  1:44 ` Andrew Cooper
2026-01-06  2:12   ` [EXTERNAL] " Jon Lange
2026-01-06 22:39     ` Andrew Cooper
2026-01-06 23:01       ` Jon Lange
2026-01-07  1:58         ` dan.j.williams
2026-01-07  2:48           ` Jon Lange
2026-01-07 18:42             ` dan.j.williams
2026-01-08  6:53               ` Jon Lange
2026-01-07 12:06       ` Kiryl Shutsemau
2026-01-06 19:17   ` Edgecombe, Rick P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox