[COMMIT master] Revert vga: do not resize the screen on hw_invalidate

2009-08-11 Thread Avi Kivity
From: Avi Kivity a...@redhat.com This reverts commit 0bd8246bfec1dfb2eb959f52db535572c0260f4c. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/hw/vga.c b/hw/vga.c index 216ee63..887e640 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -1842,8 +1842,7 @@ static void vga_update_display(void

[COMMIT master] Merge branch 'upstream-merge'

2009-08-11 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * upstream-merge: (147 commits) Fix virtio-blk Add emacs header to Makefile.target rename info qdrv to info qdm check for PR_SET_NAME being defined fix qdev_print_devinfo() qdev/prop: convert xilinx_timer.c to helper macros. qdev/prop: convert

[COMMIT master] KVM: SVM: Drop tlb flush workaround in npt

2009-08-11 Thread Avi Kivity
From: Avi Kivity a...@redhat.com It is no longer possible to reproduce the problem any more, so presumably it has been fixed. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 8a28956..e158a2f 100644 --- a/arch/x86/kvm/svm.c +++

Re: Page allocation failures in guest

2009-08-11 Thread Avi Kivity
On 08/11/2009 09:32 AM, Pierre Ossman wrote: On Mon, 13 Jul 2009 23:59:52 +0900 Minchan Kimminchan@gmail.com wrote: On Mon, Jul 13, 2009 at 6:51 PM, Pierre Ossmandrzeus-l...@drzeus.cx wrote: Jul 12 23:04:54 loki kernel: Active_anon:14065 active_file:87384 inactive_anon:37480

Re: [PATCH] fix memory leak in virtio_net

2009-08-11 Thread Shirley Ma
This is false report. I checked kfree_skb(), it does free all pages in the fraglist in skb_release_data() later. Thanks Shirley On Mon, 2009-08-10 at 13:05 -0700, Shirley Ma wrote: Whild reading virtio code, I found some memory leak in removing virtio_net. In virtnet_remove, only skb has

Re: virtio-blk performance and MSI

2009-08-11 Thread Eran Rom
Christoph Hellwig hch at lst.de writes: File size set to 131072 KB Record Size 4 KB O_DIRECT feature enabled Command line used: iozone -s 128m -r 4k -I -f /dev/sdb Apologies for multiple posts, might have a problem with my mail. Can you please elaborate more on the

Re: virtio-blk performance and MSI

2009-08-11 Thread Eran Rom
Christoph Hellwig hch at lst.de writes: File size set to 131072 KB Record Size 4 KB O_DIRECT feature enabled Command line used: iozone -s 128m -r 4k -I -f /dev/sdb is /dev/sdb a local disk, network drive attached via FC/IB, something else? What is the command line

Re: [PATCH] fix memory leak in virtio_net

2009-08-11 Thread Avi Kivity
(copying Rusty, the virtio maintainer) On 08/10/2009 11:05 PM, Shirley Ma wrote: Whild reading virtio code, I found some memory leak in removing virtio_net. In virtnet_remove, only skb has been freed not the pages in skb frags. Here is the patch to fix this, please review it. There were

[KVM-AUTOTEST PATCH v2 0/3] KVM test: corrections to the AutoIt patchset

2009-08-11 Thread Michael Goldish
This is the AutoIt patch set with some minor corrections: - Use read_up_to_prompt() instead of read_nonblocking() before running the AutoIt command - autoit_script_params defaults to in the test code as well - Indentation fix in notepad1.au3 -- To unsubscribe from this list: send the line

[KVM-AUTOTEST PATCH v2 2/3] KVM test: add sample AutoIt script

2009-08-11 Thread Michael Goldish
Add a sample autoit script under autoit/. The script is a modified version of the notepad1.au3 example script that ships with AutoIt. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/autoit/notepad1.au3 | 44 ++ 1 files changed, 44

[KVM-AUTOTEST PATCH v2 1/3] KVM test: add AutoIt test

2009-08-11 Thread Michael Goldish
Currently the test only logs in, runs a given script and fails if the script takes too long to exit or if its exit status is nonzero. The test expects these parameters: autoit_binary: Path to AutoIt binary in the guest. autoit_script: Path to script in the host. autoit_script_params: Command line

[KVM-AUTOTEST PATCH v2 3/3] KVM test: add AutoIt test to kvm_tests.cfg.sample

2009-08-11 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_tests.cfg.sample b/client/tests/kvm/kvm_tests.cfg.sample index 12e907b..05a1ca7 100644 ---

Re: [PATCH 1/2] export cpu_tlbstate to modules

2009-08-11 Thread Michael S. Tsirkin
Subject: [PATCH] mm: export use_mm/unuse_mm to modules vhost net module wants to do copy to/from user from a kernel thread, which needs use_mm (like what fs/aio has). Move that into mm/ and export to modules. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- On Mon, Aug 10, 2009 at

Re: virtio-blk performance and MSI

2009-08-11 Thread Eran Rom
Christoph Hellwig hch at lst.de writes: Michael suggested to me a while ago to try MSI with virtio-blk and I played with this small patch: which gave about 5% speedups on 4k sized reads and writes, see the full iozone output I attached. File size set to 131072 KB Record Size

[KVM-AUTOTEST PATCH] KVM test: kvm_subprocess: add function kill_tail_thread()

2009-08-11 Thread Michael Goldish
Normally all threads are killed when the test process exits. However, when running multiple iterations of a test (with iterations=n) the test process remains alive between iterations, and new threads are started but old threads are not killed. This function allow to stop thread execution

[KVM-AUTOTEST PATCH] KVM test: kvm_tests.cfg.sample: improve shell_prompt regular expressions

2009-08-11 Thread Michael Goldish
Require that shell prompts start at the beginning of the line (^) and be followed by nothing more than whitespace (\s*$). Also remove the length limitation from Windows prompts, and do not restrict them to C:\. Also do not require RHEL and Fedora prompts to contain 'root@'. Signed-off-by: Michael

[PATCH 3/8 v2] Move irq routing data structure to rcu locking

2009-08-11 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- virt/kvm/irq_comm.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 42994c4..9f41dde 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -152,7 +152,8

[PATCH 4/8 v2] Move irq ack notifier list to arch independent code.

2009-08-11 Thread Gleb Natapov
Mask irq notifier list is already there. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/ia64/include/asm/kvm_host.h |1 - arch/x86/include/asm/kvm_host.h |1 - include/linux/kvm_host.h |1 + virt/kvm/irq_comm.c |4 ++-- virt/kvm/kvm_main.c

[PATCH 0/8 v2] make interrupt injection lockless (almost)

2009-08-11 Thread Gleb Natapov
kvm-irq_lock protects too much stuff, but still fail to protect everything it was design to protect (see ack notifiers call in pic). I want to make IRQ injection fast path as lockless as possible. This patch series removes kvm-irq_lock from irq injection path effectively making interrupt injection

[PATCH 2/8 v2] Maintain back mapping from irqchip/pin to gsi.

2009-08-11 Thread Gleb Natapov
Maintain back mapping from irqchip/pin to gsi to speedup interrupt acknowledgment notifications. Signed-off-by: Gleb Natapov g...@redhat.com --- include/linux/kvm_host.h |1 + virt/kvm/irq_comm.c | 24 +++- 2 files changed, 12 insertions(+), 13 deletions(-) diff

[PATCH 5/8 v2] Convert irq notifiers lists to RCU locking.

2009-08-11 Thread Gleb Natapov
Use RCU locking for mask/ack notifiers lists. Signed-off-by: Gleb Natapov g...@redhat.com --- virt/kvm/irq_comm.c | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index ff12fb5..ba880e8 100644 ---

[PATCH 1/8 v2] Change irq routing table to use gsi indexed array.

2009-08-11 Thread Gleb Natapov
Use gsi indexed array instead of scanning all entries on each interrupt injection. Signed-off-by: Gleb Natapov g...@redhat.com --- include/linux/kvm_host.h | 16 -- virt/kvm/irq_comm.c | 77 +- virt/kvm/kvm_main.c |1 - 3

[PATCH 6/8 v2] Move IO APIC to its own lock.

2009-08-11 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/ia64/kvm/kvm-ia64.c | 27 ++-- arch/x86/kvm/i8259.c |4 +++ arch/x86/kvm/lapic.c |5 +--- arch/x86/kvm/x86.c | 30 ++- virt/kvm/ioapic.c| 49

[PATCH 7/8 v2] Drop kvm-irq_lock lock from irq injection path.

2009-08-11 Thread Gleb Natapov
The only thing it protects now is interrupt injection into lapic and this can work lockless. Even now with kvm-irq_lock in place access to lapic is not entirely serialized since vcpu access doesn't take kvm-irq_lock. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |2

[PATCH 8/8 v2] Change irq_lock from mutex to spinlock.

2009-08-11 Thread Gleb Natapov
Change irq_lock from mutex to spinlock. We do not sleep while holding it. Signed-off-by: Gleb Natapov g...@redhat.com --- include/linux/kvm_host.h |2 +- virt/kvm/irq_comm.c | 28 ++-- virt/kvm/kvm_main.c |2 +- 3 files changed, 16 insertions(+), 16

Re: Page allocation failures in guest

2009-08-11 Thread Pierre Ossman
On Mon, 13 Jul 2009 23:59:52 +0900 Minchan Kim minchan@gmail.com wrote: On Mon, Jul 13, 2009 at 6:51 PM, Pierre Ossmandrzeus-l...@drzeus.cx wrote: Jul 12 23:04:54 loki kernel: Active_anon:14065 active_file:87384 inactive_anon:37480 Jul 12 23:04:54 loki kernel: inactive_file:95821

Re: [Autotest] [KVM-AUTOTEST PATCH v2 1/3] KVM test: add AutoIt test

2009-08-11 Thread Yolkfull Chow
On Tue, Aug 11, 2009 at 03:10:42PM +0300, Michael Goldish wrote: Currently the test only logs in, runs a given script and fails if the script takes too long to exit or if its exit status is nonzero. The test expects these parameters: autoit_binary: Path to AutoIt binary in the guest.

Unable to activate windows 2003 se

2009-08-11 Thread dgour...@itool.com
Hi all, I post here because I experiment a lot of problem to activate windows 2003 server se on kvm guest. I use the latest version of kvm (88). I've tested with 2 different emulated nic (realtek 8139 and intel pro 1000) and with the intel one, impossible to go to windows update website which

Re: [Autotest] [KVM-AUTOTEST PATCH v2 1/3] KVM test: add AutoIt test

2009-08-11 Thread Michael Goldish
- Yolkfull Chow yz...@redhat.com wrote: On Tue, Aug 11, 2009 at 03:10:42PM +0300, Michael Goldish wrote: Currently the test only logs in, runs a given script and fails if the script takes too long to exit or if its exit status is nonzero. The test expects these parameters:

Re: [Autotest] [KVM-AUTOTEST PATCH v2 1/3] KVM test: add AutoIt test

2009-08-11 Thread Yolkfull Chow
On Tue, Aug 11, 2009 at 09:27:17AM -0400, Michael Goldish wrote: - Yolkfull Chow yz...@redhat.com wrote: On Tue, Aug 11, 2009 at 03:10:42PM +0300, Michael Goldish wrote: Currently the test only logs in, runs a given script and fails if the script takes too long to exit or if its

Re: [KVM-AUTOTEST PATCH 11/12] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-11 Thread Jason Wang
Hello Michael: Based on our experiences with TAP networking scripts, the verify_mac_ip_pair() could not work well under multiple nics when testing linux guests. The main problem is the policy of multiple interfaces responding in linux, we should take care of the value of

Re: [KVM-AUTOTEST PATCH 11/12] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-11 Thread Michael Goldish
- Jason Wang jasow...@redhat.com wrote: Hello Michael: Based on our experiences with TAP networking scripts, the verify_mac_ip_pair() could not work well under multiple nics when testing linux guests. The main problem is the policy of multiple interfaces responding in linux, we should

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit

2009-08-11 Thread Avi Kivity
On 08/11/2009 04:00 AM, Anthony Liguori wrote: According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading and new segments. If eflags.vm == 1, then the segments are treated as 16-bit segments. This fixes an invalid vmentry failure in a custom OS that was happening after a

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit

2009-08-11 Thread Anthony Liguori
Avi Kivity wrote: On 08/11/2009 04:00 AM, Anthony Liguori wrote: kvm_load_segment_descriptor() can already load plain segments: if (!(vcpu-arch.cr0 X86_CR0_PE)) return kvm_load_realmode_segment(vcpu, selector, seg); so we can simplify the patch a bit by extending the check. I

Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit

2009-08-11 Thread Avi Kivity
On 08/11/2009 07:45 PM, Anthony Liguori wrote: Avi Kivity wrote: On 08/11/2009 04:00 AM, Anthony Liguori wrote: kvm_load_segment_descriptor() can already load plain segments: if (!(vcpu-arch.cr0 X86_CR0_PE)) return kvm_load_realmode_segment(vcpu, selector, seg); so we can

Re: [PATCH] fix memory leak in virtio_net

2009-08-11 Thread Shirley Ma
Hello Avi, I do see memory leak after removing virtio_net module. There is 72KB per removal along with free already free IRQ. Maybe the memleak from virtio_pci, seems some lock is missing when accessing the irq list? Trying to free already-free IRQ 26 Modules linked in: virtio_net(-) sunrpc ipv6

Re: [Autotest] [KVM-AUTOTEST PATCH 11/12] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-11 Thread Lucas Meneghel Rodrigues
On Tue, Aug 11, 2009 at 1:16 PM, Michael Goldishmgold...@redhat.com wrote: - Jason Wang jasow...@redhat.com wrote: Hello Michael: Based on our experiences with TAP networking scripts, the verify_mac_ip_pair() could not work well under multiple nics when testing linux guests. The main

Re: KVM autotest TAP patchset

2009-08-11 Thread Michael Goldish
- look...@gmail.com wrote: Reviewers: lmr, Message: Michael, the patchset looks mostly good to me, congrats! I have a few comments to make. I believe it's enough to make you send me a full updated set with 9 patches: 1,2,3,4,5,8,9,11,12. 3 of them were already applied. After

[ kvm-Bugs-2506814 ] TAP network lockup after some traffic

2009-08-11 Thread SourceForge.net
Bugs item #2506814, was opened at 2009-01-14 11:38 Message generated for change (Comment added) made by rdoitaly You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2506814group_id=180599 Please note that this message will contain a full copy of the comment

qemu-kvm-0.11.0-rc1 guests failing without noapic (on x86_64 host)

2009-08-11 Thread Charles Duffy
Howdy. The libguestfs kernel and appliance I've been using successfully with qemu-kvm-0.10.6 and prior fails horribly with qemu-kvm-0.11.0-rc1 unless 'noapic' is passed on the kernel command line: /usr/bin/qemu-kvm /usr/bin/qemu-kvm -drive

[PATCH] When switching to a vm8086 task, load segments as 16-bit (v2)

2009-08-11 Thread Anthony Liguori
According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading and new segments. If eflags.vm == 1, then the segments are treated as 16-bit segments. The LDTR and TR are not normally available in vm86 mode so if they happen to somehow get loaded, they need to be treated as

[PATCHv2 1/2] mm: export use_mm/unuse_mm to modules

2009-08-11 Thread Michael S. Tsirkin
vhost net module wants to do copy to/from user from a kernel thread, which needs use_mm (like what fs/aio has). Move that into mm/ and export to modules. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- fs/aio.c| 47 +--

[PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-11 Thread Michael S. Tsirkin
What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification. There's similarity with vringfd, with some differences and reduced scope - uses eventfd for

[PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-11 Thread Michael S. Tsirkin
This implements vhost: a kernel-level backend for virtio, The main motivation for this work is to reduce virtualization overhead for virtio by removing system calls on data path, without guest changes. For virtio-net, this removes up to 4 system calls per packet: vm exit for kick, reentry for

Re: [PATCHv2 1/2] mm: export use_mm/unuse_mm to modules

2009-08-11 Thread Andrew Morton
On Wed, 12 Aug 2009 00:27:52 +0300 Michael S. Tsirkin m...@redhat.com wrote: vhost net module wants to do copy to/from user from a kernel thread, which needs use_mm (like what fs/aio has). Move that into mm/ and export to modules. OK by me. Please include this change in the virtio patchset.

Re: [PATCHv2 0/2] vhost: a kernel-level virtio server

2009-08-11 Thread Gregory Haskins
Michael S. Tsirkin wrote: This implements vhost: a kernel-level backend for virtio, The main motivation for this work is to reduce virtualization overhead for virtio by removing system calls on data path, without guest changes. For virtio-net, this removes up to 4 system calls per packet: vm

Re: qemu-kvm-0.11.0-rc1 guests failing without noapic (on x86_64 host)

2009-08-11 Thread Charles Duffy
Charles Duffy wrote: Howdy. The libguestfs kernel and appliance I've been using successfully with qemu-kvm-0.10.6 and prior fails horribly with qemu-kvm-0.11.0-rc1 unless 'noapic' is passed on the kernel command line: To follow up with a quick note -- I have quite a lot of Unsupported

Re: [PATCHv2 2/2] vhost_net: a kernel-level virtio server

2009-08-11 Thread Gregory Haskins
Michael S. Tsirkin wrote: What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification. There's similarity with vringfd, with some differences and reduced

Re: [KVM-AUTOTEST PATCH v2 3/3] KVM test: add AutoIt test to kvm_tests.cfg.sample

2009-08-11 Thread Cao, Chen
On Tue, Aug 11, 2009 at 03:10:44PM +0300, Michael Goldish wrote: Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_tests.cfg.sample

Re: Page allocation failures in guest

2009-08-11 Thread Rusty Russell
On Tue, 11 Aug 2009 04:22:53 pm Avi Kivity wrote: On 08/11/2009 09:32 AM, Pierre Ossman wrote: On Mon, 13 Jul 2009 23:59:52 +0900 Minchan Kimminchan@gmail.com wrote: Any ideas here? Is the virtio net driver very GFP_ATOMIC happy so it drains all those pages? And why is this triggered

[PATCH] qemu-kvm: ia64 build fix.

2009-08-11 Thread Zhang, Xiantao
From 7ae1cc3ac39e920ecd553902a5f578af8cdb383c Mon Sep 17 00:00:00 2001 From: Xiantao Zhang xiantao.zh...@intel.com Date: Wed, 12 Aug 2009 10:48:18 +0800 Subject: [PATCH] qemu-kvm: ia64 build fix. fixed missing part for ipf due to common changes. Signed-off-by: Xiantao Zhang

[PATCH 02/03] qemu-kvm: add tcg-traget stub for ia64.

2009-08-11 Thread Zhang, Xiantao
From 94b7ff3a596b43d82e26494484807f3de7eddd40 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang xiantao.zh...@intel.com Date: Wed, 5 Aug 2009 11:27:10 +0800 Subject: [PATCH] qemu-kvm: add tcg-traget stub for ia64. Signed-off-by: Xiantao Zhang xiantao.zh...@intel.com --- tcg/ia64/tcg-target.c | 222

[PATCH] qemu-kvm: fix ia64 build breakage

2009-08-11 Thread Zhang, Xiantao
From 2d3d6cf55f7fecd9a9fd7c764e43b1ee56c7eebb Mon Sep 17 00:00:00 2001 From: Xiantao Zhang xiantao.zh...@intel.com Date: Wed, 12 Aug 2009 11:39:33 +0800 Subject: [PATCH] qemu-kvm: fix ia64 build breakage fix some configure issues. Signed-off-by: Xiantao Zhang xiantao.zh...@intel.com ---

Re: Page allocation failures in guest

2009-08-11 Thread Rusty Russell
On Wed, 12 Aug 2009 12:49:51 pm Rusty Russell wrote: On Tue, 11 Aug 2009 04:22:53 pm Avi Kivity wrote: On 08/11/2009 09:32 AM, Pierre Ossman wrote: I doesn't get out of it though, or at least the virtio net driver wedges itself. There's a fixme to retry when this happens, but this is

Re: Page allocation failures in guest

2009-08-11 Thread Avi Kivity
On 08/12/2009 08:31 AM, Rusty Russell wrote: +static void refill_work(struct work_struct *work) +{ + struct virtnet_info *vi; + bool still_empty; + + vi = container_of(work, struct virtnet_info, refill); + napi_disable(vi-napi); + try_fill_recv(vi, GFP_KERNEL); +