Live migration makes VM unusable

2013-09-04 Thread Maciej Gałkiewicz
Hi I am experiencing very weird and hard to debug issue for me with live migration. After successfully migrating VM it is not usable. It responds to echo requests (for some time). When I am trying to 'ping' someone only the first packet appears on network interface (I am able to receive one echo

[PATCH V2] Documentation/kvm: Update cpuid documentation for steal time and pv eoi

2013-09-04 Thread Raghavendra K T
Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com --- Changes in V2: Correction in the description of steal time and added msr info (Michael S Tsirkin) Documentation/virtual/kvm/cpuid.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git

Re: Mapping guest memory from another process?

2013-09-04 Thread Stefan Hajnoczi
On Tue, Sep 03, 2013 at 07:56:33PM -0400, Cutter 409 wrote: I'm working on a tool that needs the ability to map the physical memory of a virtual machine into its own address space. With Xen, I can simply call xc_map_foreign_pages(). Is there something similar for KVM? So far, I can only

[RFC qom-cpu 15/41] cpu: Move watchpoint fields from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 5 +++-- exec.c | 33 - gdbstub.c | 8 include/exec/cpu-defs.h | 10 -- include/qom/cpu.h | 10 ++ linux-user/main.c |

Re: Live migration makes VM unusable

2013-09-04 Thread Philipp Hahn
Hello, On Wednesday 04 September 2013 09:43:55 Maciej Gałkiewicz wrote: I am experiencing very weird and hard to debug issue for me with live migration. After successfully migrating VM it is not usable. It responds to echo requests (for some time). When I am trying to 'ping' someone only the

Re: [PATCH] kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()

2013-09-04 Thread Pekka Enberg
On 8/30/13 4:58 PM, Ying-Shiuan Pan wrote: From: Ying-Shiuan Pan yingshiuan@gmail.com This patch fixes a bug that vtirtio_mmio_init_ioeventfd() passed a wrong value when it invoked ioeventfd__add_event(). True value of 2nd parameter indicates the eventfd uses PIO bus which is used by

Re: [PATCH 0/3] kvm tools: remove periodic tick

2013-09-04 Thread Pekka Enberg
On 9/3/13 9:10 PM, Jonathan Austin wrote: This patch series removes kvm tool's periodic tick function in favour of a thread that blocks waiting for input. The paths used for handling input are the same as when using a periodic tick, but they're not called unless there is actually input to be

Re: [PATCH] drivers/vhost/scsi.c: avoid a 10-order allocation

2013-09-04 Thread Dan Aloni
On Wed, Sep 04, 2013 at 12:02:01PM +0300, Michael S. Tsirkin wrote: On Sun, Aug 18, 2013 at 12:18:38PM +0300, Michael S. Tsirkin wrote: On Sun, Aug 18, 2013 at 11:48:56AM +0300, Dan Aloni wrote: On 3.10.7 and x86_64, as a result of sizeof(struct vhost_scsi) being 2152960 bytes the

Re: [PATCH 2/3] kvm tools: remove periodic tick in favour of a polling thread

2013-09-04 Thread Marc Zyngier
Hi Jonny, Just a couple of nits, see below: On 03/09/13 19:10, Jonathan Austin wrote: Currently the only use of the periodic timer tick in kvmtool is to handle reading from stdin. Though functional, this periodic tick can be problematic on slow (eg FPGA) platforms and can cause low

Re: [PATCH 0/3] kvm tools: remove periodic tick

2013-09-04 Thread Marc Zyngier
On 04/09/13 10:23, Pekka Enberg wrote: Hi Pekka, On 9/3/13 9:10 PM, Jonathan Austin wrote: This patch series removes kvm tool's periodic tick function in favour of a thread that blocks waiting for input. The paths used for handling input are the same as when using a periodic tick, but

Re: [PATCH] kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()

2013-09-04 Thread Will Deacon
On Wed, Sep 04, 2013 at 10:21:26AM +0100, Pekka Enberg wrote: On 8/30/13 4:58 PM, Ying-Shiuan Pan wrote: From: Ying-Shiuan Pan yingshiuan@gmail.com This patch fixes a bug that vtirtio_mmio_init_ioeventfd() passed a wrong value when it invoked ioeventfd__add_event(). True value of 2nd

Re: [PATCH] kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()

2013-09-04 Thread Pekka Enberg
On Wed, Sep 4, 2013 at 1:07 PM, Will Deacon will.dea...@arm.com wrote: Like this? It gets a bit confusing, because there is a KVM_IOEVENTFD_FLAG_* namespace as part of the kernel KVM API, but which doesn't have the flags we need (e.g. userspace polling). Looks good. I applied the fix so can

Re: [GIT PULL] KVM changes for 3.12

2013-09-04 Thread Thierry Reding
On Tue, Sep 03, 2013 at 03:10:46PM +0300, Gleb Natapov wrote: [...] Aneesh Kumar K.V (5): mm/cma: Move dma contiguous changes into a seperate config Hi Gleb, This commit is going to cause runtime regressions on various ARM platforms because it renames a symbol but fails to update all

Re: [PATCH] kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()

2013-09-04 Thread Will Deacon
On Wed, Sep 04, 2013 at 11:13:55AM +0100, Pekka Enberg wrote: On Wed, Sep 4, 2013 at 1:07 PM, Will Deacon will.dea...@arm.com wrote: Like this? It gets a bit confusing, because there is a KVM_IOEVENTFD_FLAG_* namespace as part of the kernel KVM API, but which doesn't have the flags we need

[PATCH] kvm tools: ioeventfd: replace bool parameters to __add_event with flags

2013-09-04 Thread Will Deacon
A recent fix to virtio MMIO (72a7541ce305 [kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()]) highlighted the confusing parameters expected by ioeventfd__add_event. As per Pekka's suggestion, replace the bool parameters to this function with a single `flags'

Re: [GIT PULL] KVM changes for 3.12

2013-09-04 Thread Gleb Natapov
Copying Marek, Aneesh and Alex since this came through PPC kvm tree. On Wed, Sep 04, 2013 at 12:18:28PM +0200, Thierry Reding wrote: On Tue, Sep 03, 2013 at 03:10:46PM +0300, Gleb Natapov wrote: [...] Aneesh Kumar K.V (5): mm/cma: Move dma contiguous changes into a seperate config

Re: [PATCH] kvm tools: ioeventfd: replace bool parameters to __add_event with flags

2013-09-04 Thread Pekka Enberg
On Wed, Sep 4, 2013 at 1:27 PM, Will Deacon will.dea...@arm.com wrote: A recent fix to virtio MMIO (72a7541ce305 [kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()]) highlighted the confusing parameters expected by ioeventfd__add_event. As per Pekka's

Re: [PATCH] KVM: PPC: fix couple of memory leaks in MPIC/XICS devices

2013-09-04 Thread Alexander Graf
On 01.09.2013, at 14:53, Gleb Natapov wrote: XICS failed to free xics structure on error path. MPIC destroy handler forgot to delete kvm_device structure. Signed-off-by: Gleb Natapov g...@redhat.com Paul, please ack :). Alex -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time

2013-09-04 Thread Michael S. Tsirkin
On Mon, Sep 02, 2013 at 04:40:59PM +0800, Jason Wang wrote: Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if upend_idx != done_idx we still set zcopy_used to true and rollback this choice later. This could be avoided by determining zerocopy once by checking all

Re: [PATCH] KVM: PPC: fix couple of memory leaks in MPIC/XICS devices

2013-09-04 Thread Paul Mackerras
On Sun, Sep 01, 2013 at 03:53:46PM +0300, Gleb Natapov wrote: XICS failed to free xics structure on error path. MPIC destroy handler forgot to delete kvm_device structure. Signed-off-by: Gleb Natapov g...@redhat.com Acked-by: Paul Mackerras pau...@samba.org -- To unsubscribe from this list:

[PATCH v2 3/3] kvm tools: stop virtio console doing unnecessary input handling

2013-09-04 Thread Jonathan Austin
The asynchronous nature of the virtio input handling (using a job queue) can result in unnecessary jobs being created if there is some delay in handing input (the original function to handle the input returns immediately without the file having been read, and hence poll returns immediately

[PATCH v2 0/3] kvm tools: remove periodic tick

2013-09-04 Thread Jonathan Austin
This patch series removes kvm tool's periodic tick function in favour of a thread that blocks waiting for input. The paths used for handling input are the same as when using a periodic tick, but they're not called unless there is actually input to be processed. On extremely slow platforms (eg

[PATCH v2 1/3] kvm tools: use #define for maximum number of terminal devices

2013-09-04 Thread Jonathan Austin
Though there may be no near-term plans to change the number of terminal devices in the future, using TERM_MAX_DEVS instead of '4' makes reading some of the loops over terminal devices clearer. This patch makes the this substitution where required. Signed-off-by: Jonathan Austin

[PATCH v2 2/3] kvm tools: remove periodic tick in favour of a polling thread

2013-09-04 Thread Jonathan Austin
Currently the only use of the periodic timer tick in kvmtool is to handle reading from stdin. Though functional, this periodic tick can be problematic on slow (eg FPGA) platforms and can cause low interactivity or even stop the execution from progressing at all. This patch removes the periodic

[PATCH v3] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-04 Thread Arthur Chunqi Li
This patch contains the following two changes: 1. Fix the bug in nested preemption timer support. If vmexit L2-L0 with some reasons not emulated by L1, preemption timer value should be save in such exits. 2. Add support of Save VMX-preemption timer value VM-Exit controls to nVMX. With this patch,

[PATCH] kvm-unit-tests: VMX: Test suite for preemption timer

2013-09-04 Thread Arthur Chunqi Li
Test cases for preemption timer in nested VMX. Two aspects are tested: 1. Save preemption timer on VMEXIT if relevant bit set in EXIT_CONTROL 2. Test a relevant bug of KVM. The bug will not save preemption timer value if exit L2-L0 for some reason and enter L0-L2. Thus preemption timer will never

Re: [PATCH v2 2/3] kvm tools: remove periodic tick in favour of a polling thread

2013-09-04 Thread Pekka Enberg
Hi Jonathan, On Wed, Sep 4, 2013 at 4:25 PM, Jonathan Austin jonathan.aus...@arm.com wrote: Currently the only use of the periodic timer tick in kvmtool is to handle reading from stdin. Though functional, this periodic tick can be problematic on slow (eg FPGA) platforms and can cause low

Re: [PATCH] kvm-unit-tests: VMX: Add the framework of EPT

2013-09-04 Thread Arthur Chunqi Li
Hi Xiao Guangrong, Jun Nakajima, Yang Zhang, Gleb and Paolo, If you have any ideas of how and which aspects should nested EPT be tested, please tell me and I will write relevant test cases. Besides, I'm so happy if you can help me review this patch or propose other suggestions. Thanks very mush,

[stable-3.4] possibly revert KVM: X86 emulator: fix source operand decoding...

2013-09-04 Thread Paul Gortmaker
Hi Greg, The 3.4.44+ cherry pick: commit 5b5b30580218eae22609989546bac6e44d0eda6e Author: Gleb Natapov g...@redhat.com Date: Wed Apr 24 13:38:36 2013 +0300 KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions commit

Re: Mapping guest memory from another process?

2013-09-04 Thread Cutter 409
Thanks, I'll try that. Do you know of any way to get at the VCPU structure from another process? I'm looking to have an event triggered from the guest which will notify my application. In Xen I use an event channel, and then I can call a function to retrieve the relevant VCPU context. On Wed, Sep

Re: [Qemu-devel] [PATCH V3] target-i386: forward CPUID cache leaves when -cpu host is used

2013-09-04 Thread Eduardo Habkost
On Mon, Sep 02, 2013 at 07:09:47PM +0200, Benoît Canet wrote: Signed-off-by: Benoit Canet ben...@irqsave.net Reviewed-by: Eduardo Habkost ehabk...@redhat.com Thanks. Do you have an idea on how QEMU could reflect the real host clock frequency to the guest when the host cpu

Re: [PATCH v2 2/3] kvm tools: remove periodic tick in favour of a polling thread

2013-09-04 Thread Jonathan Austin
Hi Pekka, On 04/09/13 16:58, Pekka Enberg wrote: Hi Jonathan, On Wed, Sep 4, 2013 at 4:25 PM, Jonathan Austin jonathan.aus...@arm.com wrote: Currently the only use of the periodic timer tick in kvmtool is to handle reading from stdin. Though functional, this periodic tick can be

Re: [PATCH v2 2/3] kvm tools: remove periodic tick in favour of a polling thread

2013-09-04 Thread Pekka Enberg
On Wed, Sep 4, 2013 at 8:40 PM, Jonathan Austin jonathan.aus...@arm.com wrote: 'top' works on ARM with virtio console. I've just done some new testing and with the serial console emulation and I see the same as you're reporting. Previously with the 8250 emulation I'd booted to a prompt but

Re: [PATCH v2 2/3] kvm tools: remove periodic tick in favour of a polling thread

2013-09-04 Thread Sasha Levin
On 09/04/2013 01:48 PM, Pekka Enberg wrote: On Wed, Sep 4, 2013 at 8:40 PM, Jonathan Austin jonathan.aus...@arm.com wrote: 'top' works on ARM with virtio console. I've just done some new testing and with the serial console emulation and I see the same as you're reporting. Previously with the

Re: [GIT PULL] KVM changes for 3.12

2013-09-04 Thread Stephen Warren
On 09/04/2013 04:38 AM, Gleb Natapov wrote: Copying Marek, Aneesh and Alex since this came through PPC kvm tree. On Wed, Sep 04, 2013 at 12:18:28PM +0200, Thierry Reding wrote: On Tue, Sep 03, 2013 at 03:10:46PM +0300, Gleb Natapov wrote: [...] Aneesh Kumar K.V (5): mm/cma: Move dma

[PATCH 1/2] kvm: free resources after canceling async_pf

2013-09-04 Thread Radim Krčmář
When we cancel 'async_pf_execute()', we should behave as if the work was never scheduled in 'kvm_setup_async_pf()'. Fixes a bug when we can't unload module because the vm wasn't destroyed. Signed-off-by: Radim Krčmář rkrc...@redhat.com --- virt/kvm/async_pf.c | 5 - 1 file changed, 4

[PATCH 0/2] kvm: fix a bug and remove a redundancy in async_pf

2013-09-04 Thread Radim Krčmář
I did not reproduce the bug fixed in [1/2], but there are not that many reasons why we could not unload a module, so the spot is quite obvious. Radim Krčmář (2): kvm: free resources after canceling async_pf kvm: remove .done from struct kvm_async_pf include/linux/kvm_host.h | 1 -

[PATCH 2/2] kvm: remove .done from struct kvm_async_pf

2013-09-04 Thread Radim Krčmář
'.done' is used to mark the completion of 'async_pf_execute()', but 'cancel_work_sync()' returns true when the work was canceled, so we use it instead. Signed-off-by: Radim Krčmář rkrc...@redhat.com --- include/linux/kvm_host.h | 1 - virt/kvm/async_pf.c | 5 + 2 files changed, 1

[Bug 60850] New: BUG: Bad page state in process libvirtd pfn:76000

2013-09-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=60850 Bug ID: 60850 Summary: BUG: Bad page state in process libvirtd pfn:76000 Product: Virtualization Version: unspecified Kernel Version: 3.11 Hardware: x86-64 OS: Linux

[PATCH kvm-unit-tests] realmode: test RETF imm

2013-09-04 Thread Bruce Rogers
Signed-off-by: Bruce Rogers brog...@suse.com --- x86/realmode.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index 3546771..c57e033 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -481,6 +481,9 @@ void test_io(void) asm (retf:

OpenBSD 5.3 guest on KVM

2013-09-04 Thread Daniel Bareiro
Hi all! These days I tested OpenBSD 5.3 and pleasantly surprised me notice that they implemented VirtIO for block devices, network and memory ballooning. It is an important step for those who contribute to the project. Now what I'm seeing is that there seems to be some sort of problem with the

Re: [GIT PULL] KVM changes for 3.12

2013-09-04 Thread Linus Torvalds
On Tue, Sep 3, 2013 at 5:10 AM, Gleb Natapov g...@redhat.com wrote: This pull request adds tlb_gather_mmu() caller in S390 code, but 2b047252 in your tree added another parameter to the function, so the patch bellow have to be applied during merge to resolve the conflicts. The patch was used

Re: [PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time

2013-09-04 Thread Jason Wang
On 09/04/2013 07:59 PM, Michael S. Tsirkin wrote: On Mon, Sep 02, 2013 at 04:40:59PM +0800, Jason Wang wrote: Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if upend_idx != done_idx we still set zcopy_used to true and rollback this choice later. This could be

Re: [Qemu-devel] [PATCH] linux-headers: update to 3.11

2013-09-04 Thread Alexey Kardashevskiy
On 09/04/2013 01:35 AM, Paolo Bonzini wrote: Il 03/09/2013 17:28, Alexey Kardashevskiy ha scritto: On 09/03/2013 08:42 PM, Jan Kiszka wrote: On 2013-09-03 11:32, Alexey Kardashevskiy wrote: On 09/03/2013 07:29 PM, Peter Maydell wrote: On 3 September 2013 09:27, Alexey Kardashevskiy

Re: [PATCH v2 net-next] pkt_sched: fq: Fair Queue packet scheduler

2013-09-04 Thread Jason Wang
On 09/04/2013 07:59 PM, Daniel Borkmann wrote: On 09/04/2013 01:27 PM, Eric Dumazet wrote: On Wed, 2013-09-04 at 03:30 -0700, Eric Dumazet wrote: On Wed, 2013-09-04 at 14:30 +0800, Jason Wang wrote: And tcpdump would certainly help ;) See attachment. Nothing obvious on tcpdump (only that

Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-09-04 Thread Benjamin Herrenschmidt
On Tue, 2013-09-03 at 13:53 +0300, Gleb Natapov wrote: Or supporting all IOMMU links (and leaving emulated stuff as is) in on device is the last thing I have to do and then you'll ack the patch? I am concerned more about API here. Internal implementation details I leave to powerpc experts

Re: [GIT PULL] KVM changes for 3.12

2013-09-04 Thread Heiko Carstens
On Wed, Sep 04, 2013 at 06:08:08PM -0700, Linus Torvalds wrote: On Tue, Sep 3, 2013 at 5:10 AM, Gleb Natapov g...@redhat.com wrote: This pull request adds tlb_gather_mmu() caller in S390 code, but 2b047252 in your tree added another parameter to the function, so the patch bellow have to

Re: [PATCH] KVM: PPC: fix couple of memory leaks in MPIC/XICS devices

2013-09-04 Thread Alexander Graf
On 01.09.2013, at 14:53, Gleb Natapov wrote: XICS failed to free xics structure on error path. MPIC destroy handler forgot to delete kvm_device structure. Signed-off-by: Gleb Natapov g...@redhat.com Paul, please ack :). Alex -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] KVM: PPC: fix couple of memory leaks in MPIC/XICS devices

2013-09-04 Thread Paul Mackerras
On Sun, Sep 01, 2013 at 03:53:46PM +0300, Gleb Natapov wrote: XICS failed to free xics structure on error path. MPIC destroy handler forgot to delete kvm_device structure. Signed-off-by: Gleb Natapov g...@redhat.com Acked-by: Paul Mackerras pau...@samba.org -- To unsubscribe from this list:

Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-09-04 Thread Benjamin Herrenschmidt
On Tue, 2013-09-03 at 13:53 +0300, Gleb Natapov wrote: Or supporting all IOMMU links (and leaving emulated stuff as is) in on device is the last thing I have to do and then you'll ack the patch? I am concerned more about API here. Internal implementation details I leave to powerpc experts