From 46dba6e8aa6d24865c665a23e13d641e558d9755 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 25 Jan 2014 10:02:15 -0800 Subject: [PATCH] 3.12-stable patches added patches: kvm-x86-fix-apic_base-enable-check.patch --- .../kvm-x86-fix-apic_base-enable-check.patch | 35 +++++++++++++++++++ queue-3.12/series | 1 + 2 files changed, 36 insertions(+) create mode 100644 queue-3.12/kvm-x86-fix-apic_base-enable-check.patch create mode 100644 queue-3.12/series diff --git a/queue-3.12/kvm-x86-fix-apic_base-enable-check.patch b/queue-3.12/kvm-x86-fix-apic_base-enable-check.patch new file mode 100644 index 00000000000..f5f79449e30 --- /dev/null +++ b/queue-3.12/kvm-x86-fix-apic_base-enable-check.patch @@ -0,0 +1,35 @@ +From 0dce7cd67fd9055c4a2ff278f8af1431e646d346 Mon Sep 17 00:00:00 2001 +From: Andrew Jones +Date: Wed, 15 Jan 2014 13:39:59 +0100 +Subject: kvm: x86: fix apic_base enable check + +From: Andrew Jones + +commit 0dce7cd67fd9055c4a2ff278f8af1431e646d346 upstream. + +Commit e66d2ae7c67bd moved the assignment +vcpu->arch.apic_base = value above a condition with +(vcpu->arch.apic_base ^ value), causing that check +to always fail. Use old_value, vcpu->arch.apic_base's +old value, in the condition instead. + +Signed-off-by: Andrew Jones +Signed-off-by: Paolo Bonzini +Cc: Radim Krčmář +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/lapic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kvm/lapic.c ++++ b/arch/x86/kvm/lapic.c +@@ -1355,7 +1355,7 @@ void kvm_lapic_set_base(struct kvm_vcpu + vcpu->arch.apic_base = value; + + /* update jump label if enable bit changes */ +- if ((vcpu->arch.apic_base ^ value) & MSR_IA32_APICBASE_ENABLE) { ++ if ((old_value ^ value) & MSR_IA32_APICBASE_ENABLE) { + if (value & MSR_IA32_APICBASE_ENABLE) + static_key_slow_dec_deferred(&apic_hw_disabled); + else diff --git a/queue-3.12/series b/queue-3.12/series new file mode 100644 index 00000000000..ac4d3c020f2 --- /dev/null +++ b/queue-3.12/series @@ -0,0 +1 @@ +kvm-x86-fix-apic_base-enable-check.patch -- 2.47.2