[PATCH 4/5] KVM: Add kvm_get_irq_routing_entry() func

2010-11-04 Thread Sheng Yang
We need to query the entry later. Signed-off-by: Sheng Yang sh...@linux.intel.com --- include/linux/kvm_host.h |2 ++ virt/kvm/irq_comm.c | 20 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h

[PATCH 0/5 v3] MSI-X mask supporting for assigned device(kernel)

2010-11-04 Thread Sheng Yang
Here is the latest series of MSI-X mask supporting patches. The bigest change from last version is, in order to reduce the complexity, I moved all mask bit operation to kernel, including disabled entries. This addressed two concerns: 1. KVM and QEmu each own a part of mask bit operation. 2. QEmu

[PATCH 3/5] KVM: Move struct kvm_io_device to kvm_host.h

2010-11-04 Thread Sheng Yang
Then it can be used in struct kvm_assigned_dev_kernel later. Signed-off-by: Sheng Yang sh...@linux.intel.com --- include/linux/kvm_host.h | 23 +++ virt/kvm/iodev.h | 25 + 2 files changed, 24 insertions(+), 24 deletions(-) diff --git

[PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-04 Thread Sheng Yang
This patch enable per-vector mask for assigned devices using MSI-X. This patch provided two new APIs: one is for guest to specific device's MSI-X table address in MMIO, the other is for userspace to get information about mask bit. All the mask bit operation are kept in kernel, in order to

[PATCH 1/5] PCI: MSI: Move MSI-X entry definition to pci_regs.h

2010-11-04 Thread Sheng Yang
Then it can be used by others. Reviewed-by: Matthew Wilcox wi...@linux.intel.com Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org Signed-off-by: Sheng Yang sh...@linux.intel.com --- drivers/pci/msi.h|6 -- include/linux/pci_regs.h |7 +++ 2 files

[PATCH 0/3] MSI-X mask supporting for assigned device(QEmu)

2010-11-04 Thread Sheng Yang
Sheng Yang (3): qemu-kvm: Ioctl for in-kernel mask support qemu-kvm: device assignment: Some clean up about MSI-X code qemu-kvm: device assignment: emulate MSI-X mask bits hw/device-assignment.c | 236 ++-- qemu-kvm.c | 15 +++

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

2010-11-04 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- hw/device-assignment.c | 77 --- 1 files changed, 52 insertions(+), 25 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 2605bd1..8a98876 100644 ---

[PATCH 1/3] qemu-kvm: Ioctl for in-kernel mask support

2010-11-04 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm.c | 15 +++ qemu-kvm.h |6 ++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 733d0a9..ba6db51 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1092,6 +1092,21 @@ int

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

2010-11-04 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 | 161 ++-- 1 files changed, 155 insertions(+), 6 deletions(-) diff --git a/hw/device-assignment.c

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-04 Thread Gleb Natapov
On Wed, Nov 03, 2010 at 06:22:11PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Wed, Nov 03, 2010 at 04:18:18PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Wed, Nov 03, 2010 at 02:39:52PM +0100, Markus Armbruster wrote: Here's

[PATCH v14 05/17] Add a function to indicate if device use external buffer.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/netdevice.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git

[PATCH v14 08/17] Modify netdev_free_page() to release external buffer

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Currently, it can get external buffers from mp device. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/skbuff.h |4 +++- net/core/skbuff.c

[PATCH v14 09/17] Don't do skb recycle, if device use external buffer.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- net/core/skbuff.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net/core/skbuff.c

[PATCH v14 10/17] If device is in zero-copy mode first, bonding will fail.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com If device is in this zero-copy mode first, we cannot handle this, so fail it. This patch is for this. If bonding is created first, and one of the device will be in zero-copy mode, this will be handled by mp device. It will first check if all the slaves

[PATCH v14 13/17] Add mp(mediate passthru) device.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com The patch add mp(mediate passthru) device, which now based on vhost-net backend driver and provides proto_ops to send/receive guest buffers data from/to guest vitio-net driver. It also exports async functions which can be used by other drivers like macvtap

[PATCH v14 14/17] Add a kconfig entry and make entry for mp device.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- drivers/vhost/Kconfig | 10 ++ drivers/vhost/Makefile |2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git

[PATCH v14 17/17] An example how to alloc user buffer based on napi_gro_frags() interface.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com This example is made on ixgbe driver which using napi_gro_frags(). It can get buffers from guest side directly using netdev_alloc_page() and release guest buffers using netdev_free_page(). Signed-off-by: Xin Xiaohui xiaohui@intel.com ---

[PATCH v14 16/17] An example how to modifiy NIC driver to use napi_gro_frags() interface

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com This example is made on ixgbe driver. It provides API is_rx_buffer_mapped_as_page() to indicate if the driver use napi_gro_frags() interface or not. The example allocates 2 pages for DMA for one ring descriptor using netdev_alloc_page(). When packets is

[PATCH v14 15/17]Provides multiple submits and asynchronous notifications.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com The vhost-net backend now only supports synchronous send/recv operations. The patch provides multiple submits and asynchronous notifications. This is needed for zero-copy case. Signed-off-by: Xin Xiaohui xiaohui@intel.com ---

[PATCH v14 12/17] Add header file for mp device.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/mpassthru.h | 133 + 1 files changed, 133

[PATCH v14 11/17] Add a hook to intercept external buffers from NIC driver.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com The hook is called in __netif_receive_skb(). Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- net/core/dev.c | 40 1

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-04 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: On Wed, Nov 03, 2010 at 06:22:11PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Wed, Nov 03, 2010 at 04:18:18PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Wed, Nov 03, 2010 at 02:39:52PM

[PATCH v14 07/17]Modify netdev_alloc_page() to get external buffer

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Currently, it can get external buffers from mp device. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- net/core/skbuff.c | 27

[PATCH v14 06/17] Use callback to deal with skb_release_data() specially.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com If buffer is external, then use the callback to destruct buffers. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- net/core/skbuff.c |8 1 files

[PATCH v14 00/17] Provide a zero-copy method on KVM virtio-net.

2010-11-04 Thread xiaohui . xin
We provide an zero-copy method which driver side may get external buffers to DMA. Here external means driver don't use kernel space to allocate skb buffers. Currently the external buffer can be from guest virtio-net driver. The idea is simple, just to pin the guest VM user space and then let host

[PATCH v14 02/17] Add a new struct for device to manipulate external buffer.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Add a structure in structure net_device, the new field is named as mp_port. It's for mediate passthru (zero-copy). It contains the capability for the net device driver, a socket, and an external buffer creator, external means skb buffer

[PATCH v14 03/17] Add a ndo_mp_port_prep pointer to net_device_ops.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com If the driver want to allocate external buffers, then it can export it's capability, as the skb buffer header length, the page length can be DMA, etc. The external buffers owner may utilize this. Signed-off-by: Xin Xiaohui

[PATCH v14 04/17] Add a function make external buffer owner to query capability.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com The external buffer owner can use the functions to get the capability of the underlying NIC driver. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com ---

[PATCH v14 01/17] Add a new structure for skb buffer from external.

2010-11-04 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/skbuff.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git

Re: [PATCH v14 06/17] Use callback to deal with skb_release_data() specially.

2010-11-04 Thread Eric Dumazet
Le jeudi 04 novembre 2010 à 17:05 +0800, xiaohui@intel.com a écrit : From: Xin Xiaohui xiaohui@intel.com If buffer is external, then use the callback to destruct buffers. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzhao81...@gmail.com Reviewed-by:

Re: [PATCH v14 06/17] Use callback to deal with skb_release_data() specially.

2010-11-04 Thread Eric Dumazet
Le jeudi 04 novembre 2010 à 10:04 +0100, Eric Dumazet a écrit : Hmm, I suggest you read the comment two lines above. If destructor_arg is now cleared each time we allocate a new skb, then, please move it before dataref in shinfo structure, so that the following memset() does the job

Re: [Qemu-devel] [PATCHv2 1/8] Introduce deriver_name field to DeviceInfo structure.

2010-11-04 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: Add deriver_name to DeviceInfo to use in device path building. In Typo deriver. Same in subject. contrast to name driver_name should refer to functionality device provides instead of particular device model like name does. Why is that useful in a device

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-04 Thread Gleb Natapov
On Thu, Nov 04, 2010 at 09:46:57AM +0100, Markus Armbruster wrote: But why order of device creation is important? It shouldn't be if we want to move HW description into config file. We even may allow creating piix3-ide with only second IDE bus, but not first. That's not how buses work in

Re: [Qemu-devel] Re: [PATCHv2 0/8 RFC] boot order specification

2010-11-04 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: On Sun, Oct 31, 2010 at 06:25:53PM -0400, Kevin O'Connor wrote: On Sun, Oct 31, 2010 at 01:40:01PM +0200, Gleb Natapov wrote: This is current sate of the patch series for people to comment on. I tried to use open firmware naming scheme to specify device

Re: [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation

2010-11-04 Thread Michael S. Tsirkin
On Wed, Nov 03, 2010 at 10:38:46PM -0700, Shirley Ma wrote: On Wed, 2010-11-03 at 12:48 +0200, Michael S. Tsirkin wrote: I mean in practice, you see a benefit from this patch? Yes, I tested it. It does benefit the performance. My concern here is whether checking only in set up would be

Re: [Qemu-devel] [PATCHv2 1/8] Introduce deriver_name field to DeviceInfo structure.

2010-11-04 Thread Gleb Natapov
On Thu, Nov 04, 2010 at 10:20:18AM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: Add deriver_name to DeviceInfo to use in device path building. In Typo deriver. Same in subject. Heh. contrast to name driver_name should refer to functionality device provides

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

2010-11-04 Thread Michael S. Tsirkin
On Thu, Nov 04, 2010 at 02:18:21PM +0800, Sheng Yang wrote: 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 | 161 ++-- 1 files changed, 155

Re: [Qemu-devel] Re: [PATCHv2 0/8 RFC] boot order specification

2010-11-04 Thread Gleb Natapov
On Thu, Nov 04, 2010 at 10:24:45AM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Sun, Oct 31, 2010 at 06:25:53PM -0400, Kevin O'Connor wrote: On Sun, Oct 31, 2010 at 01:40:01PM +0200, Gleb Natapov wrote: This is current sate of the patch series for people to

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

2010-11-04 Thread Michael S. Tsirkin
On Thu, Nov 04, 2010 at 02:18:20PM +0800, Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com If you have the energy for cleanups, how about removing most of msi/msix code in device-assignment and using msi.c and msix.c instead? --- hw/device-assignment.c | 77

Re: [PATCH 1/3] qemu-kvm: Ioctl for in-kernel mask support

2010-11-04 Thread Michael S. Tsirkin
On Thu, Nov 04, 2010 at 02:18:19PM +0800, Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm.c | 15 +++ qemu-kvm.h |6 ++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 733d0a9..ba6db51

Re: [PATCH 2/5] PCI: Add mask bit definition for MSI-X table

2010-11-04 Thread Michael S. Tsirkin
On Thu, Nov 04, 2010 at 02:15:18PM +0800, Sheng Yang wrote: Then we can use it instead of magic number 1. Cc: Matthew Wilcox wi...@linux.intel.com Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org Signed-off-by: Sheng Yang sh...@linux.intel.com Looks good to me ---

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

2010-11-04 Thread Michael S. Tsirkin
On Thu, Nov 04, 2010 at 02:18:21PM +0800, Sheng Yang wrote: This patch emulated MSI-X per vector mask bit on assigned device. Signed-off-by: Sheng Yang sh...@linux.intel.com Also pls update the in-tree header for the new ioctls. --- hw/device-assignment.c | 161

[PATCH] KVM: remove unused function declaration

2010-11-04 Thread Xiao Guangrong
Remove the declaration of kvm_mmu_set_base_ptes() Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index

[PATCH 1/3] KVM: MMU: fix missing post sync audit

2010-11-04 Thread Xiao Guangrong
Add AUDIT_POST_SYNC audit for 'root_level == PT64_ROOT_LEVEL' case Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 5275c50..f3fad4f 100644 ---

[PATCH 2/3] KVM: MMU: don not retry #PF for nonpaging guest

2010-11-04 Thread Xiao Guangrong
nonpaing guest's 'direct_map' is also true, retry #PF for those guests is useless, so use 'tdp_enabled' instead Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/x86.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c

[PATCH 3/3] KVM: MMU: retry #PF for softmmu

2010-11-04 Thread Xiao Guangrong
Retry #PF for softmmu only when the current vcpu has the same root shadow page as the time when #PF occurs. it means they have same paging environment. Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h |6 ++ arch/x86/kvm/mmu.c |

Re: [PATCH 2/3] KVM: MMU: don not retry #PF for nonpaging guest

2010-11-04 Thread Gleb Natapov
On Thu, Nov 04, 2010 at 06:32:42PM +0800, Xiao Guangrong wrote: nonpaing guest's 'direct_map' is also true, retry #PF for those guests is useless, so use 'tdp_enabled' instead nonpaging guest will not attempt async pf. And by checking tdp_enabled here instead of direct_map we will screw nested

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-04 Thread Michael S. Tsirkin
On Thu, Nov 04, 2010 at 02:15:21PM +0800, Sheng Yang wrote: This patch enable per-vector mask for assigned devices using MSI-X. This patch provided two new APIs: one is for guest to specific device's MSI-X table address in MMIO, the other is for userspace to get information about mask bit.

vhost-net-next updates

2010-11-04 Thread Michael S. Tsirkin
I pushed out some optimization patches on vhost-net-next branch on my vhost tree (intended for 2.6.38). It would be helpful if people working on vhost-net optimizations base their work on that tree just to make sure comparisons are apples to apples. I might rebase this as I didn't send a pull

Problem booting Microsoft Windows KVM virtual machine

2010-11-04 Thread RaSca
Hi all, I'm having problems with a vm's startup, I cloned the entire disk of a Windows 2000 with dd on a drbd device, that disk was configured with two partitions. I'm able to see all the partitions contents by using kpartx and mount them: # kpartx -l /dev/drbd0 drbd0p1 : 0 202751488

RE: Problem booting Microsoft Windows KVM virtual machine

2010-11-04 Thread Martin Maurer
Hi, Before you begin, prepare the running w2k to use ide disk (and boot on KVM with ide disks) For w2k I followed this link (solution 2 worked for me): http://www.motherboard.windowsreinstall.com/problems.htm And I am using clonezilla live cd´s to do cloning jobs, for me this is a fast and

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-04 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 09:46:57AM +0100, Markus Armbruster wrote: But why order of device creation is important? It shouldn't be if we want to move HW description into config file. We even may allow creating piix3-ide with only second IDE bus, but not

Re: [Qemu-devel] [PATCHv2 1/8] Introduce deriver_name field to DeviceInfo structure.

2010-11-04 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 10:20:18AM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: Add deriver_name to DeviceInfo to use in device path building. In Typo deriver. Same in subject. Heh. contrast to name driver_name should

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-04 Thread Gleb Natapov
On Thu, Nov 04, 2010 at 03:22:50PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 09:46:57AM +0100, Markus Armbruster wrote: But why order of device creation is important? It shouldn't be if we want to move HW description into config file.

Re: [Qemu-devel] [PATCHv2 1/8] Introduce deriver_name field to DeviceInfo structure.

2010-11-04 Thread Gleb Natapov
On Thu, Nov 04, 2010 at 03:58:03PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 10:20:18AM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: Add deriver_name to DeviceInfo to use in device path building. In Typo

Re: qemu-kvm-0.13.0 compile error

2010-11-04 Thread Teck Choon Giam
On Wed, Nov 3, 2010 at 6:00 PM, Ramon Dustet ra...@atrend.eu wrote: Teck Choon Giam giamteckchoon at gmail.com writes: # grep kvm_handle_internal_error ./* ./kvm-all.c:static void kvm_handle_internal_error(CPUState *env, struct kvm_run *run) ./kvm-all.c:            

Re: [PATCH -v2] Monitor command: pfa2hva, translate guest physical address to host virtual address

2010-11-04 Thread Luiz Capitulino
On Mon, 01 Nov 2010 14:22:21 -0500 Anthony Liguori aligu...@linux.vnet.ibm.com wrote: On 11/01/2010 02:20 PM, Huang Ying wrote: Yes. As general interface, it may not work so well, but as test interface, it works quite well and useful. Do we have any mechanism to add a test only

Use of anon_inode_getfd in KVM

2010-11-04 Thread Prasad Joshi
Hello All, I trying to understand the KVM code. In userland code kvm_init() creates a VM by calling kvm_ioctl(KVM_CREATE_VM). The character device ioctl operation (kvm_dev_ioctl). Creates a new VM using kvm_create_vm(). The ioctl call also creates an anonymous file with name 'kvm-vm'. This

Re: [Qemu-devel] qemu-kvm build issue on RHEL5.1

2010-11-04 Thread Chris Wright
* Hidetoshi Seto (seto.hideto...@jp.fujitsu.com) wrote: (2010/10/14 4:11), Blue Swirl wrote: On Wed, Oct 13, 2010 at 8:00 AM, Hidetoshi Seto seto.hideto...@jp.fujitsu.com wrote: (Add CC to k...@vger) (2010/10/12 10:52), Hao, Xudong wrote: Hi, Currently qemu-kvm build fail on RHEL5

Re: [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation

2010-11-04 Thread Shirley Ma
On Thu, 2010-11-04 at 11:30 +0200, Michael S. Tsirkin wrote: One thing to note is that deferred signalling needs to be benchmarked with old guests which don't orphan skbs on xmit (or disable orphaning in both networking stack and virtio-net). Yes, we need run more test. OK, so I guess I'll

Re: [PATCH 1/5] PCI: MSI: Move MSI-X entry definition to pci_regs.h

2010-11-04 Thread Hidetoshi Seto
Yeah, I think there are many virtualization stuff awaiting this change in these days. Reviewed-by: Hidetoshi Seto seto.hideto...@jp.fujitsu.com (2010/11/04 15:15), Sheng Yang wrote: Then it can be used by others. Reviewed-by: Matthew Wilcox wi...@linux.intel.com Cc: Jesse Barnes

Re: [PATCH 2/5] PCI: Add mask bit definition for MSI-X table

2010-11-04 Thread Hidetoshi Seto
(2010/11/04 15:15), Sheng Yang wrote: Then we can use it instead of magic number 1. Cc: Matthew Wilcox wi...@linux.intel.com Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org Signed-off-by: Sheng Yang sh...@linux.intel.com --- drivers/pci/msi.c|4 ++--

[PATCH 49/49] virt/kvm/kvm_main.c: Use vzalloc

2010-11-04 Thread Joe Perches
Signed-off-by: Joe Perches j...@perches.com --- virt/kvm/kvm_main.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5225052..c2a08e6e 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -604,13 +604,10

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

2010-11-04 Thread Sheng Yang
On Thursday 04 November 2010 18:04:08 Michael S. Tsirkin wrote: On Thu, Nov 04, 2010 at 02:18:21PM +0800, Sheng Yang wrote: This patch emulated MSI-X per vector mask bit on assigned device. Signed-off-by: Sheng Yang sh...@linux.intel.com Also pls update the in-tree header for the new

Re: [PATCH 2/5] PCI: Add mask bit definition for MSI-X table

2010-11-04 Thread Sheng Yang
On Thursday 04 November 2010 17:50:29 Michael S. Tsirkin wrote: On Thu, Nov 04, 2010 at 02:15:18PM +0800, Sheng Yang wrote: Then we can use it instead of magic number 1. Cc: Matthew Wilcox wi...@linux.intel.com Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org

Re: [PATCH 2/5] PCI: Add mask bit definition for MSI-X table

2010-11-04 Thread Sheng Yang
On Friday 05 November 2010 08:48:43 Hidetoshi Seto wrote: (2010/11/04 15:15), Sheng Yang wrote: Then we can use it instead of magic number 1. Cc: Matthew Wilcox wi...@linux.intel.com Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org Signed-off-by: Sheng Yang

Re: [PATCH 1/3] qemu-kvm: Ioctl for in-kernel mask support

2010-11-04 Thread Sheng Yang
On Thursday 04 November 2010 17:47:58 Michael S. Tsirkin wrote: On Thu, Nov 04, 2010 at 02:18:19PM +0800, Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm.c | 15 +++ qemu-kvm.h |6 ++ 2 files changed, 21 insertions(+), 0

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-04 Thread Sheng Yang
On Thursday 04 November 2010 18:43:22 Michael S. Tsirkin wrote: On Thu, Nov 04, 2010 at 02:15:21PM +0800, Sheng Yang wrote: This patch enable per-vector mask for assigned devices using MSI-X. This patch provided two new APIs: one is for guest to specific device's MSI-X table address in

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

2010-11-04 Thread Sheng Yang
On Thursday 04 November 2010 17:47:16 Michael S. Tsirkin wrote: On Thu, Nov 04, 2010 at 02:18:20PM +0800, Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com If you have the energy for cleanups, how about removing most of msi/msix code in device-assignment and using msi.c and

[V2 PATCH] virtio-net: init link state correctly

2010-11-04 Thread Jason Wang
For device that supports VIRTIO_NET_F_STATUS, there's no need to assume the link is up and we need to call nerif_carrier_off() before querying device status, otherwise we may get wrong operstate after diver was loaded because the link watch event was not fired as expected. For device that does

[V2 PATCH] virtio-net: init link state correctly

2010-11-04 Thread Jason Wang
Jason Wang writes: CC netdev missed in the original patch. For device that supports VIRTIO_NET_F_STATUS, there's no need to assume the link is up and we need to call nerif_carrier_off() before querying device status, otherwise we may get wrong operstate after diver was loaded because the

[PATCH 05/49] arch/x86: Use vzalloc

2010-11-04 Thread Joe Perches
Signed-off-by: Joe Perches j...@perches.com --- arch/x86/kernel/microcode_amd.c |3 +-- arch/x86/kvm/x86.c |3 +-- arch/x86/mm/pageattr-test.c |3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/microcode_amd.c

[PATCH 03/49] arch/powerpc: Use vzalloc

2010-11-04 Thread Joe Perches
Signed-off-by: Joe Perches j...@perches.com --- arch/powerpc/kvm/book3s.c |6 ++ arch/powerpc/platforms/cell/spufs/lscsa_alloc.c |3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index

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

2010-11-04 Thread Sheng Yang
On Thursday 04 November 2010 17:44:27 Michael S. Tsirkin wrote: Thanks very much for reviewing this! Seems nobody cares about userspace one before... On Thu, Nov 04, 2010 at 02:18:21PM +0800, Sheng Yang wrote: This patch emulated MSI-X per vector mask bit on assigned device.

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-04 Thread Sheng Yang
On Friday 05 November 2010 10:44:19 Sheng Yang wrote: On Thursday 04 November 2010 18:43:22 Michael S. Tsirkin wrote: On Thu, Nov 04, 2010 at 02:15:21PM +0800, Sheng Yang wrote: This patch enable per-vector mask for assigned devices using MSI-X. This patch provided two new APIs: one

Re: [PATCH 05/49] arch/x86: Use vzalloc

2010-11-04 Thread Takuya Yoshikawa
(2010/11/05 12:07), Joe Perches wrote: diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2288ad8..624d4da 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3174,10 +3174,9 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, spin_unlock(kvm-mmu_lock);

Re: [PATCH 49/49] virt/kvm/kvm_main.c: Use vzalloc

2010-11-04 Thread Takuya Yoshikawa
(2010/11/05 12:08), Joe Perches wrote: Signed-off-by: Joe Perchesj...@perches.com --- virt/kvm/kvm_main.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c Already changed to vzalloc(), see kvm.git. Takuya

Re: [PATCH 49/49] virt/kvm/kvm_main.c: Use vzalloc

2010-11-04 Thread Joe Perches
On Fri, 2010-11-05 at 13:25 +0900, Takuya Yoshikawa wrote: (2010/11/05 12:08), Joe Perches wrote: Signed-off-by: Joe Perchesj...@perches.com --- virt/kvm/kvm_main.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/virt/kvm/kvm_main.c

[PATCH 03/49] arch/powerpc: Use vzalloc

2010-11-04 Thread Joe Perches
Signed-off-by: Joe Perches j...@perches.com --- arch/powerpc/kvm/book3s.c |6 ++ arch/powerpc/platforms/cell/spufs/lscsa_alloc.c |3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index