[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH v4 02/14] x86/altp2m: add static inline stub for altp2m_vcpu_idx()
The stub just returns 0 due to implementation of p2m_get_mem_access() for x86 & ARM expects it to be 0 when altp2m not active or not implemented. The separate stub is favoured over dynamic check for alt2pm availability inside regular altp2m_vcpu_idx() because this way we retain the possibility to later put the whole struct altp2mvcpu under CONFIG_ALTP2M. The purpose of the change is later to be able to disable altp2m support and exclude its code from the build completely, when not supported by target platform (as of now it's implemented for Intel EPT only). Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> CC: Tamas K Lengyel <tamas@xxxxxxxxxxxxx> CC: Jan Beulich <jbeulich@xxxxxxxx> --- changes in v4: - add static inline stub for altp2m_vcpu_idx() instead of using altp2m_active() check inside altp2m_vcpu_idx() as suggested by Jan - changed patch description changes in v3: - move altp2m_active() check inside altp2m_vcpu_idx() - drop changes to monitor.c - changed patch description changes in v2: - patch description changed, removed VMX mentioning - guard by altp2m_active() instead of hvm_altp2m_supported() --- xen/arch/x86/include/asm/altp2m.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/altp2m.h b/xen/arch/x86/include/asm/altp2m.h index e5e59cbd68..c655b8a34e 100644 --- a/xen/arch/x86/include/asm/altp2m.h +++ b/xen/arch/x86/include/asm/altp2m.h @@ -37,8 +37,12 @@ static inline bool altp2m_active(const struct domain *d) return false; } +static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) +{ + return 0; +} + /* Only declaration is needed. DCE will optimise it out when linking. */ -uint16_t altp2m_vcpu_idx(const struct vcpu *v); void altp2m_vcpu_disable_ve(struct vcpu *v); #endif -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |