Re: [PATCH v6 02/12] Halt vcpu if page it tries to access is swapped out.

2010-10-10 Thread Gleb Natapov
On Sat, Oct 09, 2010 at 08:30:18PM +0200, Avi Kivity wrote: On 10/07/2010 07:47 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 11:50:08AM +0200, Avi Kivity wrote: On 10/04/2010 05:56 PM, Gleb Natapov wrote: If a guest accesses swapped out memory do not swap it in from vcpu thread

Re: [PATCH v6 02/12] Halt vcpu if page it tries to access is swapped out.

2010-10-10 Thread Gleb Natapov
On Sat, Oct 09, 2010 at 08:32:14PM +0200, Avi Kivity wrote: On 10/09/2010 08:30 PM, Avi Kivity wrote: So that info cpu will interfere with apf? Migration should work in regular way. apf state should not be migrated since it has no meaning on the destination. I'll make sure synthetic halt

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-10 Thread Gleb Natapov
On Sat, Oct 09, 2010 at 08:42:00PM +0200, Avi Kivity wrote: On 10/07/2010 07:21 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 02:29:07PM +0200, Avi Kivity wrote: On 10/04/2010 05:56 PM, Gleb Natapov wrote: When page is swapped in it is mapped into guest memory only after guest tries

Re: [PATCH v6 08/12] Handle async PF in a guest.

2010-10-10 Thread Gleb Natapov
On Sat, Oct 09, 2010 at 08:48:15PM +0200, Avi Kivity wrote: On 10/07/2010 08:03 PM, Gleb Natapov wrote: Host side keeps track of outstanding apfs and will not send apf for the same phys address twice. It will halt vcpu instead. What about different pages, running the scheduler

Re: [PATCH] trace exit to userspace event

2010-10-10 Thread Avi Kivity
On 10/08/2010 06:44 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 09:49:17PM -0300, Marcelo Tosatti wrote: On Thu, Oct 07, 2010 at 07:56:55PM +0200, Gleb Natapov wrote: diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index b8499f5..8800713 100644 ---

[PULL 0/3] PPC BookE patches

2010-10-10 Thread Alexander Graf
Hi Marcelo / Avi, Scott has found some bugs in the BookE implementation of KVM, so please pull the fixes for them to the kvm tree. The following changes since commit 3c4504636ab1ff41ec162980bf85121aee14e58f: Huang Ying (1): KVM: MCE: Send SRAR SIGBUS directly are available in the git

[PATCH 2/3] KVM: PPC: BookE: fix sleep with interrupts disabled

2010-10-10 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com It is not legal to call mutex_lock() with interrupts disabled. This will assert with debug checks enabled. If there's a real need to disable interrupts here, it could be done after the mutex is acquired -- but I don't see why it's needed at all.

[PATCH 3/3] KVM: PPC: e500: Call kvm_vcpu_uninit() before kvmppc_e500_tlb_uninit().

2010-10-10 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The VCPU uninit calls some TLB functions, and the TLB uninit function frees the memory used by them. Signed-off-by: Scott Wood scottw...@freescale.com Acked-by: Liu Yu yu@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 1/3] KVM: PPC: BookE: Load the lower half of MSR

2010-10-10 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This was preventing the guest from setting any bits in the hardware MSR which aren't forced on, such as MSR[SPE]. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke_interrupts.S |2

Re: kvm networking todo wiki

2010-10-10 Thread Dragos Tatulea
Hi, More importantly: anyone's going to work on this? I'd like to work on this. Might need some assistance though. Thanks, Dragos -- 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: kvm networking todo wiki

2010-10-10 Thread Michael S. Tsirkin
On Sun, Oct 10, 2010 at 01:37:45PM +0200, Dragos Tatulea wrote: Hi, More importantly: anyone's going to work on this? I'd like to work on this. Might need some assistance though. Thanks, Dragos Cool, you can add this info to the wiki. Thanks! -- MST -- To unsubscribe from this list:

Re: [PATCH v6 08/12] Handle async PF in a guest.

2010-10-10 Thread Gleb Natapov
On Thu, Oct 07, 2010 at 03:10:27PM +0200, Avi Kivity wrote: On 10/04/2010 05:56 PM, Gleb Natapov wrote: When async PF capability is detected hook up special page fault handler that will handle async page fault events and bypass other page faults to regular page fault handler. Also add async

Re: [PATCH v6 08/12] Handle async PF in a guest.

2010-10-10 Thread Avi Kivity
On 10/10/2010 02:32 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 03:10:27PM +0200, Avi Kivity wrote: On 10/04/2010 05:56 PM, Gleb Natapov wrote: When async PF capability is detected hook up special page fault handler that will handle async page fault events and bypass other page

Re: [PATCH v6 08/12] Handle async PF in a guest.

2010-10-10 Thread Avi Kivity
On 10/10/2010 09:56 AM, Gleb Natapov wrote: On Sat, Oct 09, 2010 at 08:48:15PM +0200, Avi Kivity wrote: On 10/07/2010 08:03 PM, Gleb Natapov wrote: Host side keeps track of outstanding apfs and will not send apf for the same phys address twice. It will halt vcpu instead.

Re: [PATCH v6 06/12] Add PV MSR to enable asynchronous page faults delivery.

2010-10-10 Thread Avi Kivity
On 10/07/2010 07:53 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 02:42:06PM +0200, Avi Kivity wrote: On 10/04/2010 05:56 PM, Gleb Natapov wrote: Guest enables async PF vcpu functionality using this MSR. return NON_PRESENT; + +MSR_KVM_ASYNC_PF_EN:

Re: [PATCH v6 04/12] Add memory slot versioning and use it to provide fast guest write interface

2010-10-10 Thread Avi Kivity
On 10/07/2010 07:23 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 06:20:53PM +0200, Avi Kivity wrote: On 10/07/2010 06:03 PM, Gleb Natapov wrote: Isn't SET_USER_MEMORY_REGION so slow that calling it 2^32 times isn't really feasible? Assuming it takes 1ms, it

Re: [PATCH v6 08/12] Handle async PF in a guest.

2010-10-10 Thread Gleb Natapov
On Sun, Oct 10, 2010 at 02:38:58PM +0200, Avi Kivity wrote: On 10/10/2010 02:32 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 03:10:27PM +0200, Avi Kivity wrote: On 10/04/2010 05:56 PM, Gleb Natapov wrote: When async PF capability is detected hook up special page fault handler that

Re: [PATCH v6 06/12] Add PV MSR to enable asynchronous page faults delivery.

2010-10-10 Thread Gleb Natapov
On Sun, Oct 10, 2010 at 02:47:43PM +0200, Avi Kivity wrote: On 10/07/2010 07:53 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 02:42:06PM +0200, Avi Kivity wrote: On 10/04/2010 05:56 PM, Gleb Natapov wrote: Guest enables async PF vcpu functionality using this MSR.

Re: [PATCH v6 10/12] Handle async PF in non preemptable context

2010-10-10 Thread Gleb Natapov
On Wed, Oct 06, 2010 at 12:41:32PM +0200, Gleb Natapov wrote: On Tue, Oct 05, 2010 at 04:51:50PM -0300, Marcelo Tosatti wrote: On Mon, Oct 04, 2010 at 05:56:32PM +0200, Gleb Natapov wrote: If async page fault is received by idle task or when preemp_count is not zero guest cannot

[PATCH v2 0/8] Move msix.o back to target independent files list

2010-10-10 Thread Avi Kivity
Due to a depedency on kvm's msix support, msix.c was changed to be a target dependent file. This patch set changes it back. v2: make the msix.c-kvm.c interface at a finer granularity, removing the need for kvm code to know about PCIDevice. Avi Kivity (8): msix: avoid leaking kvm data on

[PATCH v2 1/8] msix: avoid leaking kvm data on init failure

2010-10-10 Thread Avi Kivity
Move initialization after we're certain to succeed, so we don't leak memory on failure. Signed-off-by: Avi Kivity a...@redhat.com --- hw/msix.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 9663b17..162faa7 100644 --- a/hw/msix.c

[PATCH v2 4/8] Avoid use of kvm_irq_routing_entry in hw/msix.c

2010-10-10 Thread Avi Kivity
kvm_irq_routing_entry cannot be used when CONFIG_KVM is disabled; add a new interface to the kvm support code that uses scalars instead. Signed-off-by: Avi Kivity a...@redhat.com --- hw/msix.c| 35 ++- qemu-kvm.c | 44

[PATCH v2 5/8] kvm: Add stubs for msix support code

2010-10-10 Thread Avi Kivity
To allow msix to build without kvm support, add stubs for these functions. Move the declarations to kvm.h so they are accessible when kvm support is not built. Signed-off-by: Avi Kivity a...@redhat.com --- kvm-stub.c | 35 +++ kvm.h | 13 +

[PATCH v2 7/8] msix: remove CONFIG_KVM depedency

2010-10-10 Thread Avi Kivity
Now that the kvm support is properly stubbed, we can build the msix/kvm glue unconditionally. Signed-off-by: Avi Kivity a...@redhat.com --- hw/msix.c | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index c752e90..f6ab686 100644 ---

[PATCH v2 6/8] kvm: allow kvm.h to be included from target independent files

2010-10-10 Thread Avi Kivity
- don't include qemu-kvm.h when NEED_CPU_H not defined - move a couple of declarations around Signed-off-by: Avi Kivity a...@redhat.com --- kvm.h | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/kvm.h b/kvm.h index 2f12851..d484a3f 100644 --- a/kvm.h +++ b/kvm.h

[PATCH v2 8/8] Move msix.o build back to Makefile.objs

2010-10-10 Thread Avi Kivity
Now that hw/msix.c does not depend on CONFIG_KVM, remove it from Makefile.target and put it back in Makefile.objs. Signed-off-by: Avi Kivity a...@redhat.com --- Makefile.objs |4 +--- Makefile.target |4 2 files changed, 1 insertions(+), 7 deletions(-) diff --git a/Makefile.objs

[PATCH v2 2/8] kvm: drop kvm_context parameter from msix-related kvm functions

2010-10-10 Thread Avi Kivity
The kvm_context parameter serves no useful purpose since it's a global (and all callers reference that global); on the other hand it prevents the build when kvm is not configured in since the kvm_context symbol is not defined. Remove the parameter and replace it by the global kvm_context in

[PATCH v2 3/8] Avoid using kvm_irq_routing_entry in PCIDevice

2010-10-10 Thread Avi Kivity
This structure is not available when !CONFIG_KVM. While an incomplete type works if it's not used, you can't do address arithmetic on it. Use a new type kvm_msix_message instead. Signed-off-by: Avi Kivity a...@redhat.com --- hw/msix.c | 60

Using 1920x1080 resolution with kvm

2010-10-10 Thread Aniruddha
Hi, I would like to use a resolution 1920x1080 for my Windows XP Guest. However I only see 1680x1050 and 19520x1200 with nothing in between.I did see a message that resolution 1920x1080 was added to to vga bios. Anyone knows how I can activate the 1920x1080 resolution? I'm using Debian sid.

Re: [PATCH v2 0/8] Move msix.o back to target independent files list

2010-10-10 Thread Michael S. Tsirkin
On Sun, Oct 10, 2010 at 04:41:59PM +0200, Avi Kivity wrote: Due to a depedency on kvm's msix support, msix.c was changed to be a target dependent file. This patch set changes it back. Nothing to object to here :). FWIW Acked-by: Michael S. Tsirkin m...@redhat.com v2: make the msix.c-kvm.c

Re: [PATCH] trace exit to userspace event

2010-10-10 Thread Gleb Natapov
On Sun, Oct 10, 2010 at 10:45:45AM +0200, Avi Kivity wrote: On 10/08/2010 06:44 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 09:49:17PM -0300, Marcelo Tosatti wrote: On Thu, Oct 07, 2010 at 07:56:55PM +0200, Gleb Natapov wrote: diff --git a/virt/kvm/kvm_main.c

Re: [PATCH v6 02/12] Halt vcpu if page it tries to access is swapped out.

2010-10-10 Thread Avi Kivity
On 10/10/2010 09:29 AM, Gleb Natapov wrote: On Sat, Oct 09, 2010 at 08:30:18PM +0200, Avi Kivity wrote: On 10/07/2010 07:47 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 11:50:08AM +0200, Avi Kivity wrote: On 10/04/2010 05:56 PM, Gleb Natapov wrote: If a guest accesses swapped

Re: [PATCH v6 02/12] Halt vcpu if page it tries to access is swapped out.

2010-10-10 Thread Avi Kivity
On 10/10/2010 05:55 PM, Avi Kivity wrote: There is special completion that tells guest to wake all sleeping tasks on vcpu. It is delivered after migration on the destination. Yes, I saw. What if you can't deliver it? is it possible that some other vcpu will start receiving apfs that

Re: [PATCH v6 02/12] Halt vcpu if page it tries to access is swapped out.

2010-10-10 Thread Gleb Natapov
On Sun, Oct 10, 2010 at 05:55:25PM +0200, Avi Kivity wrote: @@ -5112,6 +5122,13 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) if (unlikely(r)) goto out; + kvm_check_async_pf_completion(vcpu); + if

Re: [PATCH v6 02/12] Halt vcpu if page it tries to access is swapped out.

2010-10-10 Thread Gleb Natapov
On Sun, Oct 10, 2010 at 05:56:31PM +0200, Avi Kivity wrote: On 10/10/2010 05:55 PM, Avi Kivity wrote: There is special completion that tells guest to wake all sleeping tasks on vcpu. It is delivered after migration on the destination. Yes, I saw. What if you can't deliver it? is it

Re: how to debug unhandled vm exit: 0x11?

2010-10-10 Thread Neo Jia
On Fri, Oct 1, 2010 at 7:29 AM, Avi Kivity a...@redhat.com wrote:  On 10/01/2010 08:16 AM, Neo Jia wrote: On Wed, Sep 29, 2010 at 1:38 AM, Avi Kivitya...@redhat.com  wrote:    On 09/28/2010 08:40 PM, Neo Jia wrote:  I found the instruction that caused this problem:  emulation failed

[PULL 0/3] PPC BookE patches

2010-10-10 Thread Alexander Graf
Hi Marcelo / Avi, Scott has found some bugs in the BookE implementation of KVM, so please pull the fixes for them to the kvm tree. The following changes since commit 3c4504636ab1ff41ec162980bf85121aee14e58f: Huang Ying (1): KVM: MCE: Send SRAR SIGBUS directly are available in the git

[PATCH 2/3] KVM: PPC: BookE: fix sleep with interrupts disabled

2010-10-10 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com It is not legal to call mutex_lock() with interrupts disabled. This will assert with debug checks enabled. If there's a real need to disable interrupts here, it could be done after the mutex is acquired -- but I don't see why it's needed at all.

[PATCH 3/3] KVM: PPC: e500: Call kvm_vcpu_uninit() before kvmppc_e500_tlb_uninit().

2010-10-10 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The VCPU uninit calls some TLB functions, and the TLB uninit function frees the memory used by them. Signed-off-by: Scott Wood scottw...@freescale.com Acked-by: Liu Yu yu@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---