diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-23 02:24:42 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-23 02:24:42 -0400 |
commit | 0da029ed7ee5fdf49a2a0e14160c3e9999be9292 (patch) | |
tree | 9475934dd30001dafa00cb2e721f66f0e1f5fb6d | |
parent | fb279950ba02e3210a16b11ecfa8871f3ee0ca49 (diff) |
KVM: x86: rename quirk constants to KVM_X86_QUIRK_*
Make them clearly architecture-dependent; the capability is valid for
all architectures, but the argument is not.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/include/uapi/asm/kvm.h | 4 | ||||
-rw-r--r-- | arch/x86/kvm/lapic.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/svm.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h index a4ae82eb82aa..cd54147cb365 100644 --- a/arch/x86/include/uapi/asm/kvm.h +++ b/arch/x86/include/uapi/asm/kvm.h | |||
@@ -354,7 +354,7 @@ struct kvm_xcrs { | |||
354 | struct kvm_sync_regs { | 354 | struct kvm_sync_regs { |
355 | }; | 355 | }; |
356 | 356 | ||
357 | #define KVM_QUIRK_LINT0_REENABLED (1 << 0) | 357 | #define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0) |
358 | #define KVM_QUIRK_CD_NW_CLEARED (1 << 1) | 358 | #define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1) |
359 | 359 | ||
360 | #endif /* _ASM_X86_KVM_H */ | 360 | #endif /* _ASM_X86_KVM_H */ |
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 1c425443a41a..2a5ca97c263b 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -1595,7 +1595,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event) | |||
1595 | for (i = 0; i < APIC_LVT_NUM; i++) | 1595 | for (i = 0; i < APIC_LVT_NUM; i++) |
1596 | apic_set_reg(apic, APIC_LVTT + 0x10 * i, APIC_LVT_MASKED); | 1596 | apic_set_reg(apic, APIC_LVTT + 0x10 * i, APIC_LVT_MASKED); |
1597 | apic_update_lvtt(apic); | 1597 | apic_update_lvtt(apic); |
1598 | if (kvm_check_has_quirk(vcpu->kvm, KVM_QUIRK_LINT0_REENABLED)) | 1598 | if (kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_LINT0_REENABLED)) |
1599 | apic_set_reg(apic, APIC_LVT0, | 1599 | apic_set_reg(apic, APIC_LVT0, |
1600 | SET_APIC_DELIVERY_MODE(0, APIC_MODE_EXTINT)); | 1600 | SET_APIC_DELIVERY_MODE(0, APIC_MODE_EXTINT)); |
1601 | apic_manage_nmi_watchdog(apic, kvm_apic_get_reg(apic, APIC_LVT0)); | 1601 | apic_manage_nmi_watchdog(apic, kvm_apic_get_reg(apic, APIC_LVT0)); |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 8cbec765b08d..8e0c0844c6b9 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1672,7 +1672,7 @@ static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
1672 | * does not do it - this results in some delay at | 1672 | * does not do it - this results in some delay at |
1673 | * reboot | 1673 | * reboot |
1674 | */ | 1674 | */ |
1675 | if (kvm_check_has_quirk(vcpu->kvm, KVM_QUIRK_CD_NW_CLEARED)) | 1675 | if (kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_CD_NW_CLEARED)) |
1676 | cr0 &= ~(X86_CR0_CD | X86_CR0_NW); | 1676 | cr0 &= ~(X86_CR0_CD | X86_CR0_NW); |
1677 | svm->vmcb->save.cr0 = cr0; | 1677 | svm->vmcb->save.cr0 = cr0; |
1678 | mark_dirty(svm->vmcb, VMCB_CR); | 1678 | mark_dirty(svm->vmcb, VMCB_CR); |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index e9e1fc517ab5..83b7b5cd75d5 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -8650,7 +8650,7 @@ static u64 vmx_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio) | |||
8650 | 8650 | ||
8651 | if (kvm_read_cr0(vcpu) & X86_CR0_CD) { | 8651 | if (kvm_read_cr0(vcpu) & X86_CR0_CD) { |
8652 | ipat = VMX_EPT_IPAT_BIT; | 8652 | ipat = VMX_EPT_IPAT_BIT; |
8653 | if (kvm_check_has_quirk(vcpu->kvm, KVM_QUIRK_CD_NW_CLEARED)) | 8653 | if (kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_CD_NW_CLEARED)) |
8654 | cache = MTRR_TYPE_WRBACK; | 8654 | cache = MTRR_TYPE_WRBACK; |
8655 | else | 8655 | else |
8656 | cache = MTRR_TYPE_UNCACHABLE; | 8656 | cache = MTRR_TYPE_UNCACHABLE; |