From patchwork Fri Jul 8 12:29:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Vrabel X-Patchwork-Id: 9220791 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5146D60467 for ; Fri, 8 Jul 2016 12:31:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 428B32875E for ; Fri, 8 Jul 2016 12:31:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3761328763; Fri, 8 Jul 2016 12:31:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E157B2875E for ; Fri, 8 Jul 2016 12:31:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLUuf-0006jX-Pw; Fri, 08 Jul 2016 12:29:45 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLUud-0006iY-Ni for xen-devel@lists.xenproject.org; Fri, 08 Jul 2016 12:29:43 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 4B/03-11548-6BC9F775; Fri, 08 Jul 2016 12:29:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCIsWRWlGSWpSXmKPExsXitHSDve62OfX hBqt3K1p83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBl/X3xhLnjKVdF+eCJrA+Mnji5GTg4JAX+J GW2XWEBsYYEgiScXf7GC2CICqRL7bh5lB7GFBOwkLhx9B1bDLOAiMa/pPSOIzSagI/F4yQx2i DlyEr3dk8BqeAU0JRo61zKD2CwCKhLnVj8Di4sKBEvcufCcDaJGUOLkzCdgcU4Be4k9U74wQc w3kDiyaA4rhC0vsf3tHGaIG1QkPq5dxQqxi1vi9umpzBMYBWYhGTULSfssJO0LGJlXMaoXpxa VpRbpGuslFWWmZ5TkJmbm6BoamOnlphYXJ6an5iQmFesl5+duYgSGJgMQ7GDs+Od0iFGSg0lJ lNcwoD5ciC8pP6UyI7E4I76oNCe1+BCjDAeHkgTvr1lAOcGi1PTUirTMHGCUwKQlOHiURHglZ gOleYsLEnOLM9MhUqcYFaXEedeC9AmAJDJK8+DaYJF5iVFWSpiXEegQIZ6C1KLczBJU+VeM4h yMSsK82iBTeDLzSuCmvwJazAS02CAAbHFJIkJKqoFx4jX+0Ny5vJVhl/+u2+y5u+vPoQkcXrt 7f+UZBN0w1HDfJhOcEJi6VD1HLzO25vPagMCF3T9M1OVmO7F+qhB4xtKe8r6tJs5e4ObUP38n Gztt3Lg5RYJnhuZ/u07mNIbWa5f3TeS2Pf2uPfFYe6jdxns622R3ZBTlf5VW3rb4xPsj0srRZ j5KLMUZiYZazEXFiQBg7AXmxwIAAA== X-Env-Sender: prvs=990bad7c9=david.vrabel@citrix.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1467980980!22892472!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9527 invoked from network); 8 Jul 2016 12:29:42 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-9.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 8 Jul 2016 12:29:42 -0000 X-IronPort-AV: E=Sophos;i="5.28,329,1464652800"; d="scan'208";a="372004571" To: Jan Beulich , , "Juergen Gross" References: <577FB56B02000078000FC9DB@prv-mh.provo.novell.com> From: David Vrabel X-Enigmail-Draft-Status: N1110 Message-ID: <577F9CB2.5050406@citrix.com> Date: Fri, 8 Jul 2016 13:29:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <577FB56B02000078000FC9DB@prv-mh.provo.novell.com> X-DLP: MIA2 Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: [Xen-devel] [PATCH] xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On 08/07/16 13:15, Jan Beulich wrote: > As of Xen 4.7 PV CPUID doesn't expose either of CPUID[1].ECX[7] and > CPUID[0x80000007].EDX[7] anymore, causing the driver to fail to load on > both Intel and AMD systems. Doing any kind of hardware capability > checks in the driver as a prerequisite was wrong anyway: With the > hypervisor being in charge, all such checking should be done by it. If > ACPI data gets uploaded despite some missing capability, the hypervisor > is free to ignore part or all of that data. > > Ditch the entire check_prereq() function, and do the only valid check > (xen_initial_domain()) in the caller in its place. Thanks, but I'm not sure this is sufficient. I think the generic ACPI code needs to know the full capabilities in order to generate the correct tables, or you won't get (for example) turbo mode working. We had to fake the EST feature back in. David --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -448,7 +448,8 @@ static void __init xen_init_cpuid_mask(void) if ((cx & xsave_mask) != xsave_mask) cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */ if (xen_check_mwait()) - cpuid_leaf1_ecx_set_mask = (1 << (X86_FEATURE_MWAIT % 32)); + cpuid_leaf1_ecx_set_mask = (1 << (X86_FEATURE_MWAIT % 32) + | 1 << (X86_FEATURE_EST % 32)); } static void xen_set_debugreg(int reg, unsigned long val)