Re: [PATCH] x86/svm: require VMSAVEvirt for nested virt

Stephen Cheng <[email protected]> Thu, 30 Jul 2026 10:37:15 +0800
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <[email protected]>
On 28/07/2026 10:03, Jan Beulich wrote:
> But the functions you drop aren't needed just for older parts. They're also
> going to be needed when the insn emulator hits these insns. This still is
> in need of properly wiring up, but imo we better wouldn't delete code which
> is going to be needed later on.

Fair enough.  I've talked this over with Andrew and he makes the same
point -- the emulator needs VMLOAD/VMSAVE wired up for reasons that go
beyond older parts.  I'll drop the removal.

Worth noting for the record that the handlers become unreachable in
practice, since svm_nested_features_on_efer_update() clears the
VMLOAD/VMSAVE intercepts whenever the guest sets EFER.SVME.  They sit
dormant until the emulator work picks them up.  Keeping them or
removing them makes no behavioural difference.

Ross -- this reverses your suggestion to fold VMEXIT_VMLOAD and
VMEXIT_VMSAVE into the VMEXIT_RDPRU #UD group, as that only works if
the handlers go away.

I'll submit a v2 patch soon.
Thanks all for the review.

Stephen