All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Don't clear HCR_VM bit when updating VTTBR.
@ 2016-10-10 19:27 Jun Sun
  2016-10-12  0:21 ` Jun Sun
  2016-10-19 19:59 ` Stefano Stabellini
  0 siblings, 2 replies; 7+ messages in thread
From: Jun Sun @ 2016-10-10 19:27 UTC (permalink / raw)
  To: xen-devel; +Cc: julien.grall, sstabellini, Jun Sun

Currently function p2m_restore_state() would clear HCR_VM bit, i.e.,
disabling stage2 translation, before updating VTTBR register. After
some research and talking to ARM support, I got confirmed that this is not
necessary. We are currently working on a new platform that would need this
to be removed.

The patch is tested on FVP foundation model.

Signed-off-by: Jun Sun <jsun@junsun.net>
---
 xen/arch/arm/p2m.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index cc5634b..e4991df 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -140,8 +140,6 @@ void p2m_restore_state(struct vcpu *n)
         return;
 
     hcr = READ_SYSREG(HCR_EL2);
-    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
-    isb();
 
     WRITE_SYSREG64(p2m->vttbr, VTTBR_EL2);
     isb();
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] Don't clear HCR_VM bit when updating VTTBR.
  2016-10-10 19:27 [PATCH] Don't clear HCR_VM bit when updating VTTBR Jun Sun
@ 2016-10-12  0:21 ` Jun Sun
  2016-10-19 19:59 ` Stefano Stabellini
  1 sibling, 0 replies; 7+ messages in thread
From: Jun Sun @ 2016-10-12  0:21 UTC (permalink / raw)
  To: xen-devel; +Cc: julien.grall, sstabellini, Jun Sun


[-- Attachment #1.1: Type: text/plain, Size: 1018 bytes --]

Sorry to be pushy - any feedback on this simple little patch?

Cheers.

Jun

On Mon, Oct 10, 2016 at 12:27 PM, Jun Sun <jsun@junsun.net> wrote:

> Currently function p2m_restore_state() would clear HCR_VM bit, i.e.,
> disabling stage2 translation, before updating VTTBR register. After
> some research and talking to ARM support, I got confirmed that this is not
> necessary. We are currently working on a new platform that would need this
> to be removed.
>
> The patch is tested on FVP foundation model.
>
> Signed-off-by: Jun Sun <jsun@junsun.net>
> ---
>  xen/arch/arm/p2m.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index cc5634b..e4991df 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -140,8 +140,6 @@ void p2m_restore_state(struct vcpu *n)
>          return;
>
>      hcr = READ_SYSREG(HCR_EL2);
> -    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
> -    isb();
>
>      WRITE_SYSREG64(p2m->vttbr, VTTBR_EL2);
>      isb();
> --
> 2.7.4
>
>

[-- Attachment #1.2: Type: text/html, Size: 1574 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] Don't clear HCR_VM bit when updating VTTBR.
  2016-10-10 19:27 [PATCH] Don't clear HCR_VM bit when updating VTTBR Jun Sun
  2016-10-12  0:21 ` Jun Sun
@ 2016-10-19 19:59 ` Stefano Stabellini
  2016-10-31 11:25   ` Steve Capper
  1 sibling, 1 reply; 7+ messages in thread
From: Stefano Stabellini @ 2016-10-19 19:59 UTC (permalink / raw)
  To: Jun Sun; +Cc: xen-devel, julien.grall, sstabellini, steve.capper

On Mon, 10 Oct 2016, Jun Sun wrote:
> Currently function p2m_restore_state() would clear HCR_VM bit, i.e.,
> disabling stage2 translation, before updating VTTBR register. After
> some research and talking to ARM support, I got confirmed that this is not
> necessary. We are currently working on a new platform that would need this
> to be removed.
> 
> The patch is tested on FVP foundation model.
> 
> Signed-off-by: Jun Sun <jsun@junsun.net>

Hello Jun,

thanks for the patch and sorry for the late reply. I would appreciate
feedback from Julien, but he is current AFK.

Steve,
can I have your Acked-by on this patch?


>  xen/arch/arm/p2m.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index cc5634b..e4991df 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -140,8 +140,6 @@ void p2m_restore_state(struct vcpu *n)
>          return;
>  
>      hcr = READ_SYSREG(HCR_EL2);
> -    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
> -    isb();
>  
>      WRITE_SYSREG64(p2m->vttbr, VTTBR_EL2);
>      isb();
> -- 
> 2.7.4
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] Don't clear HCR_VM bit when updating VTTBR.
  2016-10-19 19:59 ` Stefano Stabellini
@ 2016-10-31 11:25   ` Steve Capper
  2016-10-31 22:18     ` Stefano Stabellini
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Capper @ 2016-10-31 11:25 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel, julien.grall, Jun Sun

On Wed, Oct 19, 2016 at 12:59:45PM -0700, Stefano Stabellini wrote:
> On Mon, 10 Oct 2016, Jun Sun wrote:
> > Currently function p2m_restore_state() would clear HCR_VM bit, i.e.,
> > disabling stage2 translation, before updating VTTBR register. After
> > some research and talking to ARM support, I got confirmed that this is not
> > necessary. We are currently working on a new platform that would need this
> > to be removed.
> > 
> > The patch is tested on FVP foundation model.
> > 
> > Signed-off-by: Jun Sun <jsun@junsun.net>
> 
> Hello Jun,
> 
> thanks for the patch and sorry for the late reply. I would appreciate
> feedback from Julien, but he is current AFK.
> 
> Steve,
> can I have your Acked-by on this patch?
> 

Apologies for my very late reply on this.

I've taken a look and I think that this is okay, so please feel free to
add:
Acked-by: Steve Capper <steve.capper@linaro.org>

Cheers,
-- 
Steve

> 
> >  xen/arch/arm/p2m.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> > index cc5634b..e4991df 100644
> > --- a/xen/arch/arm/p2m.c
> > +++ b/xen/arch/arm/p2m.c
> > @@ -140,8 +140,6 @@ void p2m_restore_state(struct vcpu *n)
> >          return;
> >  
> >      hcr = READ_SYSREG(HCR_EL2);
> > -    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
> > -    isb();
> >  
> >      WRITE_SYSREG64(p2m->vttbr, VTTBR_EL2);
> >      isb();
> > -- 
> > 2.7.4
> > 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] Don't clear HCR_VM bit when updating VTTBR.
  2016-10-31 11:25   ` Steve Capper
@ 2016-10-31 22:18     ` Stefano Stabellini
  2016-11-01 14:38       ` Julien Grall
  0 siblings, 1 reply; 7+ messages in thread
From: Stefano Stabellini @ 2016-10-31 22:18 UTC (permalink / raw)
  To: Steve Capper; +Cc: xen-devel, julien.grall, Stefano Stabellini, Jun Sun

On Mon, 31 Oct 2016, Steve Capper wrote:
> On Wed, Oct 19, 2016 at 12:59:45PM -0700, Stefano Stabellini wrote:
> > On Mon, 10 Oct 2016, Jun Sun wrote:
> > > Currently function p2m_restore_state() would clear HCR_VM bit, i.e.,
> > > disabling stage2 translation, before updating VTTBR register. After
> > > some research and talking to ARM support, I got confirmed that this is not
> > > necessary. We are currently working on a new platform that would need this
> > > to be removed.
> > > 
> > > The patch is tested on FVP foundation model.
> > > 
> > > Signed-off-by: Jun Sun <jsun@junsun.net>
> > 
> > Hello Jun,
> > 
> > thanks for the patch and sorry for the late reply. I would appreciate
> > feedback from Julien, but he is current AFK.
> > 
> > Steve,
> > can I have your Acked-by on this patch?
> > 
> 
> Apologies for my very late reply on this.
> 
> I've taken a look and I think that this is okay, so please feel free to
> add:
> Acked-by: Steve Capper <steve.capper@linaro.org>

Thanks Steve. Given the state of the release, I am going to push the fix
to Xen 4.9 unless you or Jun have a strong argument for committing this
sooner.


> > 
> > >  xen/arch/arm/p2m.c | 2 --
> > >  1 file changed, 2 deletions(-)
> > > 
> > > diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> > > index cc5634b..e4991df 100644
> > > --- a/xen/arch/arm/p2m.c
> > > +++ b/xen/arch/arm/p2m.c
> > > @@ -140,8 +140,6 @@ void p2m_restore_state(struct vcpu *n)
> > >          return;
> > >  
> > >      hcr = READ_SYSREG(HCR_EL2);
> > > -    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
> > > -    isb();
> > >  
> > >      WRITE_SYSREG64(p2m->vttbr, VTTBR_EL2);
> > >      isb();
> > > -- 
> > > 2.7.4
> > > 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] Don't clear HCR_VM bit when updating VTTBR.
  2016-10-31 22:18     ` Stefano Stabellini
@ 2016-11-01 14:38       ` Julien Grall
  2016-11-01 18:10         ` Stefano Stabellini
  0 siblings, 1 reply; 7+ messages in thread
From: Julien Grall @ 2016-11-01 14:38 UTC (permalink / raw)
  To: Stefano Stabellini, Steve Capper; +Cc: xen-devel, Jun Sun

Hi Stefano,

On 31/10/2016 22:18, Stefano Stabellini wrote:
> On Mon, 31 Oct 2016, Steve Capper wrote:
>> On Wed, Oct 19, 2016 at 12:59:45PM -0700, Stefano Stabellini wrote:
>>> On Mon, 10 Oct 2016, Jun Sun wrote:
>>>> Currently function p2m_restore_state() would clear HCR_VM bit, i.e.,
>>>> disabling stage2 translation, before updating VTTBR register. After
>>>> some research and talking to ARM support, I got confirmed that this is not
>>>> necessary. We are currently working on a new platform that would need this
>>>> to be removed.
>>>>
>>>> The patch is tested on FVP foundation model.
>>>>
>>>> Signed-off-by: Jun Sun <jsun@junsun.net>
>>>
>>> Hello Jun,
>>>
>>> thanks for the patch and sorry for the late reply. I would appreciate
>>> feedback from Julien, but he is current AFK.
>>>
>>> Steve,
>>> can I have your Acked-by on this patch?
>>>
>>
>> Apologies for my very late reply on this.
>>
>> I've taken a look and I think that this is okay, so please feel free to
>> add:
>> Acked-by: Steve Capper <steve.capper@linaro.org>
>
> Thanks Steve. Given the state of the release, I am going to push the fix
> to Xen 4.9 unless you or Jun have a strong argument for committing this
> sooner.

Not related to this patch. Do you plan to have a branch for queuing all 
Xen 4.9 patches?

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] Don't clear HCR_VM bit when updating VTTBR.
  2016-11-01 14:38       ` Julien Grall
@ 2016-11-01 18:10         ` Stefano Stabellini
  0 siblings, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2016-11-01 18:10 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel, Stefano Stabellini, Steve Capper, Jun Sun

On Tue, 1 Nov 2016, Julien Grall wrote:
> Hi Stefano,
> 
> On 31/10/2016 22:18, Stefano Stabellini wrote:
> > On Mon, 31 Oct 2016, Steve Capper wrote:
> > > On Wed, Oct 19, 2016 at 12:59:45PM -0700, Stefano Stabellini wrote:
> > > > On Mon, 10 Oct 2016, Jun Sun wrote:
> > > > > Currently function p2m_restore_state() would clear HCR_VM bit, i.e.,
> > > > > disabling stage2 translation, before updating VTTBR register. After
> > > > > some research and talking to ARM support, I got confirmed that this is
> > > > > not
> > > > > necessary. We are currently working on a new platform that would need
> > > > > this
> > > > > to be removed.
> > > > > 
> > > > > The patch is tested on FVP foundation model.
> > > > > 
> > > > > Signed-off-by: Jun Sun <jsun@junsun.net>
> > > > 
> > > > Hello Jun,
> > > > 
> > > > thanks for the patch and sorry for the late reply. I would appreciate
> > > > feedback from Julien, but he is current AFK.
> > > > 
> > > > Steve,
> > > > can I have your Acked-by on this patch?
> > > > 
> > > 
> > > Apologies for my very late reply on this.
> > > 
> > > I've taken a look and I think that this is okay, so please feel free to
> > > add:
> > > Acked-by: Steve Capper <steve.capper@linaro.org>
> > 
> > Thanks Steve. Given the state of the release, I am going to push the fix
> > to Xen 4.9 unless you or Jun have a strong argument for committing this
> > sooner.
> 
> Not related to this patch. Do you plan to have a branch for queuing all Xen
> 4.9 patches?

Hi Julien, thanks a good suggestion (I am already starting to lose
patches). I created:

git://xenbits.xen.org/people/sstabellini/xen-unstable.git xen-arm-next

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-11-01 18:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10 19:27 [PATCH] Don't clear HCR_VM bit when updating VTTBR Jun Sun
2016-10-12  0:21 ` Jun Sun
2016-10-19 19:59 ` Stefano Stabellini
2016-10-31 11:25   ` Steve Capper
2016-10-31 22:18     ` Stefano Stabellini
2016-11-01 14:38       ` Julien Grall
2016-11-01 18:10         ` Stefano Stabellini

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.