x86/P2M: p2m.c is HVM-only

This only requires moving p2m_percpu_rwlock elsewhere (ultimately I
think all P2M locking should go away as well when !HVM, but this looks
to require further code juggling). The two other unguarded functions are
already unneeded (by virtue of DCE) when !HVM.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
This commit is contained in:
Jan Beulich committed 2022-04-08 14:50:29 +02:00
1 parent 512699aa51
commit c479415610
3 files changed
+3 -11

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ obj-$(CONFIG_MEM_ACCESS) += mem_access.o
obj-$(CONFIG_MEM_PAGING) += mem_paging.o
obj-$(CONFIG_MEM_SHARING) += mem_sharing.o
obj-$(CONFIG_HVM) += nested.o
obj-y += p2m.o
obj-$(CONFIG_HVM) += p2m.o
obj-y += p2m-basic.o
obj-$(CONFIG_HVM) += p2m-ept.o p2m-pod.o p2m-pt.o
obj-y += paging.o
+2
View File
@@ -28,6 +28,8 @@
#include "mm-locks.h"
#include "p2m.h"
DEFINE_PERCPU_RWLOCK_GLOBAL(p2m_percpu_rwlock);
/* Init the datastructures for later use by the p2m code */
static int p2m_initialise(struct domain *d, struct p2m_domain *p2m)
{
-10
View File
@@ -53,10 +53,6 @@ bool_t __initdata opt_hap_1gb = 1, __initdata opt_hap_2mb = 1;
boolean_param("hap_1gb", opt_hap_1gb);
boolean_param("hap_2mb", opt_hap_2mb);
DEFINE_PERCPU_RWLOCK_GLOBAL(p2m_percpu_rwlock);
#ifdef CONFIG_HVM
int p2m_init_logdirty(struct p2m_domain *p2m)
{
if ( p2m->logdirty_ranges )
@@ -258,8 +254,6 @@ void p2m_flush_hardware_cached_dirty(struct domain *d)
}
}
#endif /* CONFIG_HVM */
/*
* Force a synchronous P2M TLB flush if a deferred flush is pending.
*
@@ -286,8 +280,6 @@ void p2m_unlock_and_tlb_flush(struct p2m_domain *p2m)
mm_write_unlock(&p2m->lock);
}
#ifdef CONFIG_HVM
mfn_t p2m_get_gfn_type_access(struct p2m_domain *p2m, gfn_t gfn,
p2m_type_t *t, p2m_access_t *a, p2m_query_t q,
unsigned int *page_order, bool_t locked)
@@ -2718,8 +2710,6 @@ int p2m_set_altp2m_view_visibility(struct domain *d, unsigned int altp2m_idx,
return rc;
}
#endif /* CONFIG_HVM */
/*
* Local variables:
* mode: C
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.