Re: [Xen-devel] [RFC 15/16] xen/arm: Implement Set/Way operations

2018-11-06 Thread Stefano Stabellini
On Tue, 6 Nov 2018, Julien Grall wrote: > Hi Stefano, > > On 06/11/2018 17:31, Stefano Stabellini wrote: > > On Mon, 5 Nov 2018, Julien Grall wrote: > > > > This will affect all the registers trapped with TVM. Shouldn't we only > > > > call p2m_toggle_cache when relevant? i.e. when changing SCTLR?

Re: [Xen-devel] [RFC 15/16] xen/arm: Implement Set/Way operations

2018-11-06 Thread Julien Grall
Hi Stefano, On 06/11/2018 17:31, Stefano Stabellini wrote: On Mon, 5 Nov 2018, Julien Grall wrote: This will affect all the registers trapped with TVM. Shouldn't we only call p2m_toggle_cache when relevant? i.e. when changing SCTLR? I think it would be better to only modify the SCTLR emulation

Re: [Xen-devel] [RFC 15/16] xen/arm: Implement Set/Way operations

2018-11-06 Thread Stefano Stabellini
On Mon, 5 Nov 2018, Julien Grall wrote: > > > +void p2m_set_way_flush(struct vcpu *v) > > > +{ > > > +/* This function can only work with the current vCPU. */ > > > +ASSERT(v == current); > > > > NIT: if it can only operate on current, it makes sense to remove the > > struct vcpu* paramete

Re: [Xen-devel] [RFC 15/16] xen/arm: Implement Set/Way operations

2018-11-05 Thread Julien Grall
Hi Stefano, On 11/5/18 9:10 PM, Stefano Stabellini wrote: On Mon, 8 Oct 2018, Julien Grall wrote: Set/Way operations are used to perform maintenance on a given cache. At the moment, Set/Way operations are not trapped and therefore a guest OS will directly act on the local cache. However, a vCPU

Re: [Xen-devel] [RFC 15/16] xen/arm: Implement Set/Way operations

2018-11-05 Thread Stefano Stabellini
On Mon, 8 Oct 2018, Julien Grall wrote: > Set/Way operations are used to perform maintenance on a given cache. > At the moment, Set/Way operations are not trapped and therefore a guest > OS will directly act on the local cache. However, a vCPU may migrate to > another pCPU in the middle of the proc

[Xen-devel] [RFC 15/16] xen/arm: Implement Set/Way operations

2018-10-08 Thread Julien Grall
Set/Way operations are used to perform maintenance on a given cache. At the moment, Set/Way operations are not trapped and therefore a guest OS will directly act on the local cache. However, a vCPU may migrate to another pCPU in the middle of the processor. This will result to have cache with stall