Re: [PATCH 1/1] virtio_console: perf-test fix [FIX] read-out all data after perf-test [FIX] code clean-up

2010-09-28 Thread Amit Shah
On (Thu) Sep 23 2010 [14:11:52], Lukas Doktor wrote: @@ -829,6 +832,11 @@ def run_virtio_console(test, params, env): exit_event.set() thread.join() +# Let the guest read-out all the remaining data +while not _on_guest(virt.poll('%s', %s) +

pci passthrough with KVM

2010-09-28 Thread Inigo Losada
We are using pci passthrough with an SCSI Adapter card. The system is: - O.S: Ubuntu 10.04.1 LTS - KVM Packages: kvm1:84+dfsg-0ubuntu16+0.12.3+noroms+0ubuntu9.2 kvm-pxe 5.4.4-1ubuntu1 qemu-kvm 0.12.3+noroms-0ubuntu9.2 libvirt-bin 0.7.5-5ubuntu27.2 python-libvirt

[PATCH] KVM: x86 emulator: Eliminate compilation warning in x86_decode_insn()

2010-09-28 Thread Sheng Yang
Eliminate: arch/x86/kvm/emulate.c:801: warning: ‘sv’ may be used uninitialized in this function on gcc 4.1.2 Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c

[PATCH] qemu-kvm: device assignment: Reflect assigned device's MSI data/address modification to KVM

2010-09-28 Thread Sheng Yang
Device driver can modify MSI data/address when MSI is enabled. This patch reflect the moditication to KVM. Signed-off-by: Sheng Yang sh...@linux.intel.com --- hw/device-assignment.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c

Re: [PATCH] x86, nmi: workaround sti; hlt race vs nmi; intr

2010-09-28 Thread Avi Kivity
On 09/27/2010 11:55 PM, H. Peter Anvin wrote: On 09/27/2010 02:27 AM, Avi Kivity wrote: I don't have write permissions for the spec. If you can verify that all existing and future hardware will mask NMI after STI and convince the spec owners to update the specifications, I'm all for it;

Re: [PATCH 2/7] KVM: MMU: cleanup for error mask set while walk guest page table

2010-09-28 Thread Xiao Guangrong
On 09/27/2010 10:30 PM, Avi Kivity wrote: r = FNAME(walk_addr)(walker, vcpu, vaddr, - !!(access PFERR_WRITE_MASK), - !!(access PFERR_USER_MASK), - !!(access PFERR_FETCH_MASK)); + access PFERR_WRITE_MASK, +

Re: [PATCH] fix kvmclock bug

2010-09-28 Thread Jan Kiszka
Am 27.09.2010 21:00, Zachary Amsden wrote: On 09/25/2010 11:54 PM, Jan Kiszka wrote: That only leaves us with the likely wrong unstable declaration of the TSC after resume. And that raises the question for me if KVM is actually that much smarter than the Linux kernel in detecting TSC jumps. If

[PATCH] KVM: MMU: move access code parsing to FNAME(walk_addr) function

2010-09-28 Thread Xiao Guangrong
Move access code parsing from caller site to FNAME(walk_addr) function Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/paging_tmpl.h | 40 1 files changed, 16 insertions(+), 24 deletions(-) diff --git

Re: [PATCH 2/7] KVM: MMU: cleanup for error mask set while walk guest page table

2010-09-28 Thread Avi Kivity
On 09/28/2010 10:58 AM, Xiao Guangrong wrote: Yeah, it's a good idea, i'll post a patch to do it. Not sure how that interacts with nested ept (which has a different permission model). Umm, we just move the error code parsing from the caller site to FNAME(walk_addr) function, i think it

Re: [PATCH 1/7] KVM: MMU: update 'root_hpa' out of loop in PAE shadow path

2010-09-28 Thread Avi Kivity
On 09/28/2010 04:43 AM, Xiao Guangrong wrote: On 09/27/2010 10:39 PM, Avi Kivity wrote: On 09/27/2010 12:14 PM, Xiao Guangrong wrote: On 09/27/2010 06:02 PM, Xiao Guangrong wrote: The value of 'vcpu-arch.mmu.pae_root' is not modified, so we can update 'root_hpa' out of the loop

Re: [PATCH] x86, nmi: workaround sti; hlt race vs nmi; intr

2010-09-28 Thread Roedel, Joerg
On Tue, Sep 28, 2010 at 04:50:24AM -0400, Avi Kivity wrote: On 09/27/2010 11:55 PM, H. Peter Anvin wrote: On 09/27/2010 02:27 AM, Avi Kivity wrote: I don't have write permissions for the spec. If you can verify that all existing and future hardware will mask NMI after STI and

Re: [PATCH] KVM: ia64: define kvm_lapic_enabled() to fix a compile error

2010-09-28 Thread Avi Kivity
On 09/27/2010 12:01 PM, Zhang, Xiantao wrote: Maybe we should make ia64 kvm depend on CONFIG_BROKEN. It has been experimental for quite a while. I don't think the kvm/ia64 is broken in the upstream Linux, and it should work according to our last try. When was that? The big issue

Re: [PATCH 3/3] Add svm cpuid features

2010-09-28 Thread Roedel, Joerg
On Mon, Sep 27, 2010 at 12:22:13PM -0400, Avi Kivity wrote: On 09/27/2010 05:40 PM, Roedel, Joerg wrote: On Mon, Sep 27, 2010 at 11:02:23AM -0400, Avi Kivity wrote: On 09/27/2010 04:58 PM, Avi Kivity wrote: On 09/27/2010 03:16 PM, Joerg Roedel wrote: This patch adds the svm

Re: [PATCH 3/3] Add svm cpuid features

2010-09-28 Thread Avi Kivity
On 09/28/2010 11:28 AM, Roedel, Joerg wrote: On Mon, Sep 27, 2010 at 12:22:13PM -0400, Avi Kivity wrote: On 09/27/2010 05:40 PM, Roedel, Joerg wrote: On Mon, Sep 27, 2010 at 11:02:23AM -0400, Avi Kivity wrote: On 09/27/2010 04:58 PM, Avi Kivity wrote: On 09/27/2010

[PATCH 0/3] Emulate MSI-X mask bits for assigned devices

2010-09-28 Thread Sheng Yang
Hi Avi Marcelo This patchset would add emulation of MSI-X mask bit for assigned devices in QEmu. BTW: We are also purposed an acceleration of MSI-X mask bit for KVM - to get it done in kernel. That's because sometime MSI-X mask bit was accessed very frequently by guest and emulation in QEmu

[PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-09-28 Thread Sheng Yang
This patch enable per-vector mask for assigned devices using MSI-X. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/x86.c |1 + include/linux/kvm.h |9 - include/linux/kvm_host.h |1 + virt/kvm/assigned-dev.c | 39

[PATCH 2/3] qemu-kvm: device assignment: Some clean up for MSI-X code

2010-09-28 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- hw/device-assignment.c | 75 --- 1 files changed, 51 insertions(+), 24 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 87f7418..4edae52 100644 ---

[PATCH 3/3] qemu-kvm: device assignment: emulate MSI-X mask bits

2010-09-28 Thread Sheng Yang
This patch emulated MSI-X per vector mask bit on assigned device. Signed-off-by: Sheng Yang sh...@linux.intel.com --- hw/device-assignment.c | 127 +++- 1 files changed, 126 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c

Re: [PATCH v11 17/17]add two new ioctls for mp device.

2010-09-28 Thread Michael S. Tsirkin
On Sat, Sep 25, 2010 at 12:27:35PM +0800, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com The patch add two ioctls for mp device. One is for userspace to query how much memory locked to make mp device run smoothly. Another one is for userspace to set how much meory

Re: [PATCH 3/3] Add svm cpuid features

2010-09-28 Thread Roedel, Joerg
On Tue, Sep 28, 2010 at 05:37:58AM -0400, Avi Kivity wrote: On 09/28/2010 11:28 AM, Roedel, Joerg wrote: Weird, it worked here as I tested it. I had it on qemu/master and with all three patches. But patch 1 should not make the difference. I take a look, have you pushed the failing

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Michael S. Tsirkin
On Mon, Sep 27, 2010 at 02:46:32PM -0600, Alex Williamson wrote: On Wed, 2010-09-22 at 14:18 -0700, Tom Lyon wrote: +ssize_t vfio_mem_readwrite( + int write, + struct vfio_dev *vdev, + char __user *buf, + size_t count, + loff_t *ppos)

Re: [PATCH 3/3] Add svm cpuid features

2010-09-28 Thread Avi Kivity
On 09/28/2010 12:05 PM, Roedel, Joerg wrote: On Tue, Sep 28, 2010 at 05:37:58AM -0400, Avi Kivity wrote: On 09/28/2010 11:28 AM, Roedel, Joerg wrote: Weird, it worked here as I tested it. I had it on qemu/master and with all three patches. But patch 1 should not make the

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Michael S. Tsirkin
On Mon, Sep 27, 2010 at 02:57:49PM -0600, Alex Williamson wrote: On Mon, 2010-09-27 at 13:54 +0200, Michael S. Tsirkin wrote: On Wed, Sep 22, 2010 at 02:18:24PM -0700, Tom Lyon wrote: Signed-off-by: Tom Lyon p...@cisco.com Some comments on the pci bits: After going over them

Re: 2.6.35-rc1 regression with pvclock and smp guests

2010-09-28 Thread Michael Tokarev
Arjan Koers 0h61vkll2ly8 at xutrox.com writes: [] I've attached the printk patches for 2.6.34.1 and 2.6.35, in case anyone needs them... Move a printk that's using the clock before it's ready Fix a hang during SMP kernel boot on KVM that showed up after commit

Re: [PATCH v11 13/17] Add mp(mediate passthru) device.

2010-09-28 Thread Michael S. Tsirkin
On Mon, Sep 27, 2010 at 10:23:33PM +0100, Ben Hutchings wrote: +/* The main function to transform the guest user space address + * to host kernel address via get_user_pages(). Thus the hardware + * can do DMA directly to the external buffer address. + */ +static struct page_info

Re: [PATCH v11 17/17]add two new ioctls for mp device.

2010-09-28 Thread Michael S. Tsirkin
On Mon, Sep 27, 2010 at 10:36:15PM +0100, Ben Hutchings wrote: On Sat, 2010-09-25 at 12:27 +0800, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com The patch add two ioctls for mp device. One is for userspace to query how much memory locked to make mp device run

[RFC] virtio_balloon: disable oom killer when fill balloon

2010-09-28 Thread Dave Young
Balloon could cause guest memory oom killing and panic. If we disable the oom killer it will be better at least avoid guest panic. If alloc failed we can just adjust the balloon target to be equal to current number by call vdev-config-set But during test I found the config-set num_pages does

Re: [PATCH 08/18] KVM test: Add basic file transfer test

2010-09-28 Thread Michael S. Tsirkin
On Mon, Sep 27, 2010 at 06:43:54PM -0400, Lucas Meneghel Rodrigues wrote: From: Amos Kong ak...@redhat.com This test is the basic test of transfering file between host and guest. Try to transfer a large file from host to guest, and transfer it back to host, then compare the files by

Re: [RFC] virtio_balloon: disable oom killer when fill balloon

2010-09-28 Thread Anthony Liguori
On 09/28/2010 08:19 AM, Dave Young wrote: Balloon could cause guest memory oom killing and panic. If we disable the oom killer it will be better at least avoid guest panic. If alloc failed we can just adjust the balloon target to be equal to current number by call vdev-config-set But during

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-09-28 Thread Michael S. Tsirkin
On Tue, Sep 28, 2010 at 05:44:10PM +0800, Sheng Yang wrote: This patch enable per-vector mask for assigned devices using MSI-X. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/x86.c |1 + include/linux/kvm.h |9 - include/linux/kvm_host.h |1

Re: [RFC] virtio_balloon: disable oom killer when fill balloon

2010-09-28 Thread Dave Young
On Tue, Sep 28, 2010 at 9:34 PM, Anthony Liguori anth...@codemonkey.ws wrote: On 09/28/2010 08:19 AM, Dave Young wrote: Balloon could cause guest memory oom killing and panic. If we disable the oom killer it will be better at least avoid guest panic. If alloc failed we can just adjust the

Re: [RFC] virtio_balloon: disable oom killer when fill balloon

2010-09-28 Thread Dave Young
On Tue, Sep 28, 2010 at 9:49 PM, Dave Young hidave.darks...@gmail.com wrote: On Tue, Sep 28, 2010 at 9:34 PM, Anthony Liguori anth...@codemonkey.ws wrote: On 09/28/2010 08:19 AM, Dave Young wrote: Balloon could cause guest memory oom killing and panic. If we disable the oom killer it will

Re: KVM call agenda for Sept 28

2010-09-28 Thread Avi Kivity
On 09/28/2010 12:14 AM, Chris Wright wrote: Please send in any agenda items you are interested in covering. no agenda - no call. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [RFC] virtio_balloon: disable oom killer when fill balloon

2010-09-28 Thread Anthony Liguori
On 09/28/2010 08:49 AM, Dave Young wrote: On Tue, Sep 28, 2010 at 9:34 PM, Anthony Liguorianth...@codemonkey.ws wrote: On 09/28/2010 08:19 AM, Dave Young wrote: Balloon could cause guest memory oom killing and panic. If we disable the oom killer it will be better at least avoid

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Alex Williamson
On Tue, 2010-09-28 at 12:09 +0200, Michael S. Tsirkin wrote: On Mon, Sep 27, 2010 at 02:46:32PM -0600, Alex Williamson wrote: On Wed, 2010-09-22 at 14:18 -0700, Tom Lyon wrote: +ssize_t vfio_mem_readwrite( + int write, + struct vfio_dev *vdev, + char __user

KVM: VMX: Add AX to list of registers clobbered by guest switch

2010-09-28 Thread Jan Kiszka
By chance this caused no harm so far. We overwrite AX during switch to/from guest context, so we must declare this. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/kvm/vmx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c

Re: [PATCH v11 13/17] Add mp(mediate passthru) device.

2010-09-28 Thread Arnd Bergmann
On Tuesday 28 September 2010, Michael S. Tsirkin wrote: + skb_reserve(skb, NET_IP_ALIGN); + skb_put(skb, len); + + if (skb_copy_datagram_from_iovec(skb, 0, iov, 0, len)) { + kfree_skb(skb); + return -EAGAIN; + } + + skb-protocol =

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Michael S. Tsirkin
On Tue, Sep 28, 2010 at 08:26:21AM -0600, Alex Williamson wrote: On Tue, 2010-09-28 at 12:09 +0200, Michael S. Tsirkin wrote: On Mon, Sep 27, 2010 at 02:46:32PM -0600, Alex Williamson wrote: On Wed, 2010-09-22 at 14:18 -0700, Tom Lyon wrote: +ssize_t vfio_mem_readwrite( +

Re: [PATCH v11 13/17] Add mp(mediate passthru) device.

2010-09-28 Thread Michael S. Tsirkin
On Tue, Sep 28, 2010 at 04:39:59PM +0200, Arnd Bergmann wrote: On Tuesday 28 September 2010, Michael S. Tsirkin wrote: + skb_reserve(skb, NET_IP_ALIGN); + skb_put(skb, len); + + if (skb_copy_datagram_from_iovec(skb, 0, iov, 0, len)) { + kfree_skb(skb); +

Re: [PATCH v11 13/17] Add mp(mediate passthru) device.

2010-09-28 Thread Arnd Bergmann
On Tuesday 28 September 2010, Michael S. Tsirkin wrote: On Tue, Sep 28, 2010 at 04:39:59PM +0200, Arnd Bergmann wrote: Can you be more specific what the problem is? Do you think it breaks when a guest sends VLAN tagged frames or when macvtap is connected to a VLAN interface that adds

Re: [PATCH] x86, nmi: workaround sti; hlt race vs nmi; intr

2010-09-28 Thread H. Peter Anvin
On 09/28/2010 01:50 AM, Avi Kivity wrote: Personally I think the safer route is to take the patch. There are other processors besides Intel and AMD and we can't test all of them, not to mention various emulators and virtual machine monitors out there. Speaking for the smoltering crater

Re: [PATCH] x86, nmi: workaround sti; hlt race vs nmi; intr

2010-09-28 Thread Avi Kivity
On 09/28/2010 05:34 PM, H. Peter Anvin wrote: On 09/28/2010 01:50 AM, Avi Kivity wrote: Personally I think the safer route is to take the patch. There are other processors besides Intel and AMD and we can't test all of them, not to mention various emulators and virtual machine monitors

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Alex Williamson
On Tue, 2010-09-28 at 16:40 +0200, Michael S. Tsirkin wrote: On Tue, Sep 28, 2010 at 08:26:21AM -0600, Alex Williamson wrote: On Tue, 2010-09-28 at 12:09 +0200, Michael S. Tsirkin wrote: On Mon, Sep 27, 2010 at 02:46:32PM -0600, Alex Williamson wrote: On Wed, 2010-09-22 at 14:18 -0700,

Re: [PATCH 3/3] VFIO V4: VFIO driver: Non-privileged user level PCI drivers

2010-09-28 Thread Michael S. Tsirkin
On Tue, Sep 28, 2010 at 11:10:42AM -0600, Alex Williamson wrote: On Tue, 2010-09-28 at 16:40 +0200, Michael S. Tsirkin wrote: On Tue, Sep 28, 2010 at 08:26:21AM -0600, Alex Williamson wrote: On Tue, 2010-09-28 at 12:09 +0200, Michael S. Tsirkin wrote: On Mon, Sep 27, 2010 at 02:46:32PM

Support for nested vmx

2010-09-28 Thread Vandeir Eduardo
Hi, I work at an university computer lab and would like to create linux vitual machines using kvm on a big linux intel-vt server we have. Each linux vitual machine would be assigned to a group of students and they will use those vms to study and create another linux vitual machines using kvm

Re: pci passthrough with KVM

2010-09-28 Thread Alex Williamson
On Tue, Sep 28, 2010 at 2:27 AM, Inigo Losada ilos...@ibex.es wrote: We are using pci passthrough with an SCSI Adapter card. The system is: -  O.S:  Ubuntu 10.04.1 LTS -  KVM Packages: kvm    1:84+dfsg-0ubuntu16+0.12.3+noroms+0ubuntu9.2 kvm-pxe   5.4.4-1ubuntu1 qemu-kvm    

Re: how to debug unhandled vm exit: 0x11?

2010-09-28 Thread Neo Jia
On Tue, Jul 27, 2010 at 3:04 AM, Avi Kivity a...@redhat.com wrote:  On 07/26/2010 08:58 PM, ewheeler wrote: O n 07/26/2010 07:01 PM, Neo Jia wrote: hi, I am seeing an unhandled vm exit: 0x11 on Win7 with KVM-88 release and wondering if I am still able to dump the code from guest OS when

Re: how to debug unhandled vm exit: 0x11?

2010-09-28 Thread Neo Jia
On Tue, Sep 28, 2010 at 11:40 AM, Neo Jia neo...@gmail.com wrote: On Tue, Jul 27, 2010 at 3:04 AM, Avi Kivity a...@redhat.com wrote:  On 07/26/2010 08:58 PM, ewheeler wrote: O n 07/26/2010 07:01 PM, Neo Jia wrote: hi, I am seeing an unhandled vm exit: 0x11 on Win7 with KVM-88 release and

Re: [PATCH v11 13/17] Add mp(mediate passthru) device.

2010-09-28 Thread Sridhar Samudrala
On 9/28/2010 8:18 AM, Arnd Bergmann wrote: On Tuesday 28 September 2010, Michael S. Tsirkin wrote: On Tue, Sep 28, 2010 at 04:39:59PM +0200, Arnd Bergmann wrote: Can you be more specific what the problem is? Do you think it breaks when a guest sends VLAN tagged frames or when macvtap is

disk image snapshot functionality

2010-09-28 Thread Peter Doherty
Hi, I'm using Centos5.5 on the host, and the KVM that's available in the repos. I'm using linux VMs too. My disk images are qcow2 files. Here's what I want: To be able to, on the host, create a snapshot of the guest's disk image, without shutting down the guest, so that I can then restore

Re: Support for nested vmx

2010-09-28 Thread Nadav Har'El
On Tue, Sep 28, 2010, Vandeir Eduardo wrote about Support for nested vmx: Is there some place where I could get patches/instructions to test nested kvm vm on Intel-vt processors? Hi, The latest patches that I submitted on this mailing list around two months ago apply to the then-current trunk

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-09-28 Thread Sheng Yang
On Tuesday 28 September 2010 21:36:00 Michael S. Tsirkin wrote: On Tue, Sep 28, 2010 at 05:44:10PM +0800, Sheng Yang wrote: This patch enable per-vector mask for assigned devices using MSI-X. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/x86.c |1 +

Re: [RFC] virtio_balloon: disable oom killer when fill balloon

2010-09-28 Thread Dave Young
On Tue, Sep 28, 2010 at 10:03 PM, Anthony Liguori anth...@codemonkey.ws wrote: On 09/28/2010 08:49 AM, Dave Young wrote: On Tue, Sep 28, 2010 at 9:34 PM, Anthony Liguorianth...@codemonkey.ws  wrote: On 09/28/2010 08:19 AM, Dave Young wrote: Balloon could cause guest memory oom killing

IOMMU in guest OS

2010-09-28 Thread Thawan Kooburat
Hi, Can someone tell my if my understanding is correct or not. Currently, KVM only use IOMMU to allow PCI/PCI Express device to be assigned as a PCI device inside guest OS. So right now guest OS does not see IOMMU as a device, but this may change when IOMMU emulation (I saw some patches on the

Re: [RFC PATCH 2/2] macvtap: TX zero copy between guest and host kernel

2010-09-28 Thread Shirley Ma
Hello Michael, On Wed, 2010-09-15 at 07:52 -0700, Shirley Ma wrote: Don't you think once I address vhost_add_used_and_signal update issue, it is a simple and complete patch for macvtap TX zero copy? Thanks Shirley I like the fact that the patch is simple. Unfortunately I

Re: IOMMU in guest OS

2010-09-28 Thread Muli Ben-Yehuda
On Tue, Sep 28, 2010 at 08:56:57PM -0500, Thawan Kooburat wrote: Can someone tell my if my understanding is correct or not. Currently, KVM only use IOMMU to allow PCI/PCI Express device to be assigned as a PCI device inside guest OS. So right now guest OS does not see IOMMU as a device, but