[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 16/16] x86/PV: conditionalize arch_set_info_guest()'s call to update_cr3()


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 22 Mar 2023 10:38:14 +0100
  • 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=cEqVEv6hnrXt0HrtRsLdnSxoS+k1kdzCtSY7As/Jre4=; b=FzVnHVfxfQ+FcPKYMlKPxPIBbBbTLle/A8HVZWc2PW04Osdl0E2ajAjyGMS81bAzk7Ok5/9RtC09rtvBCkxgSvU0gBzha7IgEodcj5DqVRqydvpVdACHGsF20v6T97ImLyxgJWxNj7ynSrcAXUYds6YriWMPATgPgQpOTB1iW3/2YrWiE85cXT26vrQ/6yp4t0+zNbaVNKh5J9a44BvOlA8E3cX1IyWVgTsxgT6gIEs97EyXZGooBuBviIxynNuWl2aND92WERVVAYxV2lO0TCm1mGbO1gIsTQdUkiQqpIZ4cxdU8RoQ0gVy8XRsSiBsSoK8pPNViWIj5wDX1F4HPg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fTFCiUajNc221/cOMD2PCwdA4qcEKgIUqXNW5J5kcqIgMsRD6lCqXJn+Cw9RT5O0kkSgQEMTNdShCRdZvDSuY6FSGMaIi7OdIdLtUvq2dmR5p4EUXFYyRjWS2bHoPFQvfwCI79HMa0EpPpW0a7T8xWWRSY1YmFUdngcgHcTkdwvHzeKSkR0UqmqsfuXWvM6RAn0fRgtALlEYe2MmrkgS5Yw9+CIdt7CL7/tmr/o06KA9c/jVWfwD+QU9pfk3rHPIrJXgne/2pgDp5wNEuYKvkkIsW3tREPEA9IjZSKHY1vlQZZcYRs4+RKVhvNhnZlMttta6s53SYQasgFbij1yiUw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
  • Delivery-date: Wed, 22 Mar 2023 09:38:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

sh_update_paging_modes() as its last action already invokes
sh_update_cr3(). Therefore there is no reason to invoke update_cr3()
another time immediately after calling paging_update_paging_modes(),
the more that sh_update_cr3() does not short-circuit the "nothing
changed" case.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1445,8 +1445,8 @@ int arch_set_info_guest(
 
     if ( paging_mode_enabled(d) )
         paging_update_paging_modes(v);
-
-    update_cr3(v);
+    else
+        update_cr3(v);
 #endif /* CONFIG_PV */
 
  out:




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.