diff options
author | Paolo Bonzini | 2019-08-09 16:53:50 +0200 |
---|---|---|
committer | Paolo Bonzini | 2019-08-09 16:53:50 +0200 |
commit | a738b5e75b4c13be3485c82eb62c30047aa9f164 (patch) | |
tree | f47fca53ee79938be283e13cf5d48def68f9dad2 /virt/kvm/arm/vgic/vgic.c | |
parent | Merge tag 'kvmarm-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
parent | KVM: arm/arm64: vgic: Reevaluate level sensitive interrupts on enable (diff) | |
download | kernel-qcow2-linux-a738b5e75b4c13be3485c82eb62c30047aa9f164.tar.gz kernel-qcow2-linux-a738b5e75b4c13be3485c82eb62c30047aa9f164.tar.xz kernel-qcow2-linux-a738b5e75b4c13be3485c82eb62c30047aa9f164.zip |
Merge tag 'kvmarm-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm fixes for 5.3, take #2
- Fix our system register reset so that we stop writing
non-sensical values to them, and track which registers
get reset instead.
- Sync VMCR back from the GIC on WFI so that KVM has an
exact vue of PMR.
- Reevaluate state of HW-mapped, level triggered interrupts
on enable.
Diffstat (limited to 'virt/kvm/arm/vgic/vgic.c')
-rw-r--r-- | virt/kvm/arm/vgic/vgic.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c index 04786c8ec77e..13d4b38a94ec 100644 --- a/virt/kvm/arm/vgic/vgic.c +++ b/virt/kvm/arm/vgic/vgic.c @@ -919,6 +919,17 @@ void kvm_vgic_put(struct kvm_vcpu *vcpu) vgic_v3_put(vcpu); } +void kvm_vgic_vmcr_sync(struct kvm_vcpu *vcpu) +{ + if (unlikely(!irqchip_in_kernel(vcpu->kvm))) + return; + + if (kvm_vgic_global_state.type == VGIC_V2) + vgic_v2_vmcr_sync(vcpu); + else + vgic_v3_vmcr_sync(vcpu); +} + int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu) { struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; |