[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <695ea905645a0_4b7a1008e@dwillia2-mobl4.notmuch>
Date: Wed, 7 Jan 2026 10:42:13 -0800
From: <dan.j.williams@...el.com>
To: Jon Lange <jlange@...rosoft.com>, "dan.j.williams@...el.com"
<dan.j.williams@...el.com>, Andrew Cooper <andrew.cooper3@...rix.com>, "Dave
Hansen" <dave.hansen@...el.com>
CC: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>, John Starks <John.Starks@...rosoft.com>, Will Deacon
<will@...nel.org>, Mark Rutland <mark.rutland@....com>,
"linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>, LKML
<linux-kernel@...r.kernel.org>, "Edgecombe, Rick P"
<rick.p.edgecombe@...el.com>
Subject: RE: [EXTERNAL] Re: "Paravisor" Feature Enumeration
Jon Lange wrote:
> Dan W wrote:
>
> > It sounds like the paravisor is going to hide confidential memory
> > management details like page-acceptance, but it is going to advertise
> > and intercept higher order operations like generate launch attestation
> > report and TDISP paths like lock device, get device report, accept/run
> > device.
>
> I think that's roughly the right mental model. The paravisor will
> additionally hide confidential details like MSR virtualization, I/O
> and MMIO handling, CPUID virtualization - all of the sorts of things
> that would generate #VE/#VC exceptions in a fully enlightened guest so
> that the guest doesn't have to worry about those, and the paravisor
> can provide useful functionality (like device emulation or
> hypervisor-type functionality) through those primitives.
Ah, anything that causes #VE/#VC helps, thanks.
> > So does this paravisor need low level intercepts via pv_ops and a
> > confidential memory-management model independent of TDX/SNP etc? Or,
> > does it only need the higher order common "services" like attestation
> > and TDISP.
>
> I'm not following your question - I don't understand what you're
> envisioning when you describe confidential memory management
> independent of TDX/SNP. It is the case that the paravisor is
> responsible for the confidentiality state of all memory, and therefore
> it will have some implementation to fulfill this responsibility. It's
> natural for it to do so because its own operation has to integrate
> with the state of memory. Following my earlier analogy that the
> paravisor acts like a nested hypervisor for a single (confidential)
> guest, the paravisor itself will have to implement all of the services
> necessary to satisfy the virtualization requirements of an
> unenlightened guest, which is far more than the "common services" that
> you mention. Can you give some other examples of the sort of
> distinction you're trying to highlight?
So, I was trying to get to the actual ops that need to be intercepted,
and whether every operation that this paravisor wants to intercept
already has an existing indirection or what new indirections need to be
built. This probably becomes clearer when you have some time to build an
RFC, but the array of operations to touch exceeds traditional paravirt
hooks.
So, for example, paravirt ops do handle MSR virtualization:
struct pv_cpu_ops {
...
u64 (*read_msr)(u32 msr);
void (*write_msr)(u32 msr, u64 val);
...
};
Other operations are outside of paravirt hooks but do have generic
abstractions, like these for encrypted memory:
struct x86_guest {
int (*enc_status_change_prepare)(unsigned long vaddr, int npages, bool enc);
int (*enc_status_change_finish)(unsigned long vaddr, int npages, bool enc);
bool (*enc_tlb_flush_required)(bool enc);
bool (*enc_cache_flush_required)(void);
void (*enc_kexec_begin)(void);
void (*enc_kexec_finish)(void);
};
For attestation operations this effort would need to register its own
tsm_report interface:
tsm_report_register(...)
...and for TDISP it would probably need to register its own TSM device:
struct_group_tagged(pci_tsm_devsec_ops, devsec_ops,
struct pci_tsm *(*lock)(struct tsm_dev *tsm_dev,
struct pci_dev *pdev);
void (*unlock)(struct pci_tsm *tsm);
int (*accept)(struct pci_dev *pdev);
);
So my curiosity is whether there are other operations to capture that
are buried deeper in the arch implementations that do not have
abstractions today. Again, that is probably best addressed by an RFC
implementation.
Powered by blists - more mailing lists