[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86: fix !CONFIG_HVM build for clang 3.8
commit d36b7704586c232388da8b170a111cc98127cdad Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Oct 4 17:37:56 2018 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Fri Oct 5 10:04:06 2018 +0100 x86: fix !CONFIG_HVM build for clang 3.8 It is discovered that hvm_funcs made it into monitor.o even when HVM is disabled. This version of clang doesn't seem to completely eliminate the code after is_hvm_domain() in arch_monitor_get_capabilities(). Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/include/asm-x86/hvm/hvm.h | 10 ++++++++++ xen/include/asm-x86/monitor.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 3959604287..e2cbcf53db 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -379,6 +379,11 @@ unsigned long hvm_cr4_guest_valid_bits(const struct domain *d, bool restore); #define hvm_long_mode_active(v) (!!((v)->arch.hvm.guest_efer & EFER_LMA)) +static inline bool hvm_has_set_descriptor_access_exiting(void) +{ + return hvm_funcs.set_descriptor_access_exiting; +} + static inline int hvm_guest_x86_mode(struct vcpu *v) { @@ -757,6 +762,11 @@ static inline void hvm_inject_hw_exception(unsigned int vector, int errcode) ASSERT_UNREACHABLE(); } +static inline bool hvm_has_set_descriptor_access_exiting(void) +{ + return false; +} + #define is_viridian_domain(d) ((void)(d), false) #define has_viridian_time_ref_count(d) ((void)(d), false) #define hvm_long_mode_active(v) ((void)(v), false) diff --git a/xen/include/asm-x86/monitor.h b/xen/include/asm-x86/monitor.h index e02484f56b..4afb0665e8 100644 --- a/xen/include/asm-x86/monitor.h +++ b/xen/include/asm-x86/monitor.h @@ -90,7 +90,7 @@ static inline uint32_t arch_monitor_get_capabilities(struct domain *d) if ( hvm_is_singlestep_supported() ) capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP); - if ( hvm_funcs.set_descriptor_access_exiting ) + if ( hvm_has_set_descriptor_access_exiting() ) capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_DESC_ACCESS); return capabilities; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |