Re: [PATCH v4 3/5] target-arm: kvm64 sync FP register state

2015-03-17 Thread Peter Maydell
On 16 March 2015 at 11:01, Alex Bennée alex.ben...@linaro.org wrote: For migration to work we need to sync all of the register state. This is especially noticeable when GCC starts using FP registers as spill registers even with integer programs. Signed-off-by: Alex Bennée

Re: info cpus issue

2015-03-16 Thread Peter Maydell
On 16 March 2015 at 18:01, Jan Kiszka jan.kis...@siemens.com wrote: Can't comment if it's known but, from x86 experiences, such a pattern is usually related to inconsistency between get kvm state and put kvm state in QEMU or the related kernel interfaces: QEMU obtains the in-kernel CPU state

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

2015-03-17 Thread Peter Maydell
On 17 March 2015 at 19:04, Christoffer Dall christoffer.d...@linaro.org wrote: On Tue, Mar 17, 2015 at 04:18:16PM +, Peter Maydell wrote: Note that this code is implicitly relying on the ordering of register banks defined by the bank_number() function, which is a bit icky. right, I

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

2015-03-17 Thread Peter Maydell
On 17 March 2015 at 19:22, Christoffer Dall christoffer.d...@linaro.org wrote: 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

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

2015-03-17 Thread Peter Maydell
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 state with the current mode's spsr state, causing occasional failures

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

2015-03-09 Thread Peter Maydell
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 state, right? So while it may not be harmful in currently supported

Re: [PATCH 6/6] target-arm/cpu.h: document why env-spsr exists

2015-03-11 Thread Peter Maydell
On 25 February 2015 at 16:02, Alex Bennée alex.ben...@linaro.org wrote: I was getting very confused about the duplication of state. Perhaps we should just get rid of env-spsr and use helpers that understand the banking? I've already disagreed with this. I would suggest putting tentative

Re: [PATCH v4 3/3] hw/intc/arm_gic: Initialize the vgic in the realize function

2015-03-11 Thread Peter Maydell
to complete initialization of the VGIC now */ Otherwise Reviewed-by: Peter Maydell peter.mayd...@linaro.org thanks -- PMM ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v5] hw/intc/arm_gic: Initialize the vgic in the realize function

2015-03-12 Thread Peter Maydell
On 11 March 2015 at 17:17, Eric Auger eric.au...@linaro.org wrote: This patch forces vgic initialization in the vgic realize function. It uses a new group/attribute that allows such operation: KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT This earlier initialization allows, for

Re: [PATCH v2 1/6] target-arm: kvm: save/restore mp state

2015-03-12 Thread Peter Maydell
On 4 March 2015 at 14:35, Alex Bennée alex.ben...@linaro.org wrote: This adds the saving and restore of the current Multi-Processing state of the machine. While the KVM_GET/SET_MP_STATE API exposes a number of potential states for x86 we only use two for ARM. Either the process is running or

Re: [PATCH v2 3/6] hw/char: pl011 don't keep setting the IRQ if nothing changed

2015-03-12 Thread Peter Maydell
On 4 March 2015 at 14:35, Alex Bennée alex.ben...@linaro.org wrote: While observing KVM traces I can see additional IRQ calls on pretty much every MMIO access which is just plain inefficient. Only update the QEMU IRQ level if something has actually changed from last time. Otherwise we may be

Re: [PATCH v2 3/6] hw/char: pl011 don't keep setting the IRQ if nothing changed

2015-03-12 Thread Peter Maydell
On 12 March 2015 at 15:51, Peter Maydell peter.mayd...@linaro.org wrote: On 4 March 2015 at 14:35, Alex Bennée alex.ben...@linaro.org wrote: While observing KVM traces I can see additional IRQ calls on pretty much every MMIO access which is just plain inefficient. Only update the QEMU IRQ

Re: [Qemu-devel] [PATCH v5 1/6] target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc)

2015-03-24 Thread Peter Maydell
On 24 March 2015 at 14:32, Greg Bellows greg.bell...@linaro.org wrote: On Mon, Mar 23, 2015 at 12:05 PM, Alex Bennée alex.ben...@linaro.org wrote: From: Peter Maydell peter.mayd...@linaro.org @@ -523,7 +523,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs) aarch64_save_sp(env

Re: [PATCH v5 3/6] hw/intc: arm_gic_kvm.c restore config first

2015-03-26 Thread Peter Maydell
On 23 March 2015 at 17:05, Alex Bennée alex.ben...@linaro.org wrote: As there is logic to deal with the difference between edge and level triggered interrupts in the kernel we must ensure it knows the configuration of the IRQs before we restore the pending state. Signed-off-by: Alex Bennée

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

2015-03-26 Thread Peter Maydell
On 23 March 2015 at 17:05, Alex Bennée alex.ben...@linaro.org wrote: 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 with migration. Some munging is done to take care

Re: [PATCH v5 6/6] target-arm: cpu.h document why env-spsr exists

2015-03-26 Thread Peter Maydell
On 23 March 2015 at 17:05, Alex Bennée alex.ben...@linaro.org wrote: I was getting very confused about the duplication of state so wanted to make it explicit. Signed-off-by: Alex Bennée alex.ben...@linaro.org diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 083211c..6dc1799 100644

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

2015-04-01 Thread Peter Maydell
On 1 April 2015 at 17:01, Alex Bennée alex.ben...@linaro.org wrote: David Hildenbrand d...@linux.vnet.ibm.com writes: +/* + * See ARM ARM D7.3: Debug Registers Maybe drop one ARM Well technically it is the ARM Architecture Reference Manual but that's quite long winded. Dropping one ARM

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

2015-03-05 Thread Peter Maydell
On 5 March 2015 at 20:04, Catalin Marinas catalin.mari...@arm.com wrote: On Thu, Mar 05, 2015 at 11:12:22AM +0100, Paolo Bonzini wrote: On 04/03/2015 18:28, Catalin Marinas wrote: Can you add that property to the device tree for PCI devices too? Yes but not with mainline yet:

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

2015-02-24 Thread Peter Maydell
On 24 February 2015 at 20:59, Richard W.M. Jones rjo...@redhat.com 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 is a fairly common

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

2015-02-24 Thread Peter Maydell
On 24 February 2015 at 21:29, Richard W.M. Jones rjo...@redhat.com wrote: On Tue, Feb 24, 2015 at 09:15:18PM +0900, Peter Maydell wrote: Complex insns are things like load-multiple (there's a complete list in the ARM ARM somewhere). Generally this indicates a guest bug because you really

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

2015-02-24 Thread Peter Maydell
On 24 February 2015 at 23:55, Christoffer Dall christoffer.d...@linaro.org wrote: IPA is the Intermediate Physical Address (i.e. your guest physical address). As far as I can tell from looking at the QEMU virt memory map, 0x3x does not belong to any devices or RAM on the board

Re: [PATCH v2 3/4] target-arm: kvm - support for single step

2015-04-21 Thread Peter Maydell
On 21 April 2015 at 13:56, Alex Bennée alex.ben...@linaro.org wrote: Peter Maydell peter.mayd...@linaro.org writes: switch (hsr_ec) { +case HSR_EC_SOFT_STEP: +if (cs-singlestep_enabled) { +return true; +} else { +error_report(Came out

Re: [PATCH v2 4/4] target-arm: kvm - add support for HW assisted debug

2015-04-20 Thread Peter Maydell
On 31 March 2015 at 16:40, Alex Bennée alex.ben...@linaro.org wrote: From: Alex Bennée a...@bennee.com This adds basic support for HW assisted debug. The ioctl interface to KVM allows us to pass an implementation defined number of break and watch point registers. When KVM_GUESTDBG_USE_HW_BP

Re: [PATCH v2 3/4] target-arm: kvm - support for single step

2015-04-20 Thread Peter Maydell
On 31 March 2015 at 16:40, Alex Bennée alex.ben...@linaro.org wrote: This adds support for single-step. There isn't much to do on the QEMU side as after we set-up the request for single step via the debug ioctl it is all handled within the kernel. Signed-off-by: Alex Bennée

Re: [PATCH v2 2/4] target-arm: kvm - implement software breakpoints

2015-04-20 Thread Peter Maydell
On 31 March 2015 at 16:40, Alex Bennée alex.ben...@linaro.org wrote: These don't involve messing around with debug registers, just setting the breakpoint instruction in memory. GDB will not use this mechanism if it can't access the memory to write the breakpoint. All the kernel has to do is

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

2015-04-29 Thread Peter Maydell
On 29 April 2015 at 10:03, Alexander Graf ag...@suse.de wrote: On 18.03.15 20:10, 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 region is typically mapped by the guest as uncached. KVM for ARM

Re: [PATCH v12 3/4] hw/arm/virt: add dynamic sysbus device support

2015-04-27 Thread Peter Maydell
On 27 April 2015 at 14:41, Alexander Graf ag...@suse.de wrote: Peter, would you have a hard time if we just get rid of VIRT_MMIO completely and allow users to create the mmio-virtio bridges using -device for -M virt-2.4 and above? I would strongly prefer not -- it breaks existing working

Re: [PATCH v2 0/3] Add support for for GICv2m and MSIs to arm-virt

2015-05-06 Thread Peter Maydell
On 27 April 2015 at 18:31, Christoffer Dall christoffer.d...@linaro.org wrote: Now when we have a host generic PCIe controller in the virt board, it would be nice to be able to use MSIs so that we can eventually enable VHOST with KVM. With these patches you can use MSIs with TCG and with KVM,

Re: [PATCH v2 0/3] Add support for for GICv2m and MSIs to arm-virt

2015-05-06 Thread Peter Maydell
On 6 May 2015 at 17:33, Peter Maydell peter.mayd...@linaro.org wrote: On 27 April 2015 at 18:31, Christoffer Dall christoffer.d...@linaro.org wrote: Now when we have a host generic PCIe controller in the virt board, it would be nice to be able to use MSIs so that we can eventually enable

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

2015-05-14 Thread Peter Maydell
On 14 May 2015 at 13:28, Paolo Bonzini pbonz...@redhat.com wrote: Well, PCI BARs are generally MMIO resources, and hence should not be cached. As an optimization, OS drivers can mark them as cacheable or write-combining or something like that, but in general it's a safe default to leave them

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

2015-05-14 Thread Peter Maydell
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 drjo...@redhat.com wrote: Forgot to (4): switch from setting userspace's mapping to device memory to normal, non-cacheable

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

2015-05-15 Thread Peter Maydell
On 15 May 2015 at 16:14, Alex Bennée alex.ben...@linaro.org wrote: Mark Rutland mark.rutl...@arm.com writes: On Fri, May 15, 2015 at 03:27:06PM +0100, Alex Bennée wrote: +/* + * See v8 ARM ARM D7.3: Debug Registers + * + * The control registers are architecturally defined as 32 bits but

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

2015-05-14 Thread Peter Maydell
On 14 May 2015 at 11:31, Andrew Jones drjo...@redhat.com wrote: Forgot to (4): switch from setting userspace's mapping to device memory to normal, non-cacheable. Using device memory caused a problem that Alex Graf found, and Peter Maydell suggested using normal, non-cacheable instead. Did you

Re: [PATCH v4 10/12] KVM: arm64: guest debug, HW assisted debug support

2015-05-15 Thread Peter Maydell
On 15 May 2015 at 17:16, Alex Bennée alex.ben...@linaro.org wrote: Mark Rutland mark.rutl...@arm.com writes: This gets more fun when you consider the context-aware breakpoints are the highest numbered. So the set of (context-aware) breakpoints might not intersect across all CPUs. I didn't

Re: should KVM or userspace be the one which decides what MIPIDR/affinity values to assign to vcpus?

2015-06-09 Thread Peter Maydell
On 9 June 2015 at 11:52, Marc Zyngier marc.zyng...@arm.com wrote: On 08/06/15 11:52, Peter Maydell wrote: On 8 June 2015 at 11:32, Igor Mammedov imamm...@redhat.com wrote: On Thu, 4 Jun 2015 18:17:39 +0100 Peter Maydell peter.mayd...@linaro.org wrote: On 4 June 2015 at 17:40, Shlomo Pongratz

should KVM or userspace be the one which decides what MIPIDR/affinity values to assign to vcpus?

2015-06-08 Thread Peter Maydell
On 8 June 2015 at 11:32, Igor Mammedov imamm...@redhat.com wrote: On Thu, 4 Jun 2015 18:17:39 +0100 Peter Maydell peter.mayd...@linaro.org wrote: On 4 June 2015 at 17:40, Shlomo Pongratz shlomopongr...@gmail.com wrote: In order for it to work correctly we must use MPIDR values in the device

Re: [PATCH v5 3/6] target-arm: kvm - implement software breakpoints

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée alex.ben...@linaro.org wrote: These don't involve messing around with debug registers, just setting the breakpoint instruction in memory. GDB will not use this mechanism if it can't access the memory to write the breakpoint. All the kernel has to do is

Re: [PATCH v5 2/6] target-arm: kvm64: introduce kvm_arm_init_debug()

2015-06-04 Thread Peter Maydell
--- Reviewed-by: Peter Maydell peter.mayd...@linaro.org thanks -- PMM ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v5 4/6] target-arm: kvm - support for single step

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée alex.ben...@linaro.org wrote: This adds support for single-step. There isn't much to do on the QEMU side as after we set-up the request for single step via the debug ioctl it is all handled within the kernel. Signed-off-by: Alex Bennée

Re: [PATCH v5 5/6] target-arm: kvm - add support for HW assisted debug

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée alex.ben...@linaro.org wrote: This adds basic support for HW assisted debug. The ioctl interface to KVM allows us to pass an implementation defined number of break and watch point registers. When KVM_GUESTDBG_USE_HW_BP is specified these debug registers

Re: [PATCH v5 6/6] target-arm: kvm - re-inject guest debug exceptions

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée alex.ben...@linaro.org wrote: From: Alex Bennée a...@bennee.com If we can't find details for the debug exception in our debug state then we can assume the exception is due to debugging inside the guest. To inject the exception into the guest state we

Re: [PATCH v5 0/6] QEMU support for KVM Guest Debug on arm64

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée alex.ben...@linaro.org wrote: You may be wondering what happened to v3 and v4. They do exist but they didn't change much from the the original patches as I've been mostly looking the kernel side of the equation. So in summary the changes are: - updates

Re: should KVM or userspace be the one which decides what MIPIDR/affinity values to assign to vcpus?

2015-06-09 Thread Peter Maydell
On 9 June 2015 at 15:00, Marc Zyngier marc.zyng...@arm.com wrote: Yeah, what I had in mind was something along the lines of: - kernel computes its default MPDIR - kernel exposes a new capability KVM_ARM_ALLOW_MPIDR_OVERRIDE (or something along those lines) - userspace does the right thing.

Re: [PATCH] arm64/kvm: Add generic v8 KVM target

2015-06-23 Thread Peter Maydell
On 23 June 2015 at 15:03, Suzuki K. Poulose suzuki.poul...@arm.com wrote: On 23/06/15 13:39, Christoffer Dall wrote: On Mon, Jun 22, 2015 at 09:44:48AM +0100, Peter Maydell wrote: I'm guessing the intention is to avoid having to add code in the kernel to support KVM on a new CPU where nothing

Re: [PATCH] arm64/kvm: Add generic v8 KVM target

2015-06-22 Thread Peter Maydell
On 17 June 2015 at 10:00, Suzuki K. Poulose suzuki.poul...@arm.com wrote: From: Suzuki K. Poulose suzuki.poul...@arm.com This patch adds a generic ARM v8 KVM target cpu type for use by the new CPUs which eventualy ends up using the common sys_reg table. For backward compatibility the existing

Re: should KVM or userspace be the one which decides what MIPIDR/affinity values to assign to vcpus?

2015-06-25 Thread Peter Maydell
On 25 June 2015 at 13:41, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Jun 25, 2015 at 10:06:20AM +0100, Peter Maydell wrote: I agree it's not very likely anybody cares about the specific cluster topology. However if we don't want to support arbitrary topologies then QEMU

Re: [PATCH] arm64/kvm: Add generic v8 KVM target

2015-06-25 Thread Peter Maydell
On 25 June 2015 at 14:44, Marc Zyngier marc.zyng...@arm.com wrote: It should always be possible to emulate a known CPU on a generic host, and it should be able to migrate. The case we can't migrate is when we let the guest be generic (which I guess should really be unknown, and not generic).

Re: should KVM or userspace be the one which decides what MIPIDR/affinity values to assign to vcpus?

2015-06-25 Thread Peter Maydell
On 25 June 2015 at 09:00, Christoffer Dall christoffer.d...@linaro.org wrote: Of course, KVM can deny an unsupported configuration, but I am wondering if we really think anybody will care about the 'model such specific hardware' aspect with KVM, or if we should only consider the 'I want a VM

Re: [RFC PATCH] KVM: arm/arm64: Don't let userspace update CNTVOFF once guest is running

2015-06-25 Thread Peter Maydell
On 25 June 2015 at 09:59, Claudio Fontana claudio.font...@huawei.com wrote: Once the VM is created, I think QEMU should not request kvm to change the virtual offset of the VM anymore: maybe an unexpected consequence of QEMU's target-arm/kvm64.c::kvm_arch_put_registers ? Hmm. In general we

Re: [PATCH 04/10] KVM: arm/arm64: vgic: Allow HW irq to be encoded in LR

2015-06-17 Thread Peter Maydell
On 17 June 2015 at 12:53, Eric Auger eric.au...@linaro.org wrote: shouldn't we test somewhere that the hwirq is between 16 and 1019. Not directly related, but that reminds me that I noticed the other day that we have VGIC_MAX_IRQS = 1024 (and use that as a guard on how many irqs we let userspace

Re: [PATCH v2 0/2] ARM adaptations for vhost irqfd setup

2015-06-01 Thread Peter Maydell
On 10 April 2015 at 09:15, Paolo Bonzini pbonz...@redhat.com wrote: On 10/04/2015 09:48, Eric Auger wrote: After the introduction of gicv2m, this series adds missing pieces to run VIRTIO-PCI with vhost back-end on ARM. It is proposed to use the kvm_gsi_direct_mapping modality that sets the

Re: [PATCH v4 0/4] Add support for for GICv2m and MSIs to arm-virt

2015-06-01 Thread Peter Maydell
On 29 May 2015 at 12:01, Christoffer Dall christoffer.d...@linaro.org wrote: Now when we have a host generic PCIe controller in the virt board, it would be nice to be able to use MSIs so that we can eventually enable VHOST with KVM. With these patches you can use MSIs with TCG and with KVM,

Re: [RFC PATCH] KVM: arm/arm64: Don't let userspace update CNTVOFF once guest is running

2015-06-29 Thread Peter Maydell
On 29 June 2015 at 18:20, Claudio Fontana claudio.font...@huawei.com wrote: On 26.06.2015 06:49, Jan Kiszka wrote: QEMU has the concept of write-back levels: KVM_PUT_RUNTIME_STATE, KVM_PUT_RESET_STATE and KVM_PUT_FULL_STATE. I suspect this registers is just sorted into the wrong category, thus

Re: [PATCH] arm64/kvm: Add generic v8 KVM target

2015-06-29 Thread Peter Maydell
On 29 June 2015 at 18:30, Marc Zyngier marc.zyng...@arm.com wrote: On 29/06/15 18:13, Chalamarla, Tirumalesh wrote: Will this also prevents migrating between same implementations, if no how is this identified. This shouldn't. It is pretty easy to look at the incoming guest's MIDR, and verify

Re: [PATCH] arm64: KVM: Enable minimalistic support for Thunder

2015-06-29 Thread Peter Maydell
On 29 June 2015 at 18:11, Marc Zyngier marc.zyng...@arm.com wrote: On 29/06/15 18:06, Chalamarla, Tirumalesh wrote: On Jun 29, 2015, at 1:53 AM, Marc Zyngier marc.zyng...@arm.com wrote: Constantly adding new CPUs without providing any insight as to how they should be emulated only brings

Re: [PATCH] arm64/kvm: Add generic v8 KVM target

2015-07-03 Thread Peter Maydell
On 3 July 2015 at 09:28, Marc Zyngier marc.zyng...@arm.com wrote: On 03/07/15 09:12, Peter Maydell wrote: I would still like to see the proponents of this patch say what their model is for userspace support of cross-host migration, if we're abandoning the model the current API envisages. I

Re: [PATCH 05/10] KVM: arm/arm64: vgic: Relax vgic_can_sample_irq for edge IRQs

2015-07-03 Thread Peter Maydell
On 3 July 2015 at 10:50, Marc Zyngier marc.zyng...@arm.com wrote: On 02/07/15 17:23, Christoffer Dall wrote: If we had a different *shared* device than the timer which is edge-triggered, don't we then also need to capture the physical distributor's pending state along with the state of the

Re: [Qemu-devel] [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board

2015-05-25 Thread Peter Maydell
On 25 May 2015 at 14:09, Pavel Fedin p.fe...@samsung.com wrote: Hello! typedef struct MemMapEntry { @@ -88,6 +90,7 @@ typedef struct VirtBoardInfo { int fdt_size; uint32_t clock_phandle; uint32_t gic_phandle; +uint32_t v2m_phandle; } VirtBoardInfo; Could you

Re: [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board

2015-05-26 Thread Peter Maydell
On 26 May 2015 at 14:07, Eric Auger eric.au...@linaro.org wrote: On 05/26/2015 02:55 PM, Peter Maydell wrote: On 26 May 2015 at 13:54, Eric Auger eric.au...@linaro.org wrote: Reviewed-by: Eric Auger eric.au...@linaro.org The only question I have is related to mid-term virt strategy about

Re: KVM Live migration with GICv3

2015-08-12 Thread Peter Maydell
On 12 August 2015 at 17:17, Marc Zyngier marc.zyng...@arm.com wrote: If you plan to do anything for GICv3, you should only deal with with the system register version of the CPU interface. Also, please make sure that you think about (and in terms of) the underlying state inside the GIC, which is

Re: [PATCH v2] target-arm: kvm: Differentiate registers based on write-back levels

2015-07-22 Thread Peter Maydell
On 22 July 2015 at 13:56, Claudio Fontana claudio.font...@huawei.com wrote: I can if you want check if this patch actually fixes the problem without the KVM workaround. Is this the version I am supposed to test, or should I wait for the next respin? Fixed version went into master earlier

Re: [PATCH v2] target-arm: kvm: Differentiate registers based on write-back levels

2015-07-17 Thread Peter Maydell
On 16 July 2015 at 12:34, Christoffer Dall christoffer.d...@linaro.org wrote: Some registers like the CNTVCT register should only be written to the kernel as part of machine initialization or on vmload operations, but never during runtime, as this can potentially make time go backwards or

Re: [PATCH v5 0/7] KVM: arm64: Implement API for vGICv3 live migration

2015-10-23 Thread Peter Maydell
test it, please note that this version is not > binary-compatible with previous one, the API has been seriously changed. > qemu patchess will be posted in some time. > > v4 => v5: > - Adapted to new API by Peter Maydell, Marc Zyngier and Christoffer Dall. > Acked-by's on the documenta

Re: [RFC PATCH v3 1/4] hw/intc/arm_gicv3_common: Add state information

2015-10-24 Thread Peter Maydell
On 24 October 2015 at 13:30, Shlomo Pongratz wrote: > Comment on the "workaround" see inline. > >> > +/* Workaround! >> > + * Linux (drivers/irqchip/irq-gic-v3.c) is enabling only group >> > one, >> > + * in gic_cpu_sys_reg_init it calls

Re: Virt MM DEBUG_LL support arm32

2015-10-07 Thread Peter Maydell
On 7 October 2015 at 01:32, Mario Smarduch wrote: > Hi Peter, >I noticed that icedcc, and 8250 don't work > with DEBUG_LL early debug print. And the kernel dies if > these are selected. Besides PL011 is there any other > serial devices that can be used for early debug

Re: [PATCH] KVM: arm/arm64: Add VGICv3 save/restore API documentation

2015-10-08 Thread Peter Maydell
On 8 October 2015 at 10:10, Pavel Fedin wrote: > Sorry, didn't want to offend anyone. I just wanted to tell that i know > that you, as maintainers, have much more power than i do, and you can > always say "it's political decision, we just want it and that's final", > and if

Re: [PATCH] KVM: arm/arm64: Add VGICv3 save/restore API documentation

2015-10-08 Thread Peter Maydell
On 8 October 2015 at 13:45, Pavel Fedin wrote: >> Speaking of which, does the QEMU side of this patch set require first >> adding the GICv3 emulation for the data structures or is there a >> stand-alone migration patch set somewhere? > > I rolled it out a week ago: >

Re: [RFC PATCH] KVM: arm/arm64: Don't let userspace update CNTVOFF once guest is running

2015-07-08 Thread Peter Maydell
On 8 July 2015 at 16:56, Marc Zyngier marc.zyng...@arm.com wrote: On 29/06/15 18:37, Peter Maydell wrote: On 29 June 2015 at 18:20, Claudio Fontana claudio.font...@huawei.com wrote: On 26.06.2015 06:49, Jan Kiszka wrote: QEMU has the concept of write-back levels: KVM_PUT_RUNTIME_STATE

Re: [RFC PATCH] KVM: arm/arm64: Don't let userspace update CNTVOFF once guest is running

2015-07-09 Thread Peter Maydell
On 9 July 2015 at 15:17, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Jul 09, 2015 at 02:24:06PM +0200, Christoffer Dall wrote: So I ran this through GDB, and this happens when the guest probes the virtio devices, specifically the backtrace tells me that

Re: [RFC PATCH] target-arm: kvm: Differentiate registers based on write-back levels

2015-07-10 Thread Peter Maydell
On 10 July 2015 at 12:00, Christoffer Dall christoffer.d...@linaro.org wrote: Some registers like the CNTVCT register should only be written to the kernel as part of machine initialization or on vmload operations, but never during runtime, as this can potentially make time go backwards or

Re: [RFC PATCH] KVM: arm/arm64: Don't let userspace update CNTVOFF once guest is running

2015-07-09 Thread Peter Maydell
On 9 July 2015 at 11:22, Christoffer Dall christoffer.d...@linaro.org wrote: On Wed, Jul 08, 2015 at 08:13:59PM +0100, Peter Maydell wrote: I suspect Jan is right and we really need to distinguish the KVM_PUT_*_STATE levels in ARM QEMU. This probably implies some kind of whitelist/override

Re: [RFC PATCH] KVM: arm/arm64: Don't let userspace update CNTVOFF once guest is running

2015-07-09 Thread Peter Maydell
On 9 July 2015 at 13:05, Christoffer Dall christoffer.d...@linaro.org wrote: As I understand it, the problem is that if we ever run a VCPU after reading the value, and write back the value afterwards, you potentially make time go backwards and get inconsistent views of time from different

Re: [RFC PATCH] KVM: arm/arm64: Don't let userspace update CNTVOFF once guest is running

2015-07-08 Thread Peter Maydell
On 8 July 2015 at 17:37, Marc Zyngier marc.zyng...@arm.com wrote: On 08/07/15 17:06, Peter Maydell wrote: I'd prefer it if somebody could investigate to see why QEMU is actually doing this -- so far we just have speculation. I'd prefer that too, but so far people seem to be more comfortable

Re: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-08-30 Thread Peter Maydell
On 30 August 2015 at 17:50, Christoffer Dall christoffer.d...@linaro.org wrote: I had imagined we would encode the GICv3 register accesses through the device API and not through the system register API, since I'm not crazy about polluting the general system register handling logic with GIC

Re: [PATCH v2 2/5] KVM: arm64: Implement vGICv3 distributor and redistributor access from userspace

2015-09-03 Thread Peter Maydell
On 2 September 2015 at 09:09, Pavel Fedin wrote: > The access is done similar to vGICv2, using KVM_DEV_ARM_VGIC_GRP_DIST_REGS > and KVM_DEV_ARM_VGIC_GRP_REDIST_REGS with KVM_SET_DEVICE_ATTR and > KVM_GET_DEVICE_ATTR ioctls. > > Some registers are 64-bit wide according to the

Re: Building assigned device guest dt node from host device tree ...

2015-09-01 Thread Peter Maydell
On 1 September 2015 at 16:29, Eric Auger wrote: > - the device directory can be somewhere in /sys/devices/platform, ie. > can be in sub-directories. The first difficulty is to locate it. Do you > know any C routing doing find-file matching a file name pattern? Didn't > find

Re: [RFC] Handling CP15 timer without in-kernel irqchip

2015-10-02 Thread Peter Maydell
On 2 October 2015 at 11:18, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 02/10/2015 12:16, Peter Maydell wrote: >> On 2 October 2015 at 11:05, Paolo Bonzini <pbonz...@redhat.com> wrote: >>> On 02/10/2015 11:58, Peter Maydell wrote: >>>> I de

Re: [RFC] Handling CP15 timer without in-kernel irqchip

2015-10-02 Thread Peter Maydell
On 2 October 2015 at 11:05, Paolo Bonzini <pbonz...@redhat.com> wrote: > On 02/10/2015 11:58, Peter Maydell wrote: >> I definitely dislike the latter -- userspace ends up having to >> emulate part of the CPU even though that CPU support is really >> there in hardware.

Re: [RFC] Handling CP15 timer without in-kernel irqchip

2015-10-02 Thread Peter Maydell
On 2 October 2015 at 10:30, Paolo Bonzini wrote: > > > On 02/10/2015 09:28, Pavel Fedin wrote: >> 2. Another possible approach, based on how device tree binding is handled >> by Linux. It is possible >> to remove virtual timer IRQ from the device tree, in this case the

Re: [RFC PATCH v5 0/3] vfio: platform: return device properties for a platform device

2015-10-02 Thread Peter Maydell
On 2 October 2015 at 21:28, Christoffer Dall wrote: > We discussed this for the purposes of ARM during SFO15 last week, and > basically arrived at the conclusion that the resonable thing to do is to > rely on sysfs device tree parsing in userspace. We don't have a

Re: [PATCH v3 5/5] KVM: arm64: Implement vGICv3 CPU interface access

2015-09-25 Thread Peter Maydell
On 25 September 2015 at 15:27, Andre Przywara wrote: > On 24/09/15 13:08, Pavel Fedin wrote: >> Hello! >> >>> The only thing that is pure 64-bit is the MRS/MSR _instruction_ in >>> Aarch64, which always takes a x register. >>> So can you model the register size according

Re: [PATCH v10 0/6] QEMU support for KVM Guest Debug on arm64

2015-12-15 Thread Peter Maydell
On 8 December 2015 at 18:32, Alex Bennée wrote: > Hi, > > Here is the latest patch set to support debugging of KVM guests on > arm64. The main changes are fixing arm32 compiles (mostly with stubs > for the upcomming arm32 debug) and the usual bunch of minor tweaks and >

Re: [PATCH v8 20/20] KVM: ARM64: Add a new kvm ARM PMU device

2016-01-07 Thread Peter Maydell
On 22 December 2015 at 08:08, Shannon Zhao wrote: > From: Shannon Zhao > > Add a new kvm device type KVM_DEV_TYPE_ARM_PMU_V3 for ARM PMU. Implement > the kvm_device_ops for it. > > Signed-off-by: Shannon Zhao > --- >

Re: [PATCH v8 20/20] KVM: ARM64: Add a new kvm ARM PMU device

2016-01-08 Thread Peter Maydell
On 8 January 2016 at 03:06, Shannon Zhao <zhaoshengl...@huawei.com> wrote: > > > On 2016/1/7 22:56, Peter Maydell wrote: >>>>> + Errors: >>>>> >>> +-ENXIO: Unsupported attribute group >>>>> >>> +-EBUSY: The

Re: [PATCH 1/2] arm: KVM: Do not update PC if the trap handler has updated it

2015-12-22 Thread Peter Maydell
On 22 December 2015 at 09:55, Marc Zyngier wrote: > Assuming we trap a coprocessor access, and decide that the access > is illegal, we will inject an exception in the guest. In this > case, we shouldn't increment the PC, or the vcpu will miss the > first instruction of the

Re: [PATCH 1/2] arm: KVM: Do not update PC if the trap handler has updated it

2015-12-22 Thread Peter Maydell
On 22 December 2015 at 14:39, Christoffer Dall <christoffer.d...@linaro.org> wrote: > On Tue, Dec 22, 2015 at 11:08:10AM +0000, Peter Maydell wrote: >> Won't this result in our incorrectly skipping the first insn >> in the fault handler if the original offending instruction &g

Re: [PATCH v9 1/6] target-arm: kvm64 - introduce kvm_arm_init_debug()

2015-11-20 Thread Peter Maydell
On 20 November 2015 at 15:05, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 12 November 2015 at 16:20, Alex Bennée <alex.ben...@linaro.org> wrote: >> As we haven't always had guest debug support we need to probe for it. >> Additionally we don't do this in the sta

Re: [PATCH v9 1/6] target-arm: kvm64 - introduce kvm_arm_init_debug()

2015-11-20 Thread Peter Maydell
{ > *features |= 1ULL << feature; > @@ -121,6 +137,8 @@ int kvm_arch_init_vcpu(CPUState *cs) > } > cpu->mp_affinity = mpidr & ARM64_AFFINITY_MASK; > > +kvm_arm_init_debug(cs); > + > return kvm_arm_init_cpreg_list(cpu); > }

Re: [PATCH v9 4/6] target-arm: kvm - add support for HW assisted debug

2015-11-20 Thread Peter Maydell
On 12 November 2015 at 16:20, Alex Bennée wrote: > This adds basic support for HW assisted debug. The ioctl interface to > KVM allows us to pass an implementation defined number of break and > watch point registers. When KVM_GUESTDBG_USE_HW is specified these > debug

Re: [PATCH v9 5/6] target-arm: kvm - re-inject guest debug exceptions

2015-11-20 Thread Peter Maydell
On 12 November 2015 at 16:20, Alex Bennée wrote: > From: Alex Bennée > > If we can't find details for the debug exception in our debug state > then we can assume the exception is due to debugging inside the guest. > To inject the exception into the guest

Re: [PATCH v9 3/6] target-arm: kvm - support for single step

2015-11-20 Thread Peter Maydell
On 12 November 2015 at 16:20, Alex Bennée wrote: > This adds support for single-step. There isn't much to do on the QEMU > side as after we set-up the request for single step via the debug ioctl > it is all handled within the kernel. > > Signed-off-by: Alex Bennée

Re: [PATCH v9 6/6] tests/guest-debug: introduce basic gdbstub tests

2015-11-20 Thread Peter Maydell
On 12 November 2015 at 16:20, Alex Bennée wrote: > From: Alex Bennée > > The aim of these tests is to combine with an appropriate kernel > image (with symbol-file vmlinux) and check it behaves as it should. > Given a kernel it checks: > > - single step

Re: [PATCH v8 20/20] KVM: ARM64: Add a new kvm ARM PMU device

2016-01-08 Thread Peter Maydell
On 8 January 2016 at 12:15, Shannon Zhao wrote: > Firstly, userspace will call kvm device ioctl to create the PMU device, if > it fails it will return an error. > Secondly, userspace will call SET_DEVICE_ATTR ioctl to configure the PMU irq > number. If the irq is invalid,

Re: [PATCH v8 20/20] KVM: ARM64: Add a new kvm ARM PMU device

2016-01-11 Thread Peter Maydell
On 11 January 2016 at 16:09, Andrew Jones wrote: > I think the save/restore case is where I always flip to seeing it as a > bunch of separate per cpu devices. It would feel better to me to > save/restore the cpu-gic registers the same way we do all other cpu > registers.

Re: [PATCH v8 20/20] KVM: ARM64: Add a new kvm ARM PMU device

2016-01-11 Thread Peter Maydell
On 11 January 2016 at 16:21, Andrew Jones wrote: > On Mon, Jan 11, 2016 at 05:09:27PM +0100, Andrew Jones wrote: >> On Mon, Jan 11, 2016 at 04:09:29PM +0100, Christoffer Dall wrote: >> > Are vcpu ids already exposed to userspace (beyond the stupid >> > KVM_IRQ_LINE) ioctl and

Re: ARM KVM guest virtual address to host virtual address Look up

2016-01-15 Thread Peter Maydell
On 15 January 2016 at 11:14, hiwu wrote: > I want to trap some ldr,str instruction in guest VM for debug. Therefore, I > have to emulate guest ldr,str in host. Without guest VA to host VA, I cannot > emulate ldr,str instruction in host. That sounds like you want "load/store

Re: ARM KVM guest virtual address to host virtual address Look up

2016-01-15 Thread Peter Maydell
On 15 January 2016 at 15:35, hiwu wrote: > Hi Peter: > > The guest's load/store instructions, which I want to debug, do not cause a > guest exception. > ARM KVM only provides the guest' r15 register (pc) value. To get the guest > instruction for > emulating in host,

Re: ARM KVM guest virtual address to host virtual address Look up

2016-01-15 Thread Peter Maydell
On 15 January 2016 at 09:33, wrote: > How to lookup host virtual address by guest virtual address ? > Is there any function to do guest page table walk? There is no single function to do this (depending on what bit of QEMU this is, we might either try a TLB access to see

Re: [Qemu-devel] [PATCH] virt: Lift the maximum RAM limit from 30GB to 255GB

2016-02-25 Thread Peter Maydell
[Typoed the kvmarm list address; sorry... -- PMM] On 25 February 2016 at 12:09, Peter Maydell <peter.mayd...@linaro.org> wrote: > The virt board restricts guests to only 30GB of RAM. This is a > hangover from the vexpress-a15 board, and there's inherent reason > for it. 30GB is s

Re: [Question] Can KVM run on Freescale IMX6 SABRE board?

2016-02-25 Thread Peter Maydell
On 25 February 2016 at 15:17, xu mike wrote: > I'm a student from the University of Pennsylvania. I want to try KVM on ARM > boards. > > I have a Freescale IMX6 board [1] which has ARM Cortex A9 processors. > I'm wondering if KVM can run on the Freescale IMX6 board? or > Can

  1   2   3   >