Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-02-16 Thread Avi Kivity
Andrew Morton wrote: How important is this feature to KVM? Very. kvm pins pages that are referenced by the guest; a 64-bit guest will easily pin its entire memory with the kernel map. So this is critical for guest swapping to actually work. Other nice features like page migration are

Re: [kvm-devel] [kvm-ppc-devel] upstream PowerPC qemu breakage

2008-02-16 Thread Avi Kivity
Hollis Blanchard wrote: On Wed, 2008-02-13 at 08:58 +0200, Avi Kivity wrote: It'll need to be built against your kernel tree; please provide a URL. curl http://penguinppc.org/~hollisb/kvm/kvm-powerpc.mbox | git-am Unfortunately I wasn't able to get an F8 ppc rescue cd ISO to

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-02-16 Thread Andrew Morton
On Sat, 16 Feb 2008 10:45:50 +0200 Avi Kivity [EMAIL PROTECTED] wrote: Andrew Morton wrote: How important is this feature to KVM? Very. kvm pins pages that are referenced by the guest; hm. Why does it do that? a 64-bit guest will easily pin its entire memory with the kernel map.

Re: [kvm-devel] [PATCH] enable gfxboot on VMX

2008-02-16 Thread Avi Kivity
Alexander Graf wrote: While enabling gfxboot over vmx is very desirable, I'd like to avoid guest-specific hacks. IMO the correct fix is to set a non_vt_friendly flag when switching from real mode to protected mode, then continue emulation, re-computing the flag after every instruction.

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-02-16 Thread Avi Kivity
Andrew Morton wrote: Very. kvm pins pages that are referenced by the guest; hm. Why does it do that? It was deemed best not to allow the guest to write to a page that has been swapped out and assigned to an unrelated host process. One way to view the kvm shadow page tables

Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-16 Thread Andrea Arcangeli
On Fri, Feb 15, 2008 at 07:37:36PM -0800, Andrew Morton wrote: The | is obviously deliberate. But no explanation is provided telling us why we still call the callback if ptep_clear_flush_young() said the page was recently referenced. People who read your code will want to understand this.

Re: [kvm-devel] [PATCH] KVM swapping with MMU Notifiers V7

2008-02-16 Thread Andrew Morton
On Sat, 16 Feb 2008 11:48:27 +0100 Andrea Arcangeli [EMAIL PROTECTED] wrote: +void kvm_mmu_notifier_invalidate_range_end(struct mmu_notifier *mn, +struct mm_struct *mm, +unsigned long start, unsigned long end, +

[kvm-devel] [PATCH] KVM swapping with MMU Notifiers V7

2008-02-16 Thread Andrea Arcangeli
Those below two patches enable KVM to swap the guest physical memory through Christoph's V7. There's one last _purely_theoretical_ race condition I figured out and that I'm wondering how to best fix. The race condition worst case is that a few guest physical pages could remain pinned by sptes.

Re: [kvm-devel] [PATCH] KVM swapping with MMU Notifiers V7

2008-02-16 Thread Robin Holt
On Sat, Feb 16, 2008 at 11:48:27AM +0100, Andrea Arcangeli wrote: Those below two patches enable KVM to swap the guest physical memory through Christoph's V7. There's one last _purely_theoretical_ race condition I figured out and that I'm wondering how to best fix. The race condition worst

Re: [kvm-devel] [PATCH] enable gfxboot on VMX

2008-02-16 Thread Alexander Graf
On Feb 16, 2008, at 10:06 AM, Avi Kivity wrote: Alexander Graf wrote: While enabling gfxboot over vmx is very desirable, I'd like to avoid guest-specific hacks. IMO the correct fix is to set a non_vt_friendly flag when switching from real mode to protected mode, then continue

[kvm-devel] [RFC] Performance monitoring units and KVM

2008-02-16 Thread Balaji Rao
Hi all! Earlier it was suggested that we go ahead with emulating Perf Mon Events in exposing it to the guest. The serious limitation in this approach is that we end up exposing only a small number of events to the guest, even though the host hardware is capable of much more. The only benefit

Re: [kvm-devel] [patch 2/6] mmu_notifier: Callbacks to invalidate address ranges

2008-02-16 Thread Christoph Lameter
On Fri, 15 Feb 2008, Andrew Morton wrote: On Thu, 14 Feb 2008 22:49:01 -0800 Christoph Lameter [EMAIL PROTECTED] wrote: The invalidation of address ranges in a mm_struct needs to be performed when pages are removed or permissions etc change. hm. Do they? Why? If I'm in the process

Re: [kvm-devel] [patch 5/6] mmu_notifier: Support for drivers with revers maps (f.e. for XPmem)

2008-02-16 Thread Christoph Lameter
On Fri, 15 Feb 2008, Andrew Morton wrote: +#define mmu_rmap_notifier(function, args...) \ + do {\ + struct mmu_rmap_notifier *__mrn;\ + struct

Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-16 Thread Christoph Lameter
On Fri, 15 Feb 2008, Andrew Morton wrote: @@ -287,7 +288,8 @@ static int page_referenced_one(struct pa if (vma-vm_flags VM_LOCKED) { referenced++; *mapcount = 1; /* break early from loop */ - } else if (ptep_clear_flush_young(vma, address, pte)) + }

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-02-16 Thread Christoph Lameter
On Fri, 15 Feb 2008, Andrew Morton wrote: What is the status of getting infiniband to use this facility? Well we are talking about this it seems. How important is this feature to KVM? Andrea can answer this. To xpmem? Without this feature we are stuck with page pinning by increasing

Re: [kvm-devel] [RFC] Performance monitoring units and KVM

2008-02-16 Thread Anthony Liguori
Balaji Rao wrote: Hi all! Earlier it was suggested that we go ahead with emulating Perf Mon Events in exposing it to the guest. The serious limitation in this approach is that we end up exposing only a small number of events to the guest, even though the host hardware is capable of much

[kvm-devel] [patch 0/5] KVM paravirt MMU updates and cr3 caching

2008-02-16 Thread Marcelo Tosatti
The following patchset, based on earlier work by Anthony and Ingo, adds paravirt_ops support for KVM guests enabling hypercall based pte updates, hypercall batching and cr3 caching. -- - This SF.net email is sponsored by:

[kvm-devel] [patch 1/5] KVM: add basic paravirt support

2008-02-16 Thread Marcelo Tosatti
Add basic KVM paravirt support. Avoid vm-exits on IO delays. Add KVM_GET_PARA_FEATURES ioctl so paravirt features can be reported via cpuid. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Cc: Anthony Liguori [EMAIL PROTECTED] Index: kvm.paravirt/arch/x86/Kconfig

[kvm-devel] [patch 2/5] KVM: hypercall based pte updates and TLB flushes

2008-02-16 Thread Marcelo Tosatti
Hypercall based pte updates are faster than faults, and also allow use of the lazy MMU mode to batch operations. Don't report the feature if two dimensional paging is enabled. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Cc: Anthony Liguori [EMAIL PROTECTED] Index:

[kvm-devel] [patch 3/5] KVM: hypercall batching

2008-02-16 Thread Marcelo Tosatti
Batch pte updates and tlb flushes in lazy MMU mode. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Cc: Anthony Liguori [EMAIL PROTECTED] Index: kvm.paravirt/arch/x86/kernel/kvm.c === --- kvm.paravirt.orig/arch/x86/kernel/kvm.c +++

[kvm-devel] [patch 4/5] KVM: ignore zapped root pagetables

2008-02-16 Thread Marcelo Tosatti
Mark zapped root pagetables as invalid and ignore such pages during lookup. This is a problem with the cr3-target feature, where a zapped root table fools the faulting code into creating a read-only mapping. The result is a lockup if the instruction can't be emulated. Signed-off-by: Marcelo

[kvm-devel] [patch 5/5] KVM: VMX cr3 cache support

2008-02-16 Thread Marcelo Tosatti
Add support for the cr3 cache feature on Intel VMX CPU's. This avoids vmexits on context switch if the cr3 value is cached in one of the entries (currently 4 are present). This is especially important for Xenner, where each guest syscalls involves a cr3 switch. Signed-off-by: Marcelo Tosatti

Re: [kvm-devel] [patch 0/5] KVM paravirt MMU updates and cr3 caching

2008-02-16 Thread Anthony Liguori
Marcelo Tosatti wrote: The following patchset, based on earlier work by Anthony and Ingo, adds paravirt_ops support for KVM guests enabling hypercall based pte updates, hypercall batching and cr3 caching. Could you post performance results for each optimization? I'm particularly curious

Re: [kvm-devel] [patch 0/5] KVM paravirt MMU updates and cr3 caching

2008-02-16 Thread Marcelo Tosatti
On Sat, Feb 16, 2008 at 05:37:00PM -0600, Anthony Liguori wrote: Marcelo Tosatti wrote: The following patchset, based on earlier work by Anthony and Ingo, adds paravirt_ops support for KVM guests enabling hypercall based pte updates, hypercall batching and cr3 caching. Could you post

Re: [kvm-devel] [RFC] Performance monitoring units and KVM

2008-02-16 Thread Balaji Rao
On Sunday 17 February 2008 03:34:43 am Anthony Liguori wrote: Balaji Rao wrote: Hi all! Earlier it was suggested that we go ahead with emulating Perf Mon Events in exposing it to the guest. The serious limitation in this approach is that we end up exposing only a small number of events

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-02-16 Thread Doug Maxey
On Fri, 15 Feb 2008 19:37:19 PST, Andrew Morton wrote: Which other potential clients have been identified and how important it it to those? The powerpc ehea utilizes its own mmu. Not sure about the importance to the driver. (But will investigate :) ++doug