[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 2/5] x86/nestedsvm: remove nv_vmentry_pending


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: chunjie.zhu@xxxxxxxxxx
  • Date: Wed, 23 Sep 2026 17:20:42 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GntJNyGKX+o72A97gHkQ6+ZdCb8ar/MTVXAUW4MR3h4=; b=MXvwLgbKAsQEiCq6AyTGQHXkLc9jGjIsi06DD0+yVRBJho37cuGASW0JwJzPnMF2SS5FLfeKrKEDZ3noCbIB+VxjDwr+pi+iuEu1do4Ae9yZmOM5o/zO/dLeT35jOjHGMzwOvTZMqdQfw1Sp1Vurjju89C4Kl69kYRirKdeZKa9dcFiNNE06oWZ+O/VJuKC/z3KZKsIONOm5+T2Bk2EUv6v9E0EwTApji4CLxQ9fCUGDgbJG9C/PJoTAAT8VS43Yd/6M81Drf3UlHJ68ofNMbXbqmG6G5VI774rjlLPam2XQ00t1sfYNFgb0jo+5/CmY/cmuGR/claVYFEvkWsVphA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=y7hxGjT1n4EHplx1pcSXpP8ynOLsMTtTW44XPM1nXzjP+s7UfPguNaG/hTvK63cubGNTLJWziDycReNVna3b8zMpq5Uz7uyweYyh9uOjpr63Qx17dgVVEq+OUGQ8qHk7rwK853kKlCQdaoclYUMf9NqTzemq5qpFi9cWAszWrJB9tz5tM1yFW8hQRW+Gfp0MlCyhBewbu9yI7D/l8zdZHxCUt4IKtZQGQPHSR5wL7n4ltMFnrs9AljCo9HcjsujrsukO5SemicEAd7CZvHW+SeTHovBPDfHc9x3uWEHUFcEV381W1OHGdiBvFcfusfFjhfkAokBh1IR1jTB5cIZWDw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-Id:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: jbeulich@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger@xxxxxxxxxxxxxx, jason.andryuk@xxxxxxx, teddy.astie@xxxxxxxxxx, Chunjie Zhu <chunjie.zhu@xxxxxxxxxx>
  • Delivery-date: Wed, 23 Sep 2026 09:21:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Chunjie Zhu <chunjie.zhu@xxxxxxxxxx>

Signed-off-by: Chunjie Zhu <chunjie.zhu@xxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/intr.c      | 18 ------------------
 xen/arch/x86/hvm/svm/nestedsvm.c | 23 -----------------------
 2 files changed, 41 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/intr.c b/xen/arch/x86/hvm/svm/intr.c
index 4b0debfa9a2e..7f6cafb6db78 100644
--- a/xen/arch/x86/hvm/svm/intr.c
+++ b/xen/arch/x86/hvm/svm/intr.c
@@ -77,24 +77,6 @@ static void svm_enable_intr_window(struct vcpu *v, struct 
hvm_intack intack)
 
     ASSERT(intack.source != hvm_intsrc_none);
 
-    if ( nestedhvm_enabled(v->domain) )
-    {
-        struct nestedvcpu *nv = &vcpu_nestedhvm(v);
-
-        if ( nv->nv_vmentry_pending )
-        {
-            struct vmcb_struct *gvmcb = nv->nv_vvmcx;
-
-            /* check if l1 guest injects interrupt into l2 guest via vintr.
-             * return here or l2 guest looses interrupts, otherwise.
-             */
-            ASSERT(gvmcb != NULL);
-            intr = vmcb_get_vintr(gvmcb);
-            if ( intr.fields.irq )
-                return;
-        }
-    }
-
     TRACE(TRC_HVM_INTR_WINDOW, intack.vector, intack.source,
           vmcb->event_inj.v ? vmcb->event_inj.vector : -1);
 
diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index 171b32be2416..edb3f444756d 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -1433,31 +1433,8 @@ void asmlinkage nsvm_vcpu_switch(void)
     vmexit:
         nestedsvm_vcpu_vmexit(v, regs, svm->ns_vmexit.exitcode);
         nv->nv_vmexit_pending = 0;
-        nv->nv_vmentry_pending = 0;
         return;
     }
-
-    if ( nv->nv_vmentry_pending )
-    {
-        int ret;
-        ASSERT(!nv->nv_vmexit_pending);
-        ret = nsvm_vcpu_vmrun(v, regs);
-        if ( ret )
-            goto vmexit;
-
-        ASSERT(nestedhvm_vcpu_in_guestmode(v));
-        nv->nv_vmentry_pending = 0;
-    }
-
-    if ( nestedhvm_vcpu_in_guestmode(v) && nestedhvm_paging_mode_hap(v) )
-    {
-        /* In case left the l2 guest due to a physical interrupt (e.g. IPI)
-         * that is not for the l1 guest then we continue running the l2 guest
-         * but check if the nestedp2m is still valid.
-         */
-        if ( nv->nv_p2m == NULL )
-            nestedsvm_vmcb_set_nestedp2m(v, nv->nv_vvmcx, nv->nv_n2vmcx);
-    }
 }
 
 /* Interrupts, Virtual GIF */
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.