[PATCH v7 01/11] oslib-posix: Align to permit transparent hugepages on ARM Linux

2013-02-26 Thread Peter Maydell
ARM Linux (like x86-64 Linux) can use transparent hugepages for KVM if memory blocks are 2MiB aligned; set QEMU_VMALLOC_ALIGN accordingly. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- util/oslib-posix.c |2 +- 1 file changed, 1

[PATCH v7 05/11] ARM KVM: save and load VFP registers from kernel

2013-02-26 Thread Peter Maydell
-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- target-arm/kvm.c | 78 +++--- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/target-arm/kvm.c b/target-arm/kvm.c index 499b427..9173d0a 100644

[PATCH v7 04/11] ARM: KVM: Add support for KVM on ARM architecture

2013-02-26 Thread Peter Maydell
From: Christoffer Dall cd...@cs.columbia.edu Add basic support for KVM on ARM architecture. Signed-off-by: Christoffer Dall cd...@cs.columbia.edu [PMM: Minor tweaks and code cleanup, switch to ONE_REG] Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz

[PATCH v7 06/11] hw/arm_gic: Add presave/postload hooks

2013-02-26 Thread Peter Maydell
Add presave/postload hooks to the ARM GIC common base class. These will be used by the KVM in-kernel GIC subclass to sync state between kernel and userspace when migrating. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Andreas Färber afaer...@suse.de Reviewed-by: Paolo

[PATCH v7 07/11] hw/arm_gic: Convert ARM GIC classes to use init/realize

2013-02-26 Thread Peter Maydell
Convert the ARM GIC classes to use init/realize rather than SysBusDevice::init. (We have to do them all in one patch to avoid unconverted subclasses calling a nonexistent SysBusDevice init function in the base class and crashing.) Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw

Re: [Qemu-devel] [PATCH v6 7/9] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2013-02-24 Thread Peter Maydell
On 23 February 2013 15:29, Andreas Färber afaer...@suse.de wrote: +static int kvm_arm_gic_init(SysBusDevice *dev) Please make this a realize function ... Will do. As you've probably guessed, this was written some time ago and I never updated it to match our current recommendations. +

[PATCH v6 8/9] configure: Enable KVM on ARM

2013-02-22 Thread Peter Maydell
Enable KVM on ARM hosts, now that all the necessary components for it exist. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index

[PATCH v6 0/9] QEMU: Support KVM on ARM

2013-02-22 Thread Peter Maydell
ioctl KVM_SET_DEVICE_ADDRESS) Christoffer Dall (1): ARM: KVM: Add support for KVM on ARM architecture Peter Maydell (8): oslib-posix: Align to permit transparent hugepages on ARM Linux linux-headers: resync from mainline to add ARM KVM headers ARM KVM: save and load VFP registers from

[PATCH v6 1/9] oslib-posix: Align to permit transparent hugepages on ARM Linux

2013-02-22 Thread Peter Maydell
ARM Linux (like x86-64 Linux) can use transparent hugepages for KVM if memory blocks are 2MiB aligned; set QEMU_VMALLOC_ALIGN accordingly. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- util/oslib-posix.c |2 +- 1 file changed, 1

[PATCH v6 4/9] ARM KVM: save and load VFP registers from kernel

2013-02-22 Thread Peter Maydell
-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- target-arm/kvm.c | 78 +++--- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/target-arm/kvm.c b/target-arm/kvm.c index 13ebfd7..5cd9086 100644

[PATCH v6 3/9] ARM: KVM: Add support for KVM on ARM architecture

2013-02-22 Thread Peter Maydell
From: Christoffer Dall cd...@cs.columbia.edu Add basic support for KVM on ARM architecture. Signed-off-by: Christoffer Dall cd...@cs.columbia.edu [PMM: Minor tweaks and code cleanup, switch to ONE_REG] Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz

[PATCH v6 7/9] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2013-02-22 Thread Peter Maydell
Implement support for using the KVM in-kernel GIC for ARM. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- hw/a15mpcore.c |8 ++- hw/arm/Makefile.objs |1 + hw/kvm/arm_gic.c | 169

[PATCH v6 6/9] target-arm: Use MemoryListener to identify GIC base address for KVM

2013-02-22 Thread Peter Maydell
. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- target-arm/kvm.c | 84 ++ target-arm/kvm_arm.h | 32 +++ 2 files changed, 116 insertions(+) create mode 100644 target-arm

[PATCH v6 9/9] MAINTAINERS: add entry for ARM KVM guest cores

2013-02-22 Thread Peter Maydell
Add an entry indicating maintainer status for the ARM KVM code. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- MAINTAINERS |5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 21043e4..2439614 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -140,6

[PATCH v6 2/9] linux-headers: resync from mainline to add ARM KVM headers

2013-02-22 Thread Peter Maydell
changes that would have reverted updates for s390x and ppc which have not yet hit mainline. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- linux-headers/asm-arm/kvm.h | 180 ++ linux-headers/asm-arm/kvm_para.h |1 + linux-headers/asm

[PATCH v6 5/9] hw/arm_gic: Add presave/postload hooks

2013-02-22 Thread Peter Maydell
Add presave/postload hooks to the ARM GIC common base class. These will be used by the KVM in-kernel GIC subclass to sync state between kernel and userspace when migrating. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Andreas Färber afaer...@suse.de Reviewed-by: Paolo

Re: [kvmarm] [RFC v5 7/8] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2013-01-31 Thread Peter Maydell
On 31 January 2013 10:54, Andreas Färber afaer...@suse.de wrote: Am 31.01.2013 11:52, schrieb KONRAD Frédéric: +const char *gictype = arm-gic; s/arm-gic/arm_gic/ ^^ ? Christoffer and I had trouble with that: qemu-system-arm: Unknown device 'arm-gic' for default sysbus

Re: [Qemu-devel] What to do about non-qdevified devices? (was: KVM call minutes 2013-01-29)

2013-01-30 Thread Peter Maydell
On 30 January 2013 07:02, Markus Armbruster arm...@redhat.com wrote: Anthony Liguori aligu...@us.ibm.com writes: [...] The problems I ran into were (1) this is a lot of work (2) it basically requires that all bus children have been qdev/QOM-ified. Even with something like the ISA bus which

Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O

2013-01-30 Thread Peter Maydell
On 30 January 2013 11:39, Andreas Färber afaer...@suse.de wrote: Proposal by hpoussin was to move _list_add() code to ISADevice: http://lists.gnu.org/archive/html/qemu-devel/2013-01/msg00508.html Concerns: * PCI devices (VGA, QXL) register I/O ports as well = above patches add dependency

Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O

2013-01-30 Thread Peter Maydell
On 30 January 2013 20:08, Michael S. Tsirkin m...@redhat.com wrote: Anthony wrote: Nope. You can use composition: QXLDevice is-a VGACommonState QXLPCI is-a PCIDevice has-a QXLDevice But why like this? The distinction is artificial, isn't it? I think it's the wrong way round.

Re: KVM call agenda for 2013-01-29

2013-01-29 Thread Peter Maydell
On 29 January 2013 08:49, Alexander Graf ag...@suse.de wrote: - What's the plan for -device and IRQ assignment? We need to start coming up with a solution to connect irq lines between cmdline created devices and interrupt controllers. Currently, I'm aware of 2 potential users -

[RFC v5 8/8] configure: Enable KVM on ARM

2013-01-24 Thread Peter Maydell
Enable KVM on ARM hosts, now that all the necessary components for it exist. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c6172ef..b6e235d 100755 --- a/configure +++ b

[RFC v5 2/8] linux-headers: Add ARM KVM headers (not for upstream)

2013-01-24 Thread Peter Maydell
This commit adds the ARM KVM headers. This is not to go to QEMU upstream -- the correct path there is that the KVM code will be committed to a mainline upstream kernel, and then upstream QEMU can do a bulk header update from the upstream kernel, which will allow us to drop this temporary commit.

[RFC v5 6/8] target-arm: Use MemoryListener to identify GIC base address for KVM

2013-01-24 Thread Peter Maydell
. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/kvm.c | 84 ++ target-arm/kvm_arm.h | 32 +++ 2 files changed, 116 insertions(+) create mode 100644 target-arm/kvm_arm.h diff --git a/target-arm/kvm.c b

[RFC v5 5/8] hw/arm_gic: Add presave/postload hooks

2013-01-24 Thread Peter Maydell
Add presave/postload hooks to the ARM GIC common base class. These will be used by the KVM in-kernel GIC subclass to sync state between kernel and userspace when migrating. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Andreas Färber afaer...@suse.de --- hw/arm_gic_common.c

[RFC v5 4/8] ARM KVM: save and load VFP registers from kernel

2013-01-24 Thread Peter Maydell
-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/kvm.c | 78 +++--- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/target-arm/kvm.c b/target-arm/kvm.c index db13568..13f7b0d 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c

[RFC v5 0/8] QEMU: Support KVM on ARM

2013-01-24 Thread Peter Maydell
at http://git.linaro.org/gitweb?p=people/pmaydell/qemu-arm.git;a=shortlog;h=refs/heads/kvm-arm-v17 Peter Maydell (8): oslib-posix: Align to permit transparent hugepages on ARM Linux linux-headers: Add ARM KVM headers (not for upstream) ARM: KVM: Add support for KVM on ARM architecture ARM

[RFC v5 1/8] oslib-posix: Align to permit transparent hugepages on ARM Linux

2013-01-24 Thread Peter Maydell
ARM Linux (like x86-64 Linux) can use transparent hugepages for KVM if memory blocks are 2MiB aligned; set QEMU_VMALLOC_ALIGN accordingly. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- util/oslib-posix.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util

[RFC v5 3/8] ARM: KVM: Add support for KVM on ARM architecture

2013-01-24 Thread Peter Maydell
Add basic support for KVM on ARM architecture. Signed-off-by: Christoffer Dall cd...@cs.columbia.edu [PMM: Minor tweaks and code cleanup, switch to ONE_REG] Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/arm_pic.c | 26 target-arm/Makefile.objs |1 + target

[RFC v5 7/8] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2013-01-24 Thread Peter Maydell
Implement support for using the KVM in-kernel GIC for ARM. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/a15mpcore.c |8 ++- hw/arm/Makefile.objs |1 + hw/kvm/arm_gic.c | 169 ++ 3 files changed, 177 insertions

Re: [kvmarm] [PATCH v6 14/15] KVM: ARM: Power State Coordination Interface implementation

2013-01-21 Thread Peter Maydell
On 21 January 2013 18:08, Marc Zyngier marc.zyng...@arm.com wrote: I still have hope for QEMU to move forward and eventually generate a DT based on the host capabilities. We might improve our modify the DT the user passed us code, but I don't currently anticipate generate a DT from scratch. In

Re: [Qemu-devel] [PATCH 04/12] Update linux headers.

2013-01-17 Thread Peter Maydell
On 17 January 2013 14:23, Cornelia Huck cornelia.h...@de.ibm.com wrote: Base is kvm-next as of 2013/01/16. --- a/linux-headers/asm-powerpc/kvm_para.h +++ b/linux-headers/asm-powerpc/kvm_para.h @@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared { #define KVM_HCALL_TOKEN(num)

Re: [kvmarm] [PATCH v6 02/13] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-17 Thread Peter Maydell
On 16 January 2013 18:00, Christoffer Dall c.d...@virtualopensystems.com wrote: KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl Patch subject needs updating with new name of this ioctl (KVM_ARM_SET_DEVICE_ADDR)... On ARM (and possibly other architectures) some bits are specific to the model

Re: [kvmarm] [PATCH v5 06/14] KVM: ARM: Inject IRQs and FIQs from userspace

2013-01-15 Thread Peter Maydell
On 15 January 2013 09:56, Gleb Natapov g...@redhat.com wrote: On Tue, Jan 08, 2013 at 01:39:17PM -0500, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu All interrupt injection is now based on the VM ioctl KVM_IRQ_LINE. This works semantically well for the GIC as we in

Re: [kvmarm] [PATCH v5 06/14] KVM: ARM: Inject IRQs and FIQs from userspace

2013-01-15 Thread Peter Maydell
On 15 January 2013 12:52, Gleb Natapov g...@redhat.com wrote: On Tue, Jan 15, 2013 at 12:15:01PM +, Peter Maydell wrote: On 15 January 2013 09:56, Gleb Natapov g...@redhat.com wrote: ARM can signal an interrupt either at the CPU level, or at the in-kernel irqchip CPU level interrupt

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Peter Maydell
On 9 January 2013 22:30, Alexander Graf ag...@suse.de wrote: In fact, in this particular case one could merge all of the patches except for the particular ioctl implementation and just give the respective addresses default values until there is an API to set them, similar to how we did things

Re: [PATCH v5 01/12] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-09 Thread Peter Maydell
On 9 January 2013 10:02, Alexander Graf ag...@suse.de wrote: I think we should make thus at least potentially generic. In fact, I wouldn't even mind calling it DEV_REG with the same semantics as ONE_REG, just that it also gets a unique dev id that gets created during in-kernel device creation

Re: [PATCH v5 01/12] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-09 Thread Peter Maydell
On 9 January 2013 14:58, Alexander Graf ag...@suse.de wrote: On 09.01.2013, at 15:48, Peter Maydell wrote: On 9 January 2013 10:02, Alexander Graf ag...@suse.de wrote: I think we should make thus at least potentially generic. In fact, I wouldn't even mind calling it DEV_REG with the same

Re: [Qemu-devel] [PATCH 1/8] Update linux headers.

2012-12-07 Thread Peter Maydell
On 7 December 2012 12:50, Cornelia Huck cornelia.h...@de.ibm.com wrote: Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com I think it would be good if commit messages for linux-headers updates stated the kernel tree and commit that the updated headers come from. -- PMM -- To unsubscribe from

Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-06 Thread Peter Maydell
On 4 December 2012 13:37, Dong Aisheng b29...@freescale.com wrote: On Tue, Dec 04, 2012 at 12:45:12PM +, Peter Maydell wrote: On 4 December 2012 12:27, Dong Aisheng b29...@freescale.com wrote: On Mon, Dec 03, 2012 at 01:22:07PM +, Peter Maydell wrote: What we're really providing

Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-04 Thread Peter Maydell
On 4 December 2012 11:44, Dong Aisheng b29...@freescale.com wrote: On Mon, Dec 03, 2012 at 12:02:55PM +, Peter Maydell wrote: Probably one way we could try to avoid this issue is also saving the banked registers value in kernel, then using it as return value of ONE_REG access of specified

Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-04 Thread Peter Maydell
On 4 December 2012 12:27, Dong Aisheng b29...@freescale.com wrote: On Mon, Dec 03, 2012 at 01:22:07PM +, Peter Maydell wrote: What we're really providing the guest here is a hardware-accelerated software emulation of a no-virtualization GICv2. So it's better for the state we expose

Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-03 Thread Peter Maydell
On 3 December 2012 10:36, Dong Aisheng b29...@freescale.com wrote: The patch is mainly for implementing the vgic state save and retore function. I'm not sure the current implementation method is the most proper way. So i'd like to send out the patch for RFC on the direction and issues i met

Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-03 Thread Peter Maydell
On 3 December 2012 12:02, Peter Maydell peter.mayd...@linaro.org wrote: By far the largest part of the save/restore work here is figuring out what the right state to expose to userspace is so we can retain that compatibility guarantee. Some further thoughts on this... What we're really

Re: [Qemu-devel] [PATCH for-1.3] vfio-pci: Fix KVM disabled path

2012-11-30 Thread Peter Maydell
On 27 November 2012 19:45, Alex Williamson alex.william...@redhat.com wrote: kvm_check_extension() explodes when KVM isn't enabled so we need to first test whether KVM is enabled. Use kvm_irqchip_in_kernel() for this since it matches the test we do before using this result. ---

Re: [kvmarm] [PATCH] kvm-tool: ARM: set interrupt priority mask in secondary boot path

2012-11-29 Thread Peter Maydell
On 29 November 2012 15:58, Marc Zyngier marc.zyng...@arm.com wrote: A bug in the KVM GIC init code set the priority mask to the highest possible value, while the reset value should be zero. Now that the kernel bug is fixed, kvm-tool must properly configure its GIC CPU interface in order to

Re: [PATCH v2 8/8] kvm tools: add support for ARMv7 processors

2012-11-22 Thread Peter Maydell
On 22 November 2012 15:58, Will Deacon will.dea...@arm.com wrote: +++ b/tools/kvm/arm/aarch32/smp-pen.S @@ -0,0 +1,30 @@ +#include kvm/kvm-arch.h + +#include arm-common/gic.h + + .arm + + .globl smp_pen_start + .globl smp_jump_addr + .globl smp_pen_end + +

Re: Interrupt controller updates

2012-11-22 Thread Peter Maydell
On 22 November 2012 21:00, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: Oh it's simple enough initially, just move the ioctl call from generic kvm init to machine init. The problem is then to add an argument, since that essentially means changing the ioctl number, but we need that for

[RFC v4 1/8] linux-headers: Add ARM KVM headers (not for upstream)

2012-11-20 Thread Peter Maydell
This commit adds the ARM KVM headers. This is not to go to QEMU upstream -- the correct path there is that the KVM code will be committed to a mainline upstream kernel, and then upstream QEMU can do a bulk header update from the upstream kernel, which will allow us to drop this temporary commit.

[RFC v4 8/8] oslib-posix: Align to permit transparent hugepages on ARM Linux

2012-11-20 Thread Peter Maydell
ARM Linux (like x86-64 Linux) can use transparent hugepages for KVM if memory blocks are 2MiB aligned; set QEMU_VMALLOC_ALIGN accordingly. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- oslib-posix.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslib-posix.c

[RFC v4 6/8] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2012-11-20 Thread Peter Maydell
Implement support for using the KVM in-kernel GIC for ARM. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/a15mpcore.c |8 ++- hw/arm/Makefile.objs |1 + hw/kvm/arm_gic.c | 169 ++ 3 files changed, 177 insertions

[RFC v4 0/8] QEMU: Support KVM on ARM

2012-11-20 Thread Peter Maydell
interface at http://git.linaro.org/gitweb?p=people/pmaydell/qemu-arm.git;a=shortlog;h=refs/heads/kvm-arm-v14 Christoffer Dall (1): ARM: KVM: Add support for KVM on ARM architecture Peter Maydell (7): linux-headers: Add ARM KVM headers (not for upstream) ARM KVM: save and load VFP registers

[RFC v4 7/8] configure: Enable KVM on ARM

2012-11-20 Thread Peter Maydell
Enable KVM on ARM hosts, now that all the necessary components for it exist. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 780b19a..2438d6d 100755 --- a/configure +++ b

[RFC v4 2/8] ARM: KVM: Add support for KVM on ARM architecture

2012-11-20 Thread Peter Maydell
From: Christoffer Dall cd...@cs.columbia.edu Add basic support for KVM on ARM architecture. Signed-off-by: Christoffer Dall cd...@cs.columbia.edu [PMM: Minor tweaks and code cleanup, switch to ONE_REG] Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/arm_pic.c | 26

[RFC v4 3/8] ARM KVM: save and load VFP registers from kernel

2012-11-20 Thread Peter Maydell
-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/kvm.c | 78 +++--- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/target-arm/kvm.c b/target-arm/kvm.c index 8e4b989..4217ad6 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c

[RFC v4 4/8] hw/arm_gic: Add presave/postload hooks

2012-11-20 Thread Peter Maydell
Add presave/postload hooks to the ARM GIC common base class. These will be used by the KVM in-kernel GIC subclass to sync state between kernel and userspace when migrating. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Andreas Färber afaer...@suse.de --- hw/arm_gic_common.c

[RFC v4 5/8] target-arm: Use MemoryListener to identify GIC base address for KVM

2012-11-20 Thread Peter Maydell
. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/kvm.c | 83 ++ target-arm/kvm_arm.h | 32 +++ 2 files changed, 115 insertions(+) create mode 100644 target-arm/kvm_arm.h diff --git a/target-arm/kvm.c b

Re: [kvmarm] [RFC v4 8/8] oslib-posix: Align to permit transparent hugepages on ARM Linux

2012-11-20 Thread Peter Maydell
On 20 November 2012 14:37, Alexander Graf ag...@suse.de wrote: On 11/20/2012 02:55 PM, Christoffer Dall wrote: On Tue, Nov 20, 2012 at 8:54 AM, Alexander Grafag...@suse.de wrote: On 11/20/2012 02:31 PM, Peter Maydell wrote: ARM Linux (like x86-64 Linux) can use transparent hugepages for KVM

Re: [kvmarm] [PATCH v4 09/14] KVM: ARM: Emulation framework and CP15 emulation

2012-11-19 Thread Peter Maydell
On 19 November 2012 15:01, Will Deacon will.dea...@arm.com wrote: On Sat, Nov 10, 2012 at 03:43:13PM +, Christoffer Dall wrote: +/* + * A15-specific CP15 registers. + * Important: Must be sorted ascending by CRn, CRM, Op1, Op2 + */ +static const struct coproc_reg a15_regs[] = { +

Re: [kvmarm] [PATCH v3 01/13] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2012-11-09 Thread Peter Maydell
On 22 October 2012 08:51, Christoffer Dall c.d...@virtualopensystems.com wrote: +struct kvm_device_address { + __u32 id; + __u64 addr; +}; Ben suggested that this should either be a 64 bit id or have explicit padding. Other than that I think that our current proposed ABI for ARM

Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Handle new kernel uapi/ directories

2012-10-30 Thread Peter Maydell
Ping? (patchwork url http://patchwork.ozlabs.org/patch/193125/) thanks -- PMM On 22 October 2012 13:54, Peter Maydell peter.mayd...@linaro.org wrote: Recent kernels have moved to keeping the userspace headers in uapi/ subdirectories. This breaks the detection of whether an architecture has

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-27 Thread Peter Maydell
On 26 October 2012 23:03, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: So the GSI bit. We can assume that GSIs in that context are basically our global interrupt number. This would apply to pretty much every platform indeed. The routing here, if I understand things correctly,

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-27 Thread Peter Maydell
On 26 October 2012 23:03, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: So the GSI bit. We can assume that GSIs in that context are basically our global interrupt number. This would apply to pretty much every platform indeed. The routing here, if I understand things correctly,

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-26 Thread Peter Maydell
On 26 October 2012 10:58, Paolo Bonzini pbonz...@redhat.com wrote: Wiring which MSI-X interrupts go to which source controllers. If you have one source controller per PCI bridge, you need to tell the kernel the mapping between MSI messages interrupts and PCI bridges, and update it whenever

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-26 Thread Peter Maydell
On 26 October 2012 11:44, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Fri, 2012-10-26 at 12:15 +0200, Paolo Bonzini wrote: QEMU's MSI-X routing is not x86-specific, so it should use the same KVM_SET_GSI_ROUTING ioctl that x86 uses. Well, that's the thing, I haven't managed to

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-26 Thread Peter Maydell
On 26 October 2012 12:57, Paolo Bonzini pbonz...@redhat.com wrote: If you exclude old-style PCI pass-through and limit yourself to vhost and VFIO, you can treat irqfd as the in-kernel source of the interrupt. Then you need a mapping between MSIs and numbers used in KVM_IRQFD (GSIs). This is

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-26 Thread Peter Maydell
On 26 October 2012 10:58, Paolo Bonzini pbonz...@redhat.com wrote: Wiring which MSI-X interrupts go to which source controllers. If you have one source controller per PCI bridge, you need to tell the kernel the mapping between MSI messages interrupts and PCI bridges, and update it whenever

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-26 Thread Peter Maydell
On 26 October 2012 12:57, Paolo Bonzini pbonz...@redhat.com wrote: If you exclude old-style PCI pass-through and limit yourself to vhost and VFIO, you can treat irqfd as the in-kernel source of the interrupt. Then you need a mapping between MSIs and numbers used in KVM_IRQFD (GSIs). This is

Re: [Qemu-devel] [PATCH v2 2/5] Qemu: update header files

2012-10-25 Thread Peter Maydell
On 25 October 2012 10:21, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: Sync the header files by using scripts/update-linux-headers.sh I think it would be good if this kind of patch included in the commit message the kernel tree/branch and commit hash that the sync was with. thanks --

[RFC v3 6/8] target-arm: Use MemoryListener to identify GIC base address for KVM

2012-10-23 Thread Peter Maydell
. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/kvm.c | 83 ++ target-arm/kvm_arm.h | 32 +++ 2 files changed, 115 insertions(+) create mode 100644 target-arm/kvm_arm.h diff --git a/target-arm/kvm.c b

[RFC v3 2/8] ARM: KVM: Add support for KVM on ARM architecture

2012-10-23 Thread Peter Maydell
From: Christoffer Dall cd...@cs.columbia.edu Add basic support for KVM on ARM architecture. Signed-off-by: Christoffer Dall cd...@cs.columbia.edu [PMM: Minor tweaks and code cleanup, switch to ONE_REG] Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/arm_pic.c | 26

[RFC v3 3/8] ARM KVM: save and load VFP registers from kernel

2012-10-23 Thread Peter Maydell
-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/kvm.c | 78 +++--- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/target-arm/kvm.c b/target-arm/kvm.c index f80c707..f7d2235 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c

[RFC v3 8/8] configure: Enable KVM on ARM

2012-10-23 Thread Peter Maydell
Enable KVM on ARM hosts, now that all the necessary components for it exist. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index fa5657f..8173367 100755 --- a/configure +++ b

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-23 Thread Peter Maydell
On 23 October 2012 11:48, Jan Kiszka jan.kis...@siemens.com wrote: The current irqchip API is like this: KVM_CREATE_IRQCHIP (without any parameters) ... KVM_CREATE_VCPU KVM_SET_IRQCHIP (or the other way around) ... KVM_RUN The arguments you cannot pass via KVM_CREATE_IRQCHIP - which is

[RFC v3 1/8] linux-headers: Add ARM KVM headers (not for upstream)

2012-10-23 Thread Peter Maydell
This commit adds the ARM KVM headers. This is not to go to QEMU upstream -- the correct path there is that the KVM code will be committed to a mainline upstream kernel, and then upstream QEMU can do a bulk header update from the upstream kernel, which will allow us to drop this temporary commit.

[RFC v3 0/8] QEMU: Support KVM on ARM

2012-10-23 Thread Peter Maydell
architecture Peter Maydell (7): linux-headers: Add ARM KVM headers (not for upstream) ARM KVM: save and load VFP registers from kernel hw/arm_gic: Add presave/postload hooks linux-headers: update with VGIC related headers (not for upstream) target-arm: Use MemoryListener to identify GIC

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-23 Thread Peter Maydell
On 23 October 2012 12:00, Jan Kiszka jan.kis...@siemens.com wrote: BTW, I guess we will regret that one-reg ABI one day and have to introduce a multi-reg version again for hot-standby, i.e. continuous state migration. I know we also do this for c86 MSRs - that interface has the same

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-23 Thread Peter Maydell
On 23 October 2012 11:48, Jan Kiszka jan.kis...@siemens.com wrote: The current irqchip API is like this: KVM_CREATE_IRQCHIP (without any parameters) ... KVM_CREATE_VCPU KVM_SET_IRQCHIP (or the other way around) ... KVM_RUN The arguments you cannot pass via KVM_CREATE_IRQCHIP - which is

Re: [kvmarm] [RFC PATCH 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

2012-10-23 Thread Peter Maydell
On 23 October 2012 12:00, Jan Kiszka jan.kis...@siemens.com wrote: BTW, I guess we will regret that one-reg ABI one day and have to introduce a multi-reg version again for hot-standby, i.e. continuous state migration. I know we also do this for c86 MSRs - that interface has the same

[PATCH] update-linux-headers.sh: Handle new kernel uapi/ directories

2012-10-22 Thread Peter Maydell
-by: Peter Maydell peter.mayd...@linaro.org --- This would otherwise cause us to ignore the architectures which have moved over to uapi/ (which for QEMU's purposes means everything but x86...) scripts/update-linux-headers.sh |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts

Re: [RFC PATCH 2/3] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2012-10-19 Thread Peter Maydell
On 19 October 2012 19:46, Christoffer Dall c.d...@virtualopensystems.com wrote: On Wed, Oct 17, 2012 at 4:29 PM, Peter Maydell peter.mayd...@linaro.org wrote: This doesn't say whether userspace is allowed to make this ioctl multiple times for the same device. This could be any

Re: [RFC PATCH 3/3] KVM: ARM: Split KVM_CREATE_IRQCHIP and KVM_INIT_IRQCHIP

2012-10-18 Thread Peter Maydell
On 14 October 2012 01:04, Christoffer Dall c.d...@virtualopensystems.com wrote: We need this two factor initialization step to support a sane user space initialization of the emulated model. We simply follow the names of the ioctls for the internal vgic implementation steps and check if we

Re: [Qemu-devel] [RFC v2 2/6] ARM: KVM: Add support for KVM on ARM architecture

2012-10-18 Thread Peter Maydell
On 13 October 2012 10:09, Blue Swirl blauwir...@gmail.com wrote: On Wed, Oct 10, 2012 at 3:07 PM, Peter Maydell peter.mayd...@linaro.org wrote: +#include hw/arm-misc.h + +const KVMCapabilityInfo kvm_arch_required_capabilities[] = { 'static'. In fact, 'static' not used at all in this file

Re: [RFC v2 2/6] ARM: KVM: Add support for KVM on ARM architecture

2012-10-18 Thread Peter Maydell
On 18 October 2012 18:41, Jan Kiszka jan.kis...@siemens.com wrote: Minor: If you do function() { #ifdef CONFIG_KVM ... #endif } + qemu_irq *arm_pic_init_cpu(ARMCPU *cpu) { +#ifdef CONFIG_KVM +if (kvm_enabled()) { +return qemu_allocate_irqs(kvm_arm_pic_cpu_handler, cpu,

Re: [RFC PATCH 1/3] KVM: ARM: Introduce KVM_INIT_IRQCHIP ioctl

2012-10-17 Thread Peter Maydell
On 14 October 2012 01:04, Christoffer Dall c.d...@virtualopensystems.com wrote: Used to initialize the in-kernel interrupt controller. On ARM we need to map the virtual generic interrupt controller (vGIC) into Hyp the guest's physicall address space so the guest can access the virtual cpu

Re: [RFC PATCH 2/3] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2012-10-17 Thread Peter Maydell
On 14 October 2012 01:04, Christoffer Dall c.d...@virtualopensystems.com wrote: On ARM (and possibly other architectures) some bits are specific to the model being emulated for the guest and user space needs a way to tell the kernel about those bits. An example is mmio device base addresses,

Re: [RFC PATCH 1/3] KVM: ARM: Introduce KVM_INIT_IRQCHIP ioctl

2012-10-17 Thread Peter Maydell
On 17 October 2012 21:23, Christoffer Dall c.d...@virtualopensystems.com wrote: On Wed, Oct 17, 2012 at 4:21 PM, Peter Maydell peter.mayd...@linaro.org wrote: +for the emulated platofrm (see KVM_SET_DEVICE_ADDRESS), but before the CPU is +initally run. initially. thanks a bunch

Re: [Qemu-devel] [RFC v2 2/6] ARM: KVM: Add support for KVM on ARM architecture

2012-10-13 Thread Peter Maydell
On 13 October 2012 10:09, Blue Swirl blauwir...@gmail.com wrote: On Wed, Oct 10, 2012 at 3:07 PM, Peter Maydell peter.mayd...@linaro.org wrote: From: Christoffer Dall cd...@cs.columbia.edu Add basic support for KVM on ARM architecture. +#include device_tree.h Is this used? Don't think so

[RFC v2 4/6] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2012-10-10 Thread Peter Maydell
Implement support for using the KVM in-kernel GIC for ARM. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/a15mpcore.c |8 ++- hw/arm/Makefile.objs |1 + hw/kvm/arm_gic.c | 162 ++ 3 files changed, 170 insertions

[RFC v2 3/6] hw/arm_gic: Add presave/postload hooks

2012-10-10 Thread Peter Maydell
Add presave/postload hooks to the ARM GIC common base class. These will be used by the KVM in-kernel GIC subclass to sync state between kernel and userspace when migrating. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/arm_gic_common.c | 10 ++ hw/arm_gic_internal.h

[RFC v2 0/6] QEMU: Support KVM on ARM

2012-10-10 Thread Peter Maydell
feels any of the todo-type stuff is a blocker to these patches being committed that would be good to know too :-)) Git tree if preferred: git://git.linaro.org/people/pmaydell/qemu-arm.git kvm-arm-v12 Peter Maydell (6): linux-headers: Add ARM KVM headers (not for upstream) ARM: KVM: Add support

[RFC v2 6/6] configure: Enable KVM on ARM

2012-10-10 Thread Peter Maydell
Enable KVM on ARM hosts, now that all the necessary components for it exist. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c4a7837..f87bcd6 100755 --- a/configure +++ b

[RFC v2 1/6] linux-headers: Add ARM KVM headers (not for upstream)

2012-10-10 Thread Peter Maydell
This commit adds the ARM KVM headers. This is not to go to QEMU upstream -- the correct path there is that the KVM code will be committed to a mainline upstream kernel, and then upstream QEMU can do a bulk header update from the upstream kernel, which will allow us to drop this temporary commit.

Re: [Qemu-devel] [RFC v2 4/6] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2012-10-10 Thread Peter Maydell
On 10 October 2012 18:23, Andreas Färber afaer...@suse.de wrote: Am 10.10.2012 17:07, schrieb Peter Maydell: Implement support for using the KVM in-kernel GIC for ARM. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/a15mpcore.c |8 ++- hw/arm/Makefile.objs |1

[RFC v2 5/6] ARM KVM: save and load VFP registers from kernel

2012-10-10 Thread Peter Maydell
-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/kvm.c | 78 +++--- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/target-arm/kvm.c b/target-arm/kvm.c index fee60e1..f17e7fd 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c

[RFC v2 2/6] ARM: KVM: Add support for KVM on ARM architecture

2012-10-10 Thread Peter Maydell
From: Christoffer Dall cd...@cs.columbia.edu Add basic support for KVM on ARM architecture. Signed-off-by: Christoffer Dall cd...@cs.columbia.edu [PMM: Minor tweaks and code cleanup, switch to ONE_REG] Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/arm_pic.c | 28

Re: [kvmarm] [PATCH v2 12/14] KVM: ARM: VFP userspace interface

2012-10-09 Thread Peter Maydell
On 1 October 2012 10:11, Christoffer Dall c.d...@virtualopensystems.com wrote: From: Rusty Russell rusty.russ...@linaro.org --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1765,6 +1765,12 @@ ARM 64-bit CP15 registers have the following id bit patterns:

Re: [Qemu-devel] [PATCH] kvm: Set default accelerator to kvm if the host supports it

2012-10-05 Thread Peter Maydell
On 5 October 2012 03:24, Alexander Graf ag...@suse.de wrote: On 05.10.2012, at 04:17, Anthony Liguori wrote: Alexander Graf ag...@suse.de writes: We get similar problems on PPC. Take the following example: $ qemu-system-ppc -M mpc8544ds -kernel uImage -nographic But do you really expect

Re: [Qemu-devel] [PATCH] hw: Add test device for unittests execution

2012-10-04 Thread Peter Maydell
On 4 October 2012 04:49, Lucas Meneghel Rodrigues l...@redhat.com wrote: Add a test device which supports the kvmctl ioports, so one can run the KVM unittest suite [1]. Usage: qemu -device testdev 1) Removed port 0xf1, since now kvm-unit-tests use serial 2) Removed exit code port

Re: [Qemu-devel] [PATCH] kvm: Set default accelerator to kvm if the host supports it

2012-10-03 Thread Peter Maydell
On 3 October 2012 21:01, Blue Swirl blauwir...@gmail.com wrote: On Mon, Oct 1, 2012 at 4:20 PM, Anthony Liguori anth...@codemonkey.ws wrote: Jan Kiszka jan.kis...@siemens.com writes: +/* The default accelerator depends on the availability of KVM. */ +p = kvm_configured ? kvm :

<    1   2   3   4   5   6   >