Re: [ANNOUNCE] qemu-kvm-0.13.0-rc1

2010-09-10 Thread Avi Kivity
On 09/09/2010 04:00 PM, Anthony Liguori wrote: It's perfectly reasonable to want to avoid building the tcg code if you aren't going to use it. Why? It doesn't do any harm to have extra code. It's half a megabyte of code. Also, it's better not to have code snippets that call

Re: high load with win7 usb tablet

2010-09-10 Thread Jes Sorensen
On 09/03/10 14:21, Michael Tokarev wrote: Hello. I noticed that window7, unlike windowsXP as I played with previously, poses quite high load on host when idle. On my machine, host cpu usage is about 25% when one single-cpu win7 guest is running with -usbdevice tablet option. Here's a

Re: high load with win7 usb tablet

2010-09-10 Thread Michael Tokarev
10.09.2010 15:47, Jes Sorensen wrote: On 09/03/10 14:21, Michael Tokarev wrote: Hello. I noticed that window7, unlike windowsXP as I played with previously, poses quite high load on host when idle. On my machine, host cpu usage is about 25% when one single-cpu win7 guest is running with

Re: high load with win7 usb tablet

2010-09-10 Thread Avi Kivity
On 09/03/2010 03:21 PM, Michael Tokarev wrote: Hello. I noticed that window7, unlike windowsXP as I played with previously, poses quite high load on host when idle. On my machine, host cpu usage is about 25% when one single-cpu win7 guest is running with -usbdevice tablet option. Here's a

Orphaning IA64 KVM

2010-09-10 Thread Alexander Graf
Hi Xiantao, Do you still actively maintain the IA64 KVM port? It seems to have gotten quiet around that one and I'm not even sure the full stack still works in recent versions. If not, I would recommend to set it to orphaned in the MAINTAINERS file and maybe schedule it for deprecation. Alex,

Re: high load with win7 usb tablet

2010-09-10 Thread Michael Tokarev
10.09.2010 16:19, Avi Kivity wrote: On 09/03/2010 03:21 PM, Michael Tokarev wrote: Hello. I noticed that window7, unlike windowsXP as I played with previously, poses quite high load on host when idle. On my machine, host cpu usage is about 25% when one single-cpu win7 guest is running

Re: high load with win7 usb tablet

2010-09-10 Thread Avi Kivity
On 09/10/2010 03:44 PM, Michael Tokarev wrote: 10.09.2010 16:19, Avi Kivity wrote: On 09/03/2010 03:21 PM, Michael Tokarev wrote: Hello. I noticed that window7, unlike windowsXP as I played with previously, poses quite high load on host when idle. On my machine, host cpu usage is about

vhost, something changed between 2.6.35 and 2.6.36 ?

2010-09-10 Thread Dhaval Giani
Hi, I have been trying to get vhost+macvtap to work for me. I run it as /root/qemu-kvm-vhost-net/bin/qemu-system-x86_64 -hda $IMAGE -serial stdio -monitor telnet::,server,nowait -vnc :4: -m 3G -net nic,model=virtio,macaddr=$MACADDR,netdev=macvtap0 -netdev tap,id=macvtap0,vhost=on,fd=3 3

RE: [RFC PATCH v9 12/16] Add mp(mediate passthru) device.

2010-09-10 Thread Xin, Xiaohui
Michael, Sorry to reply the mail late. So - does this driver help reduce service demand signifiantly? I'm looking at the performance now. Some comments from looking at the code: On Fri, Aug 06, 2010 at 05:23:41PM +0800, xiaohui@intel.com wrote: +static struct page_info

[GIT PULL] KVM updates for 2.6.36-rc3

2010-09-10 Thread Marcelo Tosatti
Linus, please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/2.6.36 To receive the following updates: Avi Kivity (2): KVM: x86 emulator: fix regression with cmpxchg8b on i386 hosts KVM: fix i8259 oops when no vcpus are online Gleb Natapov (1): KVM:

Re: high load with win7 usb tablet

2010-09-10 Thread Avi Kivity
On 09/10/2010 05:47 PM, Michael Tokarev wrote: 10.09.2010 16:50, Avi Kivity wrote: [] During this shot, host CPU was about 30..35% in use - higher than usual 25%, but I guess it's due to perfmon. Please build qemu with --disable-strip and use 'perf' to profile it. Done, I tried several

Re: high load with win7 usb tablet

2010-09-10 Thread Michael Tokarev
10.09.2010 18:56, Avi Kivity пишет: On 09/10/2010 05:47 PM, Michael Tokarev wrote: 10.09.2010 16:50, Avi Kivity wrote: [] During this shot, host CPU was about 30..35% in use - higher than usual 25%, but I guess it's due to perfmon. Please build qemu with --disable-strip and use 'perf' to

[PATCH 24/29] KVM: MMU: Track NX state in struct kvm_mmu

2010-09-10 Thread Joerg Roedel
With Nested Paging emulation the NX state between the two MMU contexts may differ. To make sure that always the right fault error code is recorded this patch moves the NX state into struct kvm_mmu so that the code can distinguish between L1 and L2 NX state. Signed-off-by: Joerg Roedel

[PATCH 18/29] KVM: MMU: Propagate the right fault back to the guest after gva_to_gpa

2010-09-10 Thread Joerg Roedel
This patch implements logic to make sure that either a page-fault/page-fault-vmexit or a nested-page-fault-vmexit is propagated back to the guest. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/x86.c | 18

[PATCH 01/29] KVM: MMU: Check for root_level instead of long mode

2010-09-10 Thread Joerg Roedel
The walk_addr function checks for !is_long_mode in its 64 bit version. But what is meant here is a check for pae paging. Change the condition to really check for pae paging so that it also works with nested nested paging. Signed-off-by: Joerg Roedel joerg.roe...@amd.com ---

[PATCH 06/29] KVM: MMU: Introduce inject_page_fault function pointer

2010-09-10 Thread Joerg Roedel
This patch introduces an inject_page_fault function pointer into struct kvm_mmu which will be used to inject a page fault. This will be used later when Nested Nested Paging is implemented. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |3 +++

[PATCH 08/29] KVM: MMU: Let is_rsvd_bits_set take mmu context instead of vcpu

2010-09-10 Thread Joerg Roedel
This patch changes is_rsvd_bits_set() function prototype to take only a kvm_mmu context instead of a full vcpu. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/mmu.c |6 +++--- arch/x86/kvm/paging_tmpl.h |7 --- 2 files changed, 7 insertions(+), 6

[PATCH 26/29] KVM: SVM: Initialize Nested Nested MMU context on VMRUN

2010-09-10 Thread Joerg Roedel
This patch adds code to initialize the Nested Nested Paging MMU context when the L1 guest executes a VMRUN instruction and has nested paging enabled in its VMCB. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/mmu.c |1 + arch/x86/kvm/svm.c | 50

[PATCH 11/29] KVM: MMU: Add infrastructure for two-level page walker

2010-09-10 Thread Joerg Roedel
This patch introduces a mmu-callback to translate gpa addresses in the walk_addr code. This is later used to translate l2_gpa addresses into l1_gpa addresses. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/x86.c |6

[PATCH 21/29] KVM: MMU: Introduce kvm_pdptr_read_mmu

2010-09-10 Thread Joerg Roedel
This function is implemented to load the pdptr pointers of the currently running guest (l1 or l2 guest). Therefore it takes care about the current paging mode and can read pdptrs out of l2 guest physical memory. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/kvm_cache_regs.h |

[PATCH 14/29] KVM: X86: Add kvm_read_guest_page_mmu function

2010-09-10 Thread Joerg Roedel
This patch adds a function which can read from the guests physical memory or from the guest's guest physical memory. This will be used in the two-dimensional page table walker. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |3 +++ arch/x86/kvm/x86.c

[PATCH 05/29] KVM: MMU: Introduce get_cr3 function pointer

2010-09-10 Thread Joerg Roedel
This function pointer in the MMU context is required to implement Nested Nested Paging. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/mmu.c |9 - arch/x86/kvm/paging_tmpl.h |4 ++-- 3 files changed,

[PATCH 07/29] KVM: MMU: Introduce kvm_init_shadow_mmu helper function

2010-09-10 Thread Joerg Roedel
Some logic of the init_kvm_softmmu function is required to build the Nested Nested Paging context. So factor the required logic into a seperate function and export it. Also make the whole init path suitable for more than one mmu context. Signed-off-by: Joerg Roedel joerg.roe...@amd.com ---

[PATCH 28/29] KVM: SVM: Report Nested Paging support to userspace

2010-09-10 Thread Joerg Roedel
This patch implements the reporting of the nested paging feature support to userspace. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index

[PATCH 27/29] KVM: SVM: Expect two more candiates for exit_int_info

2010-09-10 Thread Joerg Roedel
This patch adds INTR and NMI intercepts to the list of expected intercepts with an exit_int_info set. While this can't happen on bare metal it is architectural legal and may happen with KVMs SVM emulation. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |3 ++- 1

[PATCH 25/29] KVM: SVM: Implement MMU helper functions for Nested Nested Paging

2010-09-10 Thread Joerg Roedel
This patch adds the helper functions which will be used in the mmu context for handling nested nested page faults. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git

[PATCH 19/29] KVM: X86: Propagate fetch faults

2010-09-10 Thread Joerg Roedel
KVM currently ignores fetch faults in the instruction emulator. With nested-npt we could have such faults. This patch adds the code to handle these. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/emulate.c |3 +++ arch/x86/kvm/x86.c |4 2 files changed, 7

[PATCH 13/29] KVM: MMU: Implement nested gva_to_gpa functions

2010-09-10 Thread Joerg Roedel
This patch adds the functions to do a nested l2_gva to l1_gpa page table walk. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h | 10 ++ arch/x86/kvm/mmu.c |8 arch/x86/kvm/paging_tmpl.h | 31

[PATCH 12/29] KVM: X86: Introduce pointer to mmu context used for gva_to_gpa

2010-09-10 Thread Joerg Roedel
This patch introduces the walk_mmu pointer which points to the mmu-context currently used for gva_to_gpa translations. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h | 13 + arch/x86/kvm/mmu.c | 10 +- arch/x86/kvm/x86.c

[PATCH 22/29] KVM: MMU: Refactor mmu_alloc_roots function

2010-09-10 Thread Joerg Roedel
This patch factors out the direct-mapping paths of the mmu_alloc_roots function into a seperate function. This makes it a lot easier to avoid all the unnecessary checks done in the shadow path which may break when running direct. In fact, this patch already fixes a problem when running PAE guests

[PATCH 17/29] KVM: MMU: Introduce init_kvm_nested_mmu()

2010-09-10 Thread Joerg Roedel
This patch introduces the init_kvm_nested_mmu() function which is used to re-initialize the nested mmu when the l2 guest changes its paging mode. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/mmu.c | 37

[PATCH 15/29] KVM: MMU: Make walk_addr_generic capable for two-level walking

2010-09-10 Thread Joerg Roedel
This patch uses kvm_read_guest_page_tdp to make the walk_addr_generic functions suitable for two-level page table walking. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/paging_tmpl.h | 30 +++--- 1 files changed, 23 insertions(+), 7 deletions(-)

[PATCH 04/29] KVM: X86: Introduce a tdp_set_cr3 function

2010-09-10 Thread Joerg Roedel
This patch introduces a special set_tdp_cr3 function pointer in kvm_x86_ops which is only used for tpd enabled mmu contexts. This allows to remove some hacks from svm code. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |2 ++ arch/x86/kvm/mmu.c

[PATCH 3/7] svm: Add test for NX bit check in emulated NPT

2010-09-10 Thread Joerg Roedel
This patch adds a test to check if the NX bit is checked in the NPT emulation of KVM. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- x86/svm.c | 37 + 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/x86/svm.c b/x86/svm.c index

[PATCH 4/7] svm: Add test for US bit check in emulated NPT

2010-09-10 Thread Joerg Roedel
This patch adds a test to check if the US bit is checked in the NPT emulation of KVM. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- x86/svm.c | 34 +- 1 files changed, 33 insertions(+), 1 deletions(-) diff --git a/x86/svm.c b/x86/svm.c index

[PATCH 0/29] Nested Paging Virtualization for KVM v4

2010-09-10 Thread Joerg Roedel
Hi Avi, Marcelo, as promised here is -v4 of my patch-set for virtualizing nested paging in KVM. I addresses all of your review comments in this version and fixed a misbehavior in the nested page-walker code where it would have reported the wrong error-code on an emulated nested page fault. Here

[PATCH 7/7] svm: Add test for the NPT page table walker

2010-09-10 Thread Joerg Roedel
This patch adds a test to check if NPT faults that occur while walking the guest page table are reported correctly. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- x86/svm.c | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/x86/svm.c

[PATCH 0/7] New Unit-Tests for KVM SVM emulation

2010-09-10 Thread Joerg Roedel
Hi, here are a couple of unit-tests for the KVM unit test framework. These tests check for the sel_cr0 bug I fixes recently and also add a number of tests for the NPT code. Please have a look at them and write me your thoughts (or just pick them up ;-) ) Thanks, Joerg -- To

[PATCH 2/7] svm: Run tests with NPT enabled if available

2010-09-10 Thread Joerg Roedel
This patch adds code to setup a nested page table which is used for all tests. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- x86/svm.c | 59 +++ 1 files changed, 59 insertions(+), 0 deletions(-) diff --git a/x86/svm.c b/x86/svm.c

[PATCH 5/7] svm: Add test for RSVD bit check in emulated NPT

2010-09-10 Thread Joerg Roedel
This patch adds a test to check if the RSVD bits are checked in the NPT emulation of KVM. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- x86/svm.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/x86/svm.c b/x86/svm.c index a0f465f..8711862 100644

[PATCH 10/29] KVM: MMU: Introduce generic walk_addr function

2010-09-10 Thread Joerg Roedel
This is the first patch in the series towards a generic walk_addr implementation which could walk two-dimensional page tables in the end. In this first step the walk_addr function is renamed into walk_addr_generic which takes a mmu context as an additional parameter. Signed-off-by: Joerg Roedel

[PATCH 16/29] KVM: MMU: Introduce kvm_read_nested_guest_page()

2010-09-10 Thread Joerg Roedel
This patch introduces the kvm_read_guest_page_x86 function which reads from the physical memory of the guest. If the guest is running in guest-mode itself with nested paging enabled it will read from the guest's guest physical memory instead. The patch also changes changes the code to use this

[PATCH 1/7] svm: Add test for selective cr0 intercept

2010-09-10 Thread Joerg Roedel
This patch adds a test to check if the selective cr0 intercept emulation of the kvm svm emulation works. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- x86/svm.c | 37 - 1 files changed, 36 insertions(+), 1 deletions(-) diff --git a/x86/svm.c

[PATCH 2/2] qemu-kvm: Add svm cpuid features

2010-09-10 Thread Joerg Roedel
This patch adds the svm cpuid feature flags to the qemu intialization path. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- target-i386/cpu.h | 12 +++ target-i386/cpuid.c | 80 --- target-i386/kvm.c |3 ++ 3 files changed, 78

[PATCH] KVM test: tests.cfg.sample: add params to qemu command line properly

2010-09-10 Thread Lucas Meneghel Rodrigues
There's a small bug on the qemu sample testset for KVM autotest: We need to append -enable-kvm as extra params to the qemu command line, not replace all extra params. Small bug, renders the unattended install unusable for folks trying qemu instead of qemu-kvm. Thanks to Kevin Wolf for having

Re: high load with win7 usb tablet

2010-09-10 Thread Avi Kivity
On 09/10/2010 06:03 PM, Michael Tokarev wrote: Strange. Can you also post a few lines of 'vmstat 1'? Maybe we'll see a lot of context switches in there. Not that many. Still running the same w7 guest, still ~25..27% CPU usage reported by top for the kvm process, here's `vmstat 5' after a

Re: [PATCH] KVM test: tests.cfg.sample: add params to qemu command line properly

2010-09-10 Thread Avi Kivity
On 09/10/2010 06:57 PM, Lucas Meneghel Rodrigues wrote: There's a small bug on the qemu sample testset for KVM autotest: We need to append -enable-kvm as extra params to the qemu command line, not replace all extra params. Small bug, renders the unattended install unusable for folks trying qemu

Re: [PATCH] KVM test: tests.cfg.sample: add params to qemu command line properly

2010-09-10 Thread Lucas Meneghel Rodrigues
On Fri, 2010-09-10 at 12:57 -0300, Lucas Meneghel Rodrigues wrote: There's a small bug on the qemu sample testset for KVM autotest: We need to append -enable-kvm as extra params to the qemu command line, not replace all extra params. Small bug, renders the unattended install unusable for folks

[PATCH] KVM test: tests.cfg.sample: add params to qemu command line properly

2010-09-10 Thread Lucas Meneghel Rodrigues
There's a small bug on the qemu sample testset for KVM autotest: We need to append -enable-kvm as extra params to the qemu command line, not replace all extra params. Small bug, renders the unattended install unusable for folks trying qemu instead of qemu-kvm. Thanks to Kevin Wolf for having

Re: high load with usb device

2010-09-10 Thread Michael Tokarev
Note the changed subject line. I just did a few tests with linux guest (amd64 2.6.35 kernel). And it shows the same behavour as win7 (unlike winXP), namely, high host CPU load when guest is idle. When I run this guest (which network-boots and only runs udevd and a busybox shell after loading

Re: [ANNOUNCE] qemu-kvm-0.13.0-rc1

2010-09-10 Thread Chris Wright
* Avi Kivity (a...@redhat.com) wrote: On 09/09/2010 04:00 PM, Anthony Liguori wrote: It's perfectly reasonable to want to avoid building the tcg code if you aren't going to use it. Why? It doesn't do any harm to have extra code. It's half a megabyte of code. And half a day to compile

Re: [ANNOUNCE] qemu-kvm-0.13.0-rc1

2010-09-10 Thread Anthony Liguori
On 09/10/2010 02:31 PM, Chris Wright wrote: * Avi Kivity (a...@redhat.com) wrote: On 09/09/2010 04:00 PM, Anthony Liguori wrote: It's perfectly reasonable to want to avoid building the tcg code if you aren't going to use it. Why? It doesn't do any harm to have extra

Re: [ANNOUNCE] qemu-kvm-0.13.0-rc1

2010-09-10 Thread Chris Wright
* Anthony Liguori (anth...@codemonkey.ws) wrote: On 09/10/2010 02:31 PM, Chris Wright wrote: * Avi Kivity (a...@redhat.com) wrote: On 09/09/2010 04:00 PM, Anthony Liguori wrote: It's perfectly reasonable to want to avoid building the tcg code if you aren't going to use it. Why? It doesn't

[PATCH] [RFC] Add support for a USB audio device model

2010-09-10 Thread H. Peter Anvin
I discovered that none of the audio device models supported by current Qemu/KVM appear to be supported out of the box on Win7 64 bit (AC97 works fine on 32 bit). The most logical ways to fix that would be to add a long-term supportable audio device model. Intel HD Audio and USB Audio seemed like

Re: [PATCH] [RFC] Add support for a USB audio device model

2010-09-10 Thread malc
On Fri, 10 Sep 2010, H. Peter Anvin wrote: I discovered that none of the audio device models supported by current Qemu/KVM appear to be supported out of the box on Win7 64 bit (AC97 works fine on 32 bit). The most logical ways to fix that would be to add a long-term supportable audio device

Re: [PATCH] [RFC] Add support for a USB audio device model

2010-09-10 Thread H. Peter Anvin
On 09/10/2010 05:28 PM, malc wrote: On Fri, 10 Sep 2010, H. Peter Anvin wrote: I discovered that none of the audio device models supported by current Qemu/KVM appear to be supported out of the box on Win7 64 bit (AC97 works fine on 32 bit). The most logical ways to fix that would be to add

Re: [Qemu-devel] Re: [PATCH] [RFC] Add support for a USB audio device model

2010-09-10 Thread H. Peter Anvin
On 09/10/2010 06:08 PM, H. Peter Anvin wrote: Any remotely recent stock distro should have support for it. I say should, because I haven't actually tested it with a Linux guest yet. I'll try to do that later; I have to leave now. Just tested it on a stock Fedora 13 64 bit VM; it behaves

Re: [Qemu-devel] Re: [PATCH] [RFC] Add support for a USB audio device model

2010-09-10 Thread H. Peter Anvin
On 09/10/2010 07:47 PM, H. Peter Anvin wrote: On 09/10/2010 06:08 PM, H. Peter Anvin wrote: Any remotely recent stock distro should have support for it. I say should, because I haven't actually tested it with a Linux guest yet. I'll try to do that later; I have to leave now. Just tested