From nobody Sun May 19 03:12:52 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.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=1574331601; cv=none; d=zoho.com; s=zohoarc; b=W5iaD6OWzP6hZd/7KieXI7K06bz1MMH7imaEd9OHzr8bc7KZOcEvILH624yYPw6GJKITnKoGlUH1PLbTudjY8nyiIYYbHExsUT7gyxrka7YOBjfc31RsSPwZq8ADwnYdfvssSWvE5sEbCU4pMHl4b3wqH6u5o03VhSP8elYEsL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574331601; 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=kQ0nxkl+x4fAFkhceSzVPs64SuzQ0DQueSbdohrKbMo=; b=DZYRHAzwZDw6iOSG+bfyyJ0Axg9BiJl2cSrXDDy5/hCkcgbxwZxwuvQt/wG+aLOfR7/pty6UHPq96DcVDvJ5+OI3cQ4xp1AGSZSZmhle7kQFzj+HKmAyYbIWLbMrxuhCsl5yhUYf2/N9mJa0B9okOvnlxJDJgTWTM/4Ek1DDZTg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.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 1574331601184952.3436808549403; Thu, 21 Nov 2019 02:20:01 -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 1iXjYT-0003wE-79; Thu, 21 Nov 2019 10:19:17 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iXjYR-0003w9-KT for xen-devel@lists.xenproject.org; Thu, 21 Nov 2019 10:19:15 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5df31d38-0c48-11ea-b678-bc764e2007e4; Thu, 21 Nov 2019 10:19:14 +0000 (UTC) X-Inumbo-ID: 5df31d38-0c48-11ea-b678-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1574331555; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=x/JGpG39DfpKhBur1pJPt3SqA0ktBe9gMyJSwPG2uBg=; b=BxjJX2z+bZrZk5Th/nmXeLiTon3FOp9fWbe0UWwYEtXPNez69i2hR4UK eMnMAkwCF91XQDJ/GoZCNVRQNkg/dHlh2guP+EjT/3b4h2MHYImF/a9UJ +xnk7BxT1Ntovtis6ckI0D+7V4F/n2LmGYRxOAzdSoLgB194yUh6UYBju E=; 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 (zoho.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: nXhawkTx5ibZoIqmd6fVMvCywa6TxPaB9oBrKVoKpLU66HACIWQ0gTgb1SPKlndMeNsWg79J2u ATK2Edb14G/ETD4cx2JtbMQYIa3X9FZmpYzWvonbC5n+rIRC83afJRAIV2Yw6cc32fjSIstlMO nJRFNhG1kf5Is7sodIbMmfl5tigfxGZtcKVqfrq46mMzs65lVxqiHc/4FYnpwDefqhCce2S63F n9kuoxmBWe1ljkP1hp8ksLhEzkhUT+E0eoRrVw4r9cQk3hanxSWjhnsJMMQn807/D8a3rfBEqS aOQ= X-SBRS: 2.7 X-MesageID: 8762668 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,224,1571716800"; d="scan'208";a="8762668" From: Roger Pau Monne To: Date: Thu, 21 Nov 2019 11:19:04 +0100 Message-ID: <20191121101904.10295-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-4.13 v2] x86/vlapic: allow setting APIC_SPIV_FOCUS_DISABLED in x2APIC mode 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: Juergen Gross , Andrew Cooper , Wei Liu , 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) Current code unconditionally prevents setting APIC_SPIV_FOCUS_DISABLED regardless of the processor model, which is not correct according to the specification. This issue was discovered while trying to boot a pvshim with x2APIC enabled. Always allow setting APIC_SPIV_FOCUS_DISABLED: the local APIC provided to guests is emulated by Xen, and as such doesn't depend on the features found on the hardware processor. Note for example that Xen offers x2APIC support to guests even when the underlying hardware doesn't have such feature. Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Jan Beulich --- Cc: Juergen Gross --- Changes since v1: - Always allow setting the APIC_SPIV_FOCUS_DISABLED bit. --- xen/arch/x86/hvm/vlapic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index 9466258d6f..b790ba6bbd 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -993,6 +993,7 @@ int guest_wrmsr_x2apic(struct vcpu *v, uint32_t msr, ui= nt64_t msr_content) =20 case APIC_SPIV: if ( msr_content & ~(APIC_VECTOR_MASK | APIC_SPIV_APIC_ENABLED | + APIC_SPIV_FOCUS_DISABLED | (VLAPIC_VERSION & APIC_LVR_DIRECTED_EOI ? APIC_SPIV_DIRECTED_EOI : 0)) ) return X86EMUL_EXCEPTION; --=20 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel