Message ID | 1472472083-2300-1-git-send-email-suravee.suthikulpanit@amd.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1594662qga; Mon, 29 Aug 2016 05:04:14 -0700 (PDT) X-Received: by 10.36.34.204 with SMTP id o195mr14632164ito.29.1472472254312; Mon, 29 Aug 2016 05:04:14 -0700 (PDT) Return-Path: <xen-devel-bounces@lists.xen.org> Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id e206si13727561itb.26.2016.08.29.05.04.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Aug 2016 05:04:14 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@amdcloud.onmicrosoft.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from <xen-devel-bounces@lists.xen.org>) id 1beLGX-0007Zn-Ok; Mon, 29 Aug 2016 12:02:13 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from <Suravee.Suthikulpanit@amd.com>) id 1beLGW-0007Ze-Ia for xen-devel@lists.xen.org; Mon, 29 Aug 2016 12:02:12 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id 73/FF-30284-34424C75; Mon, 29 Aug 2016 12:02:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1WSb0gTcRjH97vd5jl3ds5/T2tGTg2xNA0iqze hYkp/MAkkX2i3utxgc7qbsajQrFeKGQ4sdYKSJf7BSk3EiX/m1CykUsxerLL8b9SSLCMp23lq 9u57v8/neZ7j4SGEskWRnGBMRsaQSWuVYgmu3rcrKTw22J4S2V22Lbpm8R5+FCX0W1ewJJQq0 mSq9KZzInXLq3wsyyYxOT//QXkonyhAEgKnbgphZdiBCpA7gah0+PK+SsQBGbWK4GHZxBoQU0 dgweJw47IPFQANBRY3ThJSDxCYlyvXgDcVA596Z0RcxqkQKO3vEHKZpE5Aaec0xmWgdsLQgFn Ev3vBUNkUzmUhBdA7NyfkHSWUteWJuQFAFSJw3mlck2RUGIzae8W8dBJmXkwIeWkZg+Lpx+vV 8dA8XIjzuVoMXc25vHRfDOO1k+tAC+bxJlcmXDkBOiv38o4NwdfGCsR/VONgbfnhxksKaHhK8 e9TOIyMLGLcu8y1sV+WWL7nqAcU1F7lnQo3eNlSh/N7kYOzfQjxWQGP7lpwXmrDoLNoFd1Gwe Vb9lG+ZR9VCKtHoSxjuMQYwvcfjFAZNBlqo47WaMOjIg9E6BiWpTMYLa1iI87rdc3IdQq5AgF qR2Otp2xoO4EpfUmjoy9F5qnSX7ispll1uiFHy7A2pCAIJZArSnuKzMvAZDCmixqt6542MBBS pQ+5O8iFSTaL1rGaDB49Q4Fyf7Kbq6M4oM7J3CzbuMQRFCD3JpFAIJBJsxiDTmP8ny8gfwIpv cmfXBepJtO42X3BNRhzDc7i/plkjfQ/JM9DnnsKezz6pNdMH48fk3Va+uoEwU/MsR4hb2br7A rrjnhE+yXG9RRfORQ4P19epGuPL4nx7MpOe7tUlad6d/p5PQxKmnqWrju+x9CHZ+OSpaGQ/Nt aODhldepv1disZ8WTfrhP9tgHVckN39RE9zksuiOttXHyddrAmZJvjqA2Jc6q6agwoYGl/wJp W+LThAMAAA== X-Env-Sender: Suravee.Suthikulpanit@amd.com X-Msg-Ref: server-12.tower-206.messagelabs.com!1472472129!20369843!1 X-Originating-IP: [104.47.32.80] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5359 invoked from network); 29 Aug 2016 12:02:10 -0000 Received: from mail-sn1nam01on0080.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) (104.47.32.80) by server-12.tower-206.messagelabs.com with AES256-SHA encrypted SMTP; 29 Aug 2016 12:02:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=x9e8+tAjJAQe5U5sPdAp2y09RJZ4VFZOIKqAtLEgYWE=; b=oMC5cfIAqGExk+0DunTdbC55Dew5yxBGjGUdNlhZGhrwRQx5YIY3t9lssxKvhEqiyLA1RpzvyfleYRHQC9HzX4Fbe4OSsRV8jfAJQRtu7f/6F/qRkLc6YZXSg6Eax1aLrXz3G+0njwSr3ihN5HP/VehQ4hEddaOp5Dii033B9RI= Received: from localhost.localdomain (114.109.128.54) by CY4PR12MB1446.namprd12.prod.outlook.com (10.172.71.138) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Mon, 29 Aug 2016 12:02:05 +0000 From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> To: <xen-devel@lists.xen.org> Date: Mon, 29 Aug 2016 07:01:23 -0500 Message-ID: <1472472083-2300-1-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [114.109.128.54] X-ClientProxiedBy: SINPR01CA0033.apcprd01.prod.exchangelabs.com (10.141.109.33) To CY4PR12MB1446.namprd12.prod.outlook.com (10.172.71.138) X-MS-Office365-Filtering-Correlation-Id: cd4e2c32-d2b8-4ab7-2008-08d3d0044ce1 X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1446; 2:oIZ22DHcc9CE42tfEWBz0Fz2X6tQqEvJBY3EshbE1wcwtKiPxewp7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pCNjeT5WEsM1oD6edCEBB7Lz0Q= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1446; 31:hsBw3vTBYRVlWSX9gjI6rxm59UmSBomfRmsv9UzcJgjVaKh3IM7Br7UHBXpWwzL2pzpH4y7Q43rrxJYNgey3e/Bz2pZmPvDXC5y6V3U9uvbkptDi6s1CEHGy1MJV0F2i7YyUz6oE004uBcDH3uyIIm1vuOS+LwJOm5n7YAkgvalJrLNcKTb6dQGwlfn7sj0akY8vbfVZe1uXIDshQbMMKrSzBpR2ZkxytwYBXIcsYrY=; 20:jj+XMSLaIkUza/bo2XJkW7gn87QcGk3FzpTYr3w05IVeLmK5OmnpJxmVzYPUw+bRbOiNUh2hUmybQkdf2BEVVT/sEBU2WPOnw9AKDO5dI0knNeijLDGoACu7n3RZXt3+/eFBg/9xB4rX2c4oDJuneOCp6qYYGA1jVZsHCFPsbfHW3syBnwblQm2qERBOxrUgri1CszYWC5JA89nqzP0OnyvW3zg6LF/9A21PcUzJJBSSjvM8BBls7LiAHi3jeyvg/+KJBQvkQPg00g2Ga5C5FLxd3e5TZuwDw/aTPaDayRdV1Ev+fSn8MorTR7lzhOvo2FLUNOP9PTfBiSzk5EV/D3HYjXZtjHoKFCVF8uIGyllAwFb1wzWDV0qRiwJD+4UIlQhgEJ8nStoKun48XwFGKov2JWBI8RvIx6xKexYvwxGDIOmgCjuXnb05IToC6NcvyzBodn5OMWTCektR4yFk1yiig70ZuSzp+cFH7bQL9T3YCUTsy33afWF3QEc9bzD+ X-Microsoft-Antispam-PRVS: <CY4PR12MB1446C36B49B5576023E32EF7F3E10@CY4PR12MB1446.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(70601490899591); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:CY4PR12MB1446; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1446; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1446; 4:sdowYhw69FC7Fd/Pt9DgF70KrZMRQ5Sul16CCVtvjrrxybfv+rDc7o1Xcmo4soNjbesE8ev3zPsQzl67qbUzFHYfj4So+MXNjBQK9W+X32WgSEhfkrRELnjTuGgu/UgFxpAH5liIT47afIt/8RbDliKxY+bXo7KSiRzFvFFmokDO2Px/ER+aTZCq4Drg2dEH3SdvYTUKhURrXTdt96l7FwfZ4kPH9OZbJtvj2W6Cn/ie1MR1C6sNXCG3OrGheJ9oY5ruCv2hpFGvnlS3hFbaClwpAWC0AIMWpq/osrlJAplD55Iby0n3U+ZjuieNWpxt4WantdhZwUj7feqAJ+f2v+UPgyrBvs95qCI1H7EwHICFtVa8M91AvyjW57PUJ+xlIycSD7RgSkPRpJbJQZZijPH0yCUAXcYGBOnSgSsQZ8d1DK3SRD2/CDx/nDkGc/R3Kp/AyiPkJxnF3PBPNbSATRS1TRqPgmEelLTlZdE4+Es= X-Forefront-PRVS: 0049B3F387 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(92566002)(5003940100001)(50986999)(42186005)(97736004)(3846002)(586003)(50226002)(4326007)(81156014)(81166006)(8666005)(2906002)(8676002)(6116002)(48376002)(50466002)(105586002)(101416001)(106356001)(229853001)(2351001)(110136002)(189998001)(36756003)(19580395003)(19580405001)(33646002)(47776003)(77096005)(66066001)(68736007)(305945005)(86362001)(7846002)(5660300001)(7736002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1446; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1446; 23:W3DEY+FG3R7xGO3G9Y+eVAuGEnoJBttlrfb0ZQJB6?= =?us-ascii?Q?+RsfZDkIa85BAFB3s84JOurM2hO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jFcfeyqXLuZMgaZNe9doSVwpKOHl+lhqW5vEzMKE88 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1446; 20:dEuAurkExnpAWhpKXvWOeJc+BZIUSl79yqUPSxjBnDQcz8EOGA/VH9Vko2/KvJH13nBmi/sl74RLyLfakl8x5fx7xnYIJB3hi5kM1xM06K3cg2ZZJFq6Ixq8BcubB5HKnq9Lrd1V6MVQX4znZoxBBEBYzqEQpTa7edv8B4v+wXbaydd8nBGGhVOcSODe3F8xKIWO1QbfAUouiTTQNxdBy7HytyeSDyur/Aag119pwhAdgnb6N7ok0jTcvtPkBu60 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2016 12:02:05.7015 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1446 Cc: andrew.cooper3@citrix.com, Wei Liu <wei.liu2@citrix.com>, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, jbeulich@suse.com, sherry.hurwitz@amd.com Subject: [Xen-devel] [PATCH] xen/HVM: Add guarding logic for VMX specific code X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion <xen-devel.lists.xen.org> List-Unsubscribe: <https://lists.xen.org/cgi-bin/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xen.org> List-Help: <mailto:xen-devel-request@lists.xen.org?subject=help> List-Subscribe: <https://lists.xen.org/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" <xen-devel-bounces@lists.xen.org> |
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 314881a..5d463e0 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -611,7 +611,7 @@ unsigned long hvm_cr4_guest_reserved_bits(const struct vcpu *v, bool_t restore); struct vcpu *v_ = (v); \ struct domain *d_ = v_->domain; \ if ( has_hvm_container_domain(d_) && \ - d_->arch.hvm_domain.vmx.vcpu_block ) \ + (cpu_has_vmx && d_->arch.hvm_domain.vmx.vcpu_block) ) \ d_->arch.hvm_domain.vmx.vcpu_block(v_); \ })
The struct hvm_domain.vmx is defined in a union along with the svm. This can causes issue for SVM since this code is used in the common scheduling code for x86. The logic must check for cpu_has_vmx before accessing the hvm_domain.vmx sturcture. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Cc: Wei Liu <wei.liu2@citrix.com> Cc: Jan Beulich <jbeulich@suse.com> --- Note: I ran into an issue while working on the upcoming patch series for AMD Advance Virtual Interrupt Controller patch series, which will use the hvm_domain.svm structure. xen/include/asm-x86/hvm/hvm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)