[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86/shadow: make a local variable in sh_page_fault() HVM-only
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 18 Oct 2021 08:44:49 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=I1lOxkcSWLuK57F6wf4bdXAcbJ7aLZKAUAaOcQ62Src=; b=LwUrEp0Pb/AXjkNuP15rnyp3HwuDNI0nMTyX++IQWtn4Z3nDE8u8oTOHUMDTBLiDxjBuhJL0CAvRM6P6O8v5K+5udRatmCwdGloJmeKgrDcMJcl9pYnYJZCO0jya0j3KUt8c2bePCrypDtiePJwf5i9Gkail9Lr6iHHiWN8wwOzzzGKGmr0BLkUiIgeq149MQ/fh6IWDn6KnVkPZkgbP/lUtqh3jmQvHGCkMeJjt7CfAAriyP2hzcMMObp0v+mklK8kmypuCBjuDJf/uMMyoG7Yl6GMHQJBYMNApUO8pZN9NX9XmUBrnYc1K4gIirXddI72AslhHuRXqh7wYEKHvAw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P9hgpWKG4uNpDc2ACZa9x70uGyRpLpzrUvkF1ZZiIm8yj3nPNd/xnSiTda7NSzINr+10cWTTx9u8nc7Z2bVoFXrPngD/AfQKxqBrTz/fFLiXxta3JomxXqExj3k35+b6v+uPw0YdYbsVd+nP0wCSu+Pg4DKZymZkh0oLO4aLG6Qa/rooLbtqyBs5JzwXbflzDj3OKnyEVcAL9+2E8tK4/X11n4wQXlACuniwoj6GW5ynZAji38LST44FqUpOH/sZGU4V7BoWyg4dmuEJh3qnDIhbaa5CkopkAq7KdB4V0MHfvC71H/dQVDpBKyu2PBMVSZV/OLfTAjAlyOA5nnuP2Q==
- Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
- Delivery-date: Mon, 18 Oct 2021 06:44:53 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
I recall checking that "r" would still have a user, but when doing so I
failed to recognize that all uses are inside a CONFIG_HVM conditional
section.
Fixes: 9f4f20b27b07 ("x86/shadow: adjust some shadow_set_l<N>e() callers")
Reported-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -2155,8 +2155,8 @@ static int sh_page_fault(struct vcpu *v,
#ifdef CONFIG_HVM
struct sh_emulate_ctxt emul_ctxt;
const struct x86_emulate_ops *emul_ops;
-#endif
int r;
+#endif
p2m_type_t p2mt;
uint32_t rc, error_code;
bool walk_ok;
|