summaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-06-20 16:50:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-06-20 16:50:37 -0400
commitb3e978337b25b042aa653652a029e3d798814c12 (patch)
treef03c4b0b6d9eadb4cef3daa8c1f9920415cdcefe /virt/kvm
parente929387449cf631e96840296a01922be1ef3c832 (diff)
parentb21e31b253048b7f9768ca7cc270e67765fd6ba2 (diff)
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixes from Paolo Bonzini: "Fixes for ARM and x86, plus selftest patches and nicer structs for nested state save/restore" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: nVMX: reorganize initial steps of vmx_set_nested_state KVM: arm/arm64: Fix emulated ptimer irq injection tests: kvm: Check for a kernel warning kvm: tests: Sort tests in the Makefile alphabetically KVM: x86/mmu: Allocate PAE root array when using SVM's 32-bit NPT KVM: x86: Modify struct kvm_nested_state to have explicit fields for data KVM: fix typo in documentation KVM: nVMX: use correct clean fields when copying from eVMCS KVM: arm/arm64: vgic: Fix kvm_device leak in vgic_its_destroy KVM: arm64: Filter out invalid core register IDs in KVM_GET_REG_LIST KVM: arm64: Implement vq_present() as a macro
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/arm/arch_timer.c5
-rw-r--r--virt/kvm/arm/vgic/vgic-its.c1
2 files changed, 4 insertions, 2 deletions
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
index 05ddb6293b79..1be486d5d7cb 100644
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@ -309,14 +309,15 @@ static void kvm_timer_update_irq(struct kvm_vcpu *vcpu, bool new_level,
309 } 309 }
310} 310}
311 311
312/* Only called for a fully emulated timer */
312static void timer_emulate(struct arch_timer_context *ctx) 313static void timer_emulate(struct arch_timer_context *ctx)
313{ 314{
314 bool should_fire = kvm_timer_should_fire(ctx); 315 bool should_fire = kvm_timer_should_fire(ctx);
315 316
316 trace_kvm_timer_emulate(ctx, should_fire); 317 trace_kvm_timer_emulate(ctx, should_fire);
317 318
318 if (should_fire) { 319 if (should_fire != ctx->irq.level) {
319 kvm_timer_update_irq(ctx->vcpu, true, ctx); 320 kvm_timer_update_irq(ctx->vcpu, should_fire, ctx);
320 return; 321 return;
321 } 322 }
322 323
diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index 44ceaccb18cf..8c9fe831bce4 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -1734,6 +1734,7 @@ static void vgic_its_destroy(struct kvm_device *kvm_dev)
1734 1734
1735 mutex_unlock(&its->its_lock); 1735 mutex_unlock(&its->its_lock);
1736 kfree(its); 1736 kfree(its);
1737 kfree(kvm_dev);/* alloc by kvm_ioctl_create_device, free by .destroy */
1737} 1738}
1738 1739
1739static int vgic_its_has_attr_regs(struct kvm_device *dev, 1740static int vgic_its_has_attr_regs(struct kvm_device *dev,