From: Vikram Sethi <vikrams@codeaurora.org>
To: "kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
marc.zyngier@arm.com,
Christoffer Dall <christoffer.dall@linaro.org>,
catalin.marinas@arm.com, will.deacon@arm.com,
shankerd@codeaurora.org, mmcilvai@qti.qualcomm.com,
vikrams@qti.qualcomm.com
Subject: HCPTR cp15 writes need isb?
Date: Mon, 15 Jun 2015 20:34:23 -0500 [thread overview]
Message-ID: <557F7D1F.1070308@codeaurora.org> (raw)
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
next reply other threads:[~2015-06-16 1:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 1:34 Vikram Sethi [this message]
2015-06-16 6:46 ` HCPTR cp15 writes need isb? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=557F7D1F.1070308@codeaurora.org \
--to=vikrams@codeaurora.org \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=marc.zyngier@arm.com \
--cc=mmcilvai@qti.qualcomm.com \
--cc=shankerd@codeaurora.org \
--cc=vikrams@qti.qualcomm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox