[PATCH v8 0/7] PCI: Linux kernel SR-IOV support

2009-02-10 Thread Yu Zhao
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. SR-IOV

[PATCH v8 1/7] PCI: initialize and release SR-IOV capability

2009-02-10 Thread Yu Zhao
Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/Kconfig | 13 drivers/pci/Makefile |3 + drivers/pci/iov.c| 178 ++ drivers/pci/pci.c|7 ++ drivers/pci/pci.h| 37 ++ drivers/pci/probe.c

[PATCH v8 3/7] PCI: reserve bus range for SR-IOV device

2009-02-10 Thread Yu Zhao
Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/iov.c | 34 ++ drivers/pci/pci.h |5 + drivers/pci/probe.c |3 +++ 3 files changed, 42 insertions(+), 0 deletions(-) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index

[PATCH v8 2/7] PCI: restore saved SR-IOV state

2009-02-10 Thread Yu Zhao
Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/iov.c | 25 + drivers/pci/pci.c |1 + drivers/pci/pci.h |4 3 files changed, 30 insertions(+), 0 deletions(-) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 9a1fabd..bd389b4 100644 ---

[PATCH v8 7/7] PCI: manual for SR-IOV user and driver developer

2009-02-10 Thread Yu Zhao
Signed-off-by: Yu Zhao yu.z...@intel.com --- Documentation/DocBook/kernel-api.tmpl |1 + Documentation/PCI/pci-iov-howto.txt | 106 + 2 files changed, 107 insertions(+), 0 deletions(-) create mode 100644 Documentation/PCI/pci-iov-howto.txt diff --git

[PATCH v8 6/7] PCI: document SR-IOV sysfs entries

2009-02-10 Thread Yu Zhao
Signed-off-by: Yu Zhao yu.z...@intel.com --- Documentation/ABI/testing/sysfs-bus-pci | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index ceddcff..84dc100 100644

[PATCH v8 5/7] PCI: handle SR-IOV Virtual Function Migration

2009-02-10 Thread Yu Zhao
Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/iov.c | 119 +++ drivers/pci/pci.h |4 ++ include/linux/pci.h |6 +++ 3 files changed, 129 insertions(+), 0 deletions(-) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index

[PATCH v8 4/7] PCI: add SR-IOV API for Physical Function driver

2009-02-10 Thread Yu Zhao
Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/iov.c | 336 +++ drivers/pci/pci.h |3 + include/linux/pci.h | 14 ++ 3 files changed, 353 insertions(+), 0 deletions(-) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index

[PATCH] KVM: VMX: Judge MMIO based on PFN rather than HVA in EPT violation

2009-02-10 Thread Sheng Yang
One page can be unmapped from userspace, then HVA seems legal, but in fact, PFN is illegal. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/vmx.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index

[ kvm-Bugs-2584543 ] Migration failed on kvm 83 (regression from 79)

2009-02-10 Thread SourceForge.net
Bugs item #2584543, was opened at 2009-02-10 11:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2584543group_id=180599 Please note that this message will contain a full copy of

[ kvm-Bugs-2584563 ] When binding VNC to a file other options are discarded

2009-02-10 Thread SourceForge.net
Bugs item #2584563, was opened at 2009-02-10 11:19 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2584563group_id=180599 Please note that this message will contain a full copy of

[ kvm-Bugs-2584662 ] No easy way to check kvm version

2009-02-10 Thread SourceForge.net
Bugs item #2584662, was opened at 2009-02-10 11:56 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2584662group_id=180599 Please note that this message will contain a full copy of

Re: [PATCH v2 1/6] PCI: support the ATS capability

2009-02-10 Thread David Woodhouse
On Sun, 2009-01-18 at 12:17 +0800, Yu Zhao wrote: The ATS spec can be found at http://www.pcisig.com/specifications/iov/ats/ (it requires membership). Signed-off-by: Yu Zhao yu.z...@intel.com If I can have an ack from Jesse for the PCI bits (which is basically this patch), I'll take the

Re: [PATCH] KVM: VMX: Judge MMIO based on PFN rather than HVA in EPT violation

2009-02-10 Thread Marcelo Tosatti
Hi Sheng, On Tue, Feb 10, 2009 at 05:43:41PM +0800, Sheng Yang wrote: One page can be unmapped from userspace, then HVA seems legal, but in fact, PFN is illegal. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/vmx.c |6 +++--- 1 files changed, 3 insertions(+), 3

[PATCH 0/4] kvm: fix hot remove device

2009-02-10 Thread Han, Weidong
When hot remove a device with IOMMU, should deassign it from guest and free it from qemu. Currently, a device cannot work when it is hot added twice with IOMMU (hot add - hot remove - hot add). This patchset fixes this issue. Regards, Weidong-- To unsubscribe from this list: send the line

[PATCH 1/4] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT

2009-02-10 Thread Han, Weidong
define KVM_CAP_DEVICE_DEASSIGNMENT and KVM_DEASSIGN_PCI_DEVICE for device deassignment. Signed-off-by: Weidong Han weidong@intel.com --- include/linux/kvm.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index

[PATCH 2/4] kvm: change a loglevel in kvm_vm_ioctl_deassign_device

2009-02-10 Thread Han, Weidong
change from KERN_INFO to KERN_WARNING to prompt users when deassign an unassigned device Signed-off-by: Weidong Han weidong@intel.com --- virt/kvm/kvm_main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index

[PATCH 3/4] kvm: libkvm: add deassign ioctl

2009-02-10 Thread Han, Weidong
add this ioctl to deassign a device from guest Signed-off-by: Weidong Han weidong@intel.com --- libkvm/libkvm.c | 14 ++ libkvm/libkvm.h | 13 + 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index

[PATCH 4/4] kvm: qemu: fix hot remove device

2009-02-10 Thread Han, Weidong
when hot remove a device with iommu, should deassign it from guest, and free it from qemu. assign_dev_update_irqs may not be invoked when hot add a device, so need to assign irq after assign device in init_assigned_device. Signed-off-by: Weidong Han weidong@intel.com ---

Re: [PATCH 2/2] show hypervisor information on sysfs

2009-02-10 Thread Glauber Costa
On Sat, Feb 07, 2009 at 11:43:31AM +0100, Heiko Carstens wrote: On Fri, 6 Feb 2009 10:46:57 -0500 Glauber Costa glom...@redhat.com wrote: It is useful to easily grab information about whether or not we're running on top of a hypervisor. And in case affirmative, which one. This

Re: [PATCH 2/2] show hypervisor information on sysfs

2009-02-10 Thread Heiko Carstens
On Tue, 10 Feb 2009 11:20:23 -0200 Glauber Costa glom...@redhat.com wrote: Anyway, just wanted to make you aware of what might come next. Why wouldn't it be extensible? So far, I've only added an attribute. But we can easily add others, and directories with even more attributes if we must.

Re: [PATCH 1/4] Fix GPE registers read/write handling.

2009-02-10 Thread Glauber Costa
On Mon, Feb 09, 2009 at 03:58:52PM +0200, Avi Kivity wrote: Gleb Natapov wrote: For STS register bit are cleared by writing 1 into it. Patchset looks good; however this is a touchy area. Marcelo or glommer, can you also review it? I took a look at the first version, and aside for the

kvm network performance

2009-02-10 Thread Riccardo Veraldi
Hello, I am using kvm83 on Centos 5.2 I did some iperf test on my kvm guest and I got the following results over a 1GB connection: ~650Mbit/s inbound ~250Mbit/s outbound that is performance appears to be asymmetric. Is this normal ? The inbound data flow is quite impressive as performance

KVM: x86: disable kvmclock on non constant TSC hosts

2009-02-10 Thread Marcelo Tosatti
Currently, this code path is posing us big troubles, and we won't have a decent patch in time. So, temporarily disable it. There's a module parameter for the adventurous who want to force it. Signed-off-by: Glauber Costa glom...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com ---

[PATCH 0/4] qemu: TAP filtering support

2009-02-10 Thread Alex Williamson
This series adds infrastructure and support for using the filtering support built into recent Linux kernels. The tap device currently provides a small array for exact MAC address matches, plus a hash for inexact multicast addresses. By programing this filter, we can reduce the number of

[PATCH 1/4] qemu:net: Add infrastructure for setting an RX filter through the vlan

2009-02-10 Thread Alex Williamson
Some interfaces, such as tap, can set a filter to prevent unwanted packets from interrupting qemu. This patch adds infrastructure for vlan clients to request a set of filtering parameters. The main client interface for this is the new qemu_vlan_rxfilter() function. For simplicity, we restrict

[PATCH 2/4] qemu:net: Add TAP support for RX filtering on Linux

2009-02-10 Thread Alex Williamson
The Linux tap driver provides an ioctl to set a TX filter. Setting this restricts the packets received onto the vlan. We provide a hotplug callback to clear the filter when a new device gets added. The new rxfilter=off option can be used to disable exporting this feature to backend drivers.

[PATCH 4/4] qemu:e1000: Add support for qemu_vlan_rxfilter

2009-02-10 Thread Alex Williamson
Make use of qemu_vlan_rxfilter so that we can filter at a lower level. We implement callbacks for devices being added and removed so that we can fall back to our own filtering or make another attempt to push filtering off to someone else. Signed-off-by: Alex Williamson alex.william...@hp.com ---

[PATCH 3/4] qemu:virtio-net: Add support for qemu_vlan_rxfilter

2009-02-10 Thread Alex Williamson
Make use of qemu_vlan_rxfilter so that we can filter at a lower level. We implement callbacks for devices being added and removed so that we can fall back to our own filtering or make another attempt to push filtering off to someone else. Signed-off-by: Alex Williamson alex.william...@hp.com ---

KVM: guest: only batch user pte updates

2009-02-10 Thread Marcelo Tosatti
KVM's paravirt mmu pte batching has issues with, at least, kernel updates from DEBUG_PAGEALLOC. This has been experienced with slab allocation from irq context from within lazy mmu sections: https://bugzilla.redhat.com/show_bug.cgi?id=480822 DEBUG_PAGEALLOC will map/unmap the kernel pagetables

Re: KVM: guest: only batch user pte updates

2009-02-10 Thread Jeremy Fitzhardinge
Marcelo Tosatti wrote: KVM's paravirt mmu pte batching has issues with, at least, kernel updates from DEBUG_PAGEALLOC. This has been experienced with slab allocation from irq context from within lazy mmu sections: https://bugzilla.redhat.com/show_bug.cgi?id=480822 DEBUG_PAGEALLOC will

Re: KVM: guest: only batch user pte updates

2009-02-10 Thread Marcelo Tosatti
On Tue, Feb 10, 2009 at 02:17:49PM -0800, Jeremy Fitzhardinge wrote: Marcelo Tosatti wrote: KVM's paravirt mmu pte batching has issues with, at least, kernel updates from DEBUG_PAGEALLOC. This has been experienced with slab allocation from irq context from within lazy mmu sections:

KVM: x86: disable kvmclock on non constant TSC hosts

2009-02-10 Thread Marcelo Tosatti
This is better. Currently, this code path is posing us big troubles, and we won't have a decent patch in time. So, temporarily disable it. Signed-off-by: Glauber Costa glom...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: kvm/arch/x86/kvm/x86.c

Re: KVM: guest: only batch user pte updates

2009-02-10 Thread Jeremy Fitzhardinge
Marcelo Tosatti wrote: On Tue, Feb 10, 2009 at 02:17:49PM -0800, Jeremy Fitzhardinge wrote: Marcelo Tosatti wrote: KVM's paravirt mmu pte batching has issues with, at least, kernel updates from DEBUG_PAGEALLOC. This has been experienced with slab allocation from irq context from

Recent kvm and vmware server comparisons?

2009-02-10 Thread Thomas Fjellstrom
I've temporarily got vmware server running on my new server, and intend to migrate over to kvm as soon as possible, if it provides enough incentive (extra performance, features). Currently I'm waiting for full iommu support in the kernel, modules and userspace, and didn't plan to migrate till I

Re: [PATCH] KVM: VMX: Judge MMIO based on PFN rather than HVA in EPT violation

2009-02-10 Thread Sheng Yang
On Tuesday 10 February 2009 20:14:32 Marcelo Tosatti wrote: Hi Sheng, On Tue, Feb 10, 2009 at 05:43:41PM +0800, Sheng Yang wrote: One page can be unmapped from userspace, then HVA seems legal, but in fact, PFN is illegal. Signed-off-by: Sheng Yang sh...@linux.intel.com ---

Re: [PATCH] KVM: VMX: Judge MMIO based on PFN rather than HVA in EPT violation

2009-02-10 Thread Sheng Yang
On Wednesday 11 February 2009 10:43:43 Sheng Yang wrote: On Tuesday 10 February 2009 20:14:32 Marcelo Tosatti wrote: Hi Sheng, On Tue, Feb 10, 2009 at 05:43:41PM +0800, Sheng Yang wrote: One page can be unmapped from userspace, then HVA seems legal, but in fact, PFN is illegal.

[PATCH] KVM: VMX: Use kvm_mmu_page_fault() handle EPT violation

2009-02-10 Thread Sheng Yang
Removed the unnecessary works. Thanks for Marcelo's reminder. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/vmx.c | 27 +-- 1 files changed, 1 insertions(+), 26 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 9913a1d..8704d36

[PATCH] KVM: VMX: Use kvm_mmu_page_fault() handle EPT violation

2009-02-10 Thread Sheng Yang
Removed the unnecessary works. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/vmx.c | 30 +- 1 files changed, 1 insertions(+), 29 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 9913a1d..ff2cb11 100644 ---

qcow2 corruption observed, fixed by reverting old change

2009-02-10 Thread Jamie Lokier
Hi, As you see from the subject, I'm getting qcow2 corruption. I have a Windows 2000 guest which boots and runs fine in kvm-72, fails with a blue-screen indicating file corruption errors in kvm-73 through to kvm-83 (the latest), and succeeds if I replace block-qcow2.c with the version from