diff options
author | Xiao Guangrong <guangrong.xiao@linux.intel.com> | 2015-06-15 16:55:24 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-06-19 17:16:27 +0200 |
commit | 70109e7d9d4ac7182786ddf7cd53bc651a157896 (patch) | |
tree | 39917118b57b0cdd0125b298bac4d39f077018cd /arch/x86/kvm | |
parent | eb839917a75207b89799e3500211163cb6de0dea (diff) | |
download | linux-70109e7d9d4ac7182786ddf7cd53bc651a157896.tar.bz2 |
KVM: MTRR: remove mtrr_state.have_fixed
vMTRR does not depend on any host MTRR feature and fixed MTRRs have always
been implemented, so drop this field
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/mtrr.c | 7 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c index a05846a524d9..ce061fffc077 100644 --- a/arch/x86/kvm/mtrr.c +++ b/arch/x86/kvm/mtrr.c @@ -103,7 +103,7 @@ EXPORT_SYMBOL_GPL(kvm_mtrr_valid); static void update_mtrr(struct kvm_vcpu *vcpu, u32 msr) { - struct mtrr_state_type *mtrr_state = &vcpu->arch.mtrr_state; + struct kvm_mtrr *mtrr_state = &vcpu->arch.mtrr_state; unsigned char mtrr_enabled = mtrr_state->enabled; gfn_t start, end, mask; int index; @@ -247,7 +247,7 @@ int kvm_mtrr_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) * The function is based on mtrr_type_lookup() in * arch/x86/kernel/cpu/mtrr/generic.c */ -static int get_mtrr_type(struct mtrr_state_type *mtrr_state, +static int get_mtrr_type(struct kvm_mtrr *mtrr_state, u64 start, u64 end) { u64 base, mask; @@ -262,8 +262,7 @@ static int get_mtrr_type(struct mtrr_state_type *mtrr_state, end--; /* Look in fixed ranges. Just return the type as per start */ - if (mtrr_state->have_fixed && (mtrr_state->enabled & 0x1) && - (start < 0x100000)) { + if ((mtrr_state->enabled & 0x1) && (start < 0x100000)) { int idx; if (start < 0x80000) { diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index fb6c9a11b5c1..2ffad7f2a28e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -7379,7 +7379,6 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) { int r; - vcpu->arch.mtrr_state.have_fixed = 1; r = vcpu_load(vcpu); if (r) return r; |