All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org,
	Fu Wei <fu.wei@linaro.org>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: arm: setup sane EL1 state while building domain 0.
Date: Mon, 17 Mar 2014 15:50:35 +0000	[thread overview]
Message-ID: <532719CB.5010402@linaro.org> (raw)
In-Reply-To: <1395071175.18221.47.camel@kazak.uk.xensource.com>

On 03/17/2014 03:46 PM, Ian Campbell wrote:
> On Mon, 2014-03-17 at 15:37 +0000, Julien Grall wrote:
>> void p2m_restore_state(struct vcpu *n)
> 
> I think setup_state might be more indicative of the operation.
> 
>> {
>>     register_t hcr;
>>
>>     hcr = READ_SYSREG(HCR_EL2);
>>     WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
>>     isb();
> 
> I know we do this on context switch now but I think it is unnecessary
> and I plan to remove it.

Thanks to confirm, I wasn't sure if it was necessary or not.

>> IHMO, it's more clear than continuing "hardcoding" setup in dom0 code.
> 
> Are there any other potential callers?

Yes ctx_to_switch, so everything related to P2M context switch is
restrict to p2m.c. That why I choose this name, there is also a sister
function which will save the p2m context (p2m_save_state).

-- 
Julien Grall

  reply	other threads:[~2014-03-17 15:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 15:31 [PATCH] xen: arm: setup sane EL1 state while building domain 0 Ian Campbell
2014-03-17 15:37 ` Julien Grall
2014-03-17 15:46   ` Ian Campbell
2014-03-17 15:50     ` Julien Grall [this message]
2014-03-18  3:22 ` Fu Wei
2014-03-18  9:41   ` Ian Campbell
2014-03-18 12:16     ` Julien Grall
2014-03-18 12:37     ` Fu Wei

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=532719CB.5010402@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=fu.wei@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.