public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: gengdongjiu <gengdongjiu@huawei.com>, James Morse <james.morse@arm.com>
Cc: christoffer.dall@linaro.org, vladimir.murzin@arm.com,
	rkrcmar@redhat.com, catalin.marinas@arm.com,
	shankerd@codeaurora.org, linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, zhanghaibin7@huawei.com,
	huangshaoyu@huawei.com
Subject: Re: [PATCH] arm64: KVM: VHE: reset PSTATE.UAO when switch to host
Date: Thu, 7 Sep 2017 11:13:46 +0100	[thread overview]
Message-ID: <ec27c833-c9f7-d144-3c6f-a87a3bf3d97f@arm.com> (raw)
In-Reply-To: <f710f68a-1e89-85a6-41a6-afc7588114db@huawei.com>

On 07/09/17 11:05, gengdongjiu wrote:
> Hi James,
> 
> On 2017/9/7 17:20, James Morse wrote:
>> Hi Dongjiu Geng,
>>
>> On 07/09/17 06:54, Dongjiu Geng wrote:
>>> In VHE mode, host kernel runs in the EL2 and can enable
>>> 'User Access Override' when fs==KERNEL_DS so that it can
>>> access kernel memory. However, PSTATE.UAO is set to 0 on
>>> an exception taken from EL1 to EL2. Thus when VHE is used
>>> and exception taken from a guest UAO will be disabled and
>>> host will use the incorrect PSTATE.UAO. So check and reset
>>> the PSTATE.UAO when switching to host.
>>
>> This would only be a problem if KVM were calling into world-switch with
>> fs==KERNEL_DS. I can't see where this happens.
>  Not only KVM, may also kernel sets the fs == KERNEL_DS before calling into world-switch

How? Please describe the exact sequence of event that lead to this
situation with the current code base.

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

  reply	other threads:[~2017-09-07 10:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  5:54 [PATCH] arm64: KVM: VHE: reset PSTATE.UAO when switch to host Dongjiu Geng
2017-09-07  9:20 ` James Morse
2017-09-07 10:05   ` gengdongjiu
2017-09-07 10:13     ` Marc Zyngier [this message]
2017-09-07 11:49       ` gengdongjiu
2017-09-07 12:00         ` Marc Zyngier
  -- strict thread matches above, loose matches on Subject: below --
2017-09-07 15:03 gengdongjiu
2017-09-07 15:23 ` Marc Zyngier
2017-09-08  7:19   ` gengdongjiu
2017-09-08  8:21     ` Marc Zyngier
2017-09-08  9:05       ` gengdongjiu
2017-09-08 12:10         ` Marc Zyngier
2017-09-08 13:33 gengdongjiu

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=ec27c833-c9f7-d144-3c6f-a87a3bf3d97f@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=gengdongjiu@huawei.com \
    --cc=huangshaoyu@huawei.com \
    --cc=james.morse@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=shankerd@codeaurora.org \
    --cc=vladimir.murzin@arm.com \
    --cc=zhanghaibin7@huawei.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