[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/13] x86/shadow: "monitor table" is a HVM-only concept
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 30 Mar 2023 13:31:41 +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=RpugR2creDQpmbTfh0GSUcRY9SEocvRjzcrAYXp5z+A=; b=MJ4dAyMSyDS7NOsmr0GfPUNHjyPG5Hw54A4ODtrLSBbllyfkiqQKs4340kAXNkbWhaV88dt/CfMX4ePqaPbugt0jwjF6qbE7ZN3PSm1OWCS7TehtBuHg7pXADLI+VF2MDSdbkFMpKBCDoCkPESvT6t610fUvgm3uRxVAeilOs9T+uxCjCY/chqAXxdWDF8UDuQFNB17W67XqHk7/xSAavhGqw0BvYUM4lQX5PgzeT3r9ZYf1fhIN42spWZJ1rlUraMgcTWvMsedAaXAnFqn6e6neCAzFgXai6jpz98FwXYgO9zyIl6yJHPkQzbaOZrLymwRQijbIYBbn8cumtAlcFw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I2o04hZTFoDpTSL4zM6urm9xv17de54SzbPTwFFd6FinuLMsdRTQ+u8xiW8ghFJBQy8Y+CVhJF/rlwPvpiu9Fs9julzu9hHwMDIeLhFCEeay+QSHRgTpylrmMPofJrJ9xkYzrEJI1751IVNEHGq8zNPdpfx25A/pKMHOq+0JzBXe8/YYJ+PA6IMjmIoIaFej79dMsocsTarFzRJOpL8GS4uDO11RbSf5jMWYoFjJ1a5a4xnuuXEMQ08RpnuODUVG+oW6IcPVsrmmlmNZdUloI0MTJFE7keNuvwFmUn2dFG+DburkjaLeV00nUNViMchTmMg1Sbj9AchxbmL1T3RtEw==
- 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: Thu, 30 Mar 2023 11:31:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
It looks like in the combination of aff8bf94ce65 ('x86/shadow: only
4-level guest code needs building when !HVM') and 0b841314dace
('x86/shadow: sh_{make,destroy}_monitor_table() are "even more" HVM-
only') I didn't go quite far enough: SH_type_monitor_table is also
effectively unused when !HVM.
The assertion early in sh_destroy_shadow() can have the type dropped
altogether: it shouldn't make it here in the first place. Pages of
this type are freed directly from sh_destroy_monitor_table() only.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1190,7 +1190,6 @@ void sh_destroy_shadow(struct domain *d,
ASSERT(t == SH_type_fl1_32_shadow ||
t == SH_type_fl1_pae_shadow ||
t == SH_type_fl1_64_shadow ||
- t == SH_type_monitor_table ||
(is_pv_32bit_domain(d) && t == SH_type_l4_64_shadow) ||
(page_get_owner(mfn_to_page(backpointer(sp))) == d));
--- a/xen/arch/x86/mm/shadow/private.h
+++ b/xen/arch/x86/mm/shadow/private.h
@@ -205,8 +205,7 @@ extern void shadow_audit_tables(struct v
#define SH_type_l4_64_shadow 6U /* shadowing a 64-bit L4 page */
#define SH_type_max_shadow 6U
#define SH_type_p2m_table 7U /* in use as the p2m table */
-#define SH_type_monitor_table 8U /* in use as a monitor table */
-#define SH_type_unused 9U
+#define SH_type_unused 8U
#endif
#ifndef CONFIG_PV32 /* Unused (but uglier to #ifdef above): */
|