Re: [PATCH v2 07/14] KVM: arm64/sve: Make register ioctl access errors more consistent

2019-04-25 Thread Dave Martin
On Thu, Apr 25, 2019 at 04:04:36PM +0100, Alex Bennée wrote: > > Dave Martin writes: > > > On Thu, Apr 25, 2019 at 01:30:29PM +0100, Alex Bennée wrote: > >> > >> Dave Martin writes: > >> > >> > Currently, the way error codes are generated when processing the > >> > SVE register access ioctls

Re: [PATCH v2 07/14] KVM: arm64/sve: Make register ioctl access errors more consistent

2019-04-25 Thread Alex Bennée
Dave Martin writes: > On Thu, Apr 25, 2019 at 01:30:29PM +0100, Alex Bennée wrote: >> >> Dave Martin writes: >> >> > Currently, the way error codes are generated when processing the >> > SVE register access ioctls in a bit haphazard. >> > >> > This patch refactors the code so that the

Re: [PATCH v4 0/3] vfio-pci: Support INTx mode re-enabling

2019-04-25 Thread Will Deacon
On Wed, Apr 24, 2019 at 10:21:27PM +0800, Leo Yan wrote: > On Mon, Apr 08, 2019 at 09:27:16AM +0800, Leo Yan wrote: > > When enable vfio-pci mode for NIC driver on Juno board, the IRQ is > > failed to forward properly from host to guest, finally root caused this > > issue is related with kvmtool

[PATCH 3/5] KVM: arm/arm64: Ensure vcpu target is unset on reset failure

2019-04-25 Thread Marc Zyngier
From: Andrew Jones A failed KVM_ARM_VCPU_INIT should not set the vcpu target, as the vcpu target is used by kvm_vcpu_initialized() to determine if other vcpu ioctls may proceed. We need to set the target before calling kvm_reset_vcpu(), but if that call fails, we should then unset it and clear

[PATCH 1/5] KVM: arm/arm64: arch_timer: Fix CNTP_TVAL calculation

2019-04-25 Thread Marc Zyngier
From: Wei Huang Recently the generic timer test of kvm-unit-tests failed to complete (stalled) when a physical timer is being used. This issue is caused by incorrect update of CNTP_CVAL when CNTP_TVAL is being accessed, introduced by 'Commit 84135d3d18da ("KVM: arm/arm64: consolidate arch timer

[PATCH 4/5] kvm: arm: Skip stage2 huge mappings for unaligned ipa backed by THP

2019-04-25 Thread Marc Zyngier
From: Suzuki K Poulose With commit a80868f398554842b14, we no longer ensure that the THP page is properly aligned in the guest IPA. Skip the stage2 huge mapping for unaligned IPA backed by transparent hugepages. Fixes: a80868f398554842b14 ("KVM: arm/arm64: Enforce PTE mappings at stage2 when

[PATCH 5/5] KVM: arm/arm64: Don't emulate virtual timers on userspace ioctls

2019-04-25 Thread Marc Zyngier
From: Christoffer Dall When a VCPU never runs before a guest exists, but we set timer registers up via ioctls, the associated hrtimer might never get cancelled. Since we moved vcpu_load/put into the arch-specific implementations and only have load/put for KVM_RUN, we won't ever have a scheduled

[PATCH 0/5] KVM/ARM updates for 5.1-rc7

2019-04-25 Thread Marc Zyngier
Paolo, Radim, Here's a bunch of late fixes for 5.1-rc7, which should hopefully be the last drop for this cycle. Please pull, M. The following changes since commit 8324c3d518cfd69f2a17866b52c13bf56d3042d8: KVM: arm/arm64: Comments cleanup in mmu.c (2019-03-28 13:17:17 +) are

[PATCH 2/5] KVM: arm/arm64: vgic-v3: Retire pending interrupts on disabling LPIs

2019-04-25 Thread Marc Zyngier
When disabling LPIs (for example on reset) at the redistributor level, it is expected that LPIs that was pending in the CPU interface are eventually retired. Currently, this is not what is happening, and these LPIs will stay in the ap_list, eventually being acknowledged by the vcpu (which didn't

Re: [PATCH v7 13/27] KVM: arm64/sve: Context switch the SVE registers

2019-04-25 Thread Dave Martin
On Wed, Apr 24, 2019 at 03:51:32PM +0100, Alex Bennée wrote: > > Dave Martin writes: > > > On Thu, Apr 04, 2019 at 10:35:02AM +0200, Andrew Jones wrote: > >> On Thu, Apr 04, 2019 at 09:10:08AM +0100, Dave Martin wrote: > >> > On Wed, Apr 03, 2019 at 10:01:45PM +0200, Andrew Jones wrote: > >> >

Re: [PATCH v7 12/27] KVM: arm64/sve: System register context switch and access support

2019-04-25 Thread Dave Martin
On Wed, Apr 24, 2019 at 04:21:22PM +0100, Alex Bennée wrote: > > Dave Martin writes: > > > This patch adds the necessary support for context switching ZCR_EL1 > > for each vcpu. > > > > ZCR_EL1 is trapped alongside the FPSIMD/SVE registers, so it makes > > sense for it to be handled as part of

Re: [PATCH] KVM: arm/arm64: Don't emulate virtual timers on userspace ioctls

2019-04-25 Thread Marc Zyngier
On Thu, 25 Apr 2019 13:57:40 +0100, Andre Przywara wrote: > > From: Christoffer Dall > > When a VCPU never runs before a guest exists, but we set timer registers > up via ioctls, the associated hrtimer might never get cancelled. > > Since we moved vcpu_load/put into the arch-specific

Re: [PATCH v2 00/14] KVM: arm64: SVE cleanups

2019-04-25 Thread Dave Martin
On Thu, Apr 25, 2019 at 01:35:56PM +0100, Alex Bennée wrote: > > Dave Martin writes: > > > This series contains some cleanups applicable to the SVE KVM support > > patches merged into kvmarm/next. These arose from Andrew Jones' > > review. > > > > Apart from some minor changes to error codes

Re: [PATCH v2 07/14] KVM: arm64/sve: Make register ioctl access errors more consistent

2019-04-25 Thread Dave Martin
On Thu, Apr 25, 2019 at 01:30:29PM +0100, Alex Bennée wrote: > > Dave Martin writes: > > > Currently, the way error codes are generated when processing the > > SVE register access ioctls in a bit haphazard. > > > > This patch refactors the code so that the behaviour is more > > consistent: now,

[PATCH] KVM: arm/arm64: Don't emulate virtual timers on userspace ioctls

2019-04-25 Thread Andre Przywara
From: Christoffer Dall When a VCPU never runs before a guest exists, but we set timer registers up via ioctls, the associated hrtimer might never get cancelled. Since we moved vcpu_load/put into the arch-specific implementations and only have load/put for KVM_RUN, we won't ever have a scheduled

Re: [PATCH v2 00/14] KVM: arm64: SVE cleanups

2019-04-25 Thread Alex Bennée
Dave Martin writes: > This series contains some cleanups applicable to the SVE KVM support > patches merged into kvmarm/next. These arose from Andrew Jones' > review. > > Apart from some minor changes to error codes and checking, these are > mostly cosmetic / sytlistic changes only. > > The

Re: [PATCH v2 07/14] KVM: arm64/sve: Make register ioctl access errors more consistent

2019-04-25 Thread Alex Bennée
Dave Martin writes: > Currently, the way error codes are generated when processing the > SVE register access ioctls in a bit haphazard. > > This patch refactors the code so that the behaviour is more > consistent: now, -EINVAL should be returned only for unrecognised > register IDs or when some

Re: [PATCH v7 00/27] KVM: arm64: SVE guest support

2019-04-25 Thread Alex Bennée
Dave Martin writes: > This series implements support for allowing KVM guests to use the Arm > Scalable Vector Extension (SVE), superseding the previous v6 series [1]. > > The patches are also available on a branch for reviewer convenience. [2] > > The patches are based on v5.1-rc2. > > This