From patchwork Wed Sep 7 08:24:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Razvan Cojocaru X-Patchwork-Id: 9318595 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 8F42C6077F for ; Wed, 7 Sep 2016 08:24:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87E072915A for ; Wed, 7 Sep 2016 08:24:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B74C2915C; Wed, 7 Sep 2016 08:24:16 +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 7508F2915A for ; Wed, 7 Sep 2016 08:24:13 +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 1bhY7A-0001B1-Ol; Wed, 07 Sep 2016 08:21:48 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhY79-0001As-3t for xen-devel@lists.xen.org; Wed, 07 Sep 2016 08:21:47 +0000 Received: from [85.158.137.68] by server-1.bemta-3.messagelabs.com id 43/30-17152-A1ECFC75; Wed, 07 Sep 2016 08:21:46 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNIsWRWlGSWpSXmKPExsUSfTxjoa7kufP hBi/OWlks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBn35uxlKfjLXTFl/Uq2BsadXF2MnBxCAu4S z5bsZ4Sw1zBKXN/v0MXIBWRfY5R4f7+DEaZo0q5f7BCJhYwSjUd2MoMkRASkJa59vgxWxCxQJ tG8t5EVxGYTMJRYvbGFDcQWFlCRWL3vOFgNr4CTxJ4n31lAbBag+LTGHUwgtqhAuMTpv43sED WCEidnPmGBmKku8WfeJWYIW15i+9s5YLaEQI7E7pfrgGwOIFtK4n+rEshtEgJPmSVuXjnNBFE jI/Fo4k22CYzCs5CMnYVk7CwkYxcwMq9i1ChOLSpLLdI1NNNLKspMzyjJTczM0TU0MNbLTS0u TkxPzUlMKtZLzs/dxAgMdAYg2MG4arvnIUZJDiYlUV6LY+fDhfiS8lMqMxKLM+KLSnNSiw8xy nBwKEnw1p8BygkWpaanVqRl5gBjDiYtwcGjJMJ7ASTNW1yQmFucmQ6ROsWoKCXOewgkIQCSyC jNg2uDxfklRlkpYV5GoEOEeApSi3IzS1DlXzGKczAqCfMuBJnCk5lXAjf9FdBiJqDFQqfAFpc kIqSkGhhDe37nll7pk1uivXaz6BoHobT5d6dz7/LPcNijkpu+/gqvnFnn10YdYYc/e3Zonnyf /C3mXOQJ/nX2104vk0wQPZfLLnn4bZGoY9R77/MK6RvU5vg0/ZY68DZy28QPreVbOYXi2Vm4Z LbuNOL49lf/fPoLnUUJV9dHSfRft8raV5mxT9f64lslluKMREMt5qLiRABzpyU97gIAAA== X-Env-Sender: rcojocaru@bitdefender.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1473236505!59373521!1 X-Originating-IP: [91.199.104.161] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 41946 invoked from network); 7 Sep 2016 08:21:45 -0000 Received: from mx01.bbu.dsd.mx.bitdefender.com (HELO mx01.bbu.dsd.mx.bitdefender.com) (91.199.104.161) by server-14.tower-31.messagelabs.com with DHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 7 Sep 2016 08:21:45 -0000 Received: (qmail 13535 invoked from network); 7 Sep 2016 11:21:44 +0300 Received: from unknown (HELO mx-sr.buh.bitdefender.com) (10.17.80.103) by mx01.bbu.dsd.mx.bitdefender.com with AES256-GCM-SHA384 encrypted SMTP; 7 Sep 2016 11:21:44 +0300 Received: from smtp01.buh.bitdefender.com (smtp.bitdefender.biz [10.17.80.75]) by mx-sr.buh.bitdefender.com (Postfix) with ESMTP id 61D2F7FC34 for ; Wed, 7 Sep 2016 11:21:44 +0300 (EEST) Received: (qmail 19245 invoked from network); 7 Sep 2016 11:21:44 +0300 Received: from rcojocaru.dsd.ro (HELO ?10.10.14.59?) (rcojocaru@bitdefender.com@10.10.14.59) by smtp01.buh.bitdefender.com with SMTP; 7 Sep 2016 11:21:44 +0300 To: xen-devel@lists.xen.org From: Razvan Cojocaru Message-ID: <4829a7fd-8f8f-4b92-ebec-1264c333f47e@bitdefender.com> Date: Wed, 7 Sep 2016 11:24:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 X-BitDefender-Scanner: Clean, Agent: BitDefender qmail 3.1.6 on smtp01.buh.bitdefender.com, sigver: 7.67130 X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: Build: [Engines: 2.15.6.911, Dats: 431711, Stamp: 3], Multi: [Enabled, t: (0.000009, 0.002068)], BW: [Enabled, t: (0.000007,0.000001)], RBL DNSBL: [Disabled], APM: [Enabled, Score: 500, t: (0.002402), Flags: 85D2ED72; NN_FORGED_THUNDERBIRD_2; NN_LEGIT_BITDEFENDER; NN_LEGIT_MAILING_LIST_TO], SGN: [Enabled, t: (0.007018)], URL: [Enabled, t: (0.000023)], RTDA: [Enabled, t: (0.012720), Hit: No, Details: v2.3.11; Id: 2m1ghah.1arspc2iu.quh4], total: 0(775) X-BitDefender-CF-Stamp: none Cc: Julien Grall , Stefano Stabellini , Jan Beulich Subject: [Xen-devel] ARM cross-compile build fix 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 Hello, The fastest way to compile-check the patches that touch ARM bits is to simply cross-compile, and I've followed the instructions here: https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling#64-bit_crossbuild However, there was an error trying to build master, several macros were redefined in arch-arm.h (originally defined in ptrace.h). The following patch has fixed the problem for me, but it's rather crude: #define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h) I'm not sure this is the right fix, which is why I didn't send the patch for review the usual way, but I hope it's helpful. Please let me know if you'd like me to send a proper patch. Thanks, Razvan diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h index 870bc3b..e4560a5 100644 --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -362,13 +362,27 @@ typedef uint64_t xen_callback_t; /* 64 bit modes */ #define PSR_MODE_BIT 0x10 /* Set iff AArch32 */ +#ifndef PSR_MODE_EL3h #define PSR_MODE_EL3h 0x0d +#endif +#ifndef PSR_MODE_EL3t #define PSR_MODE_EL3t 0x0c +#endif +#ifndef PSR_MODE_EL2h #define PSR_MODE_EL2h 0x09 +#endif +#ifndef PSR_MODE_EL2t #define PSR_MODE_EL2t 0x08 +#endif +#ifndef PSR_MODE_EL1h #define PSR_MODE_EL1h 0x05 +#endif +#ifndef PSR_MODE_EL1t #define PSR_MODE_EL1t 0x04 +#endif +#ifndef PSR_MODE_EL0t #define PSR_MODE_EL0t 0x00 +#endif #define PSR_GUEST32_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)