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

[xen master] x86/shadow: "monitor table" is a HVM-only concept



commit ffc3ca75e25024c05bce7afea694a7446e513c03
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Apr 25 12:37:25 2023 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Apr 25 12:37:25 2023 +0200

    x86/shadow: "monitor table" is a HVM-only concept
    
    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>
---
 xen/arch/x86/mm/shadow/common.c  | 1 -
 xen/arch/x86/mm/shadow/private.h | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 0f3a369d89..6d84ff3d99 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1748,7 +1748,6 @@ void sh_destroy_shadow(struct domain *d, mfn_t smfn)
     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));
 
diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/private.h
index 93a443ee59..d02d70ab07 100644
--- a/xen/arch/x86/mm/shadow/private.h
+++ b/xen/arch/x86/mm/shadow/private.h
@@ -193,8 +193,7 @@ extern void shadow_audit_tables(struct vcpu *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): */
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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