From nobody Fri May 3 09:25:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580732405037841.8338411320185; Mon, 3 Feb 2020 04:20:05 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iyahU-0007v7-QK; Mon, 03 Feb 2020 12:19:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iyahT-0007uM-CP for xen-devel@lists.xenproject.org; Mon, 03 Feb 2020 12:19:35 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6e27ee38-467f-11ea-ad98-bc764e2007e4; Mon, 03 Feb 2020 12:19:31 +0000 (UTC) X-Inumbo-ID: 6e27ee38-467f-11ea-ad98-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1580732371; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dvQW9MIsyWDQY5I+Bv2ITSBB5rrdAmVHJebyr3CDIl0=; b=cgB13nzCFCPl+TBdc0J27BafLTBaRtorHA7a3Zz7jDz7OQeMI6s7rbiO jWYd6mVI/t5POop4NlpjxaAEdOeeuX6uXhhiukV/L025vsHN3l/pC1+yw glhWQkv7YD4bjqytX4tmHlMiUpPPOMWAQqHo3vqwgawwDzd2PfYzh4HFM s=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: IGDWJU1o3O1XBPrhCZmkcJgvxkrr0tEI73RZ/BvEVXzKykK+NYk16u4Nmz+ewbEpj4HWvQDKNS 1HjhEtX37ukihXlgSK/7dFgk9liRLHDRbN3GCQ4ADhLZs+7CP1mZatWf/LyGWEXZ4jS/OwdYBJ rnZMauMa7Nt6ifhRpH6FRfyKBO8+EKuGnnIThnqWJEnoT6vI4kSZEUddsHu55F/kUyEnXYMn7v 6pw9saCXUBuSZBkmVsApI6tUzqjiP5Ln+mTevmbxBMQQ4qYYQUR3sDXmNIrwGYQemeduNII+up nvY= X-SBRS: 2.7 X-MesageID: 12208584 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,397,1574139600"; d="scan'208";a="12208584" From: Roger Pau Monne To: Date: Mon, 3 Feb 2020 13:19:16 +0100 Message-ID: <20200203121919.15748-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203121919.15748-1-roger.pau@citrix.com> References: <20200203121919.15748-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 1/4] x86/vvmx: fix virtual interrupt injection when Ack on exit control is used X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Kevin Tian , Jun Nakajima , Wei Liu , Andrew Cooper , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) When doing a virtual vmexit (ie: a vmexit handled by the L1 VMM) interrupts shouldn't be injected using the virtual interrupt delivery mechanism unless the Ack on exit vmexit control bit isn't set in the nested vmcs. Gate the call to nvmx_update_apicv helper on whether the nested vmcs has the Ack on exit bit set in the vmexit control field. Note that this fixes the usage of x2APIC by the L1 VMM, at least when the L1 VMM is Xen. Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Kevin Tian , with a small comment: --- Changes since v1: - Call nvmx_update_apicv if the "Ack on exit" vmexit control bit isn't set. --- xen/arch/x86/hvm/vmx/vvmx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index d8ab167d62..3d97a293b2 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1393,7 +1393,12 @@ static void virtual_vmexit(struct cpu_user_regs *reg= s) /* updating host cr0 to sync TS bit */ __vmwrite(HOST_CR0, v->arch.hvm.vmx.host_cr0); =20 - if ( cpu_has_vmx_virtual_intr_delivery ) + if ( cpu_has_vmx_virtual_intr_delivery && + /* + * Only inject the vector if the Ack on exit bit is not set, else= the + * interrupt will be signaled in the vmcs VM_EXIT_INTR_INFO field. + */ + !(get_vvmcs(v, VM_EXIT_CONTROLS) & VM_EXIT_ACK_INTR_ON_EXIT) ) nvmx_update_apicv(v); =20 nvcpu->nv_vmswitch_in_progress =3D 0; --=20 2.25.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri May 3 09:25:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580732405759259.99180790622154; Mon, 3 Feb 2020 04:20:05 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iyahT-0007uT-Gr; Mon, 03 Feb 2020 12:19:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iyahS-0007u9-Ed for xen-devel@lists.xenproject.org; Mon, 03 Feb 2020 12:19:34 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6f5af14c-467f-11ea-8e54-12813bfff9fa; Mon, 03 Feb 2020 12:19:33 +0000 (UTC) X-Inumbo-ID: 6f5af14c-467f-11ea-8e54-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1580732373; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+WP06psAabSWNj9MQ8yGgg2MdVrxR0ib/BtWDA94YBw=; b=Mnqdcq0zOtoyhgNAJA/0kNPzz48R0o49mXwOVqRksTGSYmuCryzIt9QH tNBO/3P1Bjkj9Z2e3nR53vkaaUc8HfkYS5U86yh7LCAFkIFrk1KC0Yv1E H5M5zb9M4OPozr8RNPfUTLqGEYpaM3lCbEJSS5cNa19cPD1nyPdqs7pxr I=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: BhbgsFz+l1CJ5jkN0fCJpPABZ5tgsBOnzFPY+Wvg7HLwD5B2tMK2b7MW/AEju+kugj4EJlN6Bm oPYzw/udmDKibeT5zBy0jVxTA+N5RpelRCiRsbDazPyMv5ZjukkK2LfT2oDf9XCqGyq5qYq7vv WWGRGaAhUryY1llvidZJn1j3O7udsT/ZOubOAwX+nVstMa4LFlZbBfhAMCgo5YwyrBOMfkxoY6 lQeVMlDf8D8dmBoryd4L0+amEJr5s/Ik9E7fghAOyV0nOTfoXO7usgZ+gxk1C44o+h4SqoGT+y Jqk= X-SBRS: 2.7 X-MesageID: 12457218 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,397,1574139600"; d="scan'208";a="12457218" From: Roger Pau Monne To: Date: Mon, 3 Feb 2020 13:19:17 +0100 Message-ID: <20200203121919.15748-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203121919.15748-1-roger.pau@citrix.com> References: <20200203121919.15748-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 2/4] x86/vvmx: fix VM_EXIT_ACK_INTR_ON_EXIT handling X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Kevin Tian , Jun Nakajima , Wei Liu , Andrew Cooper , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) When VM_EXIT_ACK_INTR_ON_EXIT is set in the vmexit control vmcs register the bit 31 of VM_EXIT_INTR_INFO must be 0, in order to denote that the field doesn't contain any interrupt information. This is not currently acknowledged as the field always get filled with valid interrupt information, regardless of whether VM_EXIT_ACK_INTR_ON_EXIT is set. Fix this and only fill VM_EXIT_INTR_INFO when VM_EXIT_ACK_INTR_ON_EXIT is not set. Note that this requires one minor change in nvmx_update_apicv in order to obtain the interrupt information from the internal state rather than the nested vmcs register. Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Kevin Tian --- Changes since v1: - New in this version. --- xen/arch/x86/hvm/vmx/vvmx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index 3d97a293b2..47eee1e5b9 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1283,6 +1283,7 @@ static void load_vvmcs_host_state(struct vcpu *v) static void sync_exception_state(struct vcpu *v) { struct nestedvmx *nvmx =3D &vcpu_2_nvmx(v); + uint32_t exit_ctrl =3D get_vvmcs(v, VM_EXIT_CONTROLS); =20 if ( !(nvmx->intr.intr_info & INTR_INFO_VALID_MASK) ) return; @@ -1294,7 +1295,8 @@ static void sync_exception_state(struct vcpu *v) set_vvmcs(v, VM_EXIT_REASON, EXIT_REASON_EXTERNAL_INTERRUPT); set_vvmcs(v, EXIT_QUALIFICATION, 0); set_vvmcs(v, VM_EXIT_INTR_INFO, - nvmx->intr.intr_info); + (exit_ctrl & VM_EXIT_ACK_INTR_ON_EXIT) ? nvmx->intr.intr= _info + : 0); break; =20 case X86_EVENTTYPE_HW_EXCEPTION: @@ -1320,7 +1322,7 @@ static void nvmx_update_apicv(struct vcpu *v) { struct nestedvmx *nvmx =3D &vcpu_2_nvmx(v); unsigned long reason =3D get_vvmcs(v, VM_EXIT_REASON); - uint32_t intr_info =3D get_vvmcs(v, VM_EXIT_INTR_INFO); + uint32_t intr_info =3D nvmx->intr.intr_info; =20 if ( reason =3D=3D EXIT_REASON_EXTERNAL_INTERRUPT && nvmx->intr.source =3D=3D hvm_intsrc_lapic && --=20 2.25.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri May 3 09:25:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580732408045553.51992334039; Mon, 3 Feb 2020 04:20:08 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iyahY-0007wj-6g; Mon, 03 Feb 2020 12:19:40 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iyahX-0007wJ-Eh for xen-devel@lists.xenproject.org; Mon, 03 Feb 2020 12:19:39 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6f5af14e-467f-11ea-8e54-12813bfff9fa; Mon, 03 Feb 2020 12:19:34 +0000 (UTC) X-Inumbo-ID: 6f5af14e-467f-11ea-8e54-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1580732374; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cwqcxcjbNmV5kHDMCXn9CishPL2oIgFCUnW0A+7RXmo=; b=HAFW4fYCKk5BFMiDj2YPDvP0Ijr7pOa1qcWkkQEbN5YotslG6GQjwT5A xyVawTwhEsNx/5JPbHZGJtpi1RhARLxv3CMP5GqoJe5sF7ryZ2wtbV+i6 lr8QYXve5VCxM7yj40a4sYHmi3Ugvo7vcLTVrNYsFjqvixfQdNiXVLbGc g=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: g8lPMXfP71FJSK0mnk4sOAnmHS7WmfPIDdqiYlK9xwwK2YakuUbZ8hgRfuqmq37eg+eJ9Hebrc bx7lkcBsFLSe0rMnU2ufSwsDU5rvk07ulQJBcV8zFDrIbtQs2BcN2JWDhjJNmtTJr9iFZN7cGY i8GMwBu8R2x2zqPbVLWDZjS1bpcT10QW1Z3qm6/MS/Bqvw0LdQWXJjNAn78wAkViHz3GRku9Lx YwbH1uVZMBmyzUR/VKknzC6/aGJ0MaPf1tFC6gumgZ3KcUKQxV1z5Y2Geg+KN0be0BjX4bPBMK JgA= X-SBRS: 2.7 X-MesageID: 12457221 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,397,1574139600"; d="scan'208";a="12457221" From: Roger Pau Monne To: Date: Mon, 3 Feb 2020 13:19:18 +0100 Message-ID: <20200203121919.15748-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203121919.15748-1-roger.pau@citrix.com> References: <20200203121919.15748-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 3/4] x86/vvmx: don't enable interrupt window when using virt intr delivery X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Kevin Tian , Jun Nakajima , Wei Liu , Andrew Cooper , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) If virtual interrupt delivery is used to inject the interrupt to the guest the interrupt window shouldn't be enabled, as the interrupt is already injected using the GUEST_INTR_STATUS vmcs field. Reported-by: Kevin Tian Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Kevin Tian --- Changes since v1: - New in this version. --- xen/arch/x86/hvm/vmx/intr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c index 2eaf3f8d36..49a1295f09 100644 --- a/xen/arch/x86/hvm/vmx/intr.c +++ b/xen/arch/x86/hvm/vmx/intr.c @@ -209,7 +209,7 @@ static int nvmx_intr_intercept(struct vcpu *v, struct h= vm_intack intack) if ( unlikely(intack.source !=3D hvm_intsrc_none) ) vmx_enable_intr_window(v, intack); } - else + else if ( !cpu_has_vmx_virtual_intr_delivery ) vmx_enable_intr_window(v, intack); =20 return 1; --=20 2.25.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri May 3 09:25:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580732416600132.97424263250434; Mon, 3 Feb 2020 04:20:16 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iyahd-0007zg-PC; Mon, 03 Feb 2020 12:19:45 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iyahc-0007z1-Eu for xen-devel@lists.xenproject.org; Mon, 03 Feb 2020 12:19:44 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 7115f95a-467f-11ea-8e54-12813bfff9fa; Mon, 03 Feb 2020 12:19:36 +0000 (UTC) X-Inumbo-ID: 7115f95a-467f-11ea-8e54-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1580732377; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0WFGWs7bnCUX3PGUbgIKTPEtr3wdb9zvoaxW+GaHoQA=; b=ZeyZpkMdhreBdWZH1Nax3zmOqrf2jzkw+mBgsX4XCqTJaD+OQT4wwrzl X9E9j50cAtbYUYGM83zlrryIr3mKx+iusxJr5I3VzpV81gQJCc2FHgdZa DA+J44wr5KKNQ1PjMb63Qoxjbwm2FBGJGPbLokwh0/9v3+AXw/hDcBtC0 4=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: me0qNDIzNnO8i9ku/mnoZSuYM1m9QbFkUvBQPbVdE9kQZ+Cm8Cdp/02CHRzdilRYuyWEvtDI6Z 93le3OxuxWHKLrqNctY7z5fQtmOCmoD3r48Ai31Z8GjVRAajFoZxs7OAhQIdUhUFyVmL0lk+cE fZWIbY+pL8cpj1Zu3GNS19pcv3yabXOZA/eEd4r6Rp+6ZnX+Oa1Y1Rcd8qigJ7tUlHhgAZ23m5 G6p5tWtJ4Fx2klj1+8241hT3xEUm0dZR6gEin0poUQpYz2Xi63lXf4iXIPlnbHSxfczcoA73oP Q4Q= X-SBRS: 2.7 X-MesageID: 11851700 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,397,1574139600"; d="scan'208";a="11851700" From: Roger Pau Monne To: Date: Mon, 3 Feb 2020 13:19:19 +0100 Message-ID: <20200203121919.15748-5-roger.pau@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203121919.15748-1-roger.pau@citrix.com> References: <20200203121919.15748-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 4/4] Revert "tools/libxc: disable x2APIC when using nested virtualization" X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson , Wei Liu , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This reverts commit 7b3c5b70a32303b46d0d051e695f18d72cce5ed0 and re-enables the usage of x2APIC with nested virtualization. Signed-off-by: Roger Pau Monn=C3=A9 Acked-by: Wei Liu --- tools/libxc/xc_cpuid_x86.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index ac38c1406e..2540aa1e1c 100644 --- a/tools/libxc/xc_cpuid_x86.c +++ b/tools/libxc/xc_cpuid_x86.c @@ -653,17 +653,6 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t = domid, p->extd.itsc =3D true; p->basic.vmx =3D true; p->extd.svm =3D true; - - /* - * BODGE: don't announce x2APIC mode when using nested virtualizat= ion, - * as it doesn't work properly. This should be removed once the - * underlying bug(s) are fixed. - */ - rc =3D xc_hvm_param_get(xch, domid, HVM_PARAM_NESTEDHVM, &val); - if ( rc ) - goto out; - if ( val ) - p->basic.x2apic =3D false; } =20 rc =3D x86_cpuid_copy_to_buffer(p, leaves, &nr_leaves); --=20 2.25.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel