From mboxrd@z Thu Jan 1 00:00:00 1970 From: christoffer.dall@linaro.org (Christoffer Dall) Date: Wed, 19 Jun 2013 17:18:20 -0700 Subject: [PATCH 3/5] ARM: KVM: make sure maintainance operation complete before world switch In-Reply-To: <1371648006-8036-4-git-send-email-marc.zyngier@arm.com> References: <1371648006-8036-1-git-send-email-marc.zyngier@arm.com> <1371648006-8036-4-git-send-email-marc.zyngier@arm.com> Message-ID: <20130620001820.GJ7870@lvm> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Jun 19, 2013 at 02:20:04PM +0100, Marc Zyngier wrote: > We may have preempted the guest while it was performing a maintainance > operation (TLB invalidation, for example). Make sure it completes > before we do anything else by adding the necessary barriers. > > Signed-off-by: Marc Zyngier > --- > arch/arm/kvm/interrupts.S | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S > index afa6c04..3124e0f 100644 > --- a/arch/arm/kvm/interrupts.S > +++ b/arch/arm/kvm/interrupts.S > @@ -149,6 +149,15 @@ __kvm_vcpu_return: > * r0: vcpu pointer > * r1: exception code > */ > + > + /* > + * We may have preempted the guest while it was performing a > + * maintainance operation (TLB invalidation, for example). Make > + * sure it completes before we do anything else. > + */ Can you explain what could go wrong here without these two instructions? > + dsb > + isb > + > save_guest_regs > > @ Set VMID == 0 > -- > 1.8.2.3 > > > > _______________________________________________ > kvmarm mailing list > kvmarm at lists.cs.columbia.edu > https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm