tun/tap and Vlans (was: Re: Network I/O performance)

2009-05-19 Thread Lukas Kolbe
Hi all, On a sidenote: I have also realized that when using the tun/tap configuration with a bridge, packets are replicated on all tap devices when QEMU writes packets to the tun interface. I guess this is a limitation of tun/tap as it does not know to which tap device the packet has to

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

2009-05-19 Thread Avi Kivity
Alex Williamson wrote: Perhaps we should update the bitmap on entry points that everyone uses so we don't have to worry about preallocating. We could set the bitmap in kvm_add_routing_entry() and clear it in kvm_del_routing_entry(). This would mean that kvm_del_routing_entry() implicitly gives

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-19 Thread Christian Bornträger
Am Montag 18 Mai 2009 16:26:15 schrieb Avi Kivity: Christian Borntraeger wrote: Sorry for the late question, but I missed your first version. Is there a way to change that code to use virtio instead of PCI? That would allow us to use this driver on s390 and maybe other virtio transports.

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-19 Thread Avi Kivity
Christian Bornträger wrote: To summarize, Anthony thinks it should use virtio, while I believe virtio is useful for exporting guest memory, not for importing host memory. I think the current virtio interface is not ideal for importing host memory, but we can change that. If you look at

Re: [KVM PATCH v9] kvm: add support for irqfd

2009-05-19 Thread Avi Kivity
Gregory Haskins wrote: More slop. I shouldn't send patches out first thing Monday morning, I guess. Here is my current delta queued for v10. I will wait for some feedback on v9 before cutting it: With this, v10 looks good to go. -- error compiling committee.c: too many arguments to

Re: [PATCH] If interrupt injection is not possible do not scan IRR.

2009-05-19 Thread Avi Kivity
Gleb Natapov wrote: Forget to remove debug output before submitting. Resending. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 1ccb50c..d32ceac 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -218,6 +218,11 @@ int

Re: [PATCH] Drop interrupt shadow when single stepping should be done only on VMX.

2009-05-19 Thread Avi Kivity
Gleb Natapov wrote: The problem exists only on VMX. Also currently we skip this step if there is pending exception. The patch fixes this too. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in

Re: [PATCH] [APIC] Optimize searching for highest IRR

2009-05-19 Thread Avi Kivity
Gleb Natapov wrote: Most of the time IRR is empty, so instead of scanning the whole IRR on each VM entry keep a variable that tells us if IRR is not empty. IRR will have to be scanned twice on each IRQ delivery, but this is much more rare than VM entry. static inline int

Re: virtio net regression

2009-05-19 Thread Antoine Martin
Avi Kivity wrote: Antoine Martin wrote: Hi, Here is another one, any ideas? These oopses do look quite deep. Is it normal to end up in tcp_send_ack from pdflush?? I think it can happen anywhere, part of the net softirq. Hah, gotcha. Cheers Antoine [929492.154634] pdflush: page

Re: virtio net regression

2009-05-19 Thread Avi Kivity
Antoine Martin wrote: You're out of memory. That's quite odd, the guest wasn't even hitting the swap at the tine. But you do have swap enabled? Strange, seems to be a bit of free memory here. There should be lots, all this host is doing is apache+sftp... Assuming I can

[PATCH v2 0/2] Intel-IOMMU: source-id checking for interrupt remapping

2009-05-19 Thread Weidong Han
Support source-id checking for interrupt remapping, and then isolates interrupts for guests/VMs with assigned devices. v1 - v2 change log: Access PCI directly (read_pci_config_byte) to parse IOAPIC, instead of PCI related discovery, because PCI subsystem is not initialized at that time.

[PATCH v2 1/2] Intel-IOMMU, intr-remap: set the whole 128bits of irte when modify/free it

2009-05-19 Thread Weidong Han
Interrupt remapping table entry is 128bits. Currently, it only sets low 64bits of irte in modify_irte and free_irte. This ignores high 64bits setting of irte, that means source-id setting will be ignored. This patch sets the whole 128bits of irte when modify/free it. Following source-id checking

RE: [PATCH 2/2] Intel-IOMMU, intr-remap: source-id checking

2009-05-19 Thread Han, Weidong
Ingo Molnar wrote: * Han, Weidong weidong@intel.com wrote: Ingo Molnar wrote: * Han, Weidong weidong@intel.com wrote: Siddha, Suresh B wrote: On Wed, 2009-05-06 at 23:16 -0700, Han, Weidong wrote: @@ -634,6 +694,44 @@ static int ir_parse_ioapic_scope(struct

Re: virtio net regression

2009-05-19 Thread Antoine Martin
Avi Kivity wrote: Antoine Martin wrote: You're out of memory. That's quite odd, the guest wasn't even hitting the swap at the tine. But you do have swap enabled? Yes. I always do this on the guests as it seems fairer to let the guests use swap when they need the extra memory rather

[PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Alexander Graf
SVM adds another way to do INVLPG by ASID which Hyper-V makes use of, so let's implement it! For now we just do the same thing invlpg does, as asid switching means we flush the mmu anyways. That might change one day though. v2 makes invlpga do the same as invlpg, not flush the whole mmu

[PATCH 0/4] Add rudimentary Hyper-V guest support v2

2009-05-19 Thread Alexander Graf
Now that we have nested SVM in place, let's make use of it and virtualize something non-kvm. The first interesting target that came to my mind here was Hyper-V. This patchset makes Windows Server 2008 boot with Hyper-V, which runs the dom0 in virtualized mode already. It hangs somewhere in IDE

[PATCH 4/4] Nested SVM: Improve interrupt injection v2

2009-05-19 Thread Alexander Graf
While trying to get Hyper-V running, I realized that the interrupt injection mechanisms that are in place right now are not 100% correct. This patch makes nested SVM's interrupt injection behave more like on a real machine. v2 calls BUG_ON when svm_set_irq is called with GIF=0 Signed-off-by:

[PATCH 1/4] Add definition for IGNNE MSR

2009-05-19 Thread Alexander Graf
Hyper-V tried to access MSR_IGNNE, so let's at least have a definition for it in our headers. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/include/asm/msr-index.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/msr-index.h

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

2009-05-19 Thread Jayaraman, Bhaskar
Cam, is it somehow possible to generate a local APIC interrupt from one VM to another? I guess it shouldn't be as the LAPIC interrupts generated in one VM will go to the VCPUs of the same VM... Regards, Bhaskar. -Original Message- From: kvm-ow...@vger.kernel.org

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

2009-05-19 Thread Gregory Haskins
Jayaraman, Bhaskar wrote: Cam, is it somehow possible to generate a local APIC interrupt from one VM to another? I guess it shouldn't be as the LAPIC interrupts generated in one VM will go to the VCPUs of the same VM... Regards, Bhaskar. The closest thing to this is the

Re: [PATCH v2 2/2] Intel-IOMMU, intr-remap: source-id checking

2009-05-19 Thread Ingo Molnar
* Weidong Han weidong@intel.com wrote: To support domain-isolation usages, the platform hardware must be capable of uniquely identifying the requestor (source-id) for each interrupt message. Without source-id checking for interrupt remapping , a rouge guest/VM with assigned devices

Re: [PATCH v2 1/2] Intel-IOMMU, intr-remap: set the whole 128bits of irte when modify/free it

2009-05-19 Thread Ingo Molnar
* Weidong Han weidong@intel.com wrote: Interrupt remapping table entry is 128bits. Currently, it only sets low 64bits of irte in modify_irte and free_irte. This ignores high 64bits setting of irte, that means source-id setting will be ignored. This patch sets the whole 128bits of irte

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Avi Kivity
Alexander Graf wrote: SVM adds another way to do INVLPG by ASID which Hyper-V makes use of, so let's implement it! For now we just do the same thing invlpg does, as asid switching means we flush the mmu anyways. That might change one day though. v2 makes invlpga do the same as invlpg, not

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

2009-05-19 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. v2 changes: - remove the 0x4081 MSR definition - add pr_unimpl() on unimplemented writes Signed-off-by:

Re: virtio net regression

2009-05-19 Thread Avi Kivity
Antoine Martin wrote: But you do have swap enabled? Yes. I always do this on the guests as it seems fairer to let the guests use swap when they need the extra memory rather than over-committing too much memory on the host. Although it would probably be more efficient overall to let the

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Alexander Graf
On 19.05.2009, at 14:58, Avi Kivity wrote: Alexander Graf wrote: SVM adds another way to do INVLPG by ASID which Hyper-V makes use of, so let's implement it! For now we just do the same thing invlpg does, as asid switching means we flush the mmu anyways. That might change one day though. v2

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Avi Kivity
Alexander Graf wrote: I think that for ASID!=0 you can actually do nothing. The guest entry is a cr3 switch, so we'll both get a tlb flush and a resync on any modified ptes. Right, the only situation I can imagine this isn't fulfilled is when INVLPGA isn't trapped in the 1st level guest,

Re: [PATCH 4/4] Nested SVM: Improve interrupt injection v2

2009-05-19 Thread Gleb Natapov
On Tue, May 19, 2009 at 12:54:03PM +0200, Alexander Graf wrote: While trying to get Hyper-V running, I realized that the interrupt injection mechanisms that are in place right now are not 100% correct. This patch makes nested SVM's interrupt injection behave more like on a real machine.

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Marcelo Tosatti
On Tue, May 19, 2009 at 03:58:52PM +0300, Avi Kivity wrote: Alexander Graf wrote: SVM adds another way to do INVLPG by ASID which Hyper-V makes use of, so let's implement it! For now we just do the same thing invlpg does, as asid switching means we flush the mmu anyways. That might change

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Avi Kivity
Marcelo Tosatti wrote: I think that for ASID!=0 you can actually do nothing. The guest entry is a cr3 switch, so we'll both get a tlb flush and a resync on any modified ptes. For ASID==0 you can do the invlpg thing. Marcelo? kvm_mmu_invlpg is cheap, better just invalidate the

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Marcelo Tosatti
On Tue, May 19, 2009 at 04:56:48PM +0300, Avi Kivity wrote: Marcelo Tosatti wrote: I think that for ASID!=0 you can actually do nothing. The guest entry is a cr3 switch, so we'll both get a tlb flush and a resync on any modified ptes. For ASID==0 you can do the invlpg thing. Marcelo?

Re: virtio-net zero-copy

2009-05-19 Thread Raju Srivastava
On Mon, May 18, 2009 at 10:00 PM, Avi Kivity a...@redhat.com wrote: Raju Srivastava wrote: Greetings, Could someone let me know if current virtio-net supports zero-copy? I see some discussion here: http://thread.gmane.org/gmane.comp.emulators.kvm.devel/28061/ (copyless virtio net thoughts)

qemu-kvm.git regression in configure

2009-05-19 Thread Beth Kon
Latest qemu-kvm.git fails with ./configure, and reverting 22d239bcee126742df46938ee8ddc7c6b9209e23 corrects it. Beth Kon -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Alexander Graf
On 19.05.2009, at 15:58, Marcelo Tosatti wrote: On Tue, May 19, 2009 at 04:56:48PM +0300, Avi Kivity wrote: Marcelo Tosatti wrote: I think that for ASID!=0 you can actually do nothing. The guest entry is a cr3 switch, so we'll both get a tlb flush and a resync on any modified ptes.

Re: qemu-kvm.git regression in configure

2009-05-19 Thread Avi Kivity
Beth Kon wrote: Latest qemu-kvm.git fails with ./configure, and reverting 22d239bcee126742df46938ee8ddc7c6b9209e23 corrects it. Works for me. What error do you get? -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe

Re: qemu-kvm.git regression in configure

2009-05-19 Thread Beth Kon
Avi Kivity wrote: Beth Kon wrote: Latest qemu-kvm.git fails with ./configure, and reverting 22d239bcee126742df46938ee8ddc7c6b9209e23 corrects it. Works for me. What error do you get? ./configure: 1364: Syntax error: ( unexpected (expecting fi) -- To unsubscribe from this list: send the

Re: qemu-kvm.git regression in configure

2009-05-19 Thread Avi Kivity
Beth Kon wrote: Avi Kivity wrote: Beth Kon wrote: Latest qemu-kvm.git fails with ./configure, and reverting 22d239bcee126742df46938ee8ddc7c6b9209e23 corrects it. Works for me. What error do you get? ./configure: 1364: Syntax error: ( unexpected (expecting fi) Ah, a non-bash shell,

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Marcelo Tosatti
On Tue, May 19, 2009 at 05:18:07PM +0200, Alexander Graf wrote: On 19.05.2009, at 15:58, Marcelo Tosatti wrote: On Tue, May 19, 2009 at 04:56:48PM +0300, Avi Kivity wrote: Marcelo Tosatti wrote: I think that for ASID!=0 you can actually do nothing. The guest entry is a cr3 switch, so

Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2

2009-05-19 Thread Avi Kivity
Alexander Graf wrote: kvm_mmu_invlpg is cheap, better just invalidate the entry. If hyper-v uses invlpga to invalidate TLB entries which it has updated pte's in memory for, and you skip the invalidation now and somehow later use an unsync spte, you're toast. But won't the guest entry cause a

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-19 Thread Cam Macdonell
Avi Kivity wrote: Christian Bornträger wrote: To summarize, Anthony thinks it should use virtio, while I believe virtio is useful for exporting guest memory, not for importing host memory. I think the current virtio interface is not ideal for importing host memory, but we can change

Re: XP smp using a lot of CPU

2009-05-19 Thread Erik Rull
Hi Avi, here is the cpuinfo - what do you mean with workload? The CPU isage is around 33%. processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz stepping: 2 cpu MHz :

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

2009-05-19 Thread Mark McLoughlin
On Sun, 2009-05-17 at 10:43 -0500, Anthony Liguori wrote: 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

[ kvm-Bugs-2793994 ] kvm (command) doesn't work when vboxdrv module is loaded

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

[ kvm-Bugs-2793994 ] kvm doesn't work when VirtualBox' vboxdrv module is loaded

2009-05-19 Thread SourceForge.net
Bugs item #2793994, was opened at 2009-05-19 19:52 Message generated for change (Settings changed) made by benb You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2793994group_id=180599 Please note that this message will contain a full copy of the comment

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

2009-05-19 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: I'd strongly recommend working these patches on qemu-devel and lkml. I suspect Avi may disagree with me, but in order for this to be eventually merged in either place, you're going to have additional requirements put on you. I don't disagree with

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-19 Thread Anthony Liguori
Christian Bornträger wrote: Am Montag 18 Mai 2009 16:26:15 schrieb Avi Kivity: Christian Borntraeger wrote: Sorry for the late question, but I missed your first version. Is there a way to change that code to use virtio instead of PCI? That would allow us to use this driver on s390 and

[PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-19 Thread Mark Langsdorf
From 67f831e825b64be5dedae9936ff8a60b884959f2 Mon Sep 17 00:00:00 2001 From: mark.langsd...@amd.com Date: Tue, 19 May 2009 07:46:11 -0500 Subject: [PATCH] This feature creates a new field in the VMCB called Pause Filter Count. If Pause Filter Count is greater than 0 and intercepting PAUSEs is

kvm guest debug using gdb on x86

2009-05-19 Thread Aneesh Kumar K.V
Hi, With the latest qemu-kvm and 2.6.30-rc6 kernel i am not able to get the guest debugging with gdb. I get the following error. $gdb ./vmlinux GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is

Re: kvm guest debug using gdb on x86

2009-05-19 Thread Aneesh Kumar K.V
On Wed, May 20, 2009 at 12:23:12AM +0530, Aneesh Kumar K.V wrote: Hi, With the latest qemu-kvm and 2.6.30-rc6 kernel i am not able to get the guest debugging with gdb. I get the following error. $gdb ./vmlinux GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License

Re: [PATCH v2 2/2] Intel-IOMMU, intr-remap: source-id checking

2009-05-19 Thread Eric W. Biederman
Ingo Molnar mi...@elte.hu writes: * Weidong Han weidong@intel.com wrote: To support domain-isolation usages, the platform hardware must be capable of uniquely identifying the requestor (source-id) for each interrupt message. Without source-id checking for interrupt remapping , a

Re: tun/tap and Vlans

2009-05-19 Thread Lukas Kolbe
Am Dienstag, den 19.05.2009, 10:45 +0300 schrieb Avi Kivity: Hi, GuestHost kvm1 --- eth0 -+- bridge0 --- vlan1 \ | +-- eth0 kvm2 -+- eth0 -/ / \- eth1 --- bridge1 --- vlan2 + When sending packets

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

2009-05-19 Thread Alex Williamson
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 (such as Linux kernels 2.6.21-26). This can mean only a few minutes of usable run time.

Does KVM suffer from ACK-compression as you increase the number of VMs?

2009-05-19 Thread Andrew de Andrade
I recently read the following paper from 2004 that discusses ACK- compression in a VMware GSX 2.5.1 environment. http://www.cs.clemson.edu/~jmarty/papers/ccn2004.pdf I was wondering if anyone had checked to see if KVM also suffers from ACK-compression as you increase the number of VMs on each

kvm building issue

2009-05-19 Thread Nitin A Kamble
Hi Avi, I am trying to build the kvm with changed repositories. I was trying to follow the instructions from here: http://www.linux-kvm.org/page/Code. Especially this section: building an external module with older kernels from that page. I find the kernel directory is missing in the

[PATCH] qemu-kvm: Handle -no-shutodwn

2009-05-19 Thread Daniel Gollub
Plain QEMU has the parameter -no-shutdown. This avoids termination of the qemu process when VM got shutdown (e.g. to still use the QEMU-Monitor with stopped VM). This parameter has no effect on qemu-kvm, today. This patch introduces identical handling, as in qemu, of -no-shutdown for qemu-kvm:

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-19 Thread Rusty Russell
On Wed, 20 May 2009 02:21:08 am Cam Macdonell wrote: Avi Kivity wrote: Christian Bornträger wrote: To summarize, Anthony thinks it should use virtio, while I believe virtio is useful for exporting guest memory, not for importing host memory. Yes, precisely. But what's it *for*, this