Re: [PATCH V2] kvm tools: Add initial virtio-scsi support

2012-08-20 Thread Pekka Enberg
On Fri, Aug 17, 2012 at 1:04 PM, Pekka Enberg penb...@kernel.org wrote: Looks good to me. I'll sit on this for a little while if the virtio-scsi folks want to comment on the code. Applied, thanks Asias! -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: Windows slow boot: contractor wanted

2012-08-20 Thread Richard Davies
Brian Jackson wrote: Richard Davies wrote: The host in question has 128GB RAM and dual AMD Opteron 6128 (16 cores total). It is running kernel 3.5.1 and qemu-kvm 1.1.1. In this morning's test, we have 3 guests, all booting Windows with 40GB RAM and 8 cores each (we have seen small VMs

Re: perf uncore lkvm woes

2012-08-20 Thread Avi Kivity
On 08/20/2012 08:30 AM, Yan, Zheng wrote: On 08/19/2012 05:55 PM, Avi Kivity wrote: On 08/17/2012 09:56 AM, Peter Zijlstra wrote: On Fri, 2012-08-17 at 09:40 +0800, Yan, Zheng wrote: Peter, do I need to submit a patch disables uncore on virtualized CPU? I think Avi prefers the method where

Re: perf uncore lkvm woes

2012-08-20 Thread Avi Kivity
On 08/20/2012 07:15 AM, Yan, Zheng wrote: On 08/19/2012 05:55 PM, Avi Kivity wrote: On 08/17/2012 09:56 AM, Peter Zijlstra wrote: On Fri, 2012-08-17 at 09:40 +0800, Yan, Zheng wrote: Peter, do I need to submit a patch disables uncore on virtualized CPU? I think Avi prefers the method where

[PATCH uq/master] kvm: Clean up irqfd API

2012-08-20 Thread Jan Kiszka
No need to expose the fd-based interface, everyone will already be fine with the more handy EventNotifier variant. Rename the latter to clarify that we are still talking about irqfds here. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Alex, please update your vfio patch accordingly.

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-20 Thread Paolo Bonzini
Il 13/08/2012 10:35, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi

Re: [RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-20 Thread Paolo Bonzini
Il 13/08/2012 10:35, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized,

Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-20 Thread Roedel, Joerg
(Back from vacation) On Thu, Aug 16, 2012 at 01:59:02PM +0300, Avi Kivity wrote: Ok. Please check that ~KVM_XSTATE_LAZY expands to 64-bits correctly, maybe we need to cast it to u64 before negating it. Note that we limit xcr0 to the bits allowed by the host, so the currect kernel is safe

[PATCH v2] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-08-20 Thread Takuya Yoshikawa
Although the possible race described in commit 85b7059169e128c57a3a8a3e588fb89cb2031da1 KVM: MMU: fix shrinking page from the empty mmu was correct, the real cause of that issue was a more trivial bug of mmu_shrink() introduced by commit 1952639665e92481c34c34c3e2a71bf3e66ba362 KVM:

Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-20 Thread Avi Kivity
On 08/20/2012 12:24 PM, Roedel, Joerg wrote: (Back from vacation) On Thu, Aug 16, 2012 at 01:59:02PM +0300, Avi Kivity wrote: Ok. Please check that ~KVM_XSTATE_LAZY expands to 64-bits correctly, maybe we need to cast it to u64 before negating it. Note that we limit xcr0 to the bits

Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-20 Thread Roedel, Joerg
On Mon, Aug 20, 2012 at 01:08:14PM +0300, Avi Kivity wrote: On 08/20/2012 12:24 PM, Roedel, Joerg wrote: So it was broken all along? Yikes. There is no LWP support in the kernel and thus KVM can't expose it to guests. So for now nothing should be broken, no? Joerg -- To

KVM call agenda for Tuesday, August 21

2012-08-20 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. Thanks, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

when will kvm merge update from upstream linux?

2012-08-20 Thread Ren, Yongjie
Hi Avi, With latest kvm.git tree, igb VF can't be enabled. But it can work fine with upstream linux.git tree. When will kvm merge the latest update in upstream linux? The following commit in upstream linux.git should be the fix. commit 7f46f9c13041c8fde331142791f3994a8fdbec6f Merge: cab

Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-20 Thread Avi Kivity
On 08/20/2012 01:14 PM, Roedel, Joerg wrote: On Mon, Aug 20, 2012 at 01:08:14PM +0300, Avi Kivity wrote: On 08/20/2012 12:24 PM, Roedel, Joerg wrote: So it was broken all along? Yikes. There is no LWP support in the kernel and thus KVM can't expose it to guests. So for now nothing should

Re: when will kvm merge update from upstream linux?

2012-08-20 Thread Avi Kivity
On 08/20/2012 01:32 PM, Ren, Yongjie wrote: Hi Avi, With latest kvm.git tree, igb VF can't be enabled. But it can work fine with upstream linux.git tree. When will kvm merge the latest update in upstream linux? The following commit in upstream linux.git should be the fix. It is in

Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-20 Thread Roedel, Joerg
On Mon, Aug 20, 2012 at 01:43:10PM +0300, Avi Kivity wrote: On 08/20/2012 01:14 PM, Roedel, Joerg wrote: On Mon, Aug 20, 2012 at 01:08:14PM +0300, Avi Kivity wrote: On 08/20/2012 12:24 PM, Roedel, Joerg wrote: So it was broken all along? Yikes. There is no LWP support in the kernel

RE: when will kvm merge update from upstream linux?

2012-08-20 Thread Ren, Yongjie
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Avi Kivity Sent: Monday, August 20, 2012 6:45 PM To: Ren, Yongjie Cc: kvm@vger.kernel.org Subject: Re: when will kvm merge update from upstream linux? On 08/20/2012 01:32 PM, Ren,

Re: [RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-20 Thread Stefan Hajnoczi
On Mon, Aug 20, 2012 at 10:04 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 13/08/2012 10:35, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be

Re: [RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-20 Thread Michael S. Tsirkin
On Mon, Aug 20, 2012 at 12:31:01PM +0100, Stefan Hajnoczi wrote: On Mon, Aug 20, 2012 at 10:04 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 13/08/2012 10:35, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch starts and stops vhost as the

Re: [RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-20 Thread Paolo Bonzini
Il 20/08/2012 13:57, Michael S. Tsirkin ha scritto: How much of the functionality of virtio-scsi.[ch] is still in use at this point? Would it make more sense to use a separate vhost-scsi-pci device instead? Since the SCSI target lives in the kernel, almost everything is driven

Re: KVM-enabled Linux 3.2 won't boot in kvm

2012-08-20 Thread Wolfram Gloger
Neal Murphy writes: I've been using KVM for a few years now. I've had little trouble with it. But now it's got me treed. I cannot get a KVM-enabled Linux 3.2.27 kernel to boot in qemu-kvm unless I specify '-no-kvm'. I've used a similarly-built and - configured 2.6.35 kernel without trouble.

Re: Windows slow boot: contractor wanted

2012-08-20 Thread Richard Davies
Avi Kivity wrote: Richard Davies wrote: Hi Avi, Thanks to you and several others for offering help. We will work with Avi at first, but are grateful for all the other offers of help. We have a number of other qemu-related projects which we'd be interested in getting done, and will get

[PATCH RESEND] kvm: Fix nonsense handling of compat ioctl

2012-08-20 Thread Alan Cox
From: Alan Cox a...@linux.intel.com KVM_SET_SIGNAL_MASK passed a NULL argument leaves the on stack signal sets uninitialized. It then passes them through to kvm_vcpu_ioctl_set_sigmask. We should be passing a NULL in this case not translated garbage. Signed-off-by: Alan Cox a...@linux.intel.com

Re: KVM-enabled Linux 3.2 won't boot in kvm

2012-08-20 Thread Michael Tokarev
19.08.2012 06:04, Neal Murphy пишет: I've been using KVM for a few years now. I've had little trouble with it. But now it's got me treed. I cannot get a KVM-enabled Linux 3.2.27 kernel to boot in qemu-kvm unless I specify '-no-kvm'. I've used a similarly-built and - configured 2.6.35 kernel

[Bug 31992] Clarify compilation options for the host or for the guest

2012-08-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=31992 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|NEW |RESOLVED

Re: [Qemu-devel] x86, nops settings result in kernel crash

2012-08-20 Thread Tomas Racek
- Original Message - On Fri, Aug 17, 2012 at 03:43:56AM -0400, Tomas Racek wrote: Well, I've added some debug statements to the code: void __init arch_init_ideal_nops(void) { switch (boot_cpu_data.x86_vendor) { case X86_VENDOR_INTEL: /*

Re: [libvirt-users] vm pxe fail

2012-08-20 Thread Andrew Holway
I had SR-IOV enabled on the interface card. This was breaking it. The card is a: Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 01) On Aug 17, 2012, at 4:34 AM, Alex Jia wrote: Hi Andrew, I can't confirm a root reason based on your information, perhaps you may try

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-20 Thread Nicholas A. Bellinger
On Sun, 2012-08-19 at 11:44 +0300, Michael S. Tsirkin wrote: On Sat, Aug 18, 2012 at 05:36:26PM -0700, Nicholas A. Bellinger wrote: On Sat, 2012-08-18 at 22:12 +0300, Michael S. Tsirkin wrote: On Tue, Aug 14, 2012 at 01:31:14PM -0700, Nicholas A. Bellinger wrote: On Mon, 2012-08-13 at

Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-08-20 Thread Scott Wood
On 08/16/2012 03:48 AM, Bhushan Bharat-R65777 wrote: diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h index 3c14202..da71c84 100644 --- a/arch/powerpc/include/asm/kvm.h +++ b/arch/powerpc/include/asm/kvm.h @@ -25,6 +25,7 @@ /* Select powerpc specific features in

Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-08-20 Thread Scott Wood
On 08/16/2012 10:12 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 31, 2012 3:31 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; kvm-...@vger.kernel.org; kvm@vger.kernel.org; ag...@suse.de Subject: Re: [PATCH 2/2] KVM: PPC:

Re: perf uncore lkvm woes

2012-08-20 Thread Yan, Zheng
On 08/20/2012 04:49 PM, Avi Kivity wrote: On 08/20/2012 07:15 AM, Yan, Zheng wrote: On 08/19/2012 05:55 PM, Avi Kivity wrote: On 08/17/2012 09:56 AM, Peter Zijlstra wrote: On Fri, 2012-08-17 at 09:40 +0800, Yan, Zheng wrote: Peter, do I need to submit a patch disables uncore on virtualized

Re: [PATCH 17/38] KVM: PPC: BookE: Add support for vcpu-mode

2012-08-20 Thread Scott Wood
On 08/15/2012 04:29 AM, Alexander Graf wrote: On 15.08.2012, at 03:17, Scott Wood wrote: On 08/14/2012 07:26 PM, Alexander Graf wrote: On 15.08.2012, at 02:17, Scott Wood wrote: On 08/14/2012 06:04 PM, Alexander Graf wrote: Generic KVM code might want to know whether we are inside guest

Re: [RFC PATCH] vfio: add fixup for broken PCI devices

2012-08-20 Thread Alex Williamson
On Sat, 2012-08-18 at 00:28 +1000, Alexey Kardashevskiy wrote: On Fri, Jun 22, 2012 at 6:16 PM, Alexey Kardashevskiy a...@ozlabs.ru wrote: On 07/06/12 09:17, Alex Williamson wrote: On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: Some adapters (like NEC PCI USB controller)

Re: [PATCH uq/master] kvm: Clean up irqfd API

2012-08-20 Thread Alex Williamson
On Mon, 2012-08-20 at 10:55 +0200, Jan Kiszka wrote: No need to expose the fd-based interface, everyone will already be fine with the more handy EventNotifier variant. Rename the latter to clarify that we are still talking about irqfds here. Signed-off-by: Jan Kiszka jan.kis...@siemens.com

[PATCH v6 00/12] KVM: introduce readonly memslot

2012-08-20 Thread Xiao Guangrong
Changelog: - fix endless retrying for unhandleable instruction which accesses on readonly host memory - divide slot-flags by 16:16, the lower part is visible for userspace, the reset is internally used in kvm, and document this in the code - check slot-flags for gfn_to_hva_memslot The test

[PATCH v6 01/12] KVM: x86: fix possible infinite loop caused by reexecute_instruction

2012-08-20 Thread Xiao Guangrong
Currently, we reexecute all unhandleable instructions if they do not access on the mmio, however, it can not work if host map the readonly memory to guest. If the instruction try to write this kind of memory, it will fault again when guest retry it, then we will goto a infinite loop: retry

[PATCH v6 02/12] KVM: fix missing check for memslot flags

2012-08-20 Thread Xiao Guangrong
Check flags when memslot is registered from userspace as Avi's suggestion Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- virt/kvm/kvm_main.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index

[PATCH v6 03/12] KVM: hide KVM_MEMSLOT_INVALID from userspace

2012-08-20 Thread Xiao Guangrong
Quote Avi's comment: | KVM_MEMSLOT_INVALID is actually an internal symbol, not used by | userspace. Please move it to kvm_host.h. Also, we divide the memlsot-flags into two parts, the lower 16 bits are visible for userspace, the higher 16 bits are internally used in kvm Signed-off-by: Xiao

[PATCH v6 04/12] KVM: introduce gfn_to_pfn_memslot_atomic

2012-08-20 Thread Xiao Guangrong
It can instead of hva_to_pfn_atomic Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |5 + include/linux/kvm_host.h |3 ++- virt/kvm/kvm_main.c | 14 -- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCH v6 05/12] KVM: introduce gfn_to_hva_read/kvm_read_hva/kvm_read_hva_atomic

2012-08-20 Thread Xiao Guangrong
This set of functions is only used to read data from host space, in the later patch, we will only get a readonly hva in gfn_to_hva_read, and the function name is a good hint to let gfn_to_hva_read to pair with kvm_read_hva()/kvm_read_hva_atomic() Signed-off-by: Xiao Guangrong

[PATCH v6 06/12] KVM: reorganize hva_to_pfn

2012-08-20 Thread Xiao Guangrong
We do too many things in hva_to_pfn, this patch reorganize the code, let it be better readable Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- virt/kvm/kvm_main.c | 159 +++ 1 files changed, 97 insertions(+), 62 deletions(-)

[PATCH v6 07/12] KVM: use 'writable' as a hint to map writable pfn

2012-08-20 Thread Xiao Guangrong
In current code, we always map writable pfn for the read fault, in order to support readonly memslot, we map writable pfn only if 'writable' is not NULL Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- virt/kvm/kvm_main.c | 24 +++- 1 files changed, 23

[PATCH v6 08/12] KVM: introduce KVM_PFN_ERR_RO_FAULT

2012-08-20 Thread Xiao Guangrong
In the later patch, it indicates failure when we try to get a writable pfn from the readonly memslot Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH v6 10/12] KVM: introduce KVM_HVA_ERR_RO_BAD

2012-08-20 Thread Xiao Guangrong
In the later patch, it indicates failure when we try to get a writable hva from the readonly memslot Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH v6 09/12] KVM: introduce KVM_HVA_ERR_BAD

2012-08-20 Thread Xiao Guangrong
Then, remove bad_hva and inline kvm_is_error_hva Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h |8 +++- virt/kvm/kvm_main.c | 13 + 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH v6 11/12] KVM: introduce readonly memslot

2012-08-20 Thread Xiao Guangrong
In current code, if we map a readonly memory space from host to guest and the page is not currently mapped in the host, we will get a fault pfn and async is not allowed, then the vm will crash We introduce readonly memory region to map ROM/ROMD to the guest, read access is happy for readonly

[PATCH v6 12/12] KVM: indicate readonly access fault

2012-08-20 Thread Xiao Guangrong
Introduce write_readonly_mem in mmio-exit-info to indicate this exit is caused by write access on readonly memslot Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 23 ++- include/linux/kvm.h |3 +++

Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-08-20 Thread Scott Wood
On 08/16/2012 03:48 AM, Bhushan Bharat-R65777 wrote: diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h index 3c14202..da71c84 100644 --- a/arch/powerpc/include/asm/kvm.h +++ b/arch/powerpc/include/asm/kvm.h @@ -25,6 +25,7 @@ /* Select powerpc specific features in

Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-08-20 Thread Scott Wood
On 08/16/2012 10:12 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 31, 2012 3:31 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; ag...@suse.de Subject: Re: [PATCH 2/2] KVM: PPC: