Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-08-08 Thread Dave Martin
On Tue, Aug 07, 2018 at 09:43:38PM +0200, Christoffer Dall wrote: > On Tue, Aug 07, 2018 at 12:15:26PM +0100, Dave Martin wrote: > > On Mon, Aug 06, 2018 at 03:19:10PM +0200, Christoffer Dall wrote: [...] > > > nit: this may also be folded nicely into a static bool > > >

Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-08-07 Thread Christoffer Dall
On Tue, Aug 07, 2018 at 12:15:26PM +0100, Dave Martin wrote: > On Mon, Aug 06, 2018 at 03:19:10PM +0200, Christoffer Dall wrote: > > On Thu, Jun 21, 2018 at 03:57:36PM +0100, Dave Martin wrote: > > > In order to give each vcpu its own view of the SVE registers, this > > > patch adds context

Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-08-07 Thread Dave Martin
On Mon, Aug 06, 2018 at 03:19:10PM +0200, Christoffer Dall wrote: > On Thu, Jun 21, 2018 at 03:57:36PM +0100, Dave Martin wrote: > > In order to give each vcpu its own view of the SVE registers, this > > patch adds context storage via a new sve_state pointer in struct > > vcpu_arch. An additional

Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-08-06 Thread Christoffer Dall
On Thu, Jun 21, 2018 at 03:57:36PM +0100, Dave Martin wrote: > In order to give each vcpu its own view of the SVE registers, this > patch adds context storage via a new sve_state pointer in struct > vcpu_arch. An additional member sve_max_vl is also added for each > vcpu, to determine the maximum

Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-07-25 Thread Dave Martin
On Wed, Jul 25, 2018 at 03:57:33PM +0200, Andrew Jones wrote: > On Wed, Jul 25, 2018 at 12:50:45PM +0100, Dave Martin wrote: > > > > + if (system_supports_sve() && guest_has_sve) > > > > As elsewhere, the system_supports_sve() check uses a static key and > > should be very cheap (or free in

Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-07-25 Thread Andrew Jones
On Wed, Jul 25, 2018 at 12:50:45PM +0100, Dave Martin wrote: > > > + if (system_supports_sve() && guest_has_sve) > > As elsewhere, the system_supports_sve() check uses a static key and > should be very cheap (or free in a CONFIG_ARM64_SVE=n kernel). > Yup, I'm clear on that now. Thanks again for

Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-07-25 Thread Dave Martin
On Thu, Jul 19, 2018 at 03:13:38PM +0200, Andrew Jones wrote: > On Thu, Jun 21, 2018 at 03:57:36PM +0100, Dave Martin wrote: > > In order to give each vcpu its own view of the SVE registers, this > > patch adds context storage via a new sve_state pointer in struct > > vcpu_arch. An additional

Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-07-19 Thread Andrew Jones
On Thu, Jun 21, 2018 at 03:57:36PM +0100, Dave Martin wrote: > In order to give each vcpu its own view of the SVE registers, this > patch adds context storage via a new sve_state pointer in struct > vcpu_arch. An additional member sve_max_vl is also added for each > vcpu, to determine the maximum

[RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-06-21 Thread Dave Martin
In order to give each vcpu its own view of the SVE registers, this patch adds context storage via a new sve_state pointer in struct vcpu_arch. An additional member sve_max_vl is also added for each vcpu, to determine the maximum vector length visible to the guest and thus the value to be