Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Paolo Bonzini
On 01/03/2012 02:12 AM, Anthony Liguori wrote: 2/4 is on the list. It's adding the type infrastructure such that when you do -device e1000, as far as QOM is concerned you're creating an E1000 object which inherits from a PCIDevice, etc. Yes, sorry, that was quite obvious. I was not sure about

Re: KVM call agenda for Tuesday 3

2012-01-03 Thread Stefan Hajnoczi
On Mon, Jan 02, 2012 at 01:09:40PM +0100, Juan Quintela wrote: Please send in any agenda items you are interested in covering. Status of virtio drivers for Windows: * Unsupported in community today * Bugs languish on bug tracker/mailing list * Risking a reputation of not supporting Windows

Re: where should I report kvm kernel bug?

2012-01-03 Thread Avi Kivity
On 01/03/2012 05:02 AM, Ren, Yongjie wrote: Hi folks, I reported some kvm kernel bugs at bugzilla.kernel.org before the kernel.org was attacked. Though kernel.org resumes, its bugzilla can't be accessed so far. So, where should I report a kvm kernel bug? I mean not just reporting in this

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Peter Maydell
On 3 January 2012 01:14, Anthony Liguori anth...@codemonkey.ws wrote: Let's separate out what a user *should* do from what a user *can* do. A user *should* have a command line syntax that reflects something that makes sense to them. For instance, qemu-system-arm --machine beaglebone I don't

Re: [PATCH v2] kvm tool: Change kvm-ram_size to real mapped size.

2012-01-03 Thread Pekka Enberg
On Mon, Dec 19, 2011 at 4:27 AM, zanghongy...@huawei.com wrote: From: Hongyong Zang zanghongy...@huawei.com If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than ram_size.

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Alex Bradbury
On 3 January 2012 10:26, Peter Maydell peter.mayd...@linaro.org wrote: I don't think we even have syntax for 2 at the moment except for the weird special case of -cpu foo. It currently is quite common to e.g. use a versatilepb machine model but switch the CPU for arm1176, cortex-a8 etc with

Re: KVM call agenda for Tuesday 3

2012-01-03 Thread Dor Laor
On 01/03/2012 10:33 AM, Stefan Hajnoczi wrote: On Mon, Jan 02, 2012 at 01:09:40PM +0100, Juan Quintela wrote: Please send in any agenda items you are interested in covering. Status of virtio drivers for Windows: * Unsupported in community today Why? * Bugs languish on bug

Re: KVM call agenda for Tuesday 3

2012-01-03 Thread Stefan Hajnoczi
On Tue, Jan 3, 2012 at 12:15 PM, Dor Laor dl...@redhat.com wrote: On 01/03/2012 10:33 AM, Stefan Hajnoczi wrote: On Mon, Jan 02, 2012 at 01:09:40PM +0100, Juan Quintela wrote: Please send in any agenda items you are interested in covering. Status of virtio drivers for Windows:  *

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Anthony Liguori
On 01/03/2012 04:26 AM, Peter Maydell wrote: On 3 January 2012 01:14, Anthony Liguorianth...@codemonkey.ws wrote: Let's separate out what a user *should* do from what a user *can* do. A user *should* have a command line syntax that reflects something that makes sense to them. For instance,

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Andreas Färber
Anthony, Am 03.01.2012 02:04, schrieb Anthony Liguori: On 01/02/2012 07:46 AM, Andreas Färber wrote: Am 02.01.2012 13:09, schrieb Juan Quintela: First of all, Happy New Year to everybody (even for the people whose calendar is different O:-) +1 Please send in any agenda items you are

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Peter Maydell
On 3 January 2012 13:37, Anthony Liguori anth...@codemonkey.ws wrote: For what you're getting at, you actually want to model the CPUs in QOM such that you would have an ARM926 is-a ARMCPU is-a CPUCommon. Then you could have the beagle machine have a linkARM926.  If it always has a single CPU,

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Anthony Liguori
On 01/03/2012 07:52 AM, Andreas Färber wrote: Anthony, Am 03.01.2012 02:04, schrieb Anthony Liguori: On 01/02/2012 07:46 AM, Andreas Färber wrote: Am 02.01.2012 13:09, schrieb Juan Quintela: First of all, Happy New Year to everybody (even for the people whose calendar is different O:-) +1

Re: [PATCH 1/2] KVM: PPC: epapr: Add idle hcall support for host

2012-01-03 Thread Avi Kivity
On 12/31/2011 08:16 AM, Liu Yu wrote: Add a new field opt_feature in struct kvm_ppc_pvinfo to tell userspace whether it support hcall idle. diff --git a/include/linux/kvm.h b/include/linux/kvm.h index c107fae..5af21f3 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -426,9

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Anthony Liguori
On 01/03/2012 07:57 AM, Peter Maydell wrote: On 3 January 2012 13:37, Anthony Liguorianth...@codemonkey.ws wrote: For what you're getting at, you actually want to model the CPUs in QOM such that you would have an ARM926 is-a ARMCPU is-a CPUCommon. Then you could have the beagle machine have a

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Andreas Färber
Am 03.01.2012 14:12, schrieb Stefan Hajnoczi: On Tue, Jan 3, 2012 at 12:15 PM, Dor Laor dl...@redhat.com wrote: There is a legal issue w/ WHQL drivers but self sign is not a probably and I believe that's what we have today. For a user anything other than first-class native drivers is a red

Re: [PATCH 1/2] KVM: PPC: epapr: Add idle hcall support for host

2012-01-03 Thread Alexander Graf
On 03.01.2012, at 15:01, Avi Kivity wrote: On 12/31/2011 08:16 AM, Liu Yu wrote: Add a new field opt_feature in struct kvm_ppc_pvinfo to tell userspace whether it support hcall idle. diff --git a/include/linux/kvm.h b/include/linux/kvm.h index c107fae..5af21f3 100644 ---

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Peter Maydell
On 3 January 2012 14:02, Anthony Liguori anth...@codemonkey.ws wrote: On 01/03/2012 07:57 AM, Peter Maydell wrote: The CPU should always be a child of the board, surely, even if the user might want to use a different one? That's just basic composition. The links should be for the CPU has two

[tests-AUTOTEST][PATCH] virt tests kvm: Adds cpuflags test

2012-01-03 Thread Jiří Župka
This patch add tests for testing cpu flags in qemu: a) interface cpu flags tests 1) qemu -cpu ?model 2) qemu -cpu ?dump 3) qemu -cpu ?cpuid b) guest run cpu flags tests 1) Test boot cpu model. 2) Test boot cpu model and additiona/nonstandard model flags. 3) Test boot fail with host

[tests-Autotests][PATCH] virt tests kvm: Adds cpuflags test

2012-01-03 Thread Jiří Župka
This patch add tests for testing cpu flags in qemu: a) interface cpu flags tests 1) qemu -cpu ?model 2) qemu -cpu ?dump 3) qemu -cpu ?cpuid b) guest run cpu flags tests 1) Test boot cpu model. 2) Test boot cpu model and additiona/nonstandard model flags. 3) Test boot fail with host

Re: [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-03 Thread Andrea Arcangeli
On Mon, Jan 02, 2012 at 06:55:18PM +0100, Paolo Bonzini wrote: On 01/02/2012 06:05 PM, Andrea Arcangeli wrote: On Thu, Dec 29, 2011 at 06:01:45PM +0200, Avi Kivity wrote: On 12/29/2011 06:00 PM, Avi Kivity wrote: The NFS client has exactly the same issue, if you mount it with the intr

Re: KVM call agenda for Tuesday 3

2012-01-03 Thread Vadim Rozenfeld
On Tue, 2012-01-03 at 13:12 +, Stefan Hajnoczi wrote: On Tue, Jan 3, 2012 at 12:15 PM, Dor Laor dl...@redhat.com wrote: On 01/03/2012 10:33 AM, Stefan Hajnoczi wrote: On Mon, Jan 02, 2012 at 01:09:40PM +0100, Juan Quintela wrote: Please send in any agenda items you are interested in

Re: [Autotest] [PATCH] virt: Add the parameter --vnclisten to the virt-install command

2012-01-03 Thread Lucas Meneghel Rodrigues
On 01/02/2012 11:50 PM, tangchen wrote: Hi~ Here is the problem:) Without vnclisten, guest is still accessable from localhost by vnc. But we cannot access guest from other host. And most of the time, we do the test on remote host, and in this situation, vnclisten is very useful.:) Ok, fair

Re: [Qemu-devel] [PATCH 1/5] vfio: Introduce documentation for VFIO driver

2012-01-03 Thread Alex Williamson
On Wed, 2011-12-28 at 19:16 +0200, Ronen Hod wrote: On 12/21/2011 11:42 PM, Alex Williamson wrote: +The final aspect of VFIO is the notion of merging groups. In both the +assignment of devices to virtual machines and the pure userspace +driver model, it's expect that a single user instance

Re: [Qemu-devel] Better qemu/kvm defaults (was Re: [RFC PATCH 0/4] Gang scheduling in CFS)

2012-01-03 Thread Anthony Liguori
On 01/01/2012 04:16 AM, Dor Laor wrote: On 12/29/2011 06:16 PM, Anthony Liguori wrote: On 12/29/2011 10:07 AM, Dor Laor wrote: On 12/26/2011 11:05 AM, Avi Kivity wrote: On 12/26/2011 05:14 AM, Nikunj A Dadhania wrote: btw you can get an additional speedup by enabling x2apic, for

Re: where should I report kvm kernel bug?

2012-01-03 Thread Konstantin Ryabitsev
On Tue, 2012-01-03 at 12:10 +0200, Avi Kivity wrote: I'm surprised bugzilla.kernel.org isn't responding. Copying ftpad...@kernel.org for ETA (though that address isn't responding, either). Hi, Avi and Ren: Unfortunately, we don't currently have an ETA for bringing up bugzilla.kernel.org. We

Re: where should I report kvm kernel bug?

2012-01-03 Thread Avi Kivity
On 01/03/2012 06:28 PM, Konstantin Ryabitsev wrote: On Tue, 2012-01-03 at 12:10 +0200, Avi Kivity wrote: I'm surprised bugzilla.kernel.org isn't responding. Copying ftpad...@kernel.org for ETA (though that address isn't responding, either). Hi, Avi and Ren: Unfortunately, we don't

Stalls on Live Migration of VMs with a lot of memory

2012-01-03 Thread Peter Lieven
Hi all, is there any known issue when migrating VMs with a lot of (e.g. 32GB) of memory. It seems that there is some portion in the migration code which takes too much time when the number of memory pages is large. Symptoms are: Irresponsive VNC connection, VM stalls and also irresponsive

[GIT PULL 0/5] perf/core fixes and improvements

2012-01-03 Thread Arnaldo Carvalho de Melo
Hi Ingo, Please consider pulling from: git://github.com/acmel/linux.git perf/core Regards, - Arnaldo Joerg Roedel (1): perf kvm: Fix copy paste error in description Namhyung Kim (4): perf session: Remove impossible condition check perf stat: Introduce get_ratio_color() helper

[PATCH 5/5] perf kvm: Fix copy paste error in description

2012-01-03 Thread Arnaldo Carvalho de Melo
From: Joerg Roedel joerg.roe...@amd.com The --host option certainly enables host-data collection. Cc: Avi Kivity a...@redhat.com Cc: Ingo Molnar mi...@elte.hu Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Joerg Roedel joerg.roe...@amd.com Cc: kvm@vger.kernel.org Link:

Re: Device pass-through

2012-01-03 Thread Alex Williamson
On Mon, 2012-01-02 at 11:41 -0800, Gordon Messmer wrote: I'm going to summarize my questions first and write the long explanation afterward... 1: What happens when Linux rejects the aperture allocated by the BIOS for an AMD IOMMU? This is actually the GART aperture, which Linux will try

Re: [Qemu-devel] Better qemu/kvm defaults (was Re: [RFC PATCH 0/4] Gang scheduling in CFS)

2012-01-03 Thread Dor Laor
On 01/03/2012 05:48 PM, Anthony Liguori wrote: On 01/01/2012 04:16 AM, Dor Laor wrote: On 12/29/2011 06:16 PM, Anthony Liguori wrote: On 12/29/2011 10:07 AM, Dor Laor wrote: On 12/26/2011 11:05 AM, Avi Kivity wrote: On 12/26/2011 05:14 AM, Nikunj A Dadhania wrote: btw you can get an

Re: [Qemu-devel] Better qemu/kvm defaults (was Re: [RFC PATCH 0/4] Gang scheduling in CFS)

2012-01-03 Thread Anthony Liguori
On 01/03/2012 04:31 PM, Dor Laor wrote: We can just set this for pc-1.1. I don't see any real harm in doing that. Great, it 'only' took about 3 years from the time it got developed originally by Uri... Someone just needs to send a patch. When using 'guests-pick', we initially present the

Re: [Qemu-devel] Better qemu/kvm defaults (was Re: [RFC PATCH 0/4] Gang scheduling in CFS)

2012-01-03 Thread Dor Laor
On 01/04/2012 12:45 AM, Anthony Liguori wrote: When using 'guests-pick', we initially present the most compatible network model (rtl8139, for instance). We would provide a paravirtual channel (guest-agent?) that could be used to enumerate which models were available and let guest decide which

Re: Device pass-through

2012-01-03 Thread Gordon Messmer
Thanks, Alex. I really appreciate the reply. On 01/03/2012 01:34 PM, Alex Williamson wrote: This is actually the GART aperture, which Linux will try to use as an IOMMU. You can pretty much ignore this, but it may be wasting memory for no good reason if it's really hiding usable memory and

RE: where should I report kvm kernel bug?

2012-01-03 Thread Ren, Yongjie
-Original Message- From: Avi Kivity [mailto:a...@redhat.com] Sent: Wednesday, January 04, 2012 1:08 AM To: Konstantin Ryabitsev Cc: Ren, Yongjie; kvm@vger.kernel.org; ftpadmin Subject: Re: where should I report kvm kernel bug? On 01/03/2012 06:28 PM, Konstantin Ryabitsev wrote:

[PATCH 02/50] KVM: PPC: e500: Eliminate preempt_disable in local_sid_destroy_all

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The only place it makes sense to call this function already needs to have preemption disabled. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |4 +--- 1 files changed, 1

[PULL 00/50] ppc patch queue 2012-01-04

2012-01-03 Thread Alexander Graf
Hi Avi, I finally got around to completely test and check my PPC patch queue, so I finally feel confident that more works than before :). Please pull. Alex The following changes since commit 781f306789361d671187d9ddb518eea3ffda786a: Avi Kivity (1): Merge branch 'for-avi' of

[PATCH 05/50] KVM: PPC: e500: tlbsx: fix tlb0 esel

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com It should contain the way, not the absolute TLB0 index. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[PATCH 14/50] KVM: PPC: Rename deliver_interrupts to prepare_to_enter

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This function also updates paravirt int_pending, so rename it to be more obvious that this is a collection of checks run prior to (re)entering a guest. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 10/50] PPC: Fix race in mtmsr paravirt implementation

2012-01-03 Thread Alexander Graf
From: Bharat Bhushan r65...@freescale.com The current implementation of mtmsr and mtmsrd are racy in that it does: * check (int_pending == 0) --- host sets int_pending = 1 --- * write shared page * done while instead we should check for int_pending after the shared page is written.

[PATCH 13/50] KVM: PPC: booke: check for signals in kvmppc_vcpu_run

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Currently we check prior to returning from a lightweight exit, but not prior to initial entry. book3s already does a similar test. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c

[PATCH 16/50] KVM: PPC: booke: Check for MSR[WE] in prepare_to_enter

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This prevents us from inappropriately blocking in a KVM_SET_REGS ioctl -- the MSR[WE] will take effect when the guest is next entered. It also causes SRR1[WE] to be set when we enter the guest's interrupt handler, which is what e500 hardware is documented

[PATCH 15/50] KVM: PPC: Move prepare_to_enter call site into subarch code

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This function should be called with interrupts disabled, to avoid a race where an exception is delivered after we check, but the resched kick is received before we disable interrupts (and thus doesn't actually trigger the exit code that would recheck

[PATCH 39/50] KVM: PPC: Implement MMIO emulation support for Book3S HV guests

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This provides the low-level support for MMIO emulation in Book3S HV guests. When the guest tries to map a page which is not covered by any memslot, that page is taken to be an MMIO emulation page. Instead of inserting a valid HPTE, we insert an HPTE that

[PATCH 50/50] KVM: PPC: Use the vcpu kmem_cache when allocating new VCPUs

2012-01-03 Thread Alexander Graf
From: Sasha Levin levinsasha...@gmail.com Currently the code kzalloc()s new VCPUs instead of using the kmem_cache which is created when KVM is initialized. Modify it to allocate VCPUs from that kmem_cache. Signed-off-by: Sasha Levin levinsasha...@gmail.com Acked-by: Paul Mackerras

[PATCH 49/50] KVM: PPC: booke: Add booke206 TLB trace

2012-01-03 Thread Alexander Graf
From: Liu Yu yu@freescale.com The existing kvm_stlb_write/kvm_gtlb_write were a poor match for the e500/book3e MMU -- mas1 was passed as tid, mas2 was limited to unsigned int which will be a problem on 64-bit, mas3/7 got split up rather than treated as a single 64-bit word, etc.

[PATCH 43/50] KVM: PPC: Fix vcpu_create dereference before validity check.

2012-01-03 Thread Alexander Graf
From: Matt Evans m...@ozlabs.org Fix usage of vcpu struct before check that it's actually valid. Signed-off-by: Matt Evans m...@ozlabs.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 44/50] KVM: PPC: Add KVM_CAP_NR_VCPUS and KVM_CAP_MAX_VCPUS

2012-01-03 Thread Alexander Graf
From: Matt Evans m...@ozlabs.org PPC KVM lacks these two capabilities, and as such a userland system must assume a max of 4 VCPUs (following api.txt). With these, a userland can determine a more realistic limit. Signed-off-by: Matt Evans m...@ozlabs.org Signed-off-by: Alexander Graf

[PATCH 48/50] KVM: PPC: Book3s HV: Implement get_dirty_log using hardware changed bit

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This changes the implementation of kvm_vm_ioctl_get_dirty_log() for Book3s HV guests to use the hardware C (changed) bits in the guest hashed page table. Since this makes the implementation quite different from the Book3s PR case, this moves the existing

[PATCH 47/50] KVM: PPC: Book3S HV: Use the hardware referenced bit for kvm_age_hva

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This uses the host view of the hardware R (referenced) bit to speed up kvm_age_hva() and kvm_test_age_hva(). Instead of removing all the relevant HPTEs in kvm_age_hva(), we now just reset their R bits if set. Also, kvm_test_age_hva() now scans the relevant

[PATCH 46/50] KVM: PPC: Book3s HV: Maintain separate guest and host views of R and C bits

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This allows both the guest and the host to use the referenced (R) and changed (C) bits in the guest hashed page table. The guest has a view of R and C that is maintained in the guest_rpte field of the revmap entry for the HPTE, and the host has a view that

[PATCH 45/50] KVM: PPC: Book3S HV: Keep HPTE locked when invalidating

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This reworks the implementations of the H_REMOVE and H_BULK_REMOVE hcalls to make sure that we keep the HPTE locked and in the reverse- mapping chain until we have finished invalidating it. Previously we would remove it from the chain and unlock it before

[PATCH 42/50] KVM: PPC: Allow for read-only pages backing a Book3S HV guest

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org With this, if a guest does an H_ENTER with a read/write HPTE on a page which is currently read-only, we make the actual HPTE inserted be a read-only version of the HPTE. We now intercept protection faults as well as HPTE not found faults, and for a

[PATCH 40/50] KVM: PPC: Implement MMU notifiers for Book3S HV guests

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This adds the infrastructure to enable us to page out pages underneath a Book3S HV guest, on processors that support virtualized partition memory, that is, POWER7. Instead of pinning all the guest's pages, we now look in the host userspace Linux page tables

[PATCH 36/50] KVM: PPC: Allow use of small pages to back Book3S HV guests

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This relaxes the requirement that the guest memory be provided as 16MB huge pages, allowing it to be provided as normal memory, i.e. in pages of PAGE_SIZE bytes (4k or 64k). To allow this, we index the kvm-arch.slot_phys[] arrays with a small page index,

[PATCH 35/50] KVM: PPC: Only get pages when actually needed, not in prepare_memory_region()

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This removes the code from kvmppc_core_prepare_memory_region() that looked up the VMA for the region being added and called hva_to_page to get the pfns for the memory. We have no guarantee that there will be anything mapped there at the time of the

[PATCH 31/50] KVM: PPC: Keep a record of HV guest view of hashed page table entries

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This adds an array that parallels the guest hashed page table (HPT), that is, it has one entry per HPTE, used to store the guest's view of the second doubleword of the corresponding HPTE. The first doubleword in the HPTE is the same as the guest's idea of

[PATCH 34/50] KVM: PPC: Make the H_ENTER hcall more reliable

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org At present, our implementation of H_ENTER only makes one try at locking each slot that it looks at, and doesn't even retry the ldarx/stdcx. atomic update sequence that it uses to attempt to lock the slot. Thus it can return the H_PTEG_FULL error

[PATCH 32/50] KVM: PPC: Keep page physical addresses in per-slot arrays

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This allocates an array for each memory slot that is added to store the physical addresses of the pages in the slot. This array is vmalloc'd and accessed in kvmppc_h_enter using real_vmalloc_addr(). This allows us to remove the ram_pginfo field from the

[PATCH 33/50] KVM: PPC: Add an interface for pinning guest pages in Book3s HV guests

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This adds two new functions, kvmppc_pin_guest_page() and kvmppc_unpin_guest_page(), and uses them to pin the guest pages where the guest has registered areas of memory for the hypervisor to update, (i.e. the per-cpu virtual processor areas, SLB shadow buffers

[PATCH 30/50] KVM: PPC: Move kvm_vcpu_ioctl_[gs]et_one_reg down to platform-specific code

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This moves the get/set_one_reg implementation down from powerpc.c into booke.c, book3s_pr.c and book3s_hv.c. This avoids #ifdefs in C code, but more importantly, it fixes a bug on Book3s HV where we were accessing beyond the end of the kvm_vcpu struct (via

[PATCH 38/50] KVM: PPC: Maintain a doubly-linked list of guest HPTEs for each gfn

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This expands the reverse mapping array to contain two links for each HPTE which are used to link together HPTEs that correspond to the same guest logical page. Each circular list of HPTEs is pointed to by the rmap array entry for the guest logical page,

[PATCH 37/50] KVM: PPC: Allow I/O mappings in memory slots

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This provides for the case where userspace maps an I/O device into the address range of a memory slot using a VM_PFNMAP mapping. In that case, we work out the pfn from vma-vm_pgoff, and record the cache enable bits from vma-vm_page_prot in two low-order bits

[PATCH 41/50] KVM: Add barriers to allow mmu_notifier_retry to be used locklessly

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This adds an smp_wmb in kvm_mmu_notifier_invalidate_range_end() and an smp_rmb in mmu_notifier_retry() so that mmu_notifier_retry() will give the correct answer when called without kvm-mmu_lock being held. PowerPC Book3S HV KVM wants to use a bitlock per

[PATCH 20/50] KVM: PPC: booke: Improve timer register emulation

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Decrementers are now properly driven by TCR/TSR, and the guest has full read/write access to these registers. The decrementer keeps ticking (and setting the TSR bit) regardless of whether the interrupts are enabled with TCR. The decrementer stops at

[PATCH 29/50] KVM: PPC: Make wakeups work again for Book3S HV guests

2012-01-03 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org When commit f43fdc15fa (KVM: PPC: booke: Improve timer register emulation) factored out some code in arch/powerpc/kvm/powerpc.c into a new helper function, kvm_vcpu_kick(), an error crept in which causes Book3s HV guest vcpus to stall. This fixes it. On

[PATCH 28/50] KVM: PPC: Avoid patching paravirt template code

2012-01-03 Thread Alexander Graf
From: Liu Yu-B13201 yu@freescale.com Currently we patch the whole code include paravirt template code. This isn't safe for scratch area and has impact to performance. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/kvm.c |

[PATCH 27/50] KVM: PPC: e500: use hardware hint when loading TLB0 entries

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The hardware maintains a per-set next victim hint. Using this reduces conflicts, especially on e500v2 where a single guest TLB entry is mapped to two shadow TLB entries (user and kernel). We want those two entries to go to different TLB ways. sesel is

[PATCH 22/50] KVM: PPC: Book3s: PR: No irq_disable in vcpu_run

2012-01-03 Thread Alexander Graf
Somewhere during merges we ended up from local_irq_enable() foo(); local_irq_disable() to always keeping irqs enabled during that part. However, we now have the following code: foo(); local_irq_disable() which disables interrupts without the surrounding code enabling them again! So

[PATCH 25/50] KVM: PPC: Book3S: PR: Fix signal check race

2012-01-03 Thread Alexander Graf
As Scott put it: If we get a signal after the check, we want to be sure that we don't receive the reschedule IPI until after we're in the guest, so that it will cause another signal check. we need to have interrupts disabled from the point we do signal_check() all the way until we actually

[PATCH 24/50] KVM: PPC: align vcpu_kick with x86

2012-01-03 Thread Alexander Graf
Our vcpu kick implementation differs a bit from x86 which resulted in us not disabling preemption during the kick. Get it a bit closer to what x86 does. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-)

[PATCH 18/50] KVM: PPC: booke: Paravirtualize wrtee

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Also fix wrteei 1 paravirt to check for a pending interrupt. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/kvm.c | 92 +-

[PATCH 23/50] KVM: PPC: Use get/set for to_svcpu to help preemption

2012-01-03 Thread Alexander Graf
When running the 64-bit Book3s PR code without CONFIG_PREEMPT_NONE, we were doing a few things wrong, most notably access to PACA fields without making sure that the pointers stay stable accross the access (preempt_disable()). This patch moves to_svcpu towards a get/put model which allows us to

[PATCH 19/50] KVM: PPC: Paravirtualize SPRG4-7, ESR, PIR, MASn

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This allows additional registers to be accessed by the guest in PR-mode KVM without trapping. SPRG4-7 are readable from userspace. On booke, KVM will sync these registers when it enters the guest, so that accesses from guest userspace will work. The

[PATCH 26/50] KVM: PPC: e500: Fix TLBnCFG in KVM_CONFIG_TLB

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The associativity, not just total size, can differ from the host hardware. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c | 19 ++- 1 files changed, 14

[PATCH 08/50] KVM: PPC: Add support for explicit HIOR setting

2012-01-03 Thread Alexander Graf
Until now, we always set HIOR based on the PVR, but this is just wrong. Instead, we should be setting HIOR explicitly, so user space can decide what the initial HIOR value is - just like on real hardware. We keep the old PVR based way around for backwards compatibility, but once user space uses

[PATCH 17/50] KVM: PPC: booke: Fix int_pending calculation for MSR[EE] paravirt

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com int_pending was only being lowered if a bit in pending_exceptions was cleared during exception delivery -- but for interrupts, we clear it during IACK/TSR emulation. This caused paravirt for enabling MSR[EE] to be ineffective. Signed-off-by: Scott Wood

[PATCH 21/50] KVM: PPC: Book3s: PR: Disable preemption in vcpu_run

2012-01-03 Thread Alexander Graf
When entering the guest, we want to make sure we're not getting preempted away, so let's disable preemption on entry, but enable it again while handling guest exits. Reported-by: Jörg Sommer jo...@alea.gnuu.de Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - fix cases where

[PATCH 11/50] Fix DEC truncation for greater than 0xffff_ffff/1000

2012-01-03 Thread Alexander Graf
From: Bharat Bhushan r65...@freescale.com kvmppc_emulate_dec() uses dec_nsec of type unsigned long and does below calculation: dec_nsec = vcpu-arch.dec; dec_nsec *= 1000; This will truncate if DEC value vcpu-arch.dec is greater than 0x_/1000. For example : For

[PATCH 09/50] KVM: PPC: E500: Support hugetlbfs

2012-01-03 Thread Alexander Graf
With hugetlbfs support emerging on e500, we should also support KVM backing its guest memory by it. This patch adds support for hugetlbfs into the e500 shadow mmu code. Signed-off-by: Alexander Graf ag...@suse.de Acked-by: Scott Wood scottw...@freescale.com --- v1 - v2: - address scott's

[PATCH 03/50] KVM: PPC: e500: clear up confusion between host and guest entries

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Split out the portions of tlbe_priv that should be associated with host entries into tlbe_ref. Base victim selection on the number of hardware entries, not guest entries. For TLB1, where one guest entry can be mapped by multiple host entries, we use the

[PATCH 04/50] KVM: PPC: e500: MMU API

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This implements a shared-memory API for giving host userspace access to the guest's TLB. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- Documentation/virtual/kvm/api.txt | 74 +++

[PATCH 06/50] KVM: PPC: e500: Don't hardcode PIR=0

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The hardcoded behavior prevents proper SMP support. QEMU shall specify the vcpu's PIR as the vcpu id. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |4 ++--

[PATCH 12/50] KVM: booke: Do Not start decrementer when SPRN_DEC set 0

2012-01-03 Thread Alexander Graf
From: Bharat Bhushan r65...@freescale.com As per specification the decrementer interrupt not happen when DEC is written with 0. Also when DEC is zero, no decrementer running. So we should not start hrtimer for decrementer when DEC = 0. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com

[PATCH 07/50] KVM: PPC: Add generic single register ioctls

2012-01-03 Thread Alexander Graf
Right now we transfer a static struct every time we want to get or set registers. Unfortunately, over time we realize that there are more of these than we thought of before and the extensibility and flexibility of transferring a full struct every time is limited. So this is a new approach to the

[PATCH 01/50] KVM: PPC: e500: don't translate gfn to pfn with preemption disabled

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Delay allocation of the shadow pid until we're ready to disable preemption and write the entry. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c | 36

Re: [PATCH 00/21][RFC] postcopy live migration

2012-01-03 Thread Takuya Yoshikawa
(2012/01/01 18:52), Dor Laor wrote: But we really need to think hard about whether this is the right thing to take into the tree. I worry a lot about the fact that we don't test pre-copy migration nearly enough and adding a second form just introduces more things to test. It is an issue but it

Re: [Qemu-devel] Stalls on Live Migration of VMs with a lot of memory

2012-01-03 Thread Shu Ming
On 2012-1-4 2:04, Peter Lieven wrote: Hi all, is there any known issue when migrating VMs with a lot of (e.g. 32GB) of memory. It seems that there is some portion in the migration code which takes too much time when the number of memory pages is large. Symptoms are: Irresponsive VNC

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-03 Thread Cao,Bing Bu
On 01/03/2012 09:12 PM, Stefan Hajnoczi wrote: On Tue, Jan 3, 2012 at 12:15 PM, Dor Laordl...@redhat.com wrote: On 01/03/2012 10:33 AM, Stefan Hajnoczi wrote: On Mon, Jan 02, 2012 at 01:09:40PM +0100, Juan Quintela wrote: Please send in any agenda items you are interested in covering.

Re: [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-03 Thread Isaku Yamahata
On Mon, Jan 02, 2012 at 06:05:51PM +0100, Andrea Arcangeli wrote: On Thu, Dec 29, 2011 at 06:01:45PM +0200, Avi Kivity wrote: On 12/29/2011 06:00 PM, Avi Kivity wrote: The NFS client has exactly the same issue, if you mount it with the intr option. In fact you could use the NFS client as

Re: FreeBSD guest with VTD NIC not passing traffic

2012-01-03 Thread Alex Williamson
On Mon, 2011-12-19 at 19:49 +0530, Shashidhar Patil wrote: Hi, I am running Ubuntu 10.10 (amd64) on a 2 socket nehalem based server with IOH 5520. 5520 supports VTD. I enabled DMAR with intel_iommu=on. The box has intel 82599 adapter which I assigned through VT-D to FreeBSD 8.2

Re: [PATCH 21/21] postcopy: implement postcopy livemigration

2012-01-03 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 06:06:10PM +0200, Avi Kivity wrote: On 12/29/2011 03:26 AM, Isaku Yamahata wrote: This patch implements postcopy livemigration. +/* RAM is allocated via umem for postcopy incoming mode */ +#define RAM_POSTCOPY_UMEM_MASK (1 1) + typedef struct RAMBlock {

Re: Device pass-through

2012-01-03 Thread Alex Williamson
On Tue, 2012-01-03 at 16:29 -0800, Gordon Messmer wrote: Thanks, Alex. I really appreciate the reply. On 01/03/2012 01:34 PM, Alex Williamson wrote: This is actually the GART aperture, which Linux will try to use as an IOMMU. You can pretty much ignore this, but it may be wasting memory

Re: [Qemu-devel] [PATCH 00/21][RFC] postcopy live migration

2012-01-03 Thread Michael Roth
On 01/01/2012 03:52 AM, Dor Laor wrote: On 12/30/2011 12:39 AM, Anthony Liguori wrote: On 12/28/2011 07:25 PM, Isaku Yamahata wrote: Intro = This patch series implements postcopy live migration.[1] As discussed at KVM forum 2011, dedicated character device is used for distributed shared

Re: [Qemu-devel] [PATCH 00/21][RFC] postcopy live migration

2012-01-03 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 04:39:52PM -0600, Anthony Liguori wrote: TODO - benchmark/evaluation. Especially how async page fault affects the result. I'll review this series next week (Mike/Juan, please also review when you can). But we really need to think hard about whether this is the

[PATCH v2] KVM: SVM: Add support for AMD's OSVW feature in guests

2012-01-03 Thread Boris Ostrovsky
From: Boris Ostrovsky boris.ostrov...@amd.com In some cases guests should not provide workarounds for errata even when the physical processor is affected. For example, because of erratum 400 on family 10h processors a Linux guest will read an MSR (resulting in VMEXIT) before going to idle in

[RFC PATCH] KVM: Fix __set_bit() race in mark_page_dirty() during dirty logging

2012-01-03 Thread Takuya Yoshikawa
It is possible that the __set_bit() in mark_page_dirty() is called simultaneously on the same region of memory, which may result in only one bit being set, because some callers do not take mmu_lock before mark_page_dirty(). This problem is hard to produce because when we reach mark_page_dirty()

Re: [PATCH 1/2] KVM: PPC: epapr: Add idle hcall support for host

2012-01-03 Thread Alexander Graf
On 03.01.2012, at 15:01, Avi Kivity wrote: On 12/31/2011 08:16 AM, Liu Yu wrote: Add a new field opt_feature in struct kvm_ppc_pvinfo to tell userspace whether it support hcall idle. diff --git a/include/linux/kvm.h b/include/linux/kvm.h index c107fae..5af21f3 100644 ---

[PATCH 02/50] KVM: PPC: e500: Eliminate preempt_disable in local_sid_destroy_all

2012-01-03 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The only place it makes sense to call this function already needs to have preemption disabled. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |4 +--- 1 files changed, 1

[PULL 00/50] ppc patch queue 2012-01-04

2012-01-03 Thread Alexander Graf
Hi Avi, I finally got around to completely test and check my PPC patch queue, so I finally feel confident that more works than before :). Please pull. Alex The following changes since commit 781f306789361d671187d9ddb518eea3ffda786a: Avi Kivity (1): Merge branch 'for-avi' of

  1   2   >