From: Marc Zyngier Date: Mon, 19 Mar 2018 17:43:01 +0000 (+0000) Subject: Merge tag 'kvm-arm-fixes-for-v4.16-2' into HEAD X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5fbb0df6f68e31a586b947433e93ba9654c8080f;p=openwrt%2Fstaging%2Fblogic.git Merge tag 'kvm-arm-fixes-for-v4.16-2' into HEAD Resolve conflicts with current mainline --- 5fbb0df6f68e31a586b947433e93ba9654c8080f diff --cc arch/arm/kvm/hyp/Makefile index 1964111c984a,63d6b404d88e..7fc0638f263a --- a/arch/arm/kvm/hyp/Makefile +++ b/arch/arm/kvm/hyp/Makefile @@@ -7,6 -7,9 +7,8 @@@ ccflags-y += -fno-stack-protector -DDIS KVM=../../../../virt/kvm + CFLAGS_ARMV7VE :=$(call cc-option, -march=armv7ve) + -obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v2-sr.o obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v3-sr.o obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/timer-sr.o diff --cc virt/kvm/arm/hyp/vgic-v3-sr.c index b13cbd41dbc3,b89ce5432214..616e5a433ab0 --- a/virt/kvm/arm/hyp/vgic-v3-sr.c +++ b/virt/kvm/arm/hyp/vgic-v3-sr.c @@@ -212,12 -211,13 +212,14 @@@ void __hyp_text __vgic_v3_save_state(st /* * Make sure stores to the GIC via the memory mapped interface - * are now visible to the system register interface. + * are now visible to the system register interface when reading the + * LRs, and when reading back the VMCR on non-VHE systems. */ - if (!cpu_if->vgic_sre) { - dsb(sy); - isb(); - cpu_if->vgic_vmcr = read_gicreg(ICH_VMCR_EL2); + if (used_lrs || !has_vhe()) { - if (!cpu_if->vgic_sre) - dsb(st); ++ if (!cpu_if->vgic_sre) { ++ dsb(sy); ++ isb(); ++ } } if (used_lrs) {