Re: [PATCH 08/37] KVM: arm64: Defer restoring host VFP state to vcpu_put

2017-11-26 Thread Yury Norov
On Sun, Nov 26, 2017 at 08:18:34PM +0100, Christoffer Dall wrote: > On Sun, Nov 26, 2017 at 09:58:52PM +0300, Yury Norov wrote: > > On Sun, Nov 26, 2017 at 05:17:16PM +0100, Christoffer Dall wrote: > > > Hi Yury, > > > > > > On Sat, Nov 25, 2017 at 10:52:21AM +0300, Yury Norov wrote: > > > > > >

Re: [PATCH 36/37] KVM: arm/arm64: Move VGIC APR save/restore to vgic put/load

2017-11-26 Thread Christoffer Dall
On Sun, Nov 26, 2017 at 06:09:25PM +0300, Yury Norov wrote: > On Thu, Oct 12, 2017 at 12:41:40PM +0200, Christoffer Dall wrote: > > The APRs can only have bits set when the guest acknowledges an interrupt > > in the LR and can only have a bit cleared when the guest EOIs an > > interrupt in the LR.

Re: [PATCH 35/37] KVM: arm/arm64: Get rid of vgic_elrsr

2017-11-26 Thread Christoffer Dall
On Sun, Nov 26, 2017 at 05:39:02PM +0300, Yury Norov wrote: > On Thu, Oct 12, 2017 at 12:41:39PM +0200, Christoffer Dall wrote: > > There is really no need to store the vgic_elrsr on the VGIC data > > structures as the only need we have for the elrsr is to figure out if an > > LR is inavtive when

Re: [PATCH 32/37] KVM: arm/arm64: Handle VGICv2 save/restore from the main VGIC code

2017-11-26 Thread Christoffer Dall
On Sun, Nov 26, 2017 at 01:29:30PM +0300, Yury Norov wrote: > On Wed, Nov 15, 2017 at 05:50:07PM +, Andre Przywara wrote: > > Hi, > > > > those last few patches are actually helpful for the Xen port ... > > [...] > > > > +static void save_elrsr(struct kvm_vcpu *vcpu, void __iomem *base) >

Re: [PATCH 32/37] KVM: arm/arm64: Handle VGICv2 save/restore from the main VGIC code

2017-11-26 Thread Christoffer Dall
On Wed, Nov 15, 2017 at 05:50:07PM +, Andre Przywara wrote: > Hi, > > those last few patches are actually helpful for the Xen port ... cool! > > On 12/10/17 11:41, Christoffer Dall wrote: > > We can program the GICv2 hypervisor control interface logic directly > > from the core vgic code

Re: [PATCH 08/37] KVM: arm64: Defer restoring host VFP state to vcpu_put

2017-11-26 Thread Christoffer Dall
On Sun, Nov 26, 2017 at 09:58:52PM +0300, Yury Norov wrote: > On Sun, Nov 26, 2017 at 05:17:16PM +0100, Christoffer Dall wrote: > > Hi Yury, > > > > On Sat, Nov 25, 2017 at 10:52:21AM +0300, Yury Norov wrote: > > > > > > On Thu, Oct 12, 2017 at 12:41:12PM +0200, Christoffer Dall wrote: > > > >

Re: [PATCH 08/37] KVM: arm64: Defer restoring host VFP state to vcpu_put

2017-11-26 Thread Yury Norov
On Sun, Nov 26, 2017 at 05:17:16PM +0100, Christoffer Dall wrote: > Hi Yury, > > On Sat, Nov 25, 2017 at 10:52:21AM +0300, Yury Norov wrote: > > > > On Thu, Oct 12, 2017 at 12:41:12PM +0200, Christoffer Dall wrote: > > > Avoid saving the guest VFP registers and restoring the host VFP > > >

Re: [PATCH 08/37] KVM: arm64: Defer restoring host VFP state to vcpu_put

2017-11-26 Thread Christoffer Dall
On Tue, Nov 07, 2017 at 02:15:50PM +0100, Andrew Jones wrote: > On Thu, Oct 12, 2017 at 12:41:12PM +0200, Christoffer Dall wrote: > > Avoid saving the guest VFP registers and restoring the host VFP > > registers on every exit from the VM. Only when we're about to run > > userspace or other

Re: [PATCH 08/37] KVM: arm64: Defer restoring host VFP state to vcpu_put

2017-11-26 Thread Christoffer Dall
Hi Yury, On Sat, Nov 25, 2017 at 10:52:21AM +0300, Yury Norov wrote: > > On Thu, Oct 12, 2017 at 12:41:12PM +0200, Christoffer Dall wrote: > > Avoid saving the guest VFP registers and restoring the host VFP > > registers on every exit from the VM. Only when we're about to run > > userspace or

Re: [PATCH 36/37] KVM: arm/arm64: Move VGIC APR save/restore to vgic put/load

2017-11-26 Thread Yury Norov
On Thu, Oct 12, 2017 at 12:41:40PM +0200, Christoffer Dall wrote: > The APRs can only have bits set when the guest acknowledges an interrupt > in the LR and can only have a bit cleared when the guest EOIs an > interrupt in the LR. Therefore, if we have no LRs with any > pending/active interrupts,

Re: [PATCH 35/37] KVM: arm/arm64: Get rid of vgic_elrsr

2017-11-26 Thread Yury Norov
On Thu, Oct 12, 2017 at 12:41:39PM +0200, Christoffer Dall wrote: > There is really no need to store the vgic_elrsr on the VGIC data > structures as the only need we have for the elrsr is to figure out if an > LR is inavtive when we save the VGIC state upon returning from the > guest. We can

Re: [PATCH 00/15] Move vcpu_load and vcpu_put calls to arch code

2017-11-26 Thread Christoffer Dall
On Sat, Nov 25, 2017 at 09:57:03PM +0100, Christoffer Dall wrote: > Some architectures may decide to do different things during > kvm_arch_vcpu_load depending on the ioctl being executed. For example, > arm64 is about to do significant work in vcpu load/put when running a > vcpu, but it's

Re: [PATCH 14/15] KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl

2017-11-26 Thread Christoffer Dall
Hi, [replying to myself] On Sat, Nov 25, 2017 at 09:57:17PM +0100, Christoffer Dall wrote: > Move the calls to vcpu_load() and vcpu_put() in to the architecture > specific implementations of kvm_arch_vcpu_ioctl() which dispatches > further architecture-specific ioctls on to other functions. > >