[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/HVM: make hvm_set_guest_tsc*() static
commit c368538184084b98170ee3bd90fd56bbb5f97dd7 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Jan 24 12:36:55 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jan 24 12:36:55 2017 +0100 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> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 13 +++++-------- xen/include/asm-x86/hvm/hvm.h | 2 -- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 6ab60d2..d39fbbd 100644 --- 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, u64 tsc) 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 *v, u64 guest_tsc, u64 at_tsc) 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 *v, uint64_t at_tsc) 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 msr, uint64_t *msr_content) 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: diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 3cfdc4e..329831c 100644 --- 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, uint16_t cs, uint16_t ip); 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) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |