Linux KVM/arm64 development list
 help / color / mirror / Atom feed
* HCPTR cp15 writes need isb?
@ 2015-06-16  1:34 Vikram Sethi
  2015-06-16  6:46 ` Marc Zyngier
  0 siblings, 1 reply; 6+ messages in thread
From: Vikram Sethi @ 2015-06-16  1:34 UTC (permalink / raw)
  To: kvmarm@lists.cs.columbia.edu, marc.zyngier, Christoffer Dall,
	catalin.marinas, will.deacon, shankerd, mmcilvai, vikrams

Hi Marc, Christoffer, Catalin, Will,

I'm seeing an issue with KVM HCPTR (cp15) writes on guest entry/exit on one of Qualcomm's CPU cores in AArch32 host and AArch32 guest mode. Our CPU architects believe that HCPTR cp15 writes are context changing and require an isb.
With an isb in set_hcptr macro in arch/arm/kvm/interrupts_head.S I am able to boot the Aarch32 guest, but without it, I see strange crashes to hyp_undef or hyp_pabt.

What is your opinion on HCPTR cp15 writes being context changing and needing isb? I can submit a one line patch that adds the isb at the end of set_hcptr macro.

I did find some examples in ARMv7 ARM with an isb after cp15 write and an ARM blog [1] that states ISB "is used to ensure any previously executed context changing operations (including cp15 operations) will have completed by the time the ISB completed."

I also found this text from an older lkml thread [2] which seems to quote from an ARM document (although I cannot find the same text in ARMv7 ARM) "Any change to CP15 registers is guaranteed to be visible to subsequent
instructions only after one of isb, exception, return from exception"

1 http://community.arm.com/groups/processors/blog/2011/10/19/memory-access-ordering-part-3--memory-access-ordering-in-the-arm-architecture
2 http://lkml.iu.edu/hypermail/linux/kernel/1105.1/00475.html

Thanks,
Vikram

-- 
Vikram Sethi
Qualcomm Technologies Inc, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-17  8:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-16  1:34 HCPTR cp15 writes need isb? Vikram Sethi
2015-06-16  6:46 ` Marc Zyngier
2015-06-16 12:30   ` Vikram Sethi
2015-06-16 12:47     ` Marc Zyngier
2015-06-16 17:51       ` Vikram Sethi
2015-06-17  8:38         ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox