Re: [PATCH] arm64: dts: Fix GIC reg sizes for APM X-Gene

2015-02-19 Thread Christoffer Dall
Maintenence IRQ */ }; -- 1.7.9.5 This looks good to me and works with 4K and 64K pages on the mustang I have at hand. Acked-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https

Re: [PATCH] arm64: dts: Fix GIC reg sizes for APM X-Gene

2015-02-19 Thread Christoffer Dall
On Thu, Feb 19, 2015 at 12:23:15PM -0600, Rob Herring wrote: On Tue, Jan 27, 2015 at 1:03 AM, Pranavkumar Sawargaonkar psawargaon...@apm.com wrote: In APM X-Gene, GIC register space is 64K aligned while the sizes mentioned in the dt are 4K aligned. This breaks KVM when kernel is built with

Re: linux-next: manual merge of the kvm-arm tree with Linus' tree

2015-03-18 Thread Christoffer Dall
Hi Stephen, On Wed, Mar 18, 2015 at 02:41:11PM +1100, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the kvm-arm tree got a conflict in virt/kvm/arm/vgic.c between commit ae705930fca6 (arm/arm64: KVM: Keep elrsr/aisr in sync with software model) from Linus' tree and commit

[GIT PULL 3/5] arm64: KVM: Fix outdated comment about VTCR_EL2.PS

2015-03-16 Thread Christoffer Dall
to match reality (at least for the next few minutes). Acked-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall christoffer.d...@linaro.org --- arch/arm64/include/asm/kvm_arm.h | 5 +++-- 1 file changed, 3 insertions(+), 2

[GIT PULL 2/5] arm64: KVM: Do not use pgd_index to index stage-2 pgd

2015-03-16 Thread Christoffer Dall
). Tested on X-Gene with a hacked kvmtool that put memory at a stupidly high address. Reviewed-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall christoffer.d...@linaro.org --- arch/arm/include/asm/kvm_mmu.h | 3 ++- arch

Re: [PATCH roundup 1/4] arm64: mm: increase VA range of identity map

2015-03-16 Thread Christoffer Dall
On Fri, Mar 06, 2015 at 03:34:39PM +0100, Ard Biesheuvel wrote: The page size and the number of translation levels, and hence the supported virtual address range, are build-time configurables on arm64 whose optimal values are use case dependent. However, in the current implementation, if the

[GIT PULL 1/5] arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting

2015-03-16 Thread Christoffer Dall
...@arm.com Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall christoffer.d...@linaro.org --- arch/arm/include/asm/kvm_mmu.h | 10 +++--- arch/arm/kvm/mmu.c | 67 +--- arch/arm64/include/asm/kvm_mmu.h | 46

[GIT PULL 0/5] arm/arm64: KVM: Fixes for KVM for 4.0-rc5

2015-03-16 Thread Christoffer Dall
/kvmarm/kvmarm.git kvm-arm-fixes-4.0-rc5 for you to fetch changes up to ae705930fca6322600690df9dc1c7d0516145a93: arm/arm64: KVM: Keep elrsr/aisr in sync with software model (2015-03-14 13:42:07 +0100) Thanks, -Christoffer --- Christoffer Dall (1): arm/arm64: KVM: Keep elrsr/aisr in sync

[GIT PULL 5/5] arm/arm64: KVM: Keep elrsr/aisr in sync with software model

2015-03-16 Thread Christoffer Dall
during migration testing where we would capture a state where the VM has masked the arch timer but there were no interrupts, resulting in a hung test. Cc: Marc Zyngier marc.zyng...@arm.com Reported-by: Alex Bennee alex.ben...@linaro.org Signed-off-by: Christoffer Dall christoffer.d...@linaro.org Signed

[GIT PULL 4/5] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()

2015-03-16 Thread Christoffer Dall
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function kvm_vgic_create() in the error handling case. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn Signed-off-by: Christoffer Dall christoffer.d...@linaro.org --- virt/kvm/arm/vgic.c | 6

Re: [PATCH v4 2/5] hw/intc: arm_gic_kvm.c restore config first

2015-03-16 Thread Christoffer Dall
...@linaro.org Acked-by: Christoffer Dall christoffer.d...@linaro.org diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index 1ad3eb0..2f21ae7 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -370,6 +370,11 @@ static void kvm_arm_gic_put(GICState *s

Re: [PATCH v4 4/5] target-arm: kvm64 fix save/restore of SPSR regs

2015-03-17 Thread Christoffer Dall
On Tue, Mar 17, 2015 at 04:18:16PM +, Peter Maydell wrote: On 16 March 2015 at 11:01, Alex Bennée alex.ben...@linaro.org wrote: From: Christoffer Dall christoffer.d...@linaro.org The current code was negatively indexing the cpu state array and not synchronizing banked spsr register

Re: [PATCH 09/12] KVM: arm/arm64: prepare GICv2 emulation to be handled by kvm_io_bus

2015-03-17 Thread Christoffer Dall
On Tue, Mar 17, 2015 at 06:02:41PM +, Andre Przywara wrote: Hej, On 14/03/15 14:30, Christoffer Dall wrote: On Fri, Mar 13, 2015 at 04:10:09PM +, Andre Przywara wrote: Using the framework provided by the recent vgic.c changes we register a kvm_io_bus device when initializing

Re: [PATCH] target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc)

2015-03-17 Thread Christoffer Dall
On Tue, Mar 17, 2015 at 07:19:35PM +, Peter Maydell wrote: The AArch64 SPSR_EL1 register is architecturally mandated to be mapped to the AArch32 SPSR_svc register. This means its state should live in QEMU's env-banked_spsr[1] field. Correct the buggy regdef that put it in banked_spsr[0]

Re: [PATCH v2] target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc)

2015-03-17 Thread Christoffer Dall
put it in banked_spsr[0]. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Christoffer Dall christoffer.d...@linaro.org Alex, will you respin the SPSR patch based on this one then? You can change the authorship on the SPSR patch to yourself if you prefer. Thanks

Re: [PATCH 08/12] KVM: arm/arm64: implement kvm_io_bus MMIO handling for the VGIC

2015-03-20 Thread Christoffer Dall
On Thu, Mar 19, 2015 at 03:44:51PM +, Andre Przywara wrote: Hej Christoffer, On 14/03/15 14:27, Christoffer Dall wrote: On Fri, Mar 13, 2015 at 04:10:08PM +, Andre Przywara wrote: Currently we use a lot of VGIC specific code to do the MMIO dispatching. Use the previous reworks

Re: [PATCH v4 4/5] target-arm: kvm64 fix save/restore of SPSR regs

2015-03-16 Thread Christoffer Dall
On Mon, Mar 16, 2015 at 11:01:55AM +, Alex Bennée wrote: From: Christoffer Dall christoffer.d...@linaro.org The current code was negatively indexing the cpu state array and not synchronizing banked spsr register state with the current mode's spsr state, causing occasional failures

Re: [PATCH v2 5/6] target-arm: kvm64 fix save/restore of SPSR regs

2015-03-09 Thread Christoffer Dall
On Wed, Mar 04, 2015 at 02:35:52PM +, Alex Bennée wrote: From: Christoffer Dall christoffer.d...@linaro.org The current code was negatively indexing the cpu state array and not synchronizing banked spsr register state with the current mode's spsr state, causing occasional failures

Re: [PATCH v2 2/5] arm/arm64: KVM: Implement support for unqueueing active IRQs

2015-03-09 Thread Christoffer Dall
On Mon, Mar 02, 2015 at 01:29:01PM +, Alex Bennée wrote: From: Christoffer Dall christoffer.d...@linaro.org Migrating active interrupts causes the active state to be lost completely. This implements some additional bitmaps to track the active state on the distributor and export

Re: [PATCH 5/6] target-arm/kvm64: fix save/restore of SPSR regs

2015-03-09 Thread Christoffer Dall
On Mon, Mar 09, 2015 at 10:31:19PM +0900, Peter Maydell wrote: On 9 March 2015 at 21:56, Christoffer Dall christoffer.d...@linaro.org wrote: this function, however, is not used only when migration, but should generally cover the case where you want to synchronize QEMU's state into KVM's

Re: [PATCH v2 1/5] arm: KVM: export vcpi-pause state via MP_STATE ioctls

2015-03-09 Thread Christoffer Dall
On Mon, Mar 09, 2015 at 04:34:21PM +, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: Hi Alex, The subject of this change has a typo, and I also think it's not about exposing the pause state (that's just an internal name/concept), but about exposing

Re: [PATCH 3/3] arm/arm64: KVM: Optimize handling of Access Flag faults

2015-03-12 Thread Christoffer Dall
On Wed, Jan 21, 2015 at 06:42:13PM +, Marc Zyngier wrote: Now that we have page aging in Stage-2, it becomes obvious that we're doing way too much work handling the fault. The page is not going anywhere (it is still mapped), the page tables are already allocated, and all we want is to

Re: [PATCH 1/3] arm/arm64: KVM: Allow handle_hva_to_gpa to return a value

2015-03-12 Thread Christoffer Dall
change. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Acked-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH 2/3] arm/arm64: KVM: Implement Stage-2 page aging

2015-03-12 Thread Christoffer Dall
On Wed, Jan 21, 2015 at 06:42:12PM +, Marc Zyngier wrote: Until now, KVM/arm didn't care much for page aging (who was swapping anyway?), and simply provided empty hooks to the core KVM code. With server-type systems now being available, things are quite different. This patch implements

Re: [PATCH v3 0/5] KVM ARM64 Migration Fixes

2015-03-14 Thread Christoffer Dall
Hi Alex and Marc, On Fri, Mar 13, 2015 at 05:02:51PM +, Alex Bennée wrote: Some fairly minor updates from the last series I sent out: - Re-based on v4.0-rc3 - Use KVM_MP_STATE_STOPPED instead of KVM_MP_STATE_HALTED - Some minor textual tidy ups on commit msgs and comments -

Re: [PATCH 04/12] KVM: x86: remove now unneeded include directory from Makefile

2015-03-14 Thread Christoffer Dall
On Fri, Mar 13, 2015 at 04:10:04PM +, Andre Przywara wrote: virt/kvm was never really a good include directory for anything else than locally included headers. With the move of iodev.h there is no need anymore to add this directory the compiler's include path, so remove it from the x86 kvm

Re: [PATCH 01/12] KVM: Redesign kvm_io_bus_ API to pass VCPU structure to the callbacks.

2015-03-14 Thread Christoffer Dall
...@virtualopensystems.com Signed-off-by: Andre Przywara andre.przyw...@arm.com Acked-by: Paolo Bonzini pbonzini at redhat.com Acked-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman

Re: [PATCH 11/12] KVM: ARM: on IO mem abort - route the call to KVM MMIO bus

2015-03-14 Thread Christoffer Dall
On Fri, Mar 13, 2015 at 04:10:11PM +, Andre Przywara wrote: From: Nikolay Nikolaev n.nikol...@virtualopensystems.com On IO memory abort, try to handle the MMIO access through the KVM registered read/write callbacks. This is done by invoking the relevant kvm_io_bus_* API. [Andre: Since

Re: [PATCH 06/12] KVM: mark kvm-buses as empty once they were destroyed

2015-03-14 Thread Christoffer Dall
On Fri, Mar 13, 2015 at 04:10:06PM +, Andre Przywara wrote: In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, especially before calling kvm_arch_destroy_vm(). To avoid unregistering devices from the already destroyed bus, let's mark the bus with NULL to let other users know it

Re: [PATCH 03/12] KVM: arm/arm64: remove now unneeded include directory from Makefile

2015-03-14 Thread Christoffer Dall
and arm64 kvm Makefile. Signed-off-by: Andre Przywara andre.przyw...@arm.com Acked-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH 09/12] KVM: arm/arm64: prepare GICv2 emulation to be handled by kvm_io_bus

2015-03-14 Thread Christoffer Dall
On Fri, Mar 13, 2015 at 04:10:09PM +, Andre Przywara wrote: Using the framework provided by the recent vgic.c changes we register a kvm_io_bus device when initializing the virtual GICv2. Signed-off-by: Andre Przywara andre.przyw...@arm.com --- include/kvm/arm_vgic.h |1 +

Re: [PATCH 05/12] KVM: arm/arm64: rename struct kvm_mmio_range to vgic_io_range

2015-03-14 Thread Christoffer Dall
-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v2 1/3] arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting

2015-03-11 Thread Christoffer Dall
On Wed, Mar 11, 2015 at 2:13 PM, Marc Zyngier marc.zyng...@arm.com wrote: Hi Christoffer, On 11/03/15 12:16, Christoffer Dall wrote: Hi Marc, On Tue, Mar 10, 2015 at 07:06:59PM +, Marc Zyngier wrote: We're using __get_free_pages with to allocate the guest's stage-2 PGD. The standard

Re: [PATCH v2 1/3] arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting

2015-03-11 Thread Christoffer Dall
Hi Marc, On Tue, Mar 10, 2015 at 07:06:59PM +, Marc Zyngier wrote: We're using __get_free_pages with to allocate the guest's stage-2 PGD. The standard behaviour of this function is to return a set of pages where only the head page has a valid refcount. This behaviour gets us into

Re: [PATCH] KVM: vgic: add virt-capable compatible strings

2015-03-11 Thread Christoffer Dall
strings to the VGIC code. The of_device_id entries are padded to keep the probe fucntion data aligned. Signed-off-by: Mark Rutland mark.rutl...@arm.com Cc: Andre Przywara andre.przyw...@arm.com Cc: Christoffer Dall christoffer.d...@linaro.org Cc: Marc Zyngier marc.zyng...@arm.com Cc: Michal

Re: [PATCH v2 0/3] arm/arm64: KVM: Add support for page aging

2015-03-12 Thread Christoffer Dall
On Thu, Mar 12, 2015 at 06:16:49PM +, Marc Zyngier wrote: So far, KVM/arm doesn't implement any support for page aging, leading to rather bad performance when the system is swapping. This short series implements the required hooks and fault handling to deal with pages being marked

Re: [PATCH v9 5/5] KVM: arm/arm64: add irqfd support

2015-03-11 Thread Christoffer Dall
On Thu, Mar 05, 2015 at 12:27:42PM +0100, Paolo Bonzini wrote: On 05/03/2015 11:53, Marc Zyngier wrote: +#ifdef CONFIG_HAVE_KVM_IRQFD + case KVM_CAP_IRQFD: + r = vgic_present; + break; +#endif Nitpick: we have select HAVE_KVM_IRQFD, so we can lose the

[PATCH] arm/arm64: KVM: Kill CONFIG_KVM_ARM_{VGIC,TIMER}

2015-03-11 Thread Christoffer Dall
. The !CONFIG_KVM_ARM_VGIC/TIMER case is pretty much an untested code path anyway, so we're better off just getting rid of it. Signed-off-by: Christoffer Dall christoffer.d...@linaro.org --- This depends on Paolo's patch: KVM: arm/arm64: prefer IS_ENABLED to a static variable I've applied it to queue

Re: [PATCH v2 1/3] arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting

2015-03-11 Thread Christoffer Dall
On Wed, Mar 11, 2015 at 3:03 PM, Andrew Jones drjo...@redhat.com wrote: On Wed, Mar 11, 2015 at 02:20:56PM +0100, Christoffer Dall wrote: On Wed, Mar 11, 2015 at 2:13 PM, Marc Zyngier marc.zyng...@arm.com wrote: Hi Christoffer, On 11/03/15 12:16, Christoffer Dall wrote: Hi Marc

Re: [kvm-unit-tests PATCH 00/18] arm/arm64: add smp support

2015-03-02 Thread Christoffer Dall
On Thu, Feb 26, 2015 at 02:50:38PM +0100, Andrew Jones wrote: On Thu, Feb 26, 2015 at 12:34:02PM +0100, Christoffer Dall wrote: On Sun, Feb 01, 2015 at 07:34:28PM +0100, Andrew Jones wrote: This series extends the kvm-unit-tests/arm[64] framework to support smp. A break down

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-03-02 Thread Christoffer Dall
On Tue, Feb 24, 2015 at 05:47:19PM +, Ard Biesheuvel wrote: On 24 February 2015 at 14:55, Andrew Jones drjo...@redhat.com wrote: On Fri, Feb 20, 2015 at 04:36:26PM +0100, Andrew Jones wrote: On Fri, Feb 20, 2015 at 02:37:25PM +, Ard Biesheuvel wrote: On 20 February 2015 at 14:29,

Re: kvm [2087]: load/store instruction decoding not implemented

2015-02-24 Thread Christoffer Dall
Hi Rich, On Tue, Feb 24, 2015 at 11:59:35AM +, Richard W.M. Jones wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1194366 Has anyone seen this KVM error? Or have suggestions how to debug it further? kvm [2028]: load/store instruction decoding not implemented This typically

Re: [kvm-unit-tests PATCH 00/18] arm/arm64: add smp support

2015-02-26 Thread Christoffer Dall
On Sun, Feb 01, 2015 at 07:34:28PM +0100, Andrew Jones wrote: This series extends the kvm-unit-tests/arm[64] framework to support smp. A break down of the patches is as follows 01-02: prepare general framework for smp use 03-06: arm/arm64 fixups not 100% related to this series, but

Re: [PATCH 03/18] arm: fixups: add barriers, actually set MAIR

2015-02-26 Thread Christoffer Dall
On Sun, Feb 01, 2015 at 07:34:31PM +0100, Andrew Jones wrote: Sprinkle in some more isbs after context-changing operations, as the ARM ARM states we should. I haven't seen any problems without them, but we should do it right. Also, *actually* set the MAIR in asm_mmu_enable. We were reading,

Re: [PATCH v3 10/11] KVM: arm/arm64: prepare GICv3 emulation to use kvm_io_bus MMIO handling

2015-03-27 Thread Christoffer Dall
, since they need to be tagged with the respective redistributor (read: VCPU) they are connected with. We use the kvm_io_bus framework to register one devices per VCPU. Signed-off-by: Andre Przywara andre.przyw...@arm.com Reviewed-by: Christoffer Dall christoffer.d...@linaro.org

Re: [PATCH v3 08/11] KVM: arm/arm64: prepare GICv2 emulation to be handled by kvm_io_bus

2015-03-27 Thread Christoffer Dall
On Thu, Mar 26, 2015 at 02:39:35PM +, Andre Przywara wrote: Using the framework provided by the recent vgic.c changes we register a kvm_io_bus device when initializing the virtual GICv2. Signed-off-by: Andre Przywara andre.przyw...@arm.com Reviewed-by: Christoffer Dall christoffer.d

Re: [PATCH v3 09/11] KVM: arm/arm64: merge GICv3 RD_base and SGI_base register frames

2015-03-27 Thread Christoffer Dall
. Since the spec mandates those two pages to be contigious, we could as well merge them and save the churn with the second KVM I/O bus device. Signed-off-by: Andre Przywara andre.przyw...@arm.com Reviewed-by: Christoffer Dall christoffer.d...@linaro.org

Re: [PATCH v3 07/11] KVM: arm/arm64: implement kvm_io_bus MMIO handling for the VGIC

2015-03-27 Thread Christoffer Dall
do not make use of it yet, but will be enabled with the following patches. Signed-off-by: Andre Przywara andre.przyw...@arm.com Reviewed-by: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm

Re: [PATCH v3 11/11] KVM: arm/arm64: rework MMIO abort handling to use KVM MMIO bus

2015-03-27 Thread Christoffer Dall
On Thu, Mar 26, 2015 at 02:39:38PM +, Andre Przywara wrote: Currently we have struct kvm_exit_mmio for encapsulating MMIO abort data to be passed on from syndrome decoding all the way down to the VGIC register handlers. Now as we switch the MMIO handling to be routed through the KVM MMIO

Re: [PATCH v2 07/10] KVM: arm64: guest debug, add support for single-step

2015-04-14 Thread Christoffer Dall
Hi Alex, On Tue, Mar 31, 2015 at 04:08:05PM +0100, Alex Bennée wrote: This adds support for single-stepping the guest. As userspace can and will manipulate guest registers before restarting any tweaking of the registers has to occur just before control is passed back to the guest. this

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-14 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the hypervisor (MDCR_EL2_TDE). you mean trapping all exceptions in the guest to the hypervisor? The kvm_debug_exit_arch

Re: [PATCH v2 02/10] KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values

2015-04-14 Thread Christoffer Dall
On Mon, Apr 13, 2015 at 03:51:33PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Mar 31, 2015 at 04:08:00PM +0100, Alex Bennée wrote: Currently x86, powerpc and soon arm64 use the same two architecture specific bits for guest debug support

Re: [PATCH v2 08/10] KVM: arm64: guest debug, HW assisted debug support

2015-04-14 Thread Christoffer Dall
On Fri, Apr 10, 2015 at 02:25:21PM +0200, Andrew Jones wrote: [...] --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -196,16 +196,49 @@ static bool trap_dbgauthstatus_el1(struct kvm_vcpu *vcpu, * - If the dirty bit is set, save guest registers, restore host *

Re: [PATCH] KVM: arm: irqfd: fix value returned by kvm_irq_map_gsi

2015-04-14 Thread Christoffer Dall
(struct kvm *kvm, struct kvm_kernel_irq_routing_entry *entries, int gsi) { - return gsi; + return 0; } int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin) -- Acked-by: Christoffer Dall christoffer.d...@linaro.org

Re: [PATCH v2 08/10] KVM: arm64: guest debug, HW assisted debug support

2015-04-14 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:06PM +0100, Alex Bennée wrote: This adds support for userspace to control the HW debug registers for guest debug. We'll only copy the $ARCH defined number across as that is all that hyp.S will use anyway. I don't really understand what this sentence means? I've

Re: [PATCH v2 09/10] KVM: arm64: trap nested debug register access

2015-04-14 Thread Christoffer Dall
On Mon, Apr 13, 2015 at 08:59:21AM +0100, Alex Bennée wrote: [...] + /* MDSCR_EL1 */ + if (r-reg == MDSCR_EL1) { + if (p-is_write) + vcpu_debug_saved_reg(vcpu, mdscr_el1) = + *vcpu_reg(vcpu,

Re: [RFC PATCH 1/3] KVM: promote KVM_MEMSLOT_INCOHERENT to uapi

2015-04-20 Thread Christoffer Dall
On Wed, Mar 18, 2015 at 03:10:31PM -0400, Andrew Jones wrote: Also rename to KVM_MEM_UNCACHED. Signed-off-by: Andrew Jones drjo...@redhat.com --- Documentation/virtual/kvm/api.txt | 16 ++-- arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm/kvm/arm.c| 1 +

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Christoffer Dall
On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: On 28 April 2015 at 09:42, Alex Bennée alex.ben...@linaro.org wrote: Peter Maydell peter.mayd...@linaro.org writes: Does the kernel already have a conveniently implemented inject exception into guest lump of code? If so it might

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Christoffer Dall
On Wed, Apr 29, 2015 at 10:18:18AM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Christoffer Dall
On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: On 28 April 2015 at 09:42, Alex Bennée alex.ben...@linaro.org wrote: Peter Maydell peter.mayd...@linaro.org

Re: [PATCH] KVM: arm64: add active register handling to GICv3 emulation as well

2015-05-05 Thread Christoffer Dall
for save/restore of the GICv3 distributor state, we should also emulate their handling in the distributor and redistributor frames of an emulated GICv3. Signed-off-by: Andre Przywara andre.przyw...@arm.com Acked-by: Christoffer Dall christoffer.d...@linaro.org Applied to queue, thanks! -Christoffer

Re: some questions about system calls in KVM/ARM

2015-05-05 Thread Christoffer Dall
On Sun, May 03, 2015 at 11:37:29AM +0800, 孙晓阳 wrote: Hello, I am intersted in KVM/ARM and I am trying to do some work based on KVM/ARM. But here is some questions : 1. if I set HCR.TGE=1, does the system calls will traps into hyp mode and be handled by hyp_svc( arch/arm/kvm/interrupts.S)?

Re: [PATCH 2/2] KVM: arm/mips/x86/power use __kvm_guest_{enter|exit}

2015-05-05 Thread Christoffer Dall
On Thu, Apr 30, 2015 at 01:43:31PM +0200, Christian Borntraeger wrote: Use __kvm_guest_{enter|exit} instead of kvm_guest_{enter|exit} where interrupts are disabled. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com For the ARM part: Acked-by: Christoffer Dall christoffer.d

Re: [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-06 Thread Christoffer Dall
Hi Jérémy, On Tue, May 05, 2015 at 11:13:11AM +0200, Jérémy Fanguède wrote: To maintain cache coherency on ARM, we may need a mechanism to flush the data cache. In addition to generally just making this functionality available (see below), do you have an actual use case in mind for this? To

Re: [RFC v2 0/4] chip/vgic adaptations for forwarded irq

2015-05-06 Thread Christoffer Dall
Hi Eric, On Wed, Feb 11, 2015 at 09:20:53AM +0100, Eric Auger wrote: This series proposes some fixes that appeared to be necessary to integrate IRQ forwarding in KVM/VFIO. - deactivation of the forwarded IRQ in irq_disabled case - a specific handling of forwarded IRQ into the VGIC state

Re: [RFC v2 2/4] KVM: arm: vgic: fix state machine for forwarded IRQ

2015-05-07 Thread Christoffer Dall
On Thu, May 07, 2015 at 09:48:25AM +0200, Eric Auger wrote: Hi Christoffer, On 05/06/2015 04:26 PM, Christoffer Dall wrote: On Wed, Feb 11, 2015 at 09:20:55AM +0100, Eric Auger wrote: Fix multiple injection of level sensitive forwarded IRQs. With current code, the second injection fails

Re: [PATCH v3 01/12] KVM: add comments for kvm_debug_exit_arch struct

2015-05-08 Thread Christoffer Dall
{ __u64 nr; __u64 ret; -- 2.3.5 otherwise: Acked-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v3 02/12] KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:17PM +0100, Alex Bennée wrote: Currently x86, powerpc and soon arm64 use the same two architecture specific bits for guest debug support for software and hardware breakpoints. This makes the shared values explicit while leaving the gate open for another

Re: [PATCH v3 03/12] KVM: arm64: guest debug, define API headers

2015-05-08 Thread Christoffer Dall
__KVM_GUESTDBG_USE_HW_BP + #endif /* __ARM_KVM_H__ */ -- 2.3.5 Otherwise: Acked-by: Christoffer Dall christoffer.d...@linaro.org Thanks, -Christoffer ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo

Re: [PATCH v3 08/12] KVM: arm64: re-factor hyp.S debug register code

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:11AM +0100, Alex Bennée wrote: This is a pre-cursor to sharing the code with the guest debug support. This replaces the big macro that fishes data out of a fixed location with a more general helper macro to restore a set of debug registers. It uses macro

Re: [PATCH v3 12/12] KVM: arm64: add trace points for guest_debug debug

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:15AM +0100, Alex Bennée wrote: This includes trace points for: kvm_arch_setup_guest_debug kvm_arch_clear_guest_debug kvm_handle_guest_debug I've also added some generic register setting trace events and also a trace point to dump the array of hardware

Re: [PATCH v3 10/12] KVM: arm64: trap nested debug register access

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:13AM +0100, Alex Bennée wrote: When we are using the hardware registers for guest debug we need to deal with the guests access to them. There is already a mechanism for dealing with these accesses so we build on top of that. - any access to mdscr_el1 is now

Re: [PATCH v3 09/12] KVM: arm64: guest debug, HW assisted debug support

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:12AM +0100, Alex Bennée wrote: This adds support for userspace to control the HW debug registers for guest debug. In the debug ioctl we copy the IMPDEF defined number of registers into a new register set called host_debug_state. There is now a new vcpu parameter

Re: [PATCH v3 00/12] KVM Guest Debug support for arm64

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:15PM +0100, Alex Bennée wrote: Hi, Here is V3 of the KVM Guest Debug support for arm64. This sees the return of hyp.S re-factoring code which has been expanded to handle both the save and restore legs. The HW debug patch then adds a simple indirection to

Re: [PATCH v3 11/12] KVM: arm64: enable KVM_CAP_SET_GUEST_DEBUG

2015-05-08 Thread Christoffer Dall
-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH 1/2] ARM: kvm: fix a bad BSYM() usage

2015-05-11 Thread Christoffer Dall
On Sat, May 09, 2015 at 09:10:57PM +0100, Russell King - ARM Linux wrote: On Sat, May 09, 2015 at 10:07:17PM +0200, Christoffer Dall wrote: On Fri, May 08, 2015 at 05:08:42PM +0100, Russell King wrote: BSYM() should only be used when refering to local symbols in the same assembly file

Re: [PATCH] kvm: remove one useless check extension

2015-05-05 Thread Christoffer Dall
On Mon, May 04, 2015 at 11:24:22AM +0200, Paolo Bonzini wrote: On 04/05/2015 04:48, Tiejun Chen wrote: We already check KVM_CAP_IRQFD in generic once enable CONFIG_HAVE_KVM_IRQFD, kvm_vm_ioctl_check_extension_generic() | + switch (arg) { + ... + #ifdef

Re: [PATCH 1/2] ARM: kvm: fix a bad BSYM() usage

2015-05-09 Thread Christoffer Dall
On Fri, May 08, 2015 at 05:08:42PM +0100, Russell King wrote: BSYM() should only be used when refering to local symbols in the same assembly file which are resolved by the assembler, and not for linker-fixed up symbols. The use of BSYM() with panic is incorrect as the linker is involved in

Re: [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Christoffer Dall
On Thu, May 7, 2015 at 4:50 PM, Jérémy Fanguède j.fangu...@virtualopensystems.com wrote: On Thu, May 7, 2015 at 1:20 PM, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, May 07, 2015 at 12:50:50PM +0200, Jérémy Fanguède wrote: On Wed, May 6, 2015 at 4:12 PM, Christoffer Dall

Re: [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Christoffer Dall
On Thu, May 07, 2015 at 12:50:50PM +0200, Jérémy Fanguède wrote: On Wed, May 6, 2015 at 4:12 PM, Christoffer Dall christoffer.d...@linaro.org wrote: Hi Jérémy, On Tue, May 05, 2015 at 11:13:11AM +0200, Jérémy Fanguède wrote: To maintain cache coherency on ARM, we may need a mechanism

Re: [PATCH v3 05/12] KVM: arm: introduce kvm_arm_init/setup/clear_debug

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:20PM +0100, Alex Bennée wrote: This is a precursor for later patches which will need to do more to setup debug state before entering the hyp.S switch code. The existing functionality for setting mdcr_el2 has been moved out of hyp.S and now uses the value kept in

Re: [PATCH v3 06/12] KVM: arm64: guest debug, add SW break point support

2015-05-08 Thread Christoffer Dall
] = kvm_handle_guest_debug, }; static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu) -- 2.3.5 Besides the nit: Reviewed-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https

Re: [PATCH v3 07/12] KVM: arm64: guest debug, add support for single-step

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:22PM +0100, Alex Bennée wrote: This adds support for single-stepping the guest. To do this we need to manipulate the guests PSTATE.SS and MDSCR_EL1.SS bits which we do in the kvm_arm_setup/clear_debug() so we don't affect the apparent state of the guest.

Re: [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-14 Thread Christoffer Dall
On Thu, May 14, 2015 at 01:38:38PM +0200, Paolo Bonzini wrote: On 14/05/2015 13:36, Christoffer Dall wrote: (It's probably worth looking at the documentation in the first hunk too, under the commit message.) Why is this a hack/unintuitive? Is the semantics

Re: [PATCH v3 5/5] arm64: KVM: Switch vgic save/restore to alternative_insn

2015-05-14 Thread Christoffer Dall
), and it makes sense to rely on the instruction patching instead. This leads to a nice cleanup of the code. Acked-by: Will Deacon will.dea...@arm.com Signed-off-by: Marc Zyngier marc.zyng...@arm.com I gave this a quick spin on Juno as well and works as expected: Reviewed-by: Christoffer Dall

Re: [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-14 Thread Christoffer Dall
On Thu, May 14, 2015 at 02:08:49PM +0200, Paolo Bonzini wrote: On 14/05/2015 14:00, Christoffer Dall wrote: So, getting back to my original question. Is the point then that UEFI must assume (from ACPI/DT) the cache-coherency properties of the PCI controller which exists in hardware

Re: [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-14 Thread Christoffer Dall
On Thu, May 14, 2015 at 02:28:49PM +0200, Paolo Bonzini wrote: On 14/05/2015 14:24, Christoffer Dall wrote: On Thu, May 14, 2015 at 02:08:49PM +0200, Paolo Bonzini wrote: On 14/05/2015 14:00, Christoffer Dall wrote: So, getting back to my original question. Is the point

Re: [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-15 Thread Christoffer Dall
On Thu, May 14, 2015 at 03:36:37PM +0200, Andrew Jones wrote: On Thu, May 14, 2015 at 02:11:59PM +0100, Peter Maydell wrote: On 14 May 2015 at 14:03, Andrew Jones drjo...@redhat.com wrote: On Thu, May 14, 2015 at 11:37:46AM +0100, Peter Maydell wrote: On 14 May 2015 at 11:31, Andrew Jones

Re: [RFC/RFT PATCH v2 1/3] arm/arm64: pageattr: add set_memory_nc

2015-05-15 Thread Christoffer Dall
On Thu, May 14, 2015 at 03:46:44PM +0200, Andrew Jones wrote: On Thu, May 14, 2015 at 01:05:09PM +0200, Christoffer Dall wrote: On Wed, May 13, 2015 at 01:31:52PM +0200, Andrew Jones wrote: Provide a method to change normal, cacheable memory to non-cacheable. KVM will make use

Re: [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-15 Thread Christoffer Dall
On Thu, May 14, 2015 at 03:32:13PM +0200, Andrew Jones wrote: On Thu, May 14, 2015 at 12:55:49PM +0200, Christoffer Dall wrote: On Wed, May 13, 2015 at 01:31:54PM +0200, Andrew Jones wrote: When S1 and S2 memory attributes combine wrt to caching policy, non-cacheable types take precedence

Re: [PATCH v3 4/5] arm64: alternative: Introduce feature for GICv3 CPU interface

2015-05-14 Thread Christoffer Dall
On Fri, Mar 27, 2015 at 01:09:24PM +, Marc Zyngier wrote: Add a new item to the feature set (ARM64_HAS_SYSREG_GIC_CPUIF) to indicate that we have a system register GIC CPU interface This will help KVM switching to alternative instruction patching. Reviewed-by: Andre Przywara

Re: [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-14 Thread Christoffer Dall
On Thu, May 14, 2015 at 01:09:34PM +0200, Laszlo Ersek wrote: On 05/14/15 12:30, Christoffer Dall wrote: On Wed, May 13, 2015 at 01:31:51PM +0200, Andrew Jones wrote: Introduce a new memory region flag, KVM_MEM_UNCACHED, which is needed by ARM. This flag informs KVM that the given memory

Re: [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-14 Thread Christoffer Dall
On Thu, May 14, 2015 at 01:31:03PM +0200, Paolo Bonzini wrote: On 14/05/2015 13:29, Christoffer Dall wrote: (It's probably worth looking at the documentation in the first hunk too, under the commit message.) Why is this a hack/unintuitive? Is the semantics of the QEMU PCI bus

Re: [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-14 Thread Christoffer Dall
On Wed, May 13, 2015 at 01:31:54PM +0200, Andrew Jones wrote: When S1 and S2 memory attributes combine wrt to caching policy, non-cacheable types take precedence. If a guest maps a region as device memory, which KVM userspace is using to emulate the device using normal, cacheable memory, then

Re: [RFC/RFT PATCH v2 1/3] arm/arm64: pageattr: add set_memory_nc

2015-05-14 Thread Christoffer Dall
-by: Christoffer Dall christoffer.d...@linaro.org But you obviously need Russell and Will/Catalin to ack/merge this. -Christoffer ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: linux-next: manual merge of the kvm-arm tree with Linus' tree

2015-04-16 Thread Christoffer Dall
Hi Paolo and Marc, On Tue, Apr 07, 2015 at 06:20:15PM +0200, Paolo Bonzini wrote: On 18/03/2015 08:55, Christoffer Dall wrote: Hi Stephen, On Wed, Mar 18, 2015 at 02:41:11PM +1100, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the kvm-arm tree got a conflict

Re: [PATCH v2 03/10] KVM: arm: guest debug, define API headers

2015-04-13 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:01PM +0100, Alex Bennée wrote: This commit defines the API headers for guest debugging. There are two architecture specific debug structures: - kvm_guest_debug_arch, allows us to pass in HW debug registers - kvm_debug_exit_arch, signals the exact debug exit

Re: [PATCH] KVM: arm/arm64: check IRQ number on userland injection

2015-04-13 Thread Christoffer Dall
. Signed-off-by: Andre Przywara andre.przyw...@arm.com CC: sta...@vger.kernel.org # 4.0, 3.19, 3.18 Reviewed-by: Christoffer Dall christoffer.d...@linaro.org ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman

Re: [PATCH] KVM: arm/arm64: check IRQ number on userland injection

2015-04-13 Thread Christoffer Dall
On Mon, Apr 13, 2015 at 11:21:20AM +0100, Marc Zyngier wrote: On 13/04/15 11:04, Christoffer Dall wrote: On Fri, Apr 10, 2015 at 05:52:05PM +0100, Andre Przywara wrote: Hi Christopher, On 10/04/15 16:29, Christopher Covington wrote: Hi Andre, On 04/10/2015 11:17 AM, Andre Przywara

Re: [PATCH] KVM: arm/arm64: check IRQ number on userland injection

2015-04-13 Thread Christoffer Dall
On Fri, Apr 10, 2015 at 05:52:05PM +0100, Andre Przywara wrote: Hi Christopher, On 10/04/15 16:29, Christopher Covington wrote: Hi Andre, On 04/10/2015 11:17 AM, Andre Przywara wrote: When userland injects a SPI via the KVM_IRQ_LINE ioctl we currently only check it against a fixed

  1   2   3   4   5   6   7   8   9   10   >