Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Vikram Sethi <vikrams@codeaurora.org>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>,
	Will Deacon <Will.Deacon@arm.com>,
	"mmcilvai@qti.qualcomm.com" <mmcilvai@qti.qualcomm.com>,
	"vikrams@qti.qualcomm.com" <vikrams@qti.qualcomm.com>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Subject: Re: HCPTR cp15 writes need isb?
Date: Wed, 17 Jun 2015 09:38:50 +0100	[thread overview]
Message-ID: <5581321A.2060300@arm.com> (raw)
In-Reply-To: <55806237.7060405@codeaurora.org>

On 16/06/15 18:51, Vikram Sethi wrote:
> On 06/16/15 07:47, Marc Zyngier wrote:
>> On 16/06/15 13:30, Vikram Sethi wrote:
>>> On 06/16/15 01:46, Marc Zyngier wrote:
>>>> On Tue, 16 Jun 2015 02:34:23 +0100
>>>> Vikram Sethi <vikrams@codeaurora.org> wrote:
>>>>
>>>> Hi Vikram,
>>>>
>>>>> 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.
>>>> [...]
>>>>
>>>> Can you look at the following patch (queued for 4.2)?
>>>>
>>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/330955.html
>>>>
>>>> Please let me know if this solves the issue you are seeing.
>>> Don't we have the same issue the first time guest touches FP and
>>> traps i.e in switch_to_guest_vfp where we turn on floating point
>>> access in HCPTR and immediately access FPEXC in store_vfp_state
>>> without a isb?
>> Good point, looks like my initial fix is incomplete. I'll repost a more
>> complete fix but in the meantime, does adding the following work for you?
> Yes, the additional isb in switch_to_guest_vfp along with your original patch works for me.
> When you refactor the original patch will it be cleaner to handle the
> isb in the set_hcptr macro whenever it is changed to not trap VFP
> access?

That's what I have done, but the result is a bit awkward, so I'm in two
minds about it. I'll post it in a minute, please check that it still
works for you (though I've checked that the generated code is the same).

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

      reply	other threads:[~2015-06-17  8:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=5581321A.2060300@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=mmcilvai@qti.qualcomm.com \
    --cc=vikrams@codeaurora.org \
    --cc=vikrams@qti.qualcomm.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