Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Christoffer Dall
[...] >> >> to give us some idea how much performance we would gain from each >> >> approach? Thoughput should be completely unaffected anyway, since virtio >> >> just coalesces kicks internally. >> > >> > Latency is dominated by the scheduling latency. >> > This means virtio-net is not the best

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-01 Thread Christoffer Dall
On Tue, Oct 01, 2013 at 05:02:44PM -0500, Kim Phillips wrote: > On Tue, 1 Oct 2013 13:00:54 -0700 > Greg Kroah-Hartman wrote: > > > On Tue, Oct 01, 2013 at 01:38:31PM -0500, Kim Phillips wrote: > > > Hi, > > > > > > Santosh and I are having a problem figuring out how to enable binding > > > (and

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-02 Thread Christoffer Dall
On Tue, Oct 01, 2013 at 08:35:56PM -0600, Alex Williamson wrote: > On Wed, 2013-10-02 at 02:53 +0100, Christoffer Dall wrote: > > On Tue, Oct 01, 2013 at 05:02:44PM -0500, Kim Phillips wrote: > > > On Tue, 1 Oct 2013 13:00:54 -0700 > > > Greg Kroah-Hartman wrote: &g

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-02 Thread Christoffer Dall
On Wed, Oct 02, 2013 at 01:32:38PM -0500, Scott Wood wrote: > On Wed, 2013-10-02 at 13:25 -0500, Yoder Stuart-B08248 wrote: > > > > > -Original Message- > > > From: Christoffer Dall [mailto:christoffer.d...@linaro.org] > > > Sent: Wednesday, Octo

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-02 Thread Christoffer Dall
On Wed, Oct 02, 2013 at 03:04:15PM -0500, Kim Phillips wrote: > On Wed, 2 Oct 2013 11:43:30 -0700 > Christoffer Dall wrote: > > > On Wed, Oct 02, 2013 at 01:32:38PM -0500, Scott Wood wrote: > > > On Wed, 2013-10-02 at 13:25 -0500, Yoder Stuart-B08248 wrote: > >

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-02 Thread Christoffer Dall
On Wed, Oct 02, 2013 at 03:14:02PM -0500, Scott Wood wrote: > On Wed, 2013-10-02 at 11:43 -0700, Christoffer Dall wrote: > > On Wed, Oct 02, 2013 at 01:32:38PM -0500, Scott Wood wrote: > > > On Wed, 2013-10-02 at 13:25 -0500, Yoder Stuart-B08248 wrote: > > > > &

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-02 Thread Christoffer Dall
On Wed, Oct 02, 2013 at 01:37:35PM -0700, gre...@linuxfoundation.org wrote: > On Wed, Oct 02, 2013 at 11:43:30AM -0700, Christoffer Dall wrote: > > > What's wrong with a non-vfio-specific flag that a driver can set, that > > > indicates that the driver is willing to tr

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-02 Thread Christoffer Dall
On Wed, Oct 02, 2013 at 01:39:43PM -0700, gre...@linuxfoundation.org wrote: > On Wed, Oct 02, 2013 at 09:27:38PM +0100, Christoffer Dall wrote: > > > > What you're suggesting would let users specify that > > > > a serial driver should handle a NIC hardware, no? Tha

Re: [PATCH 2/3] arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS

2013-09-17 Thread Christoffer Dall
On Sat, Sep 14, 2013 at 02:10:55PM +0200, Andrew Jones wrote: > Drop the _ARM_ part of the name. We can then introduce a config option > like this to aarch64 and other arches using the same name - allowing > grep to show them all. Also update the help text to describe the option > more completely.

Re: [PATCH 3/3] aarch64: kvm: introduce CONFIG_KVM_MAX_VCPUS

2013-09-17 Thread Christoffer Dall
On Sat, Sep 14, 2013 at 02:10:56PM +0200, Andrew Jones wrote: > Take CONFIG_KVM_MAX_VCPUS from arm32, but set the default to 8. > > Signed-off-by: Andrew Jones > --- > arch/arm64/include/asm/kvm_host.h | 7 ++- > arch/arm64/kvm/Kconfig| 11 +++ > 2 files changed, 17 inse

Re: [PATCH v2] arm32: kvm: rename CONFIG_KVM_ARM_MAX_VCPUS

2013-09-25 Thread Christoffer Dall
On Tue, Sep 24, 2013 at 04:09:28PM +0200, Andrew Jones wrote: > Drop the _ARM_ part of the name. We can then introduce a config option > like this to aarch64 and other arches using the same name - allowing > grep to show them all. Also update the help text to describe the option > more completely.

Re: [PATCH] mm: Fix PageHead when !CONFIG_PAGEFLAGS_EXTENDED

2012-12-28 Thread Christoffer Dall
On Fri, Dec 28, 2012 at 5:01 PM, Linus Torvalds wrote: > On Fri, Dec 28, 2012 at 9:07 AM, wrote: >> From: Christoffer Dall >> >> Unfortunately with !CONFIG_PAGEFLAGS_EXTENDED, (!PageHead) is false, and >> (PageHead) is true, for tail pages. This breaks cache clea

Re: [PATCH RESEND 4] ARM: plat-versatile: move secondary CPU startup into cpuinit

2012-12-29 Thread Christoffer Dall
On Tue, Dec 18, 2012 at 3:42 AM, Claudio Fontana wrote: > > Using __CPUINIT instead of __INIT puts the secondary CPU startup code > into the "right" section: it will not be freed in hotplug configurations, > allowing hot-add of cpus, while still getting freed in non-hotplug configs. > > Tested suc

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-07 Thread Christoffer Dall
On Sun, Apr 7, 2013 at 12:41 AM, Michael S. Tsirkin wrote: > On Thu, Apr 04, 2013 at 04:32:01PM -0700, Christoffer Dall wrote: >> [...] >> >> >> >> to give us some idea how much performance we would gain from each >> >> >> approach? Thou

Re: [PATCH 04/21] ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally

2013-04-23 Thread Christoffer Dall
vm_vgic.h:59:11: error: 'CONFIG_KVM_ARM_MAX_VCPUS' > undeclared here (not in a function) > } percpu[VGIC_MAX_CPUS]; >^ > > Signed-off-by: Arnd Bergmann > Cc: Marc Zyngier > Cc: Christoffer Dall > Cc: Will Deacon > --- > arch/arm/kvm/Kconfig | 6 +++--- &

Re: [PATCH 04/21] ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally

2013-04-23 Thread Christoffer Dall
On Tue, Apr 23, 2013 at 10:29 AM, Christoffer Dall wrote: > On Tue, Apr 23, 2013 at 9:30 AM, Arnd Bergmann wrote: >> The CONFIG_KVM_ARM_MAX_VCPUS symbol is needed in order to build the >> kernel/context_tracking.c code, which includes the vgic data structures >> implictly th

Re: [PATCH] KVM: ARM: Fix wrong address in comment

2013-04-14 Thread Christoffer Dall
On Wed, Apr 10, 2013 at 7:37 PM, Jonghwan Choi wrote: > hyp_hvc vector offset should be 0x14 and hyp_svc vector offset should be > 0x8. > > Signed-off-by: Jonghwan Choi > --- > arch/arm/kvm/interrupts.S |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/kvm/

Re: [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-20 Thread Christoffer Dall
On Tue, Sep 20, 2016 at 11:42:23AM +0200, Peter Zijlstra wrote: > On Mon, Sep 19, 2016 at 06:21:27PM +0100, Marc Zyngier wrote: > > It is desirable to allow static keys to be integrated in structures, > > as it can lead do slightly more readable code. But the current API > > only provides DEFINE_ST

Re: [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-20 Thread Christoffer Dall
On Tue, Sep 20, 2016 at 02:42:58PM +0200, Peter Zijlstra wrote: > On Tue, Sep 20, 2016 at 02:25:14PM +0200, Christoffer Dall wrote: > > On Tue, Sep 20, 2016 at 11:42:23AM +0200, Peter Zijlstra wrote: > > > On Mon, Sep 19, 2016 at 06:21:27PM +0100, Marc Zyngier wrote: > >

Re: [PATCH 1/2] config: move x86 kvm_guest.config to a common locaton

2016-09-22 Thread Christoffer Dall
ill find it in either location. > > > > Signed-off-by: Rob Herring > > Cc: Christoffer Dall > > Cc: Marc Zyngier > > Cc: Paolo Bonzini > > Cc: "Radim Krčmář" > > Cc: kvm...@lists.cs.columbia.edu > > Cc: k...@vger.kernel.org > No objections from my side, and this looks useful: Acked-by: Christoffer Dall

Re: [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state

2016-09-23 Thread Christoffer Dall
On Fri, Sep 23, 2016 at 03:13:25PM +0800, Alison Wang wrote: > The ARMv8 architecture supports two execution state, AArch64 and > AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53 > and Cortex-A72 need to be added for target-specific checks. > > Signed-off-by: Alison Wang >

Re: [RFC v2 PATCH 6/7] arm64: KVM: Handle trappable TLB instructions

2016-09-06 Thread Christoffer Dall
On Tue, Sep 06, 2016 at 04:44:11PM +0100, Punit Agrawal wrote: > Christoffer Dall writes: > > > On Mon, Sep 05, 2016 at 05:31:36PM +0100, Punit Agrawal wrote: > >> The ARMv8 architecture allows trapping of TLB maintenane instructions > >> from EL0/EL1 to higher exc

Re: [PATCH] KVM: ARM: cleanup kvm_timer_hyp_init

2016-09-08 Thread Christoffer Dall
On Thu, Sep 08, 2016 at 12:45:59PM +0200, Paolo Bonzini wrote: > Remove two unnecessary labels now that kvm_timer_hyp_init is not > creating its own workqueue anymore. > > Signed-off-by: Paolo Bonzini Thanks, applied. -Christoffer

Re: [PATCH] KVM: arm/arm64: arch_timer: remove unused error handling

2016-09-08 Thread Christoffer Dall
Hi Arnd, On Thu, Sep 08, 2016 at 03:58:44PM +0200, Arnd Bergmann wrote: > A cleanup removed the call to create_singlethread_workqueue(), but did not > remove the code that was used in case it failed: > > virt/kvm/arm/arch_timer.c: In function 'kvm_timer_hyp_init': > virt/kvm/arm/arch_timer.c:457:

Re: [PATCH v3] arm64: KVM: Optimize __guest_enter/exit() to save a few instructions

2016-08-31 Thread Christoffer Dall
vcpu context pointer in stack because it is redundant, the same > information is available in tpidr_el2. The function __guest_exit() > calling convention is slightly modified, caller only pushes the regs > x0-x1 to stack instead of regs x0-x3. > > Signed-off-by: Shanker Donthineni >

Re: [PATCH] KVM: Remove deprecated create_singlethread_workqueue

2016-09-01 Thread Christoffer Dall
. >*/ > - if (timecounter && wqueue) > + if (timecounter) > timer->enabled = 1; > > return 0; This was discussed when this stuff was originally added, and I think the argument then was that it improved tracing somehow, to be able

Re: [PATCH] arm64: KVM: Save two instructions in __guest_enter()

2016-08-25 Thread Christoffer Dall
Hi Shanker, On Tue, Aug 09, 2016 at 08:15:36PM -0500, Shanker Donthineni wrote: > We are doing an unnecessary stack push/pop operation when restoring > the guest registers x0-x18 in __guest_enter(). This patch saves the > two instructions by using x18 as a base register. No need to store > the vcp

Re: [PATCH v1 1/2] KVM: arm64: handle single-stepping trapped instructions

2017-10-14 Thread Christoffer Dall
On Fri, Oct 13, 2017 at 10:15:09AM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Fri, Oct 06, 2017 at 12:39:20PM +0100, Alex Bennée wrote: > >> If we are using guest debug to single-step the guest we need to ensure > >> we exit after emu

Re: [PATCH v1 2/2] kvm: arm64: handle single-step of userspace mmio instructions

2017-10-14 Thread Christoffer Dall
On Fri, Oct 13, 2017 at 10:23:21AM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Fri, Oct 06, 2017 at 02:45:35PM +0100, Alex Bennée wrote: > >> > >> Julien Thierry writes: > >> > >> > On 06/10/17 12:39, Alex Bennée wrote

Re: [PATCH v1 2/2] kvm: arm64: handle single-step of userspace mmio instructions

2017-10-14 Thread Christoffer Dall
On Fri, Oct 13, 2017 at 10:27:36AM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Fri, Oct 06, 2017 at 12:39:21PM +0100, Alex Bennée wrote: > >> The system state of KVM when using userspace emulation is not complete > >> until we return int

Re: [PATCH v2 02/10] KVM: arm/arm64: vgic-its: Always allow clearing GITS_CREADR/CWRITER

2017-10-14 Thread Christoffer Dall
On Sat, Oct 14, 2017 at 10:53:01AM +0200, Auger Eric wrote: > Hi Christoffer, > > On 13/10/2017 19:54, Christoffer Dall wrote: > > On Fri, Oct 13, 2017 at 01:54:34PM +0200, Auger Eric wrote: > >> Hi Christoffer, > >> On 13/10/2017 13:44, Christoffer Dall wrote: &g

Re: [PATCH v2 03/10] KVM: arm/arm64: vgic-its: Improve error reporting on device table save

2017-10-14 Thread Christoffer Dall
On Sat, Oct 14, 2017 at 10:52:45AM +0200, Auger Eric wrote: > Hi Christoffer, > > On 13/10/2017 19:56, Christoffer Dall wrote: > > On Fri, Oct 13, 2017 at 04:22:25PM +0200, Auger Eric wrote: > >> Hi, > >> > >> On 13/10/2017 15:16, Christoffer Dall wrote

Re: [PATCH 7/9] KVM: arm/arm64: vgic-its: free caches when GITS_BASER Valid bit is cleared

2017-10-16 Thread Christoffer Dall
Hi Eric, On Mon, Sep 25, 2017 at 03:34:36PM +0200, Eric Auger wrote: > When the GITS_BASER.Valid gets cleared, the data structures in > guest RAM are not provisionned anymore. The device, collection > and LPI lists stored in the in-kernel ITS represent the same > information in some form of cache.

Re: [PATCH 7/9] KVM: arm/arm64: vgic-its: free caches when GITS_BASER Valid bit is cleared

2017-10-16 Thread Christoffer Dall
On Mon, Oct 16, 2017 at 11:44:05AM +0200, Auger Eric wrote: > Hi Christoffer, > On 16/10/2017 11:26, Christoffer Dall wrote: > > Hi Eric, > > > > On Mon, Sep 25, 2017 at 03:34:36PM +0200, Eric Auger wrote: > >> When the GITS_BASER.Valid gets cleared, the data str

Re: [PATCH 7/9] KVM: arm/arm64: vgic-its: free caches when GITS_BASER Valid bit is cleared

2017-10-16 Thread Christoffer Dall
On Mon, Oct 16, 2017 at 10:47:35AM +0100, Peter Maydell wrote: > On 16 October 2017 at 10:26, Christoffer Dall wrote: > > Hi Eric, > > > > On Mon, Sep 25, 2017 at 03:34:36PM +0200, Eric Auger wrote: > >> When the GITS_BASER.Valid gets cleared, the data struct

Re: [PATCH] arm64: KVM: set right LR register value for 32 bit guest when inject abort

2017-10-16 Thread Christoffer Dall
On Mon, Oct 16, 2017 at 04:10:01PM +, gengdongjiu wrote: > Hi Marc, > > > > > Please also update the 32bit code accordingly, as it looks broken too. > > I have updated the 32 bit code according, in my hand, there is no arm32 host > environment, > So there is no method to verify it in the ar

Re: [RFC 04/11] KVM, arm, arm64: Offer PAs to IPAs idmapping to internal VMs

2017-10-16 Thread Christoffer Dall
On Tue, Sep 26, 2017 at 11:14:45PM +0200, Florent Revest wrote: > On Thu, 2017-08-31 at 11:23 +0200, Christoffer Dall wrote: > > > diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c > > > index 2ea21da..1d2d3df 100644 > > > --- a/virt/kvm/arm/mmu.c > > > +

Re: [RFC 00/11] KVM, EFI, arm64: EFI Runtime Services Sandboxing

2017-10-16 Thread Christoffer Dall
On Tue, Sep 26, 2017 at 11:14:52PM +0200, Florent Revest wrote: > On Thu, 2017-08-31 at 11:26 +0200, Christoffer Dall wrote: > > I wonder if this should be split into two series; one that sets up > > anything you may need from KVM, and another one that uses that for > > UEF

Re: [PATCH 3/4] kvm/arm64: simplify CC instrumentation opt-out

2017-10-17 Thread Christoffer Dall
> Cc: Catalin Marinas > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Will Deacon Acked-by: Christoffer Dall > --- > arch/arm64/kvm/hyp/Makefile | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/a

Re: [PATCH v4 01/11] KVM: arm/arm64: vgic-its: fix return value for device table restore

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:09:59AM +0200, Eric Auger wrote: > AT the moment if ITT only contains invalid entries, > vgic_its_restore_itt returns 1 and this is considered as > an an error in vgic_its_restore_dte. > > Also in case the device table only contains invalid entries, > the table restore f

Re: [PATCH v4 02/11] KVM: arm/arm64: vgic-its: fix vgic_its_restore_collection_table returned value

2017-10-17 Thread Christoffer Dall
pa, cte_esz, &last); > + if (ret < 0 || last) > + return ret; > gpa += cte_esz; > read += cte_esz; > } > - return ret; > + > + /* table was fully filled with valid entries, decoded without error */ > + return 0; > } > > /** > -- > 2.5.5 > It's not that I find this looking particularly elegant, but I'm not sure I have a better alternative, perhaps it's just the natur of the beast: Reviewed-by: Christoffer Dall

Re: [PATCH v4 03/11] KVM: arm/arm64: vgic-its: Improve error reporting on device table save

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:10:01AM +0200, Eric Auger wrote: > At the moment the device table save() returns -EINVAL if > vgic_its_check_id() fails to return the gpa of the entry > associated to the device/collection id. Let vgic_its_check_id() > return an int instead of a bool and return a more pre

Re: [PATCH v4 04/11] KVM: arm/arm64: vgic-its: Check CBASER/BASER validity before enabling the ITS

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:10:02AM +0200, Eric Auger wrote: > The spec says it is UNPREDICTABLE to enable the ITS > if any of the following conditions are true: > > - GITS_CBASER.Valid == 0. > - GITS_BASER.Valid == 0, for any GITS_BASER register > where the Type field indicates Device. > - GITS_

Re: [PATCH v4 04/11] KVM: arm/arm64: vgic-its: Check CBASER/BASER validity before enabling the ITS

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:10:02AM +0200, Eric Auger wrote: > The spec says it is UNPREDICTABLE to enable the ITS > if any of the following conditions are true: > > - GITS_CBASER.Valid == 0. > - GITS_BASER.Valid == 0, for any GITS_BASER register > where the Type field indicates Device. > - GITS_

Re: [PATCH v4 06/11] KVM: arm/arm64: vgic-its: Check GITS_CBASER validity before processing commands

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:10:04AM +0200, Eric Auger wrote: > At the moment vgic_its_process_commands() does not > check the CBASER is valid before processing any command. > Let's fix that. > > Also rename cbaser local variable into cbaser_pa to avoid > any confusion with the full register. > > S

Re: [PATCH v4 07/11] KVM: arm/arm64: vgic-its: Always attempt to save/restore device and collection tables

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:10:05AM +0200, Eric Auger wrote: > In case the device table save fails, we currently do not > attempt to save the collection table. However it may > happen that the device table fails because the structures > in memory are inconsistent with device GITS_BASER however > thi

Re: [PATCH v4 08/11] KVM: arm/arm64: vgic-its: new helper functions to free the caches

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:10:06AM +0200, Eric Auger wrote: > From: wanghaibin > > We create 2 new functions that frees the device and > collection lists. this is currently called by vgic_its_destroy() > and we will add other callers in subsequent patches. See my previous comments about language

Re: [PATCH v4 09/11] KVM: arm/arm64: vgic-its: free caches when GITS_BASER Valid bit is cleared

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:10:07AM +0200, Eric Auger wrote: > When the GITS_BASER.Valid gets cleared, the data structures in > guest RAM are not valid anymore. The device, collection > and LPI lists stored in the in-kernel ITS represent the same > information in some form of cache. So let's void th

Re: [PATCH v4 10/11] KVM: arm/arm64: Document KVM_DEV_ARM_ITS_CTRL_RESET

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 09:10:08AM +0200, Eric Auger wrote: > At the moment, the in-kernel emulated ITS is not properly reset. > On guest restart/reset some registers keep their old values and > internal structures like device, ITE, and collection lists are not > freed. > > This may lead to variou

Re: [PATCH v6 2/9] KVM: arm/arm64: vgic-its: Fix vgic_its_restore_collection_table returned value

2017-11-01 Thread Christoffer Dall
ithout error, vgic_its_restore_collection_table() > returns +1. This is wrong. > > Let's return 0 in that case. > Acked-by: Christoffer Dall > Fixes: ea1ad53e1e31a3 (KVM: arm64: vgic-its: Collection table save/restore) > Signed-off-by: Eric Auger > > --- > > v5 -> v6:

Re: [PATCH v5 01/10] KVM: arm/arm64: vgic-its: Fix return value for device table restore

2017-10-24 Thread Christoffer Dall
ues. > > We also simplify the returned value computation in > handle_l1_dte. > > Signed-off-by: wanghaibin > Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall > > --- > > need to CC'ed stable > > v2 -> v3: > - add comments > - vgic_its_restor

Re: [PATCH v5 02/10] KVM: arm/arm64: vgic-its: Fix vgic_its_restore_collection_table returned value

2017-10-24 Thread Christoffer Dall
its_restore_collection_table aborts in case > of error or if the end is found. Otherwise, it now returns 0. > > Fixes: ea1ad53e1e31a3 (KVM: arm64: vgic-its: Collection table save/restore) > Signed-off-by: Eric Auger > Reviewed-by: Christoffer Dall > > --- > > ne

Re: [PATCH v5 06/10] KVM: arm/arm64: vgic-its: Remove kvm_its_unmap_device

2017-10-25 Thread Christoffer Dall
On Mon, Oct 23, 2017 at 04:08:25PM +0200, Eric Auger wrote: > Let's remove kvm_its_unmap_device and use kvm_its_free_device > as both functions are identical. > > Signed-off-by: Eric Auger Acked-by: Christoffer Dall > > --- > > v5: creation > --- >

Re: [PATCH v5 05/10] KVM: arm/arm64: vgic-its: Save the collection table before device tables

2017-10-25 Thread Christoffer Dall
On Mon, Oct 23, 2017 at 04:08:24PM +0200, Eric Auger wrote: > Currently the ITS caches are not emptied on reset. > > After a reset, in case we attempt to save the state before > the bound devices have registered their MSIs and after the > 1st level table has been allocated by the ITS driver > (dev

Re: [PATCH v5 07/10] KVM: arm/arm64: vgic-its: New helper functions to free the caches

2017-10-25 Thread Christoffer Dall
created devices. So > at this point the list is initialized. > > Signed-off-by: wanghaibin > Signed-off-by: Eric Auger > Acked-by: Christoffer Dall > --- > > v4 -> v5: > - add mutex_lock in vgic_its_free_collection_list > - use list_for_each_entry_s

Re: [PATCH v5 03/10] KVM: arm/arm64: vgic-its: Check CBASER/BASER validity before enabling the ITS

2017-10-25 Thread Christoffer Dall
d indicates Device. > - GITS_BASER.Valid == 0, for any GITS_BASER register > where the Type field indicates Interrupt Collection and > GITS_TYPER.HCC == 0. > > In that case, let's keep the ITS disabled. > > Signed-off-by: Eric Auger > Reported-by: Andre Przywara Reviewed-

Re: [PATCH 1/2] kvm: whitelist struct kvm_vcpu_arch

2017-10-26 Thread Christoffer Dall
es Cook > Cc: Christian Borntraeger > Cc: Christoffer Dall > Cc: Radim Krčmář > Signed-off-by: Paolo Bonzini > --- > virt/kvm/kvm_main.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > i

Re: [PATCH RESEND v2] arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort

2017-10-18 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 10:23:49PM +0800, Dongjiu Geng wrote: > When a exception is trapped to EL2, hardware uses ELR_ELx to hold > the current fault instruction address. If KVM wants to inject a > abort to 32 bit guest, it needs to set the LR register for the > guest to emulate this abort happene

Re: [PATCH RESEND v2] arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort

2017-10-18 Thread Christoffer Dall
On Wed, Oct 18, 2017 at 11:19:30AM +0100, Marc Zyngier wrote: > On 17/10/17 15:23, Dongjiu Geng wrote: > > When a exception is trapped to EL2, hardware uses ELR_ELx to hold > > the current fault instruction address. If KVM wants to inject a > > abort to 32 bit guest, it needs to set the LR registe

[PATCH v5 12/20] genirq: Document vcpu_info usage for percpu_devid interrupts

2017-10-27 Thread Christoffer Dall
percpu_devid interrupts when setting the VCPU affinity for the virtual timer interrupt in KVM/ARM. Cc: linux-kernel@vger.kernel.org Cc: Thomas Gleixner Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall --- kernel/irq/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v6 7/9] KVM: arm/arm64: vgic-its: Free caches when GITS_BASER Valid bit is cleared

2017-10-29 Thread Christoffer Dall
{ > > + mutex_lock(&its->its_lock); > > + switch (table_type) { > > + case GITS_BASER_TYPE_DEVICE: > > + vgic_its_free_device_list(kvm, its); > > + break; > > + case GITS_BASER_TYPE_COLLECTION: > > + vgic_its_free_collection_list(kvm, its); > > + break; > > + } > > + mutex_unlock(&its->its_lock); > > + } > > } > > > > static unsigned long vgic_mmio_read_its_ctlr(struct kvm *vcpu, > > Otherwise: > > Reviewed-by: Marc Zyngier > Also, Reviewed-by: Christoffer Dall

Re: [PATCH v6 8/9] KVM: arm/arm64: Document KVM_DEV_ARM_ITS_CTRL_RESET

2017-10-29 Thread Christoffer Dall
API which mimics the > hardware's reset line, to provide the equivalent behaviour to > a "pull the power cord out of the back of the machine" reset. > > Signed-off-by: Eric Auger > Reported-by: wanghaibin Acked-by: Christoffer Dall > > --- > v5 ->

Re: [PATCH v6 9/9] KVM: arm/arm64: vgic-its: Implement KVM_DEV_ARM_ITS_CTRL_RESET

2017-10-29 Thread Christoffer Dall
e functions, we > create a vgic_its_ctrl() wrapper that handles KVM_DEV_ARM_VGIC_GRP_CTRL > group functions. > > Signed-off-by: Eric Auger > Reviewed-by: Christoffer Dall > --- > > v5 -> v6: > - Rework the locking and create vgic_its_ctrl > > v2 -> v3: >

Re: [PATCH v6 0/9] vITS Migration fixes and reset

2017-10-29 Thread Christoffer Dall
Hi Eric, On Thu, Oct 26, 2017 at 05:23:02PM +0200, Eric Auger wrote: > This series fixes various bugs observed when saving/restoring the > ITS state before the guest writes the ITS registers (on first boot or > after reset/reboot). > > This is a follow up of Wanghaibin's series [1] plus additiona

Re: [PATCH v5 01/26] irqchip/gic-v3-its: Setup VLPI properties at map time

2017-10-29 Thread Christoffer Dall
livered with an unknown set > of properties. Not very nice. > > Instead, let's add a "properties" field to the mapping structure, > and use that to configure the VLPI before it actually gets mapped. > Reviewed-by: Christoffer Dall > Signed-off-by: Marc Zyngi

Re: [PATCH v5 02/26] KVM: arm/arm64: register irq bypass consumer on ARM/ARM64

2017-10-29 Thread Christoffer Dall
pass consumer will be registered for > ARM/ARM64 with the forwarding callbacks: > > - stop/start: halt/resume guest execution > - add/del_producer: set/unset forwarding at vgic/irqchip level > > We don't have any actual support yet, so nothing gets actually > forwarded. >

Re: [PATCH v5 24/26] KVM: arm/arm64: GICv4: Prevent userspace from changing doorbell affinity

2017-10-29 Thread Christoffer Dall
t; of trouble if the VPE is already resident, and we end-up in UNPRED > territory. > > So let's take a definitive action and prevent userspace from messing > with us. This is just a matter of adding IRQ_NO_BALANCING to the > set of flags we already have, letting the kernel in so

Re: [PATCH v4] KVM: arm/arm64: fix the incompatible matching for external abort

2017-10-30 Thread Christoffer Dall
On Mon, Oct 30, 2017 at 02:05:18PM +0800, Dongjiu Geng wrote: > kvm_vcpu_dabt_isextabt() tries to match a full fault syndrome, but > calls kvm_vcpu_trap_get_fault_type() that only returns the fault class, > thus reducing the scope of the check. This doesn't cause any observable > bug yet as we end-

Re: [PATCH v6 0/9] vITS Migration fixes and reset

2017-10-30 Thread Christoffer Dall
On Mon, Oct 30, 2017 at 08:59:36AM +0100, Auger Eric wrote: > Hi Christoffer, > > On 30/10/2017 07:20, Christoffer Dall wrote: > > Hi Eric, > > > > On Thu, Oct 26, 2017 at 05:23:02PM +0200, Eric Auger wrote: > >> This series fixes various bugs observed when

Re: [PATCH 09/15] arm64: Add page size to the kernel image header

2015-10-05 Thread Christoffer Dall
On Fri, Oct 02, 2015 at 05:50:38PM +0100, Marc Zyngier wrote: > On 02/10/15 17:31, Catalin Marinas wrote: > > On Fri, Oct 02, 2015 at 04:49:01PM +0100, Catalin Marinas wrote: > >> On Tue, Sep 15, 2015 at 04:41:18PM +0100, Suzuki K. Poulose wrote: > >>> From: Ard Biesheuvel > >>> > >>> This patch a

Re: [PATCH 03/15] arm64: Introduce helpers for page table levels

2015-10-07 Thread Christoffer Dall
Hi Suzuki, On Tue, Sep 15, 2015 at 04:41:12PM +0100, Suzuki K. Poulose wrote: > From: "Suzuki K. Poulose" > > Introduce helpers for finding the number of page table > levels required for a given VA width, shift for a particular > page table level. > > Convert the existing users to the new helpe

Re: [PATCH V4 2/3] arm64: support initrd outside kernel linear map

2015-10-08 Thread Christoffer Dall
On Tue, Oct 06, 2015 at 01:16:52PM -0400, Mark Salter wrote: > On Tue, 2015-10-06 at 18:11 +0100, Mark Rutland wrote: > > On Tue, Sep 08, 2015 at 12:31:13PM +0100, Mark Rutland wrote: > > > Hi Mark, > > > > > > On Mon, Aug 17, 2015 at 06:01:06PM +0100, Mark Salter wrote: > > > > The use of mem= co

Re: [PATCH v2 3/4] KVM: arm/arm64: check power_off in critical section before VCPU run

2015-08-31 Thread Christoffer Dall
y: Eric Auger > Reported-by: Christoffer Dall > --- > arch/arm/kvm/arm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c > index 4f50be3..cc404a8 100644 > --- a/arch/arm/kvm/arm.c > +++ b/arch/arm/kvm/arm.c &

Re: [PATCH v2 4/4] KVM: arm/arm64: implement kvm_arm_[halt,resume]_guest

2015-08-31 Thread Christoffer Dall
ost.h > +++ b/arch/arm64/include/asm/kvm_host.h > @@ -125,6 +125,9 @@ struct kvm_vcpu_arch { > /* vcpu power-off state */ > bool power_off; > > + /* Don't run the guest */ Can we have the same comment on the arm and arm64 version? > + bool pause; > + > /* IO related fields */ > struct kvm_decode mmio_decode; > > -- > 1.9.1 > Besides these commenting nits, I think this looks reasonable overall. Reviewed-by: Christoffer Dall On the series. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 09/13] arm64: KVM: VHE: Add alternatives for VHE-enabled world-switch

2015-08-31 Thread Christoffer Dall
On Wed, Jul 08, 2015 at 05:19:12PM +0100, Marc Zyngier wrote: > In order to switch between host and guest, a VHE-enabled kernel > must use different accessors for certain system registers. > > This patch uses runtime patching to use the right instruction > when required... So am I reading this pa

Re: [PATCH 12/13] arm64: KVM: Split sysreg save/restore

2015-08-31 Thread Christoffer Dall
On Wed, Jul 08, 2015 at 05:19:15PM +0100, Marc Zyngier wrote: > As we're starting to get different requirements for non-VHE and VHE > code paths, use a slightly more fine-grained approach: > > - __save/restore_sysregs: save/restore non-shared sysregs > - __save/restore_shared_sysregs: save/restore

Re: [PATCH 13/13] arm64: KVM: VHE: Early interrupt handling

2015-08-31 Thread Christoffer Dall
On Wed, Jul 08, 2015 at 05:19:16PM +0100, Marc Zyngier wrote: > With VHE enabled, it is possible to let the kernel handle an interrupt > without saving the full guest context, and without restoring the full > host context either. This reduces the latency of handling an interrupt. > > When an inter

Re: [PATCH 13/15] arm64: kvm: Rewrite fake pgd handling

2015-10-13 Thread Christoffer Dall
On Mon, Oct 12, 2015 at 10:55:24AM +0100, Suzuki K. Poulose wrote: > On 10/10/15 15:52, Christoffer Dall wrote: > >Hi Suzuki, > > Hi Christoffer, > > Thanks for being patient enough to review the code :-) without much of > the comments. I now realise there needs much

Re: [PATCHv3 03/11] arm64: Introduce helpers for page table levels

2015-10-15 Thread Christoffer Dall
On Wed, Oct 14, 2015 at 12:20:26PM +0100, Suzuki K. Poulose wrote: > Introduce helpers for finding the number of page table > levels required for a given VA width, shift for a particular > page table level. > > Convert the existing users to the new helpers. More users > to follow. > > Cc: Ard Bie

Re: [PATCHv3 03/11] arm64: Introduce helpers for page table levels

2015-10-15 Thread Christoffer Dall
On Thu, Oct 15, 2015 at 10:35:38AM +0100, Suzuki K. Poulose wrote: > On 14/10/15 18:07, Mark Rutland wrote: > >On Wed, Oct 14, 2015 at 12:20:26PM +0100, Suzuki K. Poulose wrote: > > >>+ * Number of page-table levels required to address 'va_bits' wide > >>+ * address, without section mapping. We re

Re: [PATCH] VFIO: platform: AMD xgbe reset module

2015-10-15 Thread Christoffer Dall
On Thu, Oct 15, 2015 at 01:21:55PM +0200, Arnd Bergmann wrote: > On Thursday 15 October 2015 10:08:02 Eric Auger wrote: > > Hi Arnd, > > On 10/14/2015 05:38 PM, Arnd Bergmann wrote: > > > On Wednesday 14 October 2015 15:33:12 Eric Auger wrote: > > >> --- a/drivers/vfio/platform/vfio_platform_common

Re: [PATCH v3 0/4] KVM: arm/arm64: guest synchronous halt/resume

2015-10-15 Thread Christoffer Dall
On Fri, Sep 25, 2015 at 11:41:13PM +0200, Eric Auger wrote: > This series introduces the capability to synchronously exit the guest > and prevent it from being re-entered. This modality will be used by > IRQ forwarding series when changing the state of the IRQ. > > Former pause flag used when star

Re: [PATCHv3 03/11] arm64: Introduce helpers for page table levels

2015-10-15 Thread Christoffer Dall
On Thu, Oct 15, 2015 at 02:14:22PM +0100, Suzuki K. Poulose wrote: > On 15/10/15 13:44, Mark Rutland wrote: > >On Thu, Oct 15, 2015 at 01:37:35PM +0200, Christoffer Dall wrote: > >>On Wed, Oct 14, 2015 at 12:20:26PM +0100, Suzuki K. Poulose wrote: > >>>Introduce hel

Re: [PATCHv3 03/11] arm64: Introduce helpers for page table levels

2015-10-15 Thread Christoffer Dall
On Thu, Oct 15, 2015 at 02:48:47PM +0100, Suzuki K. Poulose wrote: > On 15/10/15 14:30, Christoffer Dall wrote: > >On Thu, Oct 15, 2015 at 02:14:22PM +0100, Suzuki K. Poulose wrote: > >>On 15/10/15 13:44, Mark Rutland wrote: > >>>On Thu, Oct 15, 2015 at 01:37:35PM

Re: [PATCH] VFIO: platform: AMD xgbe reset module

2015-10-15 Thread Christoffer Dall
On Thu, Oct 15, 2015 at 04:55:13PM +0200, Arnd Bergmann wrote: > On Thursday 15 October 2015 16:46:09 Eric Auger wrote: > > > > > > This is where we'd need a little more changes for this approach. Instead > > > of unbinding the device from its driver, the idea would be that the > > > driver remain

Re: [PATCH] VFIO: platform: AMD xgbe reset module

2015-10-15 Thread Christoffer Dall
On Thu, Oct 15, 2015 at 5:49 PM, Arnd Bergmann wrote: > On Thursday 15 October 2015 17:03:21 Christoffer Dall wrote: >> On Thu, Oct 15, 2015 at 04:55:13PM +0200, Arnd Bergmann wrote: >> > On Thursday 15 October 2015 16:46:09 Eric Auger wrote: >> > > > >>

Re: [PATCH] VFIO: platform: AMD xgbe reset module

2015-10-15 Thread Christoffer Dall
On Thu, Oct 15, 2015 at 10:53:17AM -0600, Alex Williamson wrote: > On Thu, 2015-10-15 at 16:46 +0200, Eric Auger wrote: > > Hi Arnd, > > On 10/15/2015 03:59 PM, Arnd Bergmann wrote: > > > On Thursday 15 October 2015 14:12:28 Christoffer Dall wrote: > > >

Re: [PATCH v3 05/10] VFIO: platform: add vfio_platform_is_active

2015-09-02 Thread Christoffer Dall
On Mon, Aug 10, 2015 at 03:20:59PM +0200, Eric Auger wrote: > This function returns whether the IRQ is active at irqchip level or > VFIO masked. If either is true, it is considered the IRQ is active. > Currently there is no way to differentiate userspace masked IRQ from > automasked IRQ. There migh

Re: [PATCH v3 06/10] VFIO: platform: add irq bypass producer management

2015-09-02 Thread Christoffer Dall
On Mon, Aug 10, 2015 at 03:21:00PM +0200, Eric Auger wrote: > This patch populates the IRQ bypass callacks: > - stop/start producer simply consist in disabling/enabling the host irq > - add/del consumer: basically set the automasked flag to false/true > > Signed-off-by: Eric Auger > > --- > v2 -

Re: [PATCH v3 07/10] KVM: arm/arm64: vgic: Allow HW interrupts for non-shared devices

2015-09-02 Thread Christoffer Dall
On Mon, Aug 10, 2015 at 03:21:01PM +0200, Eric Auger wrote: > From: Marc Zyngier > > So far, the only use of the HW interrupt facility was the timer, > implying that the active state is context-switched for each vcpu, > as the device is is shared across all vcpus. > > This does not work for a de

Re: [PATCH v3 09/10] KVM: arm/arm64: vgic: forwarding control

2015-09-02 Thread Christoffer Dall
On Mon, Aug 10, 2015 at 03:21:03PM +0200, Eric Auger wrote: > Implements kvm_vgic_[set|unset]_forward. > > Handle low-level VGIC programming: physical IRQ/guest IRQ mapping, > list register cleanup, VGIC state machine. Also interacts with > the irqchip. > > Signed-off-by: Eric Auger > > --- >

Re: [PATCH v3 00/10] ARM IRQ forward control based on IRQ bypass manager

2015-09-02 Thread Christoffer Dall
On Mon, Aug 10, 2015 at 03:20:54PM +0200, Eric Auger wrote: > This series allows to set ARM IRQ forwarding between a VFIO platform > device physical IRQ and a guest virtual IRQ. The link is coordinated > by the IRQ bypass manager. > > The principle is the VFIO platform driver registers an IRQ bypa

Re: [PATCH 2/9] KVM: arm: Do not indent the arguments of DECLARE_BITMAP

2015-10-18 Thread Christoffer Dall
On Thu, Oct 15, 2015 at 10:16:28PM +0200, Michal Marek wrote: > Besides being a coding style issue, it confuses make tags: > > ctags: Warning: include/kvm/arm_vgic.h:307: null expansion of name pattern > "\1" > ctags: Warning: include/kvm/arm_vgic.h:308: null expansion of name pattern > "\1" > c

Re: [PATCH 2/9] KVM: arm: Do not indent the arguments of DECLARE_BITMAP

2015-10-19 Thread Christoffer Dall
On Mon, Oct 19, 2015 at 01:55:24PM +0200, Michal Marek wrote: > On 2015-10-18 22:34, Christoffer Dall wrote: > > On Thu, Oct 15, 2015 at 10:16:28PM +0200, Michal Marek wrote: > >> Besides being a coding style issue, it confuses make tags: > >> > >> ctags: Warni

Re: [PATCHv4 18/24] arm64/kvm: Make use of the system wide safe values

2015-10-19 Thread Christoffer Dall
On Mon, Oct 19, 2015 at 02:24:55PM +0100, Suzuki K. Poulose wrote: > Use the system wide safe value from the new API for safer > decisions > > Cc: Marc Zyngier > Cc: Christoffer Dall > Cc: kvm...@lists.cs.columbia.edu > Signed-off-by: Suzuki K. Poulose > Ac

Re: [PATCH 2/2] kvm: arm/arm64: Fix use after free of stage2 page table

2017-05-15 Thread Christoffer Dall
around cond_resched_lock in > stage2_wp_range(), as cond_resched_lock already does the same checks. > > Cc: Mark Rutland > Cc: Radim Krčmář > Cc: andreyk...@google.com > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Paolo Bonzini > Signed-off-by: Suzuki K Poulose

Re: [PATCH] KVM: arm/arm64: Check pagesize when allocating a hugepage at Stage 2

2018-01-11 Thread Christoffer Dall
> Fix this by checking for the pagesize of userspace vma before creating > PMD hugepage at stage 2. > > Fixes: ad361f093c1e31d ("KVM: ARM: Support hugetlbfs backed huge pages") > Signed-off-by: Punit Agrawal > Cc: Christoffer Dall > Cc: Marc Zyngier > ---

Re: [PATCH] KVM: arm/arm64: Check pagesize when allocating a hugepage at Stage 2

2018-01-11 Thread Christoffer Dall
On Thu, Jan 11, 2018 at 01:01:07PM +, Punit Agrawal wrote: > Christoffer Dall writes: > > > On Thu, Jan 04, 2018 at 06:24:33PM +, Punit Agrawal wrote: > >> KVM only supports PMD hugepages at stage 2 but doesn't actually check > >> that the provided h

Re: [PATCH] KVM: arm/arm64: Check pagesize when allocating a hugepage at Stage 2

2018-01-11 Thread Christoffer Dall
On Thu, Jan 11, 2018 at 3:23 PM, Punit Agrawal wrote: > Christoffer Dall writes: > >> On Thu, Jan 11, 2018 at 01:01:07PM +, Punit Agrawal wrote: >>> Christoffer Dall writes: >>> >>> > On Thu, Jan 04, 2018 at 06:24:33PM +, Punit Agrawal wrote:

Re: [PATCH v2] KVM: arm/arm64: vgic-its: Fix vgicv4 init

2018-01-11 Thread Christoffer Dall
On Mon, Jan 08, 2018 at 10:52:54AM +0100, Eric Auger wrote: > Commit 3d1ad640f8c94 ("KVM: arm/arm64: Fix GICv4 ITS initialization > issues") moved the vgic_supports_direct_msis() check in vgic_v4_init(). > However when vgic_v4_init is called from vgic_its_create(), the has_its > field is not yet se

  1   2   3   4   5   6   7   8   9   >