Re: [PATCH 35/59] KVM: arm/arm64: nv: Support multiple nested stage 2 mmu structures

2019-07-04 Thread Alexandru Elisei
On 6/21/19 10:38 AM, Marc Zyngier wrote: > From: Christoffer Dall > > Add stage 2 mmu data structures for virtual EL2 and for nested guests. > We don't yet populate shadow stage 2 page tables, but we now have a > framework for getting to a shadow stage 2 pgd. > > We allocate twice the number of

Re: [PATCH 15/59] KVM: arm64: nv: Refactor vcpu_{read,write}_sys_reg

2019-07-04 Thread Marc Zyngier
On 27/06/2019 10:21, Alexandru Elisei wrote: > On 6/21/19 10:37 AM, Marc Zyngier wrote: >> Extract the direct HW accessors for later reuse. >> >> Signed-off-by: Marc Zyngier >> --- >> arch/arm64/kvm/sys_regs.c | 247 +- >> 1 file changed, 139 insertions(+),

Re: [PATCH 13/59] KVM: arm64: nv: Handle virtual EL2 registers in vcpu_read/write_sys_reg()

2019-07-04 Thread Marc Zyngier
On 26/06/2019 16:04, Alexandru Elisei wrote: > On 6/21/19 10:37 AM, Marc Zyngier wrote: >> From: Andre Przywara >> >> KVM internally uses accessor functions when reading or writing the >> guest's system registers. This takes care of accessing either the stored >> copy or using the "live" EL1

Re: [PATCH 27/59] KVM: arm64: nv: Respect virtual HCR_EL2.TVM and TRVM settings

2019-07-04 Thread Marc Zyngier
On 26/06/2019 07:55, Julien Thierry wrote: > > > On 06/21/2019 10:38 AM, Marc Zyngier wrote: >> From: Jintack Lim >> >> Forward the EL1 virtual memory register traps to the virtual EL2 if they >> are not coming from the virtual EL2 and the virtual HCR_EL2.TVM or TRVM >> bit is set. >> >> This

Re: [RFC v2 11/14] arm64: Move the ASID allocator code in a separate file

2019-07-04 Thread James Morse
Hi Julien, On 20/06/2019 14:06, Julien Grall wrote: > We will want to re-use the ASID allocator in a separate context (e.g > allocating VMID). So move the code in a new file. > > The function asid_check_context has been moved in the header as a static > inline function because we want to avoid

Re: [PATCH 13/59] KVM: arm64: nv: Handle virtual EL2 registers in vcpu_read/write_sys_reg()

2019-07-04 Thread Marc Zyngier
On 03/07/2019 17:32, Alexandru Elisei wrote: [...] +} + +#define EL2_SYSREG(el2, el1, translate) \ + [el2 - FIRST_EL2_SYSREG] = { el2, el1, translate } +#define PURE_EL2_SYSREG(el2) \ + [el2 - FIRST_EL2_SYSREG] = { el2,__INVALID_SYSREG__, NULL } +/* +

Re: [PATCH] KVM: arm64/sve: Fix vq_present() macro to yield a bool

2019-07-04 Thread Dave Martin
On Thu, Jul 04, 2019 at 02:24:42PM +0200, Paolo Bonzini wrote: > On 04/07/19 10:20, Marc Zyngier wrote: > > +KVM, Paolo and Radim, > > > > Guys, do you mind picking this single patch and sending it to Linus? > > That's the only fix left for 5.2. Alternatively, I can send you a pull > > request,

Re: [PATCH] KVM: arm64/sve: Fix vq_present() macro to yield a bool

2019-07-04 Thread Paolo Bonzini
On 04/07/19 10:20, Marc Zyngier wrote: > +KVM, Paolo and Radim, > > Guys, do you mind picking this single patch and sending it to Linus? > That's the only fix left for 5.2. Alternatively, I can send you a pull > request, but it feels overkill. Sure, will do. Paolo > Either way, please let me

Re: [PATCH] KVM: arm64/sve: Fix vq_present() macro to yield a bool

2019-07-04 Thread Dave Martin
On Thu, Jul 04, 2019 at 10:04:08AM +, Zhang, Lei wrote: > Hi guys, > > I have started up KVM guest os successfully with SVE feature with Dave' patch. > > Tested-by: Zhang Lei Thanks for verifying. It's really your fix, I only wrote a commit message for it :) [...] Cheers ---Dave

RE: [PATCH] KVM: arm64/sve: Fix vq_present() macro to yield a bool

2019-07-04 Thread Zhang, Lei
Hi guys, I have started up KVM guest os successfully with SVE feature with Dave' patch. Tested-by: Zhang Lei > -Original Message- > From: Dave Martin > Sent: Thursday, July 04, 2019 5:35 PM > To: Viresh Kumar > Cc: Okamoto, Takayuki/岡本 高幸 ; Christoffer > Dall ; Ard Biesheuvel ; Marc

Re: [PATCH 06/59] KVM: arm64: nv: Allow userspace to set PSR_MODE_EL2x

2019-07-04 Thread Dave Martin
On Wed, Jul 03, 2019 at 10:21:57AM +0100, Marc Zyngier wrote: > On 24/06/2019 13:48, Dave Martin wrote: > > On Fri, Jun 21, 2019 at 02:50:08PM +0100, Marc Zyngier wrote: > >> On 21/06/2019 14:24, Julien Thierry wrote: > >>> > >>> > >>> On 21/06/2019 10:37, Marc Zyngier wrote: > From:

Re: [PATCH 52/59] KVM: arm64: nv: vgic: Allow userland to set VGIC maintenance IRQ

2019-07-04 Thread Julien Thierry
On 04/07/2019 10:01, Andre Przywara wrote: > On Thu, 4 Jul 2019 08:38:20 +0100 > Julien Thierry wrote: > >> On 21/06/2019 10:38, Marc Zyngier wrote: >>> From: Andre Przywara >>> >>> The VGIC maintenance IRQ signals various conditions about the LRs, when >>> the GIC's virtualization extension

Re: [PATCH 52/59] KVM: arm64: nv: vgic: Allow userland to set VGIC maintenance IRQ

2019-07-04 Thread Andre Przywara
On Thu, 4 Jul 2019 08:38:20 +0100 Julien Thierry wrote: > On 21/06/2019 10:38, Marc Zyngier wrote: > > From: Andre Przywara > > > > The VGIC maintenance IRQ signals various conditions about the LRs, when > > the GIC's virtualization extension is used. > > So far we didn't need it, but nested

Re: [PATCH] KVM: arm64/sve: Fix vq_present() macro to yield a bool

2019-07-04 Thread Dave Martin
On Thu, Jul 04, 2019 at 08:32:52AM +0530, Viresh Kumar wrote: > On 03-07-19, 18:42, Dave Martin wrote: > > From: Zhang Lei > > > > The original implementation of vq_present() relied on aggressive > > inlining in order for the compiler to know that the code is > > correct, due to some

Re: [PATCH] KVM: arm64/sve: Fix vq_present() macro to yield a bool

2019-07-04 Thread Marc Zyngier
+KVM, Paolo and Radim, Guys, do you mind picking this single patch and sending it to Linus? That's the only fix left for 5.2. Alternatively, I can send you a pull request, but it feels overkill. Either way, please let me know. Thanks, M. On Wed, 03 Jul 2019 18:42:50 +0100, Dave Martin

Re: [PATCH 53/59] KVM: arm64: nv: Implement maintenance interrupt forwarding

2019-07-04 Thread Julien Thierry
On 21/06/2019 10:38, Marc Zyngier wrote: > When we take a maintenance interrupt, we need to decide whether > it is generated on an action from the guest, or if it is something > that needs to be forwarded to the guest hypervisor. > > Signed-off-by: Marc Zyngier > --- >

Re: [PATCH 52/59] KVM: arm64: nv: vgic: Allow userland to set VGIC maintenance IRQ

2019-07-04 Thread Julien Thierry
On 21/06/2019 10:38, Marc Zyngier wrote: > From: Andre Przywara > > The VGIC maintenance IRQ signals various conditions about the LRs, when > the GIC's virtualization extension is used. > So far we didn't need it, but nested virtualization needs to know about > this interrupt, so add a