summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-09-13 07:57:17 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-09-13 07:57:17 -0700
commitcec46a59f3cc035d44348ffb866aa5d2026f907f (patch)
tree7d349c3c8302a15ecd45710daa69846dcd79e41b /arch
parentf97511b3d6ffdd7b90fab0f25e79b1df5c8b9be2 (diff)
parent79fcbddd736bfcc606ccf4555d0879af3b20da26 (diff)
Merge "Merge android-4.4.192 (da6d147) into msm-4.4"
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kvm/mmio.c7
-rw-r--r--arch/x86/kernel/apic/apic.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
index ae61e2ea7255..d2efc033ef8b 100644
--- a/arch/arm/kvm/mmio.c
+++ b/arch/arm/kvm/mmio.c
@@ -98,6 +98,12 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run)
unsigned int len;
int mask;
+ /* Detect an already handled MMIO return */
+ if (unlikely(!vcpu->mmio_needed))
+ return 0;
+
+ vcpu->mmio_needed = 0;
+
if (!run->mmio.is_write) {
len = run->mmio.len;
if (len > sizeof(unsigned long))
@@ -206,6 +212,7 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
run->mmio.is_write = is_write;
run->mmio.phys_addr = fault_ipa;
run->mmio.len = len;
+ vcpu->mmio_needed = 1;
if (!ret) {
/* We handled the access successfully in the kernel. */
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 80c94fc8ad5a..834d1b5b4355 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1031,10 +1031,6 @@ void clear_local_APIC(void)
apic_write(APIC_LVT0, v | APIC_LVT_MASKED);
v = apic_read(APIC_LVT1);
apic_write(APIC_LVT1, v | APIC_LVT_MASKED);
- if (!x2apic_enabled()) {
- v = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
- apic_write(APIC_LDR, v);
- }
if (maxlvt >= 4) {
v = apic_read(APIC_LVTPC);
apic_write(APIC_LVTPC, v | APIC_LVT_MASKED);