Re: [PATCH v2 00/15] KVM: Dynamically size memslot arrays

2019-10-23 Thread Christoffer Dall
e also run the selftest framework's tests for the dirty logging and the migration loop test for arm64, and they pass fine. You can add my (for arm64): Tested-by: Christoffer Dall

Re: [PATCH 00/45] KVM: Refactor vCPU creation

2019-10-22 Thread Christoffer Dall
> if (r) > goto vcpu_free_run_page; > What a fantastically welcome piece of work! Thanks for doing this, many's the time I waded through all those calls to ensure a patch was doing the right thing. Modulo the nit in patch 42, the arm64 changes survive a guest boot + hackbench and build fine. The lack of changing the arm-specific destroy function to a void also causes a series of warnings for a 32-bit arm build, but otherwise builds fine. You can add my: Acked-by: Christoffer Dall To the arm/arm64 and generic parts. Thanks, Christoffer

Re: [PATCH v9 01/26] arm64: Fix HCR.TGE status for NMI contexts

2019-01-31 Thread Christoffer Dall
On Thu, Jan 31, 2019 at 09:40:02AM +, Julien Thierry wrote: > > > On 31/01/2019 09:27, Christoffer Dall wrote: > > On Thu, Jan 31, 2019 at 08:56:04AM +, Julien Thierry wrote: > >> > >> > >> On 31/01/2019 08:19, Christoffer Dall wrote: >

Re: [PATCH v9 01/26] arm64: Fix HCR.TGE status for NMI contexts

2019-01-31 Thread Christoffer Dall
On Thu, Jan 31, 2019 at 08:56:04AM +, Julien Thierry wrote: > > > On 31/01/2019 08:19, Christoffer Dall wrote: > > On Mon, Jan 28, 2019 at 03:42:42PM +, Julien Thierry wrote: > >> Hi James, > >> > >> On 28/01/2019 11:48, James Morse wrote: > &

Re: [PATCH v9 01/26] arm64: Fix HCR.TGE status for NMI contexts

2019-01-31 Thread Christoffer Dall
On Mon, Jan 28, 2019 at 03:42:42PM +, Julien Thierry wrote: > Hi James, > > On 28/01/2019 11:48, James Morse wrote: > > Hi Julien, > > > > On 21/01/2019 15:33, Julien Thierry wrote: > >> When using VHE, the host needs to clear HCR_EL2.TGE bit in order > >> to interract with guest TLBs,

Re: [PATCH v9 10/26] arm64: kvm: Unmask PMR before entering guest

2019-01-30 Thread Christoffer Dall
daif_restore with DAIF_PROCCTX_NOIRQ, which actually does both of the things in (5). > Avoid this by making sure ICC_PMR_EL1 is unmasked when we enter a guest. > > Signed-off-by: Julien Thierry > Acked-by: Catalin Marinas > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Catalin

Re: [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization

2019-01-25 Thread Christoffer Dall
cture of this work, > the full patch set is available at: > > git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git > build-test Changes appear fine to me: Acked-by: Christoffer Dall

[PATCH] clocksource/arm_arch_timer: Store physical timer IRQ number for KVM on VHE

2019-01-24 Thread Christoffer Dall
guest and saves us from emulating this timer for the guest on VHE systems. Store the EL1 Physical Timer's IRQ number in struct arch_timer_kvm_info on VHE systems to allow KVM to use it. Signed-off-by: Andre Przywara Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- Patches

Re: [PATCH v10 0/8] kvm: arm64: Support PUD hugepage at stage 2

2018-12-18 Thread Christoffer Dall
uld post a patch later after further discussions in the > list. > For the series: Reviewed-by: Christoffer Dall

Re: [PATCH 10/10] perf/doc: update design.txt for exclude_{host|guest} flags

2018-12-12 Thread Christoffer Dall
On Tue, Dec 11, 2018 at 01:59:03PM +, Andrew Murray wrote: > On Tue, Dec 11, 2018 at 10:06:53PM +1100, Michael Ellerman wrote: > > [ Reviving old thread. ] > > > > Andrew Murray writes: > > > On Tue, Nov 20, 2018 at 10:31:36PM +1100, Michael Ellerman wrote: > > >> Andrew Murray writes: > >

Re: [PATCH v2 4/4] KVM: arm/arm64: vgic: Make vgic_cpu->ap_list_lock a raw_spinlock

2018-12-11 Thread Christoffer Dall
since RT spinlocks are interruptible. > > Signed-off-by: Julien Thierry > Cc: Christoffer Dall > Cc: Marc Zyngier Acked-by: Christoffer Dall

Re: [PATCH v2 1/4] KVM: arm/arm64: vgic: Do not cond_resched_lock() with IRQs disabled

2018-12-11 Thread Christoffer Dall
nterrupts are > disabled at this point and we cannot reschedule a vcpu. > > Solve this by waiting for all vcpus to be halted after emmiting the halt > request. > > Signed-off-by: Julien Thierry > Suggested-by: Marc Zyngier > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: s

Re: [PATCH] kvm/arm: return 0 when the number of objects is not lessthan min

2018-12-10 Thread Christoffer Dall
On Thu, Dec 06, 2018 at 09:56:30AM +0800, peng.h...@zte.com.cn wrote: > >On Wed, Dec 05, 2018 at 09:15:51AM +0800, Peng Hao wrote: > >> Return 0 when there is enough kvm_mmu_memory_cache object. > >> > >> Signed-off-by: Peng Hao > >> --- > >> virt/kvm/arm/mmu.c | 2 +- > >> 1 file changed, 1

Re: [PATCH v9 1/8] KVM: arm/arm64: Share common code in user_mem_abort()

2018-12-10 Thread Christoffer Dall
On Mon, Dec 10, 2018 at 10:47:42AM +, Suzuki K Poulose wrote: > > > On 10/12/2018 08:56, Christoffer Dall wrote: > >On Mon, Dec 03, 2018 at 01:37:37PM +, Suzuki K Poulose wrote: > >>Hi Anshuman, > >> > >>On 03/12/2018 12:11, Anshuman Khandual w

Re: [PATCH v9 5/8] KVM: arm64: Support PUD hugepage in stage2_is_exec()

2018-12-10 Thread Christoffer Dall
On Wed, Dec 05, 2018 at 05:57:51PM +, Suzuki K Poulose wrote: > > > On 01/11/2018 13:38, Christoffer Dall wrote: > >On Wed, Oct 31, 2018 at 05:57:42PM +, Punit Agrawal wrote: > >>In preparation for creating PUD hugepages at stage 2, add support for > >

Re: [PATCH v9 3/8] KVM: arm/arm64: Introduce helpers to manipulate page table entries

2018-12-10 Thread Christoffer Dall
On Mon, Dec 03, 2018 at 07:20:08PM +0530, Anshuman Khandual wrote: > > > On 10/31/2018 11:27 PM, Punit Agrawal wrote: > > Introduce helpers to abstract architectural handling of the conversion > > of pfn to page table entries and marking a PMD page table entry as a > > block entry. > > Why is

Re: [PATCH v9 2/8] KVM: arm/arm64: Re-factor setting the Stage 2 entry to exec on fault

2018-12-10 Thread Christoffer Dall
>when support for PUD hugepages is introduced refactor the code to > >>share the checks needed to mark a page table entry as executable. > >> > >>Signed-off-by: Punit Agrawal > >>Reviewed-by: Suzuki K Poulose > >>Cc: Christoffer Dall > &

Re: [PATCH v9 2/8] KVM: arm/arm64: Re-factor setting the Stage 2 entry to exec on fault

2018-12-10 Thread Christoffer Dall
he checks needed to mark a page table entry as executable. > > > > Signed-off-by: Punit Agrawal > > Reviewed-by: Suzuki K Poulose > > Cc: Christoffer Dall > > Cc: Marc Zyngier > > --- > > virt/kvm/arm/mmu.c | 28 +++- > > 1 file

Re: [PATCH v9 1/8] KVM: arm/arm64: Share common code in user_mem_abort()

2018-12-10 Thread Christoffer Dall
> >> > >>Signed-off-by: Punit Agrawal > >>Reviewed-by: Suzuki K Poulose > >>Cc: Christoffer Dall > >>Cc: Marc Zyngier > >>--- > >> virt/kvm/arm/mmu.c | 49 -- > >> 1

Re: [PATCH] kvm: arm/arm64 : fix vm's hanging at startup time

2018-11-21 Thread Christoffer Dall
On Wed, Nov 21, 2018 at 12:17:45PM +, Julien Thierry wrote: > > > On 21/11/18 11:06, Christoffer Dall wrote: > >Hi, > > > >On Wed, Nov 21, 2018 at 04:56:54PM +0800, peng.h...@zte.com.cn wrote: > >>>On 19/11/2018 09:10, Mark Rutland wrote: > &g

Re: [PATCH] kvm: arm/arm64 : fix vm's hanging at startup time

2018-11-21 Thread Christoffer Dall
On Wed, Nov 21, 2018 at 12:17:45PM +, Julien Thierry wrote: > > > On 21/11/18 11:06, Christoffer Dall wrote: > >Hi, > > > >On Wed, Nov 21, 2018 at 04:56:54PM +0800, peng.h...@zte.com.cn wrote: > >>>On 19/11/2018 09:10, Mark Rutland wrote: > &g

Re: [PATCH v2 2/4] KVM: arm/arm64: Introduce helpers to manupulate page table entries

2018-05-04 Thread Christoffer Dall
On Tue, May 01, 2018 at 02:00:43PM +0100, Punit Agrawal wrote: > Hi Suzuki, > > Thanks for having a look. > > Suzuki K Poulose writes: > > > On 01/05/18 11:26, Punit Agrawal wrote: > >> Introduce helpers to abstract architectural handling of the conversion > >> of pfn

Re: [PATCH v2 2/4] KVM: arm/arm64: Introduce helpers to manupulate page table entries

2018-05-04 Thread Christoffer Dall
On Tue, May 01, 2018 at 02:00:43PM +0100, Punit Agrawal wrote: > Hi Suzuki, > > Thanks for having a look. > > Suzuki K Poulose writes: > > > On 01/05/18 11:26, Punit Agrawal wrote: > >> Introduce helpers to abstract architectural handling of the conversion > >> of pfn to page table entries and

Re: [PATCH v2 4/4] KVM: arm64: Add support for PUD hugepages at stage 2

2018-05-04 Thread Christoffer Dall
nule) which can be useful on cores that > support mapping larger block sizes in the TLB entries. > > Signed-off-by: Punit Agrawal <punit.agra...@arm.com> > Cc: Christoffer Dall <christoffer.d...@arm.com> > Cc: Marc Zyngier <marc.zyng...@arm.com> > Cc: Russell

Re: [PATCH v2 4/4] KVM: arm64: Add support for PUD hugepages at stage 2

2018-05-04 Thread Christoffer Dall
nule) which can be useful on cores that > support mapping larger block sizes in the TLB entries. > > Signed-off-by: Punit Agrawal > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon Reviewed-by: Christoffer Dall

Re: [PATCH v2 1/4] KVM: arm/arm64: Share common code in user_mem_abort()

2018-05-04 Thread Christoffer Dall
the operations when we introduce > PUD hugepages, let's share them across the different pagesizes. > > Signed-off-by: Punit Agrawal <punit.agra...@arm.com> > Reviewed-by: Christoffer Dall <christoffer.d...@arm.com> > Cc: Marc Zyngier <marc.zyng

Re: [PATCH v2 1/4] KVM: arm/arm64: Share common code in user_mem_abort()

2018-05-04 Thread Christoffer Dall
the operations when we introduce > PUD hugepages, let's share them across the different pagesizes. > > Signed-off-by: Punit Agrawal > Reviewed-by: Christoffer Dall > Cc: Marc Zyngier > --- > virt/kvm/arm/mmu.c | 66 +++--- > 1 file

Re: [PATCH v5 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-30 Thread Christoffer Dall
On Mon, Apr 30, 2018 at 11:07:43AM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger <eric.au...@redhat.com> Reviewed-by: Christoffer Dall <chr

Re: [PATCH v5 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-30 Thread Christoffer Dall
On Mon, Apr 30, 2018 at 11:07:43AM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall > > --- > v4 -> v5

Re: [PATCH v5 07/12] KVM: arm/arm64: Helper to register a new redistributor region

2018-04-30 Thread Christoffer Dall
rdreg) > } > bool vgic_v3_rdist_overlap(struct kvm *kvm, gpa_t base, size_t size); > > +static inline bool vgic_dist_overlap(struct kvm *kvm, gpa_t base, size_t > size) > +{ > + struct vgic_dist *d = >arch.vgic; > + > + return (base + size > d->vgic_dist_base) && > + (base < d->vgic_dist_base + KVM_VGIC_V3_DIST_SIZE); > +} > + > int vgic_its_resolve_lpi(struct kvm *kvm, struct vgic_its *its, >u32 devid, u32 eventid, struct vgic_irq **irq); > struct vgic_its *vgic_msi_to_its(struct kvm *kvm, struct kvm_msi *msi); > -- > 2.5.5 > Besides the nit about using list_last_entry(): Reviewed-by: Christoffer Dall <christoffer.d...@arm.com>

Re: [PATCH v5 07/12] KVM: arm/arm64: Helper to register a new redistributor region

2018-04-30 Thread Christoffer Dall
3_rdist_overlap(struct kvm *kvm, gpa_t base, size_t size); > > +static inline bool vgic_dist_overlap(struct kvm *kvm, gpa_t base, size_t > size) > +{ > + struct vgic_dist *d = >arch.vgic; > + > + return (base + size > d->vgic_dist_base) && > + (base < d->vgic_dist_base + KVM_VGIC_V3_DIST_SIZE); > +} > + > int vgic_its_resolve_lpi(struct kvm *kvm, struct vgic_its *its, >u32 devid, u32 eventid, struct vgic_irq **irq); > struct vgic_its *vgic_msi_to_its(struct kvm *kvm, struct kvm_msi *msi); > -- > 2.5.5 > Besides the nit about using list_last_entry(): Reviewed-by: Christoffer Dall

Re: [PATCH v5 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-30 Thread Christoffer Dall
DDR_TYPE_REDIST, this new attribute allows > to declare several separate redistributor regions. > > So the whole redist space does not need to be contiguous anymore. > > Signed-off-by: Eric Auger <eric.au...@redhat.com> Acked-by: Christoffer Dall <christoffer.d...@arm.com&g

Re: [PATCH v5 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-30 Thread Christoffer Dall
DDR_TYPE_REDIST, this new attribute allows > to declare several separate redistributor regions. > > So the whole redist space does not need to be contiguous anymore. > > Signed-off-by: Eric Auger Acked-by: Christoffer Dall > > --- > v4 -> v5: > - Document read

Re: [PATCH v4 09/12] KVM: arm/arm64: Check all vcpu redistributors are set on map_resources

2018-04-29 Thread Christoffer Dall
tually check potential base address inconsistencies. > > Signed-off-by: Eric Auger <eric.au...@redhat.com> Reviewed-by: Christoffer Dall <christoffer.d...@arm.com> > > --- > > v3 -> v4: > - use kvm_debug > --- > virt/kvm/arm/vgic/vgic-v3.c | 19

Re: [PATCH v4 09/12] KVM: arm/arm64: Check all vcpu redistributors are set on map_resources

2018-04-29 Thread Christoffer Dall
tually check potential base address inconsistencies. > > Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall > > --- > > v3 -> v4: > - use kvm_debug > --- > virt/kvm/arm/vgic/vgic-v3.c | 19 ++- > 1 file changed, 14 insertions(+), 5 deletions(-

Re: [PATCH v4 12/12] KVM: arm/arm64: Bump VGIC_V3_MAX_CPUS to 512

2018-04-29 Thread Christoffer Dall
On Fri, Apr 27, 2018 at 04:15:05PM +0200, Eric Auger wrote: > Let's raise the number of supported vcpus along with > vgic v3 now that HW is looming with more physical CPUs. > > Signed-off-by: Eric Auger <eric.au...@redhat.com> Acked-by: Christoffer Dall <chr

Re: [PATCH v4 12/12] KVM: arm/arm64: Bump VGIC_V3_MAX_CPUS to 512

2018-04-29 Thread Christoffer Dall
On Fri, Apr 27, 2018 at 04:15:05PM +0200, Eric Auger wrote: > Let's raise the number of supported vcpus along with > vgic v3 now that HW is looming with more physical CPUs. > > Signed-off-by: Eric Auger Acked-by: Christoffer Dall > --- > include/kvm/arm_vgic.h | 2 +- &g

Re: [PATCH v4 08/12] KVM: arm/arm64: Check vcpu redist base before registering an iodev

2018-04-29 Thread Christoffer Dall
already been set. Initialize this latter > in kvm_vgic_vcpu_early_init(). > > Signed-off-by: Eric Auger <eric.au...@redhat.com> Acked-by: Christoffer Dall <christoffer.d...@arm.com> > --- > virt/kvm/arm/vgic/vgic-init.c| 3 +++ > virt/kvm/arm/vgic/vgic-mmio-v3.

Re: [PATCH v4 08/12] KVM: arm/arm64: Check vcpu redist base before registering an iodev

2018-04-29 Thread Christoffer Dall
already been set. Initialize this latter > in kvm_vgic_vcpu_early_init(). > > Signed-off-by: Eric Auger Acked-by: Christoffer Dall > --- > virt/kvm/arm/vgic/vgic-init.c| 3 +++ > virt/kvm/arm/vgic/vgic-mmio-v3.c | 3 +++ > 2 files changed, 6 insertions(+) > > dif

Re: [PATCH v4 06/12] KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions

2018-04-29 Thread Christoffer Dall
_t > +vgic_v3_rd_region_size(struct kvm *kvm, struct vgic_redist_region *rdreg) > +{ > + if (!rdreg->count) > + return atomic_read(>online_vcpus) * > KVM_VGIC_V3_REDIST_SIZE; > + else > + return rdreg->count * KVM_VGIC_V3_REDIST_SIZE; > +} > +bool vgic_v3_rdist_overlap(struct kvm *kvm, gpa_t base, size_t size); > + > int vgic_its_resolve_lpi(struct kvm *kvm, struct vgic_its *its, >u32 devid, u32 eventid, struct vgic_irq **irq); > struct vgic_its *vgic_msi_to_its(struct kvm *kvm, struct kvm_msi *msi); > -- > 2.5.5 > Reviewed-by: Christoffer Dall <christoffer.d...@arm.com>

Re: [PATCH v4 06/12] KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions

2018-04-29 Thread Christoffer Dall
(struct kvm *kvm, struct vgic_redist_region *rdreg) > +{ > + if (!rdreg->count) > + return atomic_read(>online_vcpus) * > KVM_VGIC_V3_REDIST_SIZE; > + else > + return rdreg->count * KVM_VGIC_V3_REDIST_SIZE; > +} > +bool vgic_v3_rdist_overlap(struct kvm *kvm, gpa_t base, size_t size); > + > int vgic_its_resolve_lpi(struct kvm *kvm, struct vgic_its *its, >u32 devid, u32 eventid, struct vgic_irq **irq); > struct vgic_its *vgic_msi_to_its(struct kvm *kvm, struct kvm_msi *msi); > -- > 2.5.5 > Reviewed-by: Christoffer Dall

Re: [PATCH v4 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-27 Thread Christoffer Dall
Hi Eric, On Fri, Apr 27, 2018 at 04:15:04PM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger > > --- > v3 -> v4: > -

Re: [PATCH v4 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-27 Thread Christoffer Dall
Hi Eric, On Fri, Apr 27, 2018 at 04:15:04PM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger > > --- > v3 -> v4: > - vgic_v3_rdist_region_from_index is introduced in

Re: [PATCH v4 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-27 Thread Christoffer Dall
DDR_TYPE_REDIST, this new attribute allows > to declare several separate redistributor regions. > > So the whole redist space does not need to be contiguous anymore. > > Signed-off-by: Eric Auger <eric.au...@redhat.com> > Reviewed-by: Peter Maydell <peter.mayd.

Re: [PATCH v4 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-27 Thread Christoffer Dall
DDR_TYPE_REDIST, this new attribute allows > to declare several separate redistributor regions. > > So the whole redist space does not need to be contiguous anymore. > > Signed-off-by: Eric Auger > Reviewed-by: Peter Maydell Acked-by: Christoffer Dall > >

Re: [PATCH v3 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-27 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:57AM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger > > --- > > v2 -> v3: > - early exit if

Re: [PATCH v3 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-27 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:57AM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger > > --- > > v2 -> v3: > - early exit if vgic_v3_rdist_region_from_index() fails >

Re: [PATCH 3/4] KVM: arm64: Support dirty page tracking for PUD hugepages

2018-04-27 Thread Christoffer Dall
> Also, provide trivial implementations of required kvm_s2pud_* helpers > to allow sharing of code with arm32. > > Signed-off-by: Punit Agrawal <punit.agra...@arm.com> > Cc: Christoffer Dall <christoffer.d...@arm.com> > Cc: Marc Zyngier <marc.zyng...@arm.com> >

Re: [PATCH 3/4] KVM: arm64: Support dirty page tracking for PUD hugepages

2018-04-27 Thread Christoffer Dall
> Also, provide trivial implementations of required kvm_s2pud_* helpers > to allow sharing of code with arm32. > > Signed-off-by: Punit Agrawal > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon >

Re: [PATCH 2/4] KVM: arm/arm64: Introduce helpers to manupulate page table entries

2018-04-27 Thread Christoffer Dall
g PUD hugepages > at stage 2 - which are supported on arm64 but do not exist on arm. > > Signed-off-by: Punit Agrawal <punit.agra...@arm.com> > Cc: Christoffer Dall <christoffer.d...@arm.com> > Cc: Marc Zyngier <marc.zyng...@arm.com> > Cc: Russell King <li..

Re: [PATCH 1/4] KVM: arm/arm64: Share common code in user_mem_abort()

2018-04-27 Thread Christoffer Dall
the operations when we introduce > PUD hugepages, let's share them across the different pagesizes. > > Signed-off-by: Punit Agrawal <punit.agra...@arm.com> > Cc: Christoffer Dall <christoffer.d...@arm.com> > Cc: Marc Zyngier <marc.zyng

Re: [PATCH 2/4] KVM: arm/arm64: Introduce helpers to manupulate page table entries

2018-04-27 Thread Christoffer Dall
g PUD hugepages > at stage 2 - which are supported on arm64 but do not exist on arm. > > Signed-off-by: Punit Agrawal > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon Acked-by: Christoffer Dall > --- > arch/

Re: [PATCH 1/4] KVM: arm/arm64: Share common code in user_mem_abort()

2018-04-27 Thread Christoffer Dall
the operations when we introduce > PUD hugepages, let's share them across the different pagesizes. > > Signed-off-by: Punit Agrawal > Cc: Christoffer Dall > Cc: Marc Zyngier > --- > virt/kvm/arm/mmu.c | 36 +--- > 1 file changed, 21 inserti

Re: [PATCH 4/4] KVM: arm64: Add support for PUD hugepages at stage 2

2018-04-27 Thread Christoffer Dall
nule) which can be useful on cores that > support mapping larger block sizes in the TLB entries. > > Signed-off-by: Punit Agrawal <punit.agra...@arm.com> > Cc: Christoffer Dall <christoffer.d...@arm.com> > Cc: Marc Zyngier <marc.zyng...@arm.com> > Cc: Russell

Re: [PATCH 4/4] KVM: arm64: Add support for PUD hugepages at stage 2

2018-04-27 Thread Christoffer Dall
nule) which can be useful on cores that > support mapping larger block sizes in the TLB entries. > > Signed-off-by: Punit Agrawal > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon > --- > arch/arm/include/asm/kvm_mmu.h

Re: [PATCHv3 03/11] arm64/kvm: hide ptrauth from guests

2018-04-27 Thread Christoffer Dall
feature were really missing. > > Signed-off-by: Mark Rutland <mark.rutl...@arm.com> > Cc: Christoffer Dall <cd...@kernel.org> > Cc: Marc Zyngier <marc.zyng...@arm.com> > Cc: kvm...@lists.cs.columbia.edu > --- > arch/arm64/kvm/handle_exit.c | 18 ++ >

Re: [PATCHv3 03/11] arm64/kvm: hide ptrauth from guests

2018-04-27 Thread Christoffer Dall
feature were really missing. > > Signed-off-by: Mark Rutland > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: kvm...@lists.cs.columbia.edu > --- > arch/arm64/kvm/handle_exit.c | 18 ++ > arch/arm64/kvm/sys_regs.c| 9 + > 2 files changed, 27 insertio

Re: [PATCHv3 04/11] arm64: Don't trap host pointer auth use to EL2

2018-04-27 Thread Christoffer Dall
it doesn't matter how we configure HCR_EL2.{API,APK}, so we don't > bother setting them. > > This does not enable support for KVM guests, since KVM manages HCR_EL2 > itself when running VMs. > > Signed-off-by: Mark Rutland <mark.rutl...@arm.com> > Cc: Christoffer Dall <

Re: [PATCHv3 04/11] arm64: Don't trap host pointer auth use to EL2

2018-04-27 Thread Christoffer Dall
it doesn't matter how we configure HCR_EL2.{API,APK}, so we don't > bother setting them. > > This does not enable support for KVM guests, since KVM manages HCR_EL2 > itself when running VMs. > > Signed-off-by: Mark Rutland > Cc: Christoffer Dall > Cc: Catali

Re: [PATCHv3 02/11] arm64/kvm: consistently handle host HCR_EL2 flags

2018-04-27 Thread Christoffer Dall
; We now use mov_q to generate the HCR_EL2 value, as we use when > configuring other registers in head.S. > > Signed-off-by: Mark Rutland <mark.rutl...@arm.com> > Cc: Catalin Marinas <catalin.mari...@arm.com> > Cc: Christoffer Dall <cd...@kernel.org> > C

Re: [PATCHv3 02/11] arm64/kvm: consistently handle host HCR_EL2 flags

2018-04-27 Thread Christoffer Dall
; We now use mov_q to generate the HCR_EL2 value, as we use when > configuring other registers in head.S. > > Signed-off-by: Mark Rutland > Cc: Catalin Marinas > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Will Deacon > Cc: kvm...@lists.cs.columbia.edu > --- >

Re: [PATCH v3 09/12] KVM: arm/arm64: Check all vcpu redistributors are set on map_resources

2018-04-26 Thread Christoffer Dall
On Thu, Apr 26, 2018 at 11:56:10AM +0200, Auger Eric wrote: > > > On 04/24/2018 11:08 PM, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:55AM +0200, Eric Auger wrote: > >> On vcpu first run, we eventually know the actual number of vcpus. > >> This is

Re: [PATCH v3 09/12] KVM: arm/arm64: Check all vcpu redistributors are set on map_resources

2018-04-26 Thread Christoffer Dall
On Thu, Apr 26, 2018 at 11:56:10AM +0200, Auger Eric wrote: > > > On 04/24/2018 11:08 PM, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:55AM +0200, Eric Auger wrote: > >> On vcpu first run, we eventually know the actual number of vcpus. > >> This is

Re: [PATCH v3 08/12] KVM: arm/arm64: Check vcpu redist base before registering an iodev

2018-04-26 Thread Christoffer Dall
On Thu, Apr 26, 2018 at 11:25:06AM +0200, Auger Eric wrote: > Hi Christoffer, > > On 04/24/2018 11:07 PM, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:54AM +0200, Eric Auger wrote: > >> As we are going to register several redist regions, > >> vgic

Re: [PATCH v3 08/12] KVM: arm/arm64: Check vcpu redist base before registering an iodev

2018-04-26 Thread Christoffer Dall
On Thu, Apr 26, 2018 at 11:25:06AM +0200, Auger Eric wrote: > Hi Christoffer, > > On 04/24/2018 11:07 PM, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:54AM +0200, Eric Auger wrote: > >> As we are going to register several redist regions, > >> vgic

Re: [PATCH v3 07/12] KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions

2018-04-26 Thread Christoffer Dall
On Thu, Apr 26, 2018 at 10:29:35AM +0200, Auger Eric wrote: > Hi Christoffer, > On 04/24/2018 11:07 PM, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:53AM +0200, Eric Auger wrote: > >> We introduce a new helper to check there is no overlap between >

Re: [PATCH v3 07/12] KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions

2018-04-26 Thread Christoffer Dall
On Thu, Apr 26, 2018 at 10:29:35AM +0200, Auger Eric wrote: > Hi Christoffer, > On 04/24/2018 11:07 PM, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:53AM +0200, Eric Auger wrote: > >> We introduce a new helper to check there is no overlap between >

Re: [PATCH v3 06/12] KVM: arm/arm64: Helper to register a new redistributor region

2018-04-26 Thread Christoffer Dall
On Thu, Apr 26, 2018 at 09:32:49AM +0200, Auger Eric wrote: > Hi Christoffer, > > On 04/24/2018 06:47 PM, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:52AM +0200, Eric Auger wrote: > >> We introduce a new helper that creates and inserts a new redistributor &g

Re: [PATCH v3 06/12] KVM: arm/arm64: Helper to register a new redistributor region

2018-04-26 Thread Christoffer Dall
On Thu, Apr 26, 2018 at 09:32:49AM +0200, Auger Eric wrote: > Hi Christoffer, > > On 04/24/2018 06:47 PM, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:52AM +0200, Eric Auger wrote: > >> We introduce a new helper that creates and inserts a new redistributor &g

Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Tue, Apr 24, 2018 at 05:50:37PM +0100, Peter Maydell wrote: > On 24 April 2018 at 17:46, Christoffer Dall <christoffer.d...@arm.com> wrote: > > On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: > >> --- a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt

Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Tue, Apr 24, 2018 at 05:50:37PM +0100, Peter Maydell wrote: > On 24 April 2018 at 17:46, Christoffer Dall wrote: > > On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: > >> --- a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt > >> +++ b/Documentation/virt

Re: [PATCH v3 10/12] KVM: arm/arm64: Add KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
define KVM_VGIC_V3_ADDR_TYPE_DIST 2 > +#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3 > +#define KVM_VGIC_ITS_ADDR_TYPE 4 > +#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5 > > #define KVM_VGIC_V3_DIST_SIZESZ_64K > #define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K) > -- > 2.5.5 > Otherwise: Acked-by: Christoffer Dall <christoffer.d...@arm.com>

Re: [PATCH v3 09/12] KVM: arm/arm64: Check all vcpu redistributors are set on map_resources

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:55AM +0200, Eric Auger wrote: > On vcpu first run, we eventually know the actual number of vcpus. > This is a synchronization point to check all redistributors regions > were assigned. Isn't it the other way around? We want to check that all redistributors (one for

Re: [PATCH v3 07/12] KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:53AM +0200, Eric Auger wrote: > We introduce a new helper to check there is no overlap between > dist region (if set) and registered rdist regions. This both > handles the case of legacy single rdist region (implicitly sized > with the number of online vcpus) and the

Re: [PATCH v3 07/12] KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:53AM +0200, Eric Auger wrote: > We introduce a new helper to check there is no overlap between > dist region (if set) and registered rdist regions. This both > handles the case of legacy single rdist region (implicitly sized > with the number of online vcpus) and the

Re: [PATCH v3 10/12] KVM: arm/arm64: Add KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
IST 2 > +#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3 > +#define KVM_VGIC_ITS_ADDR_TYPE 4 > +#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5 > > #define KVM_VGIC_V3_DIST_SIZE SZ_64K > #define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K) > -- > 2.5.5 > Otherwise: Acked-by: Christoffer Dall

Re: [PATCH v3 09/12] KVM: arm/arm64: Check all vcpu redistributors are set on map_resources

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:55AM +0200, Eric Auger wrote: > On vcpu first run, we eventually know the actual number of vcpus. > This is a synchronization point to check all redistributors regions > were assigned. Isn't it the other way around? We want to check that all redistributors (one for

Re: [PATCH v3 08/12] KVM: arm/arm64: Check vcpu redist base before registering an iodev

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:54AM +0200, Eric Auger wrote: > As we are going to register several redist regions, > vgic_register_all_redist_iodevs() may be called several times. We need > to register a redist_iodev for a given vcpu only once. Wouldn't it be more natural to change that caller to

Re: [PATCH v3 08/12] KVM: arm/arm64: Check vcpu redist base before registering an iodev

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:54AM +0200, Eric Auger wrote: > As we are going to register several redist regions, > vgic_register_all_redist_iodevs() may be called several times. We need > to register a redist_iodev for a given vcpu only once. Wouldn't it be more natural to change that caller to

Re: [PATCH v3 04/12] KVM: arm/arm64: Helper to locate free rdist index

2018-04-24 Thread Christoffer Dall
rdist_free_slot(struct list_head *rdregs); > + > int vgic_its_resolve_lpi(struct kvm *kvm, struct vgic_its *its, >u32 devid, u32 eventid, struct vgic_irq **irq); > struct vgic_its *vgic_msi_to_its(struct kvm *kvm, struct kvm_msi *msi); > -- > 2.5.5 > Asides from the above: Reviewed-by: Christoffer Dall <christoffer.d...@arm.com>

Re: [PATCH v3 04/12] KVM: arm/arm64: Helper to locate free rdist index

2018-04-24 Thread Christoffer Dall
uct list_head *rdregs); > + > int vgic_its_resolve_lpi(struct kvm *kvm, struct vgic_its *its, >u32 devid, u32 eventid, struct vgic_irq **irq); > struct vgic_its *vgic_msi_to_its(struct kvm *kvm, struct kvm_msi *msi); > -- > 2.5.5 > Asides from the above: Reviewed-by: Christoffer Dall

Re: [PATCH v3 05/12] KVM: arm/arm64: Revisit Redistributor TYPER last bit computation

2018-04-24 Thread Christoffer Dall
online_vcpus) - 1) > + > + if (addr == last_rdist_typer) > value |= GICR_TYPER_LAST; > if (vgic_has_its(vcpu->kvm)) > value |= GICR_TYPER_PLPIS; > -- > 2.5.5 > Reviewed-by: Christoffer Dall <christoffer.d...@arm.com>

Re: [PATCH v3 05/12] KVM: arm/arm64: Revisit Redistributor TYPER last bit computation

2018-04-24 Thread Christoffer Dall
+ if (addr == last_rdist_typer) > value |= GICR_TYPER_LAST; > if (vgic_has_its(vcpu->kvm)) > value |= GICR_TYPER_PLPIS; > -- > 2.5.5 > Reviewed-by: Christoffer Dall

Re: [PATCH v3 03/12] KVM: arm/arm64: Replace the single rdist region by a list

2018-04-24 Thread Christoffer Dall
R last bit. > > Signed-off-by: Eric Auger <eric.au...@redhat.com> Reviewed-by: Christoffer Dall <christoffer.d...@arm.com> > --- > include/kvm/arm_vgic.h | 14 + > virt/kvm/arm/vgic/vgic-init.c | 16 -- > virt/kvm/arm/vgic/vgic

Re: [PATCH v3 03/12] KVM: arm/arm64: Replace the single rdist region by a list

2018-04-24 Thread Christoffer Dall
R last bit. > > Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall > --- > include/kvm/arm_vgic.h | 14 + > virt/kvm/arm/vgic/vgic-init.c | 16 -- > virt/kvm/arm/vgic/vgic-kvm-device.c | 13 ++-

Re: [PATCH v3 01/12] KVM: arm/arm64: Set dist->spis to NULL after kfree

2018-04-24 Thread Christoffer Dall
off-by: Eric Auger <eric.au...@redhat.com> > Reviewed-by: Marc Zyngier <marc.zyng...@arm.com> Reviewed-by: Christoffer Dall <christoffer.d...@arm.com> > > --- > > v2 -> v3: > - added Marc's R-b and Fixed commit > --- > virt/kvm/arm/vgic/vgic-init.c

Re: [PATCH v3 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:57AM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger > > --- > > v2 -> v3: > - early exit if

Re: [PATCH v3 11/12] KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:57AM +0200, Eric Auger wrote: > Now all the internals are ready to handle multiple redistributor > regions, let's allow the userspace to register them. > > Signed-off-by: Eric Auger > > --- > > v2 -> v3: > - early exit if vgic_v3_rdist_region_from_index() fails >

Re: [PATCH v3 01/12] KVM: arm/arm64: Set dist->spis to NULL after kfree

2018-04-24 Thread Christoffer Dall
ned-off-by: Eric Auger > Reviewed-by: Marc Zyngier Reviewed-by: Christoffer Dall > > --- > > v2 -> v3: > - added Marc's R-b and Fixed commit > --- > virt/kvm/arm/vgic/vgic-init.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/virt/kvm/arm/vgic/vgic-ini

Re: [PATCH v3 06/12] KVM: arm/arm64: Helper to register a new redistributor region

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:52AM +0200, Eric Auger wrote: > We introduce a new helper that creates and inserts a new redistributor > region into the rdist region list. This helper both handles the case > where the redistributor region size is known at registration time > and the legacy case

Re: [PATCH v3 06/12] KVM: arm/arm64: Helper to register a new redistributor region

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:52AM +0200, Eric Auger wrote: > We introduce a new helper that creates and inserts a new redistributor > region into the rdist region list. This helper both handles the case > where the redistributor region size is known at registration time > and the legacy case

Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: > We introduce a new KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attribute in > KVM_DEV_ARM_VGIC_GRP_ADDR group. It allows userspace to provide the > base address and size of a redistributor region > > Compared to KVM_VGIC_V3_ADDR_TYPE_REDIST,

Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-24 Thread Christoffer Dall
On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: > We introduce a new KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attribute in > KVM_DEV_ARM_VGIC_GRP_ADDR group. It allows userspace to provide the > base address and size of a redistributor region > > Compared to KVM_VGIC_V3_ADDR_TYPE_REDIST,

[PATCH] MAINTAINERS: Update e-mail address for Christoffer Dall

2018-04-16 Thread Christoffer Dall
Update my e-mail address to a working address. Signed-off-by: Christoffer Dall <christoffer.d...@arm.com> --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0a1410d5a621..3e9c99d2620b 100644 --- a/MAINTAINERS +++ b/MAINT

[PATCH] MAINTAINERS: Update e-mail address for Christoffer Dall

2018-04-16 Thread Christoffer Dall
Update my e-mail address to a working address. Signed-off-by: Christoffer Dall --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0a1410d5a621..3e9c99d2620b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7738,7 +7738,7 @@ F

Re: [RFC v2 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-09 Thread Christoffer Dall
Hi Eric, On Tue, Mar 27, 2018 at 04:04:06PM +0200, Eric Auger wrote: > We introduce a new KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attribute in > KVM_DEV_ARM_VGIC_GRP_ADDR group. It allows userspace to provide the > base address and size of a redistributor region > > Compared to

Re: [RFC v2 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

2018-04-09 Thread Christoffer Dall
Hi Eric, On Tue, Mar 27, 2018 at 04:04:06PM +0200, Eric Auger wrote: > We introduce a new KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attribute in > KVM_DEV_ARM_VGIC_GRP_ADDR group. It allows userspace to provide the > base address and size of a redistributor region > > Compared to

Re: [PATCHv2 09/12] arm64/kvm: preserve host HCR_EL2 value

2018-04-09 Thread Christoffer Dall
On Mon, Apr 09, 2018 at 03:57:09PM +0100, Mark Rutland wrote: > On Tue, Feb 06, 2018 at 01:39:15PM +0100, Christoffer Dall wrote: > > On Mon, Nov 27, 2017 at 04:38:03PM +, Mark Rutland wrote: > > > diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c > &

Re: [PATCHv2 09/12] arm64/kvm: preserve host HCR_EL2 value

2018-04-09 Thread Christoffer Dall
On Mon, Apr 09, 2018 at 03:57:09PM +0100, Mark Rutland wrote: > On Tue, Feb 06, 2018 at 01:39:15PM +0100, Christoffer Dall wrote: > > On Mon, Nov 27, 2017 at 04:38:03PM +, Mark Rutland wrote: > > > diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c > &

Re: [REPOST PATCH] arm/arm64: KVM: Add PSCI version selection API

2018-04-09 Thread Christoffer Dall
On Mon, Apr 09, 2018 at 01:47:50PM +0100, Marc Zyngier wrote: > +Drew, who's look at the whole save/restore thing extensively > > On 09/04/18 13:30, Christoffer Dall wrote: > > On Thu, Mar 15, 2018 at 07:26:48PM +, Marc Zyngier wrote: > >> On 15/03/18 19:13, Peter Ma

  1   2   3   4   5   6   7   8   9   10   >