Live migration locks up 3.2 guests in do_timer(ticks ~ 500000)

2014-09-08 Thread Matt Mullins
Somewhere between kernel 3.2 and 3.11 on my VM hosts (yes, I know that narrows it down a /whole lot/ ...), live migration started killing my Ubuntu precise (kernel 3.2.x) guests, causing all of their vcpus to go into a busy loop. Once (and only once) I've observed the guest eventually becoming

Re: Live migration locks up 3.2 guests in do_timer(ticks ~ 500000)

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 07:54, Matt Mullins ha scritto: It also seems to happen reliably when the guest has been running for a while; it's easily reproducible with guests that have been up ~1 day, and I've reproduced it in VMs with an uptime of ~20 hours. I haven't yet figured out a lower-bound, which

[PATCH v3 1/4] kvmtool: ARM: Use KVM_ARM_PREFERRED_TARGET vm ioctl to determine target cpu

2014-09-08 Thread Anup Patel
Instead, of trying out each and every target type we should use KVM_ARM_PREFERRED_TARGET vm ioctl to determine target type for KVM ARM/ARM64. If KVM_ARM_PREFERRED_TARGET vm ioctl fails then we fallback to old method of trying all known target types. If KVM_ARM_PREFERRED_TARGET vm ioctl succeeds

[PATCH v3 2/4] kvmtool: ARM64: Add target type potenza for aarch64

2014-09-08 Thread Anup Patel
The VCPU target type KVM_ARM_TARGET_XGENE_POTENZA is available in latest Linux-3.16-rcX or higher hence register aarch64 target type for it. This patch enables us to run KVMTOOL on X-Gene Potenza host. Signed-off-by: Pranavkumar Sawargaonkar pranavku...@linaro.org Signed-off-by: Anup Patel

[PATCH v3 3/4] kvmtool: Handle exit reason KVM_EXIT_SYSTEM_EVENT

2014-09-08 Thread Anup Patel
The KVM_EXIT_SYSTEM_EVENT exit reason was added to define architecture independent system-wide events for a Guest. Currently, it is used by in-kernel PSCI-0.2 emulation of KVM ARM/ARM64 to inform user space about PSCI SYSTEM_OFF or PSCI SYSTEM_RESET request. For now, we simply treat all

[PATCH v3 4/4] kvmtool: ARM/ARM64: Provide PSCI-0.2 to guest when KVM supports it

2014-09-08 Thread Anup Patel
If in-kernel KVM support PSCI-0.2 emulation then we should set KVM_ARM_VCPU_PSCI_0_2 feature for each guest VCPU and also provide arm,psci-0.2,arm,psci as PSCI compatible string. This patch updates kvm_cpu__arch_init() and setup_fdt() as per above. Signed-off-by: Pranavkumar Sawargaonkar

[PATCH v3 0/4] kvmtool: ARM/ARM64: Misc updates

2014-09-08 Thread Anup Patel
This patchset updates KVMTOOL to use some of the features supported by Linux-3.16 KVM ARM/ARM64, such as: 1. Target CPU == Host using KVM_ARM_PREFERRED_TARGET vm ioctl 2. Target CPU type Potenza for using KVMTOOL on X-Gene 3. PSCI v0.2 support for Aarch32 and Aarch64 guest 4. System event exit

Re: [PATCH v5 3/3] ivshmem: add check on protocol version in QEMU

2014-09-08 Thread Stefan Hajnoczi
On Fri, Sep 05, 2014 at 02:25:05PM +0200, David Marchand wrote: Hello Stefan, On 09/05/2014 12:29 PM, Stefan Hajnoczi wrote: On Thu, Sep 04, 2014 at 02:51:01PM +0200, David Marchand wrote: +server using a different protocol please check your setup\n); +

[PATCH v6 2/3] docs: update ivshmem device spec

2014-09-08 Thread David Marchand
Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v6 0/3] ivshmem: update documentation, add client/server tools

2014-09-08 Thread David Marchand
Here is a patchset containing an update on ivshmem specs documentation and importing ivshmem server and client tools. These tools have been written from scratch and are not related to what is available in nahanni repository. I put them in contrib/ directory as the qemu-doc.texi was already telling

[PATCH v6 1/3] contrib: add ivshmem client and server

2014-09-08 Thread David Marchand
When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com Signed-off-by: David Marchand david.march...@6wind.com ---

[PATCH v6 3/3] ivshmem: add check on protocol version in QEMU

2014-09-08 Thread David Marchand
Send a protocol version as the first message from server, clients must close communication if they don't support this protocol version. Older QEMUs should be fine with this change in the protocol since they overrides their own vm_id on reception of an id associated to no eventfd. Signed-off-by:

Re: [RFC][patch 0/6] pci pass-through support for qemu/KVM on s390

2014-09-08 Thread Paolo Bonzini
Il 06/09/2014 01:19, Alexander Graf ha scritto: 1) interpretive execution of pci load/store instruction. If we use this function pci access does not get intercepted (no SIE exit) but is handled via microcode. To enable this we have to disable zpci device and enable it again with

Re: [PATCH v6 3/3] ivshmem: add check on protocol version in QEMU

2014-09-08 Thread Michael S. Tsirkin
On Mon, Sep 08, 2014 at 11:17:50AM +0200, David Marchand wrote: Send a protocol version as the first message from server, clients must close communication if they don't support this protocol version. What's the motivation here? This is at best a way to break all clients if an incompatible

Re: [PATCH v6 1/3] contrib: add ivshmem client and server

2014-09-08 Thread Michael S. Tsirkin
On Mon, Sep 08, 2014 at 11:17:48AM +0200, David Marchand wrote: ... diff --git a/configure b/configure index 961bf6f..a41a16c 100755 --- a/configure +++ b/configure @@ -4125,6 +4125,9 @@ if test $want_tools = yes ; then if [ $linux = yes -o $bsd = yes -o $solaris = yes ] ; then

Re: [PATCH v6 2/3] docs: update ivshmem device spec

2014-09-08 Thread Michael S. Tsirkin
On Mon, Sep 08, 2014 at 11:17:49AM +0200, David Marchand wrote: Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and

Re: [PATCH 1/2 v5] powerpc/kvm: support to handle sw breakpoint

2014-09-08 Thread Alexander Graf
On 07.09.14 18:31, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using an illegal instruction, we trap to hypervisor via Emulation Assistance interrupt, where we check for the illegal instruction and accordingly we return to Host

Re: [PATCH 2/2 v5] powerpc/kvm: common sw breakpoint instr across ppc

2014-09-08 Thread Alexander Graf
On 07.09.14 18:31, Madhavan Srinivasan wrote: This patch extends the use of illegal instruction as software breakpoint instruction across the ppc platform. Patch extends booke program interrupt code to support software breakpoint. Signed-off-by: Madhavan Srinivasan ma...@linux.vnet.ibm.com

Re: [RFC][patch 0/6] pci pass-through support for qemu/KVM on s390

2014-09-08 Thread Alex Williamson
On Mon, 2014-09-08 at 11:20 +0200, Paolo Bonzini wrote: Il 06/09/2014 01:19, Alexander Graf ha scritto: 1) interpretive execution of pci load/store instruction. If we use this function pci access does not get intercepted (no SIE exit) but is handled via microcode. To enable

Your mailbox is full.‏

2014-09-08 Thread Kathleen Aubin
Your Email account has exceeded its storage limit. You will not be able to receive or send message. In order to restore your account please Clickhere: http://slblagov.edicy.co/ and submit your web-mail required information. Thanks. IT security Service Desk -- To unsubscribe from this list: send

[BUG] Guest kernel divide error in kvm_unlock_kick

2014-09-08 Thread Chris Webb
I've reported this bug before, which reliably crashes a guest kernel shortly after boot, but have just reconfirmed that it is still present with Linux 3.16.2 guest and host kernels and Qemu 2.1. Running a 3.16.2 x86-64 SMP guest kernel on qemu-2.1, with kvm enabled and -cpu host on a 3.16.2 AMD

Re: [PATCH] virtio-rng: complete have_data completion in removing device

2014-09-08 Thread Amos Kong
On Wed, Aug 06, 2014 at 01:55:29PM +0530, Amit Shah wrote: On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote: On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote: When we try to hot-remove a busy virtio-rng device from QEMU monitor, the device can't be hot-removed. Because virtio-rng

Re: [PATCH] KVM: x86: fix kvmclock breakage from timers branch merge

2014-09-08 Thread Chris J Arges
On 09/05/2014 04:00 PM, Paolo Bonzini wrote: Il 05/09/2014 22:41, Thomas Gleixner ha scritto: No, it needs to be above update_vsyscall(). Here is the patch again which I sent before. [https://lkml.org/lkml/2014/9/5/395] Ah, I missed it after your signature. Thanks, I'll test yours then next

Re: Live migration locks up 3.2 guests in do_timer(ticks ~ 500000)

2014-09-08 Thread Matt Mullins
On Mon, Sep 08, 2014 at 10:18:06AM +0200, Paolo Bonzini wrote: Il 08/09/2014 07:54, Matt Mullins ha scritto: It also seems to happen reliably when the guest has been running for a while; it's easily reproducible with guests that have been up ~1 day, and I've reproduced it in VMs with an

Re: Live migration locks up 3.2 guests in do_timer(ticks ~ 500000)

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 17:56, Matt Mullins ha scritto: What host are you running? What information do you want that I missed in my first email? What version of QEMU? Can you try the 12.04 qemu (which IIRC is 1.0) on top of the newer kernel? Paolo The hosts are dual-socket Nehalem Xeons (L5520),

Re: Live migration locks up 3.2 guests in do_timer(ticks ~ 500000)

2014-09-08 Thread Matt Mullins
On Mon, Sep 08, 2014 at 06:18:46PM +0200, Paolo Bonzini wrote: Il 08/09/2014 17:56, Matt Mullins ha scritto: What host are you running? What version of QEMU? Can you try the 12.04 qemu (which IIRC is 1.0) on top of the newer kernel? I'm currently running the version included with Ubuntu

Re: [PATCH v3 0/4 resend] Introduce device assignment flag operation helper function

2014-09-08 Thread Bjorn Helgaas
On Fri, Sep 05, 2014 at 11:15:22AM -0600, Bjorn Helgaas wrote: On Fri, Aug 08, 2014 at 01:36:03PM +0800, Ethan Zhao wrote: This patch set introduces three PCI device flag operation helper functions when set pci device PF/VF to assigned or deassigned status also check it. and patch 2,3,4

[PATCH] ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault()

2014-09-08 Thread Ard Biesheuvel
The ISS encoding for an exception from a Data Abort has a WnR bit[6] that indicates whether the Data Abort was caused by a read or a write instruction. While there are several fields in the encoding that are only valid if the ISV bit[24] is set, WnR is not one of them, so we can read it

Re: [PATCH] ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault()

2014-09-08 Thread Laszlo Ersek
On 09/08/14 22:29, Ard Biesheuvel wrote: The ISS encoding for an exception from a Data Abort has a WnR bit[6] that indicates whether the Data Abort was caused by a read or a write instruction. While there are several fields in the encoding that are only valid if the ISV bit[24] is set, WnR is

[PATCH 6] From nobody Wed Sep 3 13:22:18 2014

2014-09-08 Thread Joel Schopp
Subject: [PATCH] From nobody Tue Sep 2 17:49:46 2014 From: Joel Schopp joel.sch...@amd.com To: kvm...@lists.cs.columbia.edu, linux-arm-ker...@lists.infradead.org, kvm@vger.kernel.org Cc: Marc Zyngier marc.zyng...@arm.com, Sungjinn Chung sungjinn.ch...@samsung.com, Christoffer Dall

Re: [PATCH 6] From nobody Wed Sep 3 13:22:18 2014

2014-09-08 Thread Joel Schopp
My apologies for the bad formatting. Will resend momentarily. On 09/08/2014 06:01 PM, Joel Schopp wrote: Subject: [PATCH] From nobody Tue Sep 2 17:49:46 2014 From: Joel Schopp joel.sch...@amd.com To: kvm...@lists.cs.columbia.edu, linux-arm-ker...@lists.infradead.org, kvm@vger.kernel.org

[PATCH v6] arm64: fix VTTBR_BADDR_MASK

2014-09-08 Thread Joel Schopp
The current VTTBR_BADDR_MASK only masks 39 bits, which is broken on current systems. Rather than just add a bit it seems like a good time to also set things at run-time instead of compile time to accomodate more hardware. This patch sets TCR_EL2.PS, VTCR_EL2.T0SZ and vttbr_baddr_mask in runtime,

[PATCH] KVM: arm64: add gic-400 compatible

2014-09-08 Thread Joel Schopp
Add a one liner to identify the gic-400. It's gicv2 with optional MSI extensions. Cc: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Joel Schopp joel.sch...@amd.com --- virt/kvm/arm/vgic.c |1 + 1 file changed, 1 insertion(+) diff --git a/virt/kvm/arm/vgic.c

Re: [PATCH v3 0/4 resend] Introduce device assignment flag operation helper function

2014-09-08 Thread ethan zhao
Bjorn, Thanks, will fix the building issue for new version and resend. Ethan On 2014/9/9 1:08, Bjorn Helgaas wrote: On Fri, Sep 05, 2014 at 11:15:22AM -0600, Bjorn Helgaas wrote: On Fri, Aug 08, 2014 at 01:36:03PM +0800, Ethan Zhao wrote: This patch set introduces three PCI device flag

[PATCH V4 4/4 resend] PCI: use device flag operation helper function in iov.c

2014-09-08 Thread Ethan Zhao
Use device flag operation helper functions when check device assignment status. Signed-off-by: Ethan Zhao ethan.z...@oracle.com --- drivers/pci/iov.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index cb6f247..4d109c0 100644 ---

[PATCH V4 2/4 resend] KVM: use pci device flag operation helper functions

2014-09-08 Thread Ethan Zhao
Use helper function instead of direct operation to pci device flag when set device to assigned or deassigned. Acked-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Ethan Zhao ethan.z...@oracle.com --- virt/kvm/assigned-dev.c |2 +- virt/kvm/iommu.c|4 ++-- 2 files changed, 3

[PATCH V4 3/4 resend] xen-pciback: use pci device flag operation helper function

2014-09-08 Thread Ethan Zhao
Use pci device flag operation helper functions when set device to assigned or deassigned state. Acked-by: David Vrabel david.vra...@citrix.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Signed-off-by: Ethan Zhao ethan.z...@oracle.com --- drivers/xen/xen-pciback/pci_stub.c |4

[PATCH v4 0/4 resend] Introduce device assignment flag operation helper function

2014-09-08 Thread Ethan Zhao
This patch set introduces three PCI device flag operation helper functions when set pci device PF/VF to assigned or deassigned status also check it. and patch 2,3,4 apply these helper functions to KVM,XEN and PCI. v2: simplify unnecessory ternary operation in function pci_is_dev_assigned(). v3:

[PATCH V4 1/4 resend] PCI: introduce helper functions for device flag operation

2014-09-08 Thread Ethan Zhao
This patch introduced three helper functions to hide direct device flag operation. void pci_set_dev_assigned(struct pci_dev *pdev); void pci_clear_dev_assigned(struct pci_dev *pdev); bool pci_is_dev_assigned(struct pci_dev *pdev); Signed-off-by: Ethan Zhao ethan.z...@oracle.com --- v2: simplify

Re: [PATCH 1/2 v5] powerpc/kvm: support to handle sw breakpoint

2014-09-08 Thread Alexander Graf
On 07.09.14 18:31, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using an illegal instruction, we trap to hypervisor via Emulation Assistance interrupt, where we check for the illegal instruction and accordingly we return to Host

Re: [PATCH 2/2 v5] powerpc/kvm: common sw breakpoint instr across ppc

2014-09-08 Thread Alexander Graf
On 07.09.14 18:31, Madhavan Srinivasan wrote: This patch extends the use of illegal instruction as software breakpoint instruction across the ppc platform. Patch extends booke program interrupt code to support software breakpoint. Signed-off-by: Madhavan Srinivasan ma...@linux.vnet.ibm.com