From nobody Mon May 6 23:05:21 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 ARC-Seal: i=1; a=rsa-sha256; t=1577201642; cv=none; d=zohomail.com; s=zohoarc; b=EMo0BHDx3HcoggsrSi9Gu/H1EpnA+GBasQclpkPHpJD2d6EUpSTAJqtRjPS6FOYoC71dfxLDSirD6bAOmrT3EEv29rmpidDQgqenWWKClLrI6Wb3UZ2lhwPT1IE9SH186MzVo0e2IhfeQymMURnjsaHnN5PLA3FZ3q7Bg09iGsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1577201642; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=fn4h0+1qtJZTtTkCN93290tV9sizlh3Fj7fbZBHMnTM=; b=EGvjnPcYFQD4vPU/Xdi3ExbNLD1WgMwHmfwD5OCEGzFzJ553ITO3ak7So0NMNn9756c0ytgicF+eKUTVWLEIRbjOMm68XE4PhopvsgFGEdImHI38RgpHDbSnk5O3ltlxYCpeOsmm5nmUzLKzNxiG8TCAk1wrrjPyZkF3u+pxRuY= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1577201642866552.8990098210652; Tue, 24 Dec 2019 07:34:02 -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 1ijmBG-0002hC-Sf; Tue, 24 Dec 2019 15:33:06 +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 1ijmBF-0002h4-Gh for xen-devel@lists.xenproject.org; Tue, 24 Dec 2019 15:33:05 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id acd1902c-2662-11ea-97e9-12813bfff9fa; Tue, 24 Dec 2019 15:33:04 +0000 (UTC) X-Inumbo-ID: acd1902c-2662-11ea-97e9-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1577201585; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=RXK7BbFDJfC64/cz30084h1kX9xgSsy4hy45nLMyDU0=; b=fjysLmxiLqKYi10Bhu2tl9Fhbny/MDi774nCmRHZc/uFVbOh87E4TlB9 FkE2ZAH3TnPBmyuzHx0Xcvlg6VHbFbLPWOJU82ocePGldAWqJgDsSO2fo v63Hwu9W4GMbpYLVpcRv4vSSOFukwldyARvITfxdZaGq8Q7FVIywooII0 k=; Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: V8TiLkbhbmmBn6vr+hDt0Tz4Gc8QORbSkrDnsSqdL+QkP4dtC8VlI7VHHmdgqHmcV27s69aWnn fD5FhmiNjeM8d7/9gu4q5Us+zMwaCxL8St1kdTLJyG1PSzhyikN0BthuYKFSuEahZK/3Auy0Pa 8FLE29j3EXWJwLc3DOlFNLWB9kWlkvwqz2/yYrN7wBDDKRzZVL0xGYUkRY4HUkJWbUbKK6+WvH KXaOuXVRiVHxvrOEtYU0ZecvxegWUQP46sIdGMFS/6QdeN6jXsI5Emr5taCRhNGBaRhkN87kwN qXU= X-SBRS: 2.7 X-MesageID: 10267472 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,351,1571716800"; d="scan'208";a="10267472" From: Roger Pau Monne To: Date: Tue, 24 Dec 2019 16:32:47 +0100 Message-ID: <20191224153247.48228-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/vvmx: virtualize x2APIC mode and APIC accesses can't both be enabled 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 , Jan Beulich , 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) According to the Intel SDM, "virtualize x2APIC mode" and "virtualize APIC accesses" can't be enabled at the same time, or else a vm{launch/entry} failure will happen. This was seen when running Xen nested and with x2APIC enabled: Dec 23 20:06:54.444025 (XEN) d3v0 VMLAUNCH error: 0x7 [...] Dec 23 20:08:33.004078 (XEN) *** Control State *** Dec 23 20:08:33.004086 (XEN) PinBased=3D0000003f CPUBased=3Db6a075fe Second= aryExec=3D000014fb [...] Fix this by making sure nvmx_update_secondary_exec_control clears the incompatible bits from the host vmcs before merging it with the nested vmcs. This fixes a regression reported by osstest in the test-amd64-amd64-qemuu-nested-intel job. Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Andrew Cooper --- 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 5dd00e11b5..d8ab167d62 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -594,6 +594,7 @@ void nvmx_update_secondary_exec_control(struct vcpu *v, u32 shadow_cntrl; struct nestedvmx *nvmx =3D &vcpu_2_nvmx(v); u32 apicv_bit =3D SECONDARY_EXEC_APIC_REGISTER_VIRT | + SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE | SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY; =20 host_cntrl &=3D ~apicv_bit; --=20 2.24.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel