From nobody Sun Apr 28 20:09:05 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=1578072654; cv=none; d=zohomail.com; s=zohoarc; b=lIrkA4oOvz/gib5oRqa/GmBoxScObtUSABLD4p4afsNl0iu/QeuAXQQMsOT+9KxwR3sdB7FZAfLWJPhEdeihx3yNSncBa/fTbYmuFetLF+zeAwmj1nq/3UiUZF3uBJshuusq0NSEWwSY5S4XSXcD9cH26G9npzEob3q/qKfLKAM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578072654; 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=00iWsu6bRNm5TT5zbwSEFcTIJXTnEsYz685S8WRre2s=; b=a45sduWPTM33waoGDPIFa73Jv0UJdFl2iBy6NQiR1Cu4qgb3nBqeWuoQ/k+GJEqbWxQQ/rFkHLBfiNEEUOvSGSGZz0QOrNaVnw9uSxdWAhkvEozMPxBjyUIxoSMS2iXANtPyB7n0KS//vPX+rTWJcwSkHzFV0S0ks8ZmX8naN98= 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 1578072654334753.8292371690175; Fri, 3 Jan 2020 09:30:54 -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 1inQlt-0005VF-4q; Fri, 03 Jan 2020 17:30:01 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1inQlr-0005VA-Rg for xen-devel@lists.xenproject.org; Fri, 03 Jan 2020 17:29:59 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a580ac10-2e4e-11ea-88e7-bc764e2007e4; Fri, 03 Jan 2020 17:29:51 +0000 (UTC) X-Inumbo-ID: a580ac10-2e4e-11ea-88e7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1578072591; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=U5d0SPYzel0AwRKDpxp6wjhvszK6fsyp7tPq/rtKPJQ=; b=S8F41lp+hUB2ruySrHoecN/PU47yyp5Fti2svoVBUY1r+mwGIn1xJMdw fjM7dqg9RJov75dsy/13il3CKN8Gs+Y9DbuEtzJ6XVZyUICHuyP1K2e9d zV1jgsnYM+wnj8dY4sV1VfSrzjafNZ8It6WKWlh1eCZnmZCiZiI+wGxTY Y=; 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: IaLQSt9RImIozNB9QW4ZE4v9z68u4PtzaGc925fnfCSF5jNUER9viQAIcYT5cGd3iTRZsfEVdd i9yrcdMod9/rs2mplL2VAWWHb5zEUd0heyKjlLEVNNLJv2gsOKH3OwQginYpSwGeR8u1rE2/NH 1uW4moCvptuOzoIdiC/3U0pUpBkpx2UCvwQ1zaXmufJ1mDMuQPUBoWbqdrRENXQ9zfj3D7oM/f 3yS3+rwasVSrgfnq3/f57d4OyIg6GaxnfaPh+fg7abtkGQa7pih0AL58lv2PjemyPXqmtV+92k 6dc= X-SBRS: 2.7 X-MesageID: 10791318 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.69,391,1571716800"; d="scan'208";a="10791318" From: Roger Pau Monne To: Date: Fri, 3 Jan 2020 18:29:35 +0100 Message-ID: <20200103172935.66137-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] 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) There are issues (as reported by osstest [0]) when Xen is running nested on itself and the L1 Xen is using x2APIC. While those are being investigated, disable announcing the x2APIC feature in CPUID when nested HVM mode is enabled. [0] http://logs.test-lab.xenproject.org/osstest/logs/145509/ Signed-off-by: Roger Pau Monn=C3=A9 Acked-by: Andrew Cooper Acked-by: Wei Liu --- tools/libxc/xc_cpuid_x86.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index 2540aa1e1c..ac38c1406e 100644 --- a/tools/libxc/xc_cpuid_x86.c +++ b/tools/libxc/xc_cpuid_x86.c @@ -653,6 +653,17 @@ 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.24.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel