[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] x86/HVM: make hvm_set_guest_tsc*() static
Other than hvm_set_guest_tsc(), neither needs to be exposed. And hvm_get_guest_tsc_adjust() is pretty pointless as a seperate function altogether, let alone a non-static one. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -369,7 +369,7 @@ u64 hvm_scale_tsc(const struct domain *d return tsc; } -void hvm_set_guest_tsc_fixed(struct vcpu *v, u64 guest_tsc, u64 at_tsc) +static void hvm_set_guest_tsc_fixed(struct vcpu *v, u64 guest_tsc, u64 at_tsc) { uint64_t tsc; uint64_t delta_tsc; @@ -394,7 +394,9 @@ void hvm_set_guest_tsc_fixed(struct vcpu hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, at_tsc); } -void hvm_set_guest_tsc_adjust(struct vcpu *v, u64 tsc_adjust) +#define hvm_set_guest_tsc(v, t) hvm_set_guest_tsc_fixed(v, t, 0) + +static void hvm_set_guest_tsc_adjust(struct vcpu *v, u64 tsc_adjust) { v->arch.hvm_vcpu.cache_tsc_offset += tsc_adjust - v->arch.hvm_vcpu.msr_tsc_adjust; @@ -421,11 +423,6 @@ u64 hvm_get_guest_tsc_fixed(struct vcpu return tsc + v->arch.hvm_vcpu.cache_tsc_offset; } -u64 hvm_get_guest_tsc_adjust(struct vcpu *v) -{ - return v->arch.hvm_vcpu.msr_tsc_adjust; -} - void hvm_migrate_timers(struct vcpu *v) { /* PVH doesn't use rtc and emulated timers, it uses pvclock mechanism. */ @@ -3354,7 +3351,7 @@ int hvm_msr_read_intercept(unsigned int break; case MSR_IA32_TSC_ADJUST: - *msr_content = hvm_get_guest_tsc_adjust(v); + *msr_content = v->arch.hvm_vcpu.msr_tsc_adjust; break; case MSR_TSC_AUX: --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -248,8 +248,6 @@ void hvm_vcpu_reset_state(struct vcpu *v void hvm_get_guest_pat(struct vcpu *v, u64 *guest_pat); int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat); -void hvm_set_guest_tsc_fixed(struct vcpu *v, u64 guest_tsc, u64 at_tsc); -#define hvm_set_guest_tsc(v, t) hvm_set_guest_tsc_fixed(v, t, 0) u64 hvm_get_guest_tsc_fixed(struct vcpu *v, u64 at_tsc); #define hvm_get_guest_tsc(v) hvm_get_guest_tsc_fixed(v, 0) Attachment:
x86-HVM-TSC-adjust-static.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |