[PATCH] vvmx: Handle INVVPID_SINGLE_CONTEXT_RETAINING_GLOBAL properly

Teddy Astie posted 1 patch 2 days, 3 hours ago
xen/arch/x86/hvm/vmx/vvmx.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] vvmx: Handle INVVPID_SINGLE_CONTEXT_RETAINING_GLOBAL properly
Posted by Teddy Astie 2 days, 3 hours ago
The feature is already advertised in NVPID_CAP_BITS, yet the handling
in nvmx_handle_invvpid() was missing.

Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
Fixes: 9ccf55307868 ("nVMX: virutalize VPID capability to nested VMM")
---
 xen/arch/x86/hvm/vmx/vvmx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index e2407f07c2..9be8b0067f 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2053,6 +2053,7 @@ static int nvmx_handle_invvpid(struct cpu_user_regs *regs)
     case INVVPID_INDIVIDUAL_ADDR:
     case INVVPID_SINGLE_CONTEXT:
     case INVVPID_ALL_CONTEXT:
+    case INVVPID_SINGLE_CONTEXT_RETAINING_GLOBAL:
         hvm_asid_flush_vcpu_asid(&vcpu_nestedhvm(current).nv_n2asid);
         break;
     default:
-- 
2.55.0



-- 
Teddy Astie | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech
Re: [PATCH] vvmx: Handle INVVPID_SINGLE_CONTEXT_RETAINING_GLOBAL properly
Posted by Jan Beulich 2 hours ago
On 22.09.2026 16:50, Teddy Astie wrote:
> The feature is already advertised in NVPID_CAP_BITS, yet the handling
> in nvmx_handle_invvpid() was missing.
> 
> Signed-off-by: Teddy Astie <teddy.astie@vates.tech>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

> Fixes: 9ccf55307868 ("nVMX: virutalize VPID capability to nested VMM")

I think it's its immediate successor, aa1b9dfdff9c ("nEPT: Expose EPT & VPID
capablities to L1 VMM"). Without NVPID_CAP_BITS defined / used, there's no
bug there.

Jan