Re: [PATCH 6/6] Nested SVM: Improve interrupt injection

2009-05-17 Thread Gleb Natapov
On Fri, May 15, 2009 at 10:22:20AM +0200, Alexander Graf wrote: static void svm_set_irq(struct kvm_vcpu *vcpu, int irq) { struct vcpu_svm *svm = to_svm(vcpu); - nested_svm_intr(svm); + if(!(svm-vcpu.arch.hflags HF_GIF_MASK)) + return; Why would this

Re: [PATCH 6/6] Nested SVM: Improve interrupt injection

2009-05-17 Thread Alexander Graf
On 17.05.2009, at 08:48, Gleb Natapov g...@redhat.com wrote: On Fri, May 15, 2009 at 10:22:20AM +0200, Alexander Graf wrote: static void svm_set_irq(struct kvm_vcpu *vcpu, int irq) { struct vcpu_svm *svm = to_svm(vcpu); -nested_svm_intr(svm); +if(!(svm-vcpu.arch.hflags

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Gleb Natapov
On Fri, May 15, 2009 at 08:14:43AM -0400, Glauber Costa wrote: This patch sets bits 1 in disabled processor's _STA. According to the ACPI spec, this bit means: Set if the device is enabled and decoding its resources. Without it, Windows 2008 device manager shows the processors as

[ kvm-Bugs-2792656 ] System freeze after modprobe kvm-intel

2009-05-17 Thread SourceForge.net
Bugs item #2792656, was opened at 2009-05-16 15:32 Message generated for change (Comment added) made by avik You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2792656group_id=180599 Please note that this message will contain a full copy of the comment

Re: event injection MACROs

2009-05-17 Thread Gleb Natapov
On Fri, May 15, 2009 at 03:57:44PM +0800, Dong, Eddie wrote: And what if INTA already happened and CPU is ready to fetch IDT for interrupt vector and at this very moment CPU faults? If INTA happens, that means it is delivered. If its delivery triggers another exception, that is what

Re: [PATCH 2/6] MMU: don't bail on PAT bits in PTE

2009-05-17 Thread Avi Kivity
Joerg Roedel wrote: Subject: [PATCH] kvm/mmu: fix reserved bit checking on 4kb pte level The reserved bits checking code looks at bit 7 of the pte to determine if it has to use the mask for a large pte or a normal pde. This does not work on 4kb pte level because bit 7 is used there for PAT.

Re: [PATCH 4/6] Implement Hyper-V MSRs

2009-05-17 Thread Avi Kivity
Alexander Graf wrote: Hyper-V uses some MSRs, some of which are actually reserved for BIOS usage. But let's be nice today and have it its way, because otherwise it fails terribly. For MSRs where I could find a name I used the name, otherwise they're just added in their hex form for now.

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Glauber Costa
On Sun, May 17, 2009 at 11:23:47AM +0300, Gleb Natapov wrote: On Fri, May 15, 2009 at 08:14:43AM -0400, Glauber Costa wrote: This patch sets bits 1 in disabled processor's _STA. According to the ACPI spec, this bit means: Set if the device is enabled and decoding its resources.

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Gleb Natapov
On Sun, May 17, 2009 at 10:27:41AM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 11:23:47AM +0300, Gleb Natapov wrote: On Fri, May 15, 2009 at 08:14:43AM -0400, Glauber Costa wrote: This patch sets bits 1 in disabled processor's _STA. According to the ACPI spec, this bit means:

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Gleb Natapov
On Sun, May 17, 2009 at 11:31:07AM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 11:23:47AM +0300, Gleb Natapov wrote: On Fri, May 15, 2009 at 08:14:43AM -0400, Glauber Costa wrote: This patch sets bits 1 in disabled processor's _STA. According to the ACPI spec, this bit means:

[RFC] KVM-Autotest: basic parallel test execution

2009-05-17 Thread Michael Goldish
Hi all, We've recently implemented a very simple form of parallel test execution into KVM-Autotest and we'd like some feedback on it. This suggestion allows the user to manually assign tests to hosts/queues. It also takes care of assigning different MAC address ranges to hosts/queues. By

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Glauber Costa
On Sun, May 17, 2009 at 05:30:06PM +0300, Gleb Natapov wrote: On Sun, May 17, 2009 at 10:27:41AM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 11:23:47AM +0300, Gleb Natapov wrote: On Fri, May 15, 2009 at 08:14:43AM -0400, Glauber Costa wrote: This patch sets bits 1 in disabled

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Glauber Costa
On Sun, May 17, 2009 at 05:32:35PM +0300, Gleb Natapov wrote: On Sun, May 17, 2009 at 11:31:07AM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 11:23:47AM +0300, Gleb Natapov wrote: On Fri, May 15, 2009 at 08:14:43AM -0400, Glauber Costa wrote: This patch sets bits 1 in disabled

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Gleb Natapov
On Sun, May 17, 2009 at 12:06:22PM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 05:30:06PM +0300, Gleb Natapov wrote: On Sun, May 17, 2009 at 10:27:41AM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 11:23:47AM +0300, Gleb Natapov wrote: On Fri, May 15, 2009 at 08:14:43AM

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Gleb Natapov
On Sun, May 17, 2009 at 12:07:27PM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 05:32:35PM +0300, Gleb Natapov wrote: On Sun, May 17, 2009 at 11:31:07AM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 11:23:47AM +0300, Gleb Natapov wrote: On Fri, May 15, 2009 at 08:14:43AM

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Glauber Costa
On Sun, May 17, 2009 at 06:21:45PM +0300, Gleb Natapov wrote: On Sun, May 17, 2009 at 12:06:22PM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 05:30:06PM +0300, Gleb Natapov wrote: On Sun, May 17, 2009 at 10:27:41AM -0300, Glauber Costa wrote: On Sun, May 17, 2009 at 11:23:47AM

[PATCH 0/17][REVIEW] Backport candidates for stable-0.10

2009-05-17 Thread Anthony Liguori
This is a set of patches from master that I think are candidates for the stable-0.10 branch. They're all KVM specific. I tried to be conservative and didn't include any ia64, PPC, or passthrough fixes. I don't know the state of those subsystems well enough to judge whether the commits help or

[PATCH 01/17] kvm: libkvm: protect irq injection status code with KVM_CAP_IRQ_INJECT_STATUS

2009-05-17 Thread Anthony Liguori
From: Gleb Natapov g...@redhat.com Fixes builds with older kernel headers. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com diff --git a/kvm/libkvm/libkvm.c b/kvm/libkvm/libkvm.c index 0ac1c28..7c65f31

[PATCH 02/17] kvm: testsuite: compile fix - avoid raw string literal

2009-05-17 Thread Anthony Liguori
From: Jochen Roth jr...@linux.vnet.ibm.com This patch fixes compilation problems of kvm-userspace on current gcc 4.4 compilers which implement the following standard: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm Signed-off-by: Jochen Roth jr...@linux.vnet.ibm.com

[PATCH 03/17] Fix build breakage on non-device-deassignment capable host kernels

2009-05-17 Thread Anthony Liguori
From: Han, Weidong weidong@intel.com kvm_deassign_pci_device is defined when KVM_CAP_DEVICE_DEASSIGNMENT is defined. Signed-off-by: Weidong Han weidong@intel.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com diff --git

[PATCH 04/17] kvm: extboot: Update number of HDs reported by BIOS

2009-05-17 Thread Anthony Liguori
From: Gleb Natapov g...@redhat.com The Vista boot loaded expects the bios to report a correct count of the bootable disks; and extboot disks are bootable. This fixes Vista boot from virtio-blk issue. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com

[PATCH 07/17] Fixup 4GB+ memslot large page alignment

2009-05-17 Thread Anthony Liguori
From: Marcelo Tosatti mtosa...@redhat.com Need to align the 4GB+ memslot after we know its address, not before. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com diff --git a/hw/pc.c b/hw/pc.c index

[PATCH 08/17] Clear tap features on initialization

2009-05-17 Thread Anthony Liguori
From: Avi Kivity a...@redhat.com tap features change how tap interprets data, so they must be cleared on initialization to prevent old settings from interfering with new guest instances. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com diff --git

[PATCH 10/17] Support unregistering memory regions larger than a slot

2009-05-17 Thread Anthony Liguori
From: Avi Kivity a...@redhat.com Unbreaks vga text mode after switching from graphics mode. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com diff --git a/qemu-kvm.c b/qemu-kvm.c index fab00ac..10e2caa 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@

[PATCH 11/17] net: drop packet from tap device if all NICs are down

2009-05-17 Thread Anthony Liguori
From: Mark McLoughlin mar...@redhat.com If you do e.g. set_link virtio.0 down and there are packets pending on the tap interface, we currently buffer a packet and constantly try and send it until the link is up again. We actually just want to drop the packet if the NIC is down. Upstream qemu

[PATCH 11/17] net: drop packet from tap device if all NICs are down

2009-05-17 Thread Anthony Liguori
From: Mark McLoughlin mar...@redhat.com If you do e.g. set_link virtio.0 down and there are packets pending on the tap interface, we currently buffer a packet and constantly try and send it until the link is up again. We actually just want to drop the packet if the NIC is down. Upstream qemu

[PATCH 12/17] Increment virtio-net savevm version to avoid conflict with upstream QEMU.

2009-05-17 Thread Anthony Liguori
When TAP_VNET_HDR eventually merges into upstream QEMU, it cannot change the format of the version 6 savevm data. This means that we're going to have to bump the version up to 7. I'm happy to reserve version 7 as having TAP_VNET_HDR support to allow time to include this support in upstream QEMU.

[PATCH 13/17] Increment version id for CPU save state

2009-05-17 Thread Anthony Liguori
9 is reserved for KVM. KVM cannot support migration from any other version. [aliguori: incorporated Glauber's fix for save/restore breakage] Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/target-i386/cpu.h b/target-i386/cpu.h index

[PATCH 15/17] Fix loading extboot option rom

2009-05-17 Thread Anthony Liguori
From: Avi Kivity a...@redhat.com The buffer that is used to store the extboot filename is later overwritten by the vga rom loading code. Use strdup() to keep our filename. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com diff --git a/hw/pc.c

[PATCH 16/17] virtio-net: Make save/load format independent of build options

2009-05-17 Thread Anthony Liguori
From: Alex Williamson alex.william...@hp.com We can't rely on build switches to tell us if a save image includes a given field. Signed-off-by: Alex Williamson alex.william...@hp.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com diff --git

[PATCH 14/17] Fix build when objdir != srcdir

2009-05-17 Thread Anthony Liguori
This requires adding the necessary bits to configure to create the directories and symlinks for libkvm. It also requires sticking KVM_CFLAGS in config-host.mak to ensure that it gets the right set of includes for the kernel headers. Signed-off-by: Anthony Liguori aligu...@us.ibm.com

[PATCH 17/17] virtio-net: Refuse loading if the source requires vnet header and the host doesn't support it

2009-05-17 Thread Anthony Liguori
From: Alex Williamson alex.william...@hp.com Bail if the saved image requires vnet header support. Signed-off-by: Alex Williamson alex.william...@hp.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com diff --git a/hw/virtio-net.c b/hw/virtio-net.c

Re: [PATCH 0/17][REVIEW] Backport candidates for stable-0.10

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: kvm-stable-start is a local tag to: commit 8d890e234cdf5860395c4cb93b831ae37aab41e9 Author: Zhang, Yang yang.zh...@intel.com Date: Thu Mar 5 15:10:22 2009 +0800 kvm: external module: add kvm-ia64.c to hack files list As best I can tell, the is the point

Re: [PATCH 01/17] kvm: libkvm: protect irq injection status code with KVM_CAP_IRQ_INJECT_STATUS

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: From: Gleb Natapov g...@redhat.com Fixes builds with older kernel headers. Since we build with a specific set of headers now (rather that 'make sync'), this isn't necessary. -- error compiling committee.c: too many arguments to function -- To unsubscribe from

Re: [PATCH 03/17] Fix build breakage on non-device-deassignment capable host kernels

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: From: Han, Weidong weidong@intel.com kvm_deassign_pci_device is defined when KVM_CAP_DEVICE_DEASSIGNMENT is defined. Unneeded, since the headers are carried in qemu-kvm.git. -- error compiling committee.c: too many arguments to function -- To unsubscribe from

Re: [PATCH 05/17] Stop/start cpus before/after devices

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: From: Yaniv Kamay ya...@qumranet.com Stop cpus before devices when stopping the VM, start cpus after devices when starting VM. Otherwise a vcpu could access a stopped device. IIRC we decided this was unnecessary since everything is under qemu_mutex. However we

Re: [PATCH 10/17] Support unregistering memory regions larger than a slot

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: From: Avi Kivity a...@redhat.com Unbreaks vga text mode after switching from graphics mode. I think this was caused by a merge (and indeed the immediately preceding commit is a merge), so this is likely unneeded. -- error compiling committee.c: too many arguments

Re: [PATCH 13/17] Increment version id for CPU save state

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: 9 is reserved for KVM. KVM cannot support migration from any other version. [aliguori: incorporated Glauber's fix for save/restore breakage] Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com I reverted this in master, so

Re: [PATCH 15/17] Fix loading extboot option rom

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: From: Avi Kivity a...@redhat.com The buffer that is used to store the extboot filename is later overwritten by the vga rom loading code. Use strdup() to keep our filename. This is a post-merge fixed, so likely unneeded on stable-0.10. Would be good to check

Re: [PATCH 0/17][REVIEW] Backport candidates for stable-0.10

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: This is a set of patches from master that I think are candidates for the stable-0.10 branch. They're all KVM specific. I tried to be conservative and didn't include any ia64, PPC, or passthrough fixes. I don't know the state of those subsystems well enough to judge

Re: [PATCH 1/2] Clean up MADT Table Creation

2009-05-17 Thread Avi Kivity
Beth Kon wrote: This patch is based on the recent patch from Vincent Minet. I split Vincent's changes into 2 patches (to separate MADT and RSDT table cleanup, as suggested by Marcelo) and added a bit to them. And to give credit where it is due, this cleanup is also related to the patch Marcelo

Re: [PATCH] kmod: Update .gitignore

2009-05-17 Thread Avi Kivity
Jan Kiszka wrote: Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- .gitignore | 118 +++- Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list:

Re: [PATCH v3] kmod: Add distclean rule

2009-05-17 Thread Avi Kivity
Jan Kiszka wrote: The smaller the patch... sigh. Remove the configure output config.kbuild, config.mak and arch links via distclean. Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list:

Re: [PATCH -tip] x86: kvm replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h

2009-05-17 Thread Avi Kivity
Jaswinder Singh Rajput wrote: If this patch looks sane to you can apply in kvm tree. Here is the updated patch based on kvm tree: [PATCH] x86: kvm replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h Use standard msr-index.h's MSR declaration. MSR_IA32_TSC is better than

Re: [PATCH -tip] x86: kvm/x86.c use MSR names in place of address

2009-05-17 Thread Avi Kivity
Jaswinder Singh Rajput wrote: [PATCH -tip] x86: kvm/x86.c use MSR names in place of address Replace 0xc0010010 with MSR_K8_SYSCFG and 0xc0010015 with MSR_K7_HWCR. Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe

Re: [RFC] KVM-Autotest: basic parallel test execution

2009-05-17 Thread Avi Kivity
Michael Goldish wrote: Drawbacks: - requires some initial work to be done by the user -- the user has to define exactly where each test should run For me, this is a major drawback. I'd really like a fire-and-forget solution. If I have to spend my own time getting this to work, vs.

Re: virtio_net with RSS?

2009-05-17 Thread Avi Kivity
Fischer, Anna wrote: Are there any plans to enhance virtio_net with receive-side scaling capabilities, so that an SMP guest OS can balance its network processing load more equally across multiple CPUs? Yes, the MSI-X patches are the first steps towards this. We will enable each queue to

Re: PCI pass-through of multi-function device

2009-05-17 Thread Avi Kivity
Fischer, Anna wrote: Does KVM allow passing through a full multi-function PCI device to a guest, and make that device appear as a whole multi-function device rather than as multiple PCI single-function devices (e.g. Xen only does the latter where all PCI devices appear with function ID being

Re: KVM 10/Gb Ethernet PCIe passthrough with Linux/iSCSI and large block sizes

2009-05-17 Thread Avi Kivity
Nicholas A. Bellinger wrote: Greetings all, The first test results for Linux/iSCSI Initiators and targets for large block sizes using 10 Gb/sec Ethernet + PCIe device-passthrough into Linux/KVM guests have been posted at: http://linux-iscsi.org/index.php/KVM-LIO-Target So far, the results

Re: [PATCH 3/6] Emulator: Inject #PF when page was not found

2009-05-17 Thread Avi Kivity
Alexander Graf wrote: If we couldn't find a page on read_emulated, it might be a good idea to tell the guest about that and inject a #PF. We do the same already for write faults. I don't know why it was not implemented for reads. I can't think why it was done for writes. Normally, a

Re: [PATCH 4/6] Implement Hyper-V MSRs

2009-05-17 Thread Avi Kivity
Alexander Graf wrote: case MSR_VM_CR: +case 0x4081: *data = 0; break; This probably is a Hyper-V MSR, but I don't see how it expects it to be present in real hardware. Are you sure this is really needed? Well hyper-v just crashes/reboots if it get a #gp on that

Re: [PATCH 5/6] Nested SVM: Implement INVLPGA

2009-05-17 Thread Avi Kivity
Avi Kivity wrote: Hmm, since we flush the TLB on every nested-guest entry I think we can make this function a nop. I think, unless it specified ASID 0? In that case you need a local tlb flush. (the kvm_mmu_reset_context() and kvm_mmu_load() are total overkills in any case). Oh,

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Avi Kivity
Gleb Natapov wrote: Theoretically we can provide different values for different OSes, but this is just a guess work since there is no any documentation how CPU hot-plug should work on x86. ACPI in fact supports this, but I hope we don't have to do that. -- Do not meddle in the internals

Re: [KVM PATCH v2 2/4] kvm: add return value to kvm_io_bus_register_dev

2009-05-17 Thread Avi Kivity
Gregory Haskins wrote: Today this function returns void and will internally BUG_ON if it fails. We want to create dynamic MMIO/PIO entries driven from userspace later in the series, so enhance this API to return an error code on failure. We also fix up all the callsites to check the return code

Re: [KVM PATCH v2 4/4] kvm: add iosignalfd support

2009-05-17 Thread Avi Kivity
Gregory Haskins wrote: + +struct _iosignalfd { Why the underscore? It's unorthodox for a structure. + u64 cookie; + u64 addr; + size_t length; + struct file *file; + struct list_head list; +

Re: RFC: convert KVMTRACE to event traces

2009-05-17 Thread Avi Kivity
Marcelo Tosatti wrote: On Fri, May 15, 2009 at 01:10:34PM -0400, Christoph Hellwig wrote: On Thu, May 14, 2009 at 05:30:16PM -0300, Marcelo Tosatti wrote: + trace_kvm_cr_write(cr, val); switch (cr) { case 0: -

Re: [PATCH 3/6] Emulator: Inject #PF when page was not found

2009-05-17 Thread Alexander Graf
On 17.05.2009, at 21:59, Avi Kivity a...@redhat.com wrote: Alexander Graf wrote: If we couldn't find a page on read_emulated, it might be a good idea to tell the guest about that and inject a #PF. We do the same already for write faults. I don't know why it was not implemented for reads.

Re: KVM_HYPERCALL

2009-05-17 Thread Avi Kivity
Kumar, Venkat wrote: I am making a hypercall kvm_hypercall0 with number 0 from a Linux guest. But I don't see the control coming to handle_vmcall or even kvm_handle_exit. What could be the reason? No idea. kvm_handle_exit() is called very frequently, even without hypercalls. Are you

Re: profiling virtio (blk in this case)

2009-05-17 Thread Avi Kivity
Eran Rom wrote: The Host--Guest calls in virtio_blk (using the generic virtio kick/notify) are as follows: Guest-Host --- do_virtlkb_request calls kick in the guest side causing handle_output to be called on the host side. Host-Guest --- virtio_blk_rw_complete calls notify in

Re: [PATCH 4/6] Implement Hyper-V MSRs

2009-05-17 Thread Alexander Graf
On 17.05.2009, at 22:00, Avi Kivity a...@redhat.com wrote: Alexander Graf wrote: case MSR_VM_CR: +case 0x4081: *data = 0; break; This probably is a Hyper-V MSR, but I don't see how it expects it to be present in real hardware. Are you sure this is really needed?

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-17 Thread Avi Kivity
Alex Williamson wrote: On Wed, 2009-05-13 at 08:33 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 08:15 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 16:55 +0300, Michael S. Tsirkin wrote: Very surprising: I haven't seen any driver disable MSI expect on device

Re: [PATCH v3] kvm: Use a bitmap for tracking used GSIs

2009-05-17 Thread Avi Kivity
Alex Williamson wrote: On Wed, 2009-05-13 at 10:04 +0300, Michael S. Tsirkin wrote: On Tue, May 12, 2009 at 04:07:15PM -0600, Alex Williamson wrote: @@ -286,6 +289,9 @@ kvm_context_t kvm_init(struct kvm_callbacks *callbacks, int fd; kvm_context_t kvm; int r;

Re: [PATCH v5] kvm: Use a bitmap for tracking used GSIs

2009-05-17 Thread Avi Kivity
Michael S. Tsirkin wrote: +#ifdef KVM_IOAPIC_NUM_PINS I think we should just export #define KVM_IOAPIC_NUM_PINS 0 for ppc in kernel headers (or in libkvm), and get rid of this ifdef completely. Avi, agree? ppc doesn't have an ioapic, so it shouldn't have this define. -- Do not

Re: [PATCH v6] kvm: Use a bitmap for tracking used GSIs

2009-05-17 Thread Avi Kivity
Alex Williamson wrote: We're currently using a counter to track the most recent GSI we've handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device assignment with a driver that regularly toggles the MSI enable bit. This can mean only a few minutes of usable run time. Instead, track

Re: [PATCH 3/6] Emulator: Inject #PF when page was not found

2009-05-17 Thread Avi Kivity
Alexander Graf wrote: I can't think why it was done for writes. Normally, a guest page fault would be trapped and reflected a long time before emulation, in FNAME(page_fault)(), after walk_addr(). Can you give some details on the situation? What instruction was executed, and why kvm

Re: [PATCH 0/6] Add rudimentary Hyper-V guest support

2009-05-17 Thread Avi Kivity
Alexander Graf wrote: In order to find out why things were slow with nested SVM I hacked intercept reporting into debugfs in my local tree and found pretty interesting results (using NPT): [...] So apparently the most intercepts come from the SVM helper calls (clgi, stgi, vmload, vmsave).

Re: Network I/O performance

2009-05-17 Thread Avi Kivity
Fischer, Anna wrote: Subject: Re: Network I/O performance Fischer, Anna wrote: I am running KVM with Fedora Core 8 on a 2.6.23 32-bit kernel. I use the tun/tap device model and the Linux bridge kernel module to connect my VM to the network. I have 2 10G Intel 82598 network devices

Re: Problem doing pci passthrough of the network card without VT-d

2009-05-17 Thread Avi Kivity
Passera, Pablo R wrote: Hi Anna, Are you expecting this to work using the 1:1 mapping for direct device assignment? Actually, I want to use the current qemu implementation for this. AFAIK from the code seems that qemu mmaps the device memory into the qemu pci subsystem memory

Re: [PATCHv6 4/4] virtio_pci: optional MSI-X support

2009-05-17 Thread Avi Kivity
Michael S. Tsirkin wrote: This implements optional MSI-X support in virtio_pci. MSI-X is used whenever the host supports at least 2 MSI-X vectors: 1 for configuration changes and 1 for virtqueues. Per-virtqueue vectors are allocated if enough vectors available. +static int

Re: XP smp using a lot of CPU

2009-05-17 Thread Avi Kivity
Erik Rull wrote: Hi all, very very interesting. I have a similar problem but the other way round. If my XP runs up tp 100% CPU usage top on the linux host reports only 33% cpu usage. I would expect around 50% because I only provide one core for the guest. I already increased the process

Re: [PATCH v2] Shared memory device with interrupt support

2009-05-17 Thread Avi Kivity
Cam Macdonell wrote: I don't think so. With the mmap call, I specify MAP_FIXED which requires that the memory in the shared memory object be mapped to the address given in the first parameter (s-ivshmem_ptr). If MAP_FIXED is not specified then mmap would allocate the memory and map on to

Re: [PATCH v2] Shared memory device with interrupt support

2009-05-17 Thread Avi Kivity
Cam Macdonell wrote: If my understanding is correct both the VM's who wants to communicate would gives this path in the command line with one of them specifying as server. Exactly, the one with the server in the parameter list will wait for a connection before booting. hm, we may be able

Re: [PATCH] kvm: user: include arch specific headers from $(KERNELDIR)

2009-05-17 Thread Avi Kivity
Mark McLoughlin wrote: Currently we only include $(KERNELDIR)/include in CFLAGS, but we also have $(KERNELDIR)/arch/$(arch)/include or else we'll get mis-matched headers. Signed-off-by: Mark McLoughlin mar...@redhat.com --- kvm/user/config-i386.mak |1 - kvm/user/config-ia64.mak

Re: [PATCH 1/6] kvm-s390: Fix memory slot versus run

2009-05-17 Thread Avi Kivity
Christian Ehrhardt wrote: The bad thing on vcpu-request in that case is that I don't want the async behaviour of vcpu-requests in that case, I want the memory slot updated in all vcpu's when the ioctl is returning. You mean, the hardware can access the vcpu control block even when the vcpu

Re: [PATCH] KVM: fix cpuid E2BIG handling for extended request types

2009-05-17 Thread Avi Kivity
Mark McLoughlin wrote: If we run out of cpuid entries for extended request types we should return -E2BIG, just like we do for the standard request types. Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this

Re: [PATCH] Work around supported cpuid ioctl() brokenness

2009-05-17 Thread Avi Kivity
Mark McLoughlin wrote: KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG when it runs out of entries. Detect this by always trying again with a bigger table if the ioctl() fills the table. Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and

Re: [PATCH 0/17][REVIEW] Backport candidates for stable-0.10

2009-05-17 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: kvm-stable-start is a local tag to: commit 8d890e234cdf5860395c4cb93b831ae37aab41e9 Author: Zhang, Yang yang.zh...@intel.com Date: Thu Mar 5 15:10:22 2009 +0800 kvm: external module: add kvm-ia64.c to hack files list As best I can tell,

Re: [PATCH 12/17] Increment virtio-net savevm version to avoid conflict with upstream QEMU.

2009-05-17 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: When TAP_VNET_HDR eventually merges into upstream QEMU, it cannot change the format of the version 6 savevm data. This means that we're going to have to bump the version up to 7. I'm happy to reserve version 7 as having TAP_VNET_HDR support to allow

Re: [PATCH 12/17] Increment virtio-net savevm version to avoid conflict with upstream QEMU.

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: Anthony Liguori wrote: When TAP_VNET_HDR eventually merges into upstream QEMU, it cannot change the format of the version 6 savevm data. This means that we're going to have to bump the version up to 7. I'm happy to reserve version 7 as having

Re: [PATCH 0/17][REVIEW] Backport candidates for stable-0.10

2009-05-17 Thread Avi Kivity
Anthony Liguori wrote: 'git log origin/stable-0.10..origin/master' would have given you the same results (all commits in master not present in stable). You need to exclude commits from qemu/master too. git log ^qemu/master origin/stable-0.10..origin/master Gives the same result as what I

Re: [KVM-AUTOTEST][PATCH] timedrift support

2009-05-17 Thread Bear Yang
Hello Yaniv Kaul: I am understand your means for timedrift testcase. * give up using ntp to query and sync the clock from guest to host. my question is below: 1. why we can not using the NTP staff in timedrift test case? Is there some positive bugs were point on NTP or we found that something

Re: [KVM PATCH v2 2/4] kvm: add return value to kvm_io_bus_register_dev

2009-05-17 Thread Gregory Haskins
Avi Kivity wrote: Gregory Haskins wrote: Today this function returns void and will internally BUG_ON if it fails. We want to create dynamic MMIO/PIO entries driven from userspace later in the series, so enhance this API to return an error code on failure. We also fix up all the callsites to

Re: [KVM PATCH v2 4/4] kvm: add iosignalfd support

2009-05-17 Thread Gregory Haskins
Avi Kivity wrote: Gregory Haskins wrote: + +struct _iosignalfd { Why the underscore? It's unorthodox for a structure. I tend to do that to denote this is a private structure, but it makes more sense if we are building a factory interface for a corresponding public version of the

Re: [KVM-AUTOTEST][PATCH] timedrift support

2009-05-17 Thread Yaniv Kaul
On 5/18/2009 4:54 AM, Bear Yang wrote: Hello Yaniv Kaul: I am understand your means for timedrift testcase. * give up using ntp to query and sync the clock from guest to host. my question is below: 1. why we can not using the NTP staff in timedrift test case? Is there some positive bugs were

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Gleb Natapov
On Sun, May 17, 2009 at 11:07:31PM +0300, Avi Kivity wrote: Gleb Natapov wrote: Theoretically we can provide different values for different OSes, but this is just a guess work since there is no any documentation how CPU hot-plug should work on x86. ACPI in fact supports this, but I hope

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Avi Kivity
Gleb Natapov wrote: On Sun, May 17, 2009 at 11:07:31PM +0300, Avi Kivity wrote: Gleb Natapov wrote: Theoretically we can provide different values for different OSes, but this is just a guess work since there is no any documentation how CPU hot-plug should work on x86. ACPI

Re: [PATCH v4 resend 5/6] VT-d: cleanup iommu_flush_iotlb_psi and flush_unmaps

2009-05-17 Thread Yu Zhao
David Woodhouse wrote: On Thu, 2009-05-14 at 10:32 +0800, Yu Zhao wrote: Make iommu_flush_iotlb_psi() and flush_unmaps() more readable. This doesn't apply any more. Sorry, I'll rebase those patches and post them again. -- To unsubscribe from this list: send the line unsubscribe kvm in the

[PATCH v5 0/6] ATS capability support for Intel IOMMU

2009-05-17 Thread Yu Zhao
This patch series implements Address Translation Service support for the Intel IOMMU. The PCIe Endpoint that supports ATS capability can request the DMA address translation from the IOMMU and cache the translation itself. This can alleviate IOMMU TLB pressure and improve the hardware performance

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

2009-05-17 Thread Yu Zhao
The PCIe ATS capability makes the Endpoint be able to request the DMA address translation from the IOMMU and cache the translation in the device side, thus alleviate IOMMU pressure and improve the hardware performance in the I/O virtualization environment. Signed-off-by: Yu Zhao yu.z...@intel.com

[PATCH v5 2/6] PCI: handle Virtual Function ATS enabling

2009-05-17 Thread Yu Zhao
The SR-IOV spec requires that the Smallest Translation Unit and the Invalidate Queue Depth fields in the Virtual Function ATS capability are hardwired to 0. If a function is a Virtual Function, then and set its Physical Function's STU before enabling the ATS. Signed-off-by: Yu Zhao

[PATCH v5 3/6] VT-d: parse ATSR in DMA Remapping Reporting Structure

2009-05-17 Thread Yu Zhao
Parse the Root Port ATS Capability Reporting Structure in the DMA Remapping Reporting Structure ACPI table. Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/dmar.c | 112 -- include/linux/dmar.h|9

[PATCH v5 4/6] VT-d: add device IOTLB invalidation support

2009-05-17 Thread Yu Zhao
Support device IOTLB invalidation to flush the translation cached in the Endpoint. Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/dmar.c | 77 ++ include/linux/intel-iommu.h | 14 +++- 2 files changed, 82 insertions(+), 9

[PATCH v5 6/6] VT-d: support the device IOTLB

2009-05-17 Thread Yu Zhao
Enable the device IOTLB (i.e. ATS) for both the bare metal and KVM environments. Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/intel-iommu.c | 109 +--- include/linux/dma_remapping.h |1 + include/linux/intel-iommu.h |1 + 3 files

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-17 Thread Gleb Natapov
On Mon, May 18, 2009 at 08:44:54AM +0300, Avi Kivity wrote: Gleb Natapov wrote: On Sun, May 17, 2009 at 11:07:31PM +0300, Avi Kivity wrote: Gleb Natapov wrote: Theoretically we can provide different values for different OSes, but this is just a guess work since there is no any