[PATCH v3 00/15] KVM: MMU: fast zap all shadow pages

2013-04-16 Thread Xiao Guangrong
This patchset is based on my previous two patchset: [PATCH 0/2] KVM: x86: avoid potential soft lockup and unneeded mmu reload (https://lkml.org/lkml/2013/4/1/2) [PATCH v2 0/6] KVM: MMU: fast invalid all mmio sptes (https://lkml.org/lkml/2013/4/1/134) Changlog: V3: completely redesign the

[PATCH v3 02/15] KVM: fold kvm_arch_create_memslot into kvm_arch_prepare_memory_region

2013-04-16 Thread Xiao Guangrong
It removes a arch-specified interface and also removes unnecessary empty functions on some architectures Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/arm/kvm/arm.c |5 - arch/ia64/kvm/kvm-ia64.c |5 - arch/powerpc/kvm/powerpc.c |8 ++--

[PATCH v3 01/15] KVM: x86: clean up and optimize for kvm_arch_free_memslot

2013-04-16 Thread Xiao Guangrong
memslot rmap and lpage-info are never partly reused and nothing need be freed when new memslot is created Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git

[PATCH v3 05/15] KVM: MMU: allow per-rmap operations

2013-04-16 Thread Xiao Guangrong
Introduce rmap_operations to allow rmap having different operations, then, we are able to handle invalid rmap specially Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/mmu.c | 31

[PATCH v3 04/15] KVM: MMU: abstract memslot rmap related operations

2013-04-16 Thread Xiao Guangrong
Introduce slot_rmap_* functions to abstract memslot rmap related operations which makes the later patch more clearer Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 108 +- arch/x86/kvm/mmu_audit.c | 10

[PATCH v3 10/15] KVM: x86: introduce memslot_set_lpage_disallowed

2013-04-16 Thread Xiao Guangrong
It is used to set disallowed lage page on the specified level, can be used in later patch Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 53 ++- 1 files changed, 35 insertions(+), 18 deletions(-) diff

[PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-16 Thread Xiao Guangrong
Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and rename kvm_zap_all to kvm_free_all which is used to free all memmory used by kvm mmu when vm is being destroyed, at this time, no vcpu exists and mmu-notify has been unregistered, so we can free the shadow pages out of mmu-lock

[PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-16 Thread Xiao Guangrong
The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to walk and zap all shadow pages one by one, also it need to zap all guest page's rmap and all shadow page's parent spte list. Particularly, things become worse if guest uses more memory or vcpus. It is not good for scalability.

[PATCH v3 14/15] KVM: move srcu_read_lock/srcu_read_unlock to arch-specified code

2013-04-16 Thread Xiao Guangrong
Move srcu_read_lock/srcu_read_unlock in kvm_mmu_notifier_release to kvm_arch_flush_shadow_all since we will hold slot-lock instead of srcu Only ARM, POWERPC and x86 are using mmu-notify and kvm_arch_flush_shadow_all on ARM and POWERPC does nothing, so we only need to modify the code on x86

[PATCH v3 13/15] KVM: x86: use the fast way to invalid all pages

2013-04-16 Thread Xiao Guangrong
Replace kvm_mmu_zap_all by kvm_mmu_invalid_all_pages except on the path of mmu_notifier-release() which will be replaced in the later patch Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v3 11/15] KVM: MMU: introduce kvm_clear_all_lpage_info

2013-04-16 Thread Xiao Guangrong
This function is used to reset the large page info of all guest page which will be used in later patch Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 25 + arch/x86/kvm/x86.h |2 ++ 2 files changed, 27 insertions(+), 0

[PATCH v3 08/15] KVM: MMU: allow unmap invalid rmap out of mmu-lock

2013-04-16 Thread Xiao Guangrong
pte_list_clear_concurrently allows us to reset pte-desc entry out of mmu-lock. We can reset spte out of mmu-lock if we can protect the lifecycle of sp, we use this way to achieve the goal: unmap_memslot_rmap_nolock(): for-each-rmap-in-slot: preempt_disable kvm-arch.being_unmapped_rmap

[PATCH v3 09/15] KVM: MMU: introduce free_meslot_rmap_desc_nolock

2013-04-16 Thread Xiao Guangrong
It frees pte-list-descs used by memslot rmap after update memslot is completed Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 26 ++ arch/x86/kvm/mmu.h |1 + 2 files changed, 27 insertions(+), 0 deletions(-) diff --git

[PATCH v3 06/15] KVM: MMU: allow concurrently clearing spte on remove-only pte-list

2013-04-16 Thread Xiao Guangrong
This patch introduce PTE_LIST_SPTE_SKIP which is the placeholder and it will be set on pte-list after removing a spte so that other sptes on this pte_list are not moved and the pte-list-descs on the pte-list are not freed. If vcpu can not add spte to the pte-list (e.g. the rmap on invalid

[PATCH v3 07/15] KVM: MMU: introduce invalid rmap handlers

2013-04-16 Thread Xiao Guangrong
Invalid rmaps is the rmap of the invalid memslot which is being deleted, especially, we can treat all rmaps are invalid when kvm is being destroyed since all memslot will be deleted soon. MMU should remove all sptes on these rmaps before the invalid memslot fully deleted The reason why we

[PATCH v3 03/15] KVM: x86: do not reuse rmap when memslot is moved

2013-04-16 Thread Xiao Guangrong
Let kvm do not reuse the rmap of the memslot which is being moved then the rmap of moved or deleted memslot can only be unmapped, no new spte can be added on it. This is good for us to unmap rmap out of mmu-lock in the later patches Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com

Re: [Virt-test-devel] [virt-test][PATCH 4/7] virt: Adds named variants to Cartesian config.

2013-04-16 Thread Alex Jia
On 03/30/2013 01:14 AM, Jiří Župka wrote: variants name=tests: - wait: run = wait variants: - long: time = short_time - short: long time = logn_time - test2: run = test1 variants name=virt_system: - linux: -

Re: [qemu-devel] Bug Report: VM crashed for some kinds of vCPU in nested virtualization

2013-04-16 Thread Jan Kiszka
On 2013-04-16 05:49, 李春奇 Arthur Chunqi Li wrote: I changed to the latest version of kvm kernel but the bug also occured. On the startup of L1 VM on the host, the host kern.log will output: Apr 16 11:28:22 Blade1-02 kernel: [ 4908.458090] kvm [2808]: vcpu0 unhandled rdmsr: 0x345 Apr 16

[PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-16 Thread Xiao Guangrong
The commit 751efd8610d3 (mmu_notifier_unregister NULL Pointer deref and multiple -release()) breaks the fix: 3ad3d901bbcfb15a5e4690e55350db0899095a68 (mm: mmu_notifier: fix freed page still mapped in secondary MMU) This patch reverts the commit and simply fix the bug spotted by that patch

Re: KVM: x86: fix maintenance of guest/host xcr0 state

2013-04-16 Thread Paolo Bonzini
Il 16/04/2013 04:30, Marcelo Tosatti ha scritto: ** Untested **. Emulation of xcr0 writes zero guest_xcr0_loaded variable so that subsequent VM-entry reloads CPU's xcr0 with guests xcr0 value. However, this is incorrect because guest_xcr0_loaded variable is read to decide whether to

Re: [User Question] Repeated severe performance problems on guest

2013-04-16 Thread Martin Wawro
On 04/16/2013 07:49 AM, Stefan Hajnoczi wrote: Hi Stefan, Besides the kvm_stat, general performance data from the host is useful when dealing with high load averages. Do you have vmstat or sar data for periods of time when the machine was slow? Stefan We do have a rather exhaustive log

Re: [RFC] provide an API to userspace doing memory snapshot

2013-04-16 Thread Wenchao Xia
于 2013-4-16 13:51, Stefan Hajnoczi 写道: On Mon, Apr 15, 2013 at 09:03:36PM +0800, Wenchao Xia wrote: I'd like to add/export an function which allow userspace program to take snapshot for a region of memory. Since it is not implemented yet I will describe it as C APIs, it is quite simple now

[PATCH v5 0/2] tcm_vhost flush

2013-04-16 Thread Asias He
Asias He (2): tcm_vhost: Pass vhost_scsi to vhost_scsi_allocate_cmd tcm_vhost: Wait for pending requests in vhost_scsi_flush() drivers/vhost/tcm_vhost.c | 106 +++--- drivers/vhost/tcm_vhost.h | 5 +++ 2 files changed, 104 insertions(+), 7

[PATCH v5 1/2] tcm_vhost: Pass vhost_scsi to vhost_scsi_allocate_cmd

2013-04-16 Thread Asias He
It is needed in next patch. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/tcm_vhost.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index da2021b..4ae6725 100644 --- a/drivers/vhost/tcm_vhost.c +++

[PATCH v5 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-16 Thread Asias He
This patch makes vhost_scsi_flush() wait for all the pending requests issued before the flush operation to be finished. Changes in v5: - Use kref and completion - Fail req if vs-vs_inflight is NULL - Rename tcm_vhost_alloc_inflight to tcm_vhost_set_inflight Changes in v4: - Introduce

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-16 Thread Robin Holt
On Tue, Apr 16, 2013 at 02:39:49PM +0800, Xiao Guangrong wrote: The commit 751efd8610d3 (mmu_notifier_unregister NULL Pointer deref and multiple -release()) breaks the fix: 3ad3d901bbcfb15a5e4690e55350db0899095a68 (mm: mmu_notifier: fix freed page still mapped in secondary MMU) Can

Re: [qemu-devel] Bug Report: VM crashed for some kinds of vCPU in nested virtualization

2013-04-16 Thread Jan Kiszka
On 2013-04-16 12:19, 李春奇 Arthur Chunqi Li wrote: I looked up Intel manual for VM instruction error. Error number 7 means VM entry with invalid control field(s), which means in process of VM switching some control fields are not properly configured. I wonder why some emulated CPUs

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-16 Thread Xiao Guangrong
On 04/16/2013 05:31 PM, Robin Holt wrote: On Tue, Apr 16, 2013 at 02:39:49PM +0800, Xiao Guangrong wrote: The commit 751efd8610d3 (mmu_notifier_unregister NULL Pointer deref and multiple -release()) breaks the fix: 3ad3d901bbcfb15a5e4690e55350db0899095a68 (mm: mmu_notifier: fix freed

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-16 Thread Robin Holt
On Tue, Apr 16, 2013 at 06:26:36PM +0800, Xiao Guangrong wrote: On 04/16/2013 05:31 PM, Robin Holt wrote: On Tue, Apr 16, 2013 at 02:39:49PM +0800, Xiao Guangrong wrote: The commit 751efd8610d3 (mmu_notifier_unregister NULL Pointer deref and multiple -release()) breaks the fix:

Re: [PATCH -v2] kvm: Emulate MOVBE

2013-04-16 Thread Paolo Bonzini
Il 14/04/2013 23:02, Borislav Petkov ha scritto: *(u16 *)ctxt-dst.val = swab16((u16)ctxt-src.val); movzwl 112(%rdi), %eax # ctxt_5(D)-src.D.27823.val, tmp82 rolw$8, %ax #, tmp82 movw%ax, 240(%rdi) # tmp82, MEM[(u16 *)ctxt_5(D) + 240B] I think this breaks

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-16 Thread Robin Holt
Argh. Taking a step back helped clear my head. For the -stable releases, I agree we should just go with your revert-plus-hlist_del_init_rcu patch. I will give it a test when I am in the office. For the v3.10 release, we should work on making this more correct and completely documented. Robin

Re: [RFC PATCH] Emulate MOVBE

2013-04-16 Thread Paolo Bonzini
Il 10/04/2013 12:08, Gleb Natapov ha scritto: What is the opinion from the KVM folks on this? Shall we start to emulate instructions the host does not provide? In this particular case a relatively simple patch fixes a problem (starting Atom optimized kernels on non-Atom machines). We can

Re: [Virt-test-devel] [virt-test][PATCH 4/7] virt: Adds named variants to Cartesian config.

2013-04-16 Thread Jiri Zupka
Hi Alex, I hope you use new version of cart config in github https://github.com/autotest/virt-test/pull/255. This was older RFC version of vart config. And I'm preparing new version based on communication with Eduardo and Pablo. If you don't please loot at documentation

Re: [RFC PATCH] Emulate MOVBE

2013-04-16 Thread Borislav Petkov
On Tue, Apr 16, 2013 at 01:47:46PM +0200, Paolo Bonzini wrote: Atom is not defined by QEMU; $ qemu-system-x86_64 -cpu ? ... x86 n270 Intel(R) Atom(TM) CPU N270 @ 1.60GHz -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe

Re: [RFC PATCH] Emulate MOVBE

2013-04-16 Thread H. Peter Anvin
Note that Atom isn't a CPU but a line of CPUs. Sadly Qemu's N270 model is broken. Borislav Petkov b...@alien8.de wrote: On Tue, Apr 16, 2013 at 01:47:46PM +0200, Paolo Bonzini wrote: Atom is not defined by QEMU; $ qemu-system-x86_64 -cpu ? ... x86 n270 Intel(R) Atom(TM) CPU

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-16 Thread Xiao Guangrong
On 04/16/2013 07:43 PM, Robin Holt wrote: Argh. Taking a step back helped clear my head. For the -stable releases, I agree we should just go with your revert-plus-hlist_del_init_rcu patch. I will give it a test when I am in the office. Okay. Wait for your test report. Thank you in

Re: KVM call agenda for 2013-04-16

2013-04-16 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please send in any agenda topics you are interested in. As there are no topics, call is cancelled. Have a nice week. Later, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [Virt-test-devel] [virt-test][PATCH 4/7] virt: Adds named variants to Cartesian config.

2013-04-16 Thread Jiri Zupka
Hi Alex, thanks again for review. I recognize now what you mean. I thought that you another thread of mails. I was try it again with https://github.com/autotest/virt-test/pull/255 and demo example works. If you are interest in this feature. Check new version which I'll send in future days.

Re: [PATCH] kvm/ppc: don't call complete_mmio_load when it's a store

2013-04-16 Thread Alexander Graf
On 16.04.2013, at 03:07, Scott Wood wrote: complete_mmio_load writes back the mmio result into the destination register. Doing this on a store results in register corruption. Signed-off-by: Scott Wood scottw...@freescale.com Thanks, applied to kvm-ppc-queue. Since nobody really is using

Re: [PATCH kvm-unittest] x86/svm: run cr3 read intercept emulate only on SMP

2013-04-16 Thread Paolo Bonzini
Il 16/04/2013 07:08, prasadjoshi.li...@gmail.com ha scritto: From: Prasad Joshi prasadjoshi.li...@gmail.com The SVM test 'cr3 read intercept emulate' when ran on uniprocessor system does not finish and blocks all the tests scheduled to be ran afterwords. Add check so that the test is only

Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel

2013-04-16 Thread Borislav Petkov
On Sun, Apr 14, 2013 at 01:03:20PM +0200, Borislav Petkov wrote: On Sun, Apr 14, 2013 at 12:31:12PM +0300, Pekka Enberg wrote: I obviously support having something like this in mainline. I wonder though if we could just call this default standalone KVM guest config instead of emphasizing

Re: [PATCH v10 6/7] KVM: Let ioapic know the irq line status

2013-04-16 Thread Alexander Graf
On 11.04.2013, at 13:21, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Userspace may deliver RTC interrupt without query the status. So we want to track RTC EOI for this case. Signed-off-by: Yang Zhang yang.z.zh...@intel.com This patch breaks ARM host support. Patch

[PATCH] KVM: ARM: Fix kvm_vm_ioctl_irq_line

2013-04-16 Thread Alexander Graf
Commit aa2fbe6d broke the ARM KVM target by introducing a new parameter to irq handling functions. Fix the function prototype to get things compiling again and ignore the parameter just like we did before Signed-off-by: Alexander Graf ag...@suse.de --- arch/arm/kvm/arm.c |3 ++- 1 files

[PATCH 0/7] KVM: irqfd generalization prepare patch set

2013-04-16 Thread Alexander Graf
The concept of an irqfd and interrupt routing are nothing particularly tied into the IOAPIC implementation. In fact, most of the code already is perfectly generic. This patch set decouples most bits of the existing irqchip and irqfd implementation to make it reusable for non-IOAPIC platforms,

[PATCH 4/7] KVM: Move irq routing to generic code

2013-04-16 Thread Alexander Graf
The IRQ routing set ioctl lives in the hacky device assignment code inside of KVM today. This is definitely the wrong place for it. Move it to the much more natural kvm_main.c. Signed-off-by: Alexander Graf ag...@suse.de --- virt/kvm/assigned-dev.c | 30 --

[PATCH 3/7] KVM: Remove kvm_get_intr_delivery_bitmask

2013-04-16 Thread Alexander Graf
The prototype has been stale for a while, I can't spot any real function define behind it. Let's just remove it. Signed-off-by: Alexander Graf ag...@suse.de --- include/linux/kvm_host.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH 5/7] KVM: Extract generic irqchip logic into irqchip.c

2013-04-16 Thread Alexander Graf
The current irq_comm.c file contains pieces of code that are generic across different irqchip implementations, as well as code that is fully IOAPIC specific. Split the generic bits out into irqchip.c. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/Makefile |2 +-

[PATCH 6/7] KVM: Move irq routing setup to irqchip.c

2013-04-16 Thread Alexander Graf
Setting up IRQ routes is nothing IOAPIC specific. Extract everything that really is generic code into irqchip.c and only leave the ioapic specific bits to irq_comm.c. Signed-off-by: Alexander Graf ag...@suse.de --- include/linux/kvm_host.h |3 ++ virt/kvm/irq_comm.c | 76

[PATCH 7/7] KVM: Move irqfd resample cap handling to generic code

2013-04-16 Thread Alexander Graf
Now that we have most irqfd code completely platform agnostic, let's move irqfd's resample capability return to generic code as well. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/x86.c |1 - virt/kvm/kvm_main.c |3 +++ 2 files changed, 3 insertions(+), 1 deletions(-)

[PATCH 2/7] KVM: Introduce __KVM_HAVE_IRQCHIP

2013-04-16 Thread Alexander Graf
Quite a bit of code in KVM has been conditionalized on availability of IOAPIC emulation. However, most of it is generically applicable to platforms that don't have an IOPIC, but a different type of irq chip. Introduce a new define to distinguish between generic code and IOAPIC specific code.

Re: [PULL 0/7] ppc patch queue 2013-03-22

2013-04-16 Thread Alexander Graf
On 12.04.2013, at 22:56, Alexander Graf wrote: On 12.04.2013, at 22:54, Marcelo Tosatti wrote: On Thu, Apr 11, 2013 at 03:50:13PM +0200, Alexander Graf wrote: On 11.04.2013, at 15:45, Marcelo Tosatti wrote: On Tue, Mar 26, 2013 at 12:59:04PM +1100, Paul Mackerras wrote: On Tue, Mar

[PATCH 1/7] KVM: Add KVM_IRQCHIP_NUM_PINS in addition to KVM_IOAPIC_NUM_PINS

2013-04-16 Thread Alexander Graf
The concept of routing interrupt lines to an irqchip is nothing that is IOAPIC specific. Every irqchip has a maximum number of pins that can be linked to irq lines. So let's add a new define that allows us to reuse generic code for non-IOAPIC platforms. Signed-off-by: Alexander Graf

Re: [RFC PATCH] Emulate MOVBE

2013-04-16 Thread Gleb Natapov
On Tue, Apr 16, 2013 at 01:47:46PM +0200, Paolo Bonzini wrote: Il 10/04/2013 12:08, Gleb Natapov ha scritto: What is the opinion from the KVM folks on this? Shall we start to emulate instructions the host does not provide? In this particular case a relatively simple patch fixes a problem

Re: [PATCH -v2] kvm: Emulate MOVBE

2013-04-16 Thread Gleb Natapov
On Sun, Apr 14, 2013 at 07:32:16PM +0200, Borislav Petkov wrote: On Sun, Apr 14, 2013 at 10:41:07AM +0300, Gleb Natapov wrote: Currently userspace assumes that that cpuid configuration returned by KVM_GET_SUPPORTED_CPUID is the optimal one. What we want here is a way for KVM to tell

Re: [PATCH] KVM: ARM: Fix kvm_vm_ioctl_irq_line

2013-04-16 Thread Christoffer Dall
On Tue, Apr 16, 2013 at 10:21 AM, Alexander Graf ag...@suse.de wrote: Commit aa2fbe6d broke the ARM KVM target by introducing a new parameter to irq handling functions. Fix the function prototype to get things compiling again and ignore the parameter just like we did before Signed-off-by:

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-16 Thread Robin Holt
On Tue, Apr 16, 2013 at 09:07:20PM +0800, Xiao Guangrong wrote: On 04/16/2013 07:43 PM, Robin Holt wrote: Argh. Taking a step back helped clear my head. For the -stable releases, I agree we should just go with your revert-plus-hlist_del_init_rcu patch. I will give it a test when I am

Re: [PATCH v5 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-16 Thread Michael S. Tsirkin
On Tue, Apr 16, 2013 at 05:16:51PM +0800, Asias He wrote: This patch makes vhost_scsi_flush() wait for all the pending requests issued before the flush operation to be finished. Changes in v5: - Use kref and completion - Fail req if vs-vs_inflight is NULL - Rename tcm_vhost_alloc_inflight

[PATCH] kvm: Allow build-time configuration of KVM device assignment

2013-04-16 Thread Alex Williamson
We hope to at some point deprecate KVM legacy device assignment in favor of VFIO-based assignment. Towards that end, allow legacy device assignment to be deconfigured. Signed-off-by: Alex Williamson alex.william...@redhat.com --- This depends on Alex Graf's irqfd generalization series to remove

Perf tuning help?

2013-04-16 Thread Mason Turner
We have an in-house app, written in c, that is not performing as well as we'd hoped it would when moving to a VM. We've tried all the common tuning recommendations (virtio, tap interface, cpu pining), without any change in performance. Even terminating all of the other VMs on the host doesn't

Re: [GIT PULL] KVM/ARM Minor fixes for 3.9

2013-04-16 Thread Marcelo Tosatti
On Mon, Apr 15, 2013 at 01:52:15AM -0700, Christoffer Dall wrote: Hi Marcelo and Gleb, The following changes since commit 41ef2d5678d83af030125550329b6ae8b74618fa: Linux 3.9-rc7 (2013-04-14 17:45:16 -0700) are available in the git repository at:

Re: [PATCH] kvm: Allow build-time configuration of KVM device assignment

2013-04-16 Thread Alexander Graf
On 16.04.2013, at 21:49, Alex Williamson wrote: We hope to at some point deprecate KVM legacy device assignment in favor of VFIO-based assignment. Towards that end, allow legacy device assignment to be deconfigured. Signed-off-by: Alex Williamson alex.william...@redhat.com Definitely a

Re: [PATCH v10 0/7] KVM: VMX: Add Posted Interrupt supporting

2013-04-16 Thread Marcelo Tosatti
On Sun, Apr 14, 2013 at 12:40:00PM +0300, Gleb Natapov wrote: On Thu, Apr 11, 2013 at 07:25:09PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com The follwoing patches are adding the Posted Interrupt supporting to KVM: The first patch enables the feature 'acknowledge

Re: [PATCH] KVM: ARM: Fix kvm_vm_ioctl_irq_line

2013-04-16 Thread Marcelo Tosatti
On Tue, Apr 16, 2013 at 11:07:40AM -0700, Christoffer Dall wrote: On Tue, Apr 16, 2013 at 10:21 AM, Alexander Graf ag...@suse.de wrote: Commit aa2fbe6d broke the ARM KVM target by introducing a new parameter to irq handling functions. Fix the function prototype to get things compiling

Re: [PATCH v2] kvm: nVMX: check vmcs12 for valid activity state

2013-04-16 Thread Marcelo Tosatti
On Mon, Apr 15, 2013 at 03:00:27PM +0200, Paolo Bonzini wrote: KVM does not use the activity state VMCS field, and does not support it in nested VMX either (the corresponding bits in the misc VMX feature MSR are zero). Fail entry if the activity state is set to anything but active. Since

Re: [PULL 0/7] ppc patch queue 2013-03-22

2013-04-16 Thread Marcelo Tosatti
On Tue, Apr 16, 2013 at 07:26:35PM +0200, Alexander Graf wrote: So I may send a pull request against 3.9 with the 3 commits that already are in kvm/next? If you decide that the fixes are important enough to justify the existance of duplicate commits, i don't see a problem. Great

Re: [PATCH] KVM: VMX: Fix check guest state validity if a guest is in VM86 mode

2013-04-16 Thread Marcelo Tosatti
On Sun, Apr 14, 2013 at 04:07:37PM +0300, Gleb Natapov wrote: If guest vcpu is in VM86 mode the vcpu state should be checked as if in real mode. Signed-off-by: Gleb Natapov g...@redhat.com Applied, thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [GIT PULL] KVM/ARM Minor fixes for 3.9

2013-04-16 Thread Christoffer Dall
On Tue, Apr 16, 2013 at 2:03 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Apr 15, 2013 at 01:52:15AM -0700, Christoffer Dall wrote: Hi Marcelo and Gleb, The following changes since commit 41ef2d5678d83af030125550329b6ae8b74618fa: Linux 3.9-rc7 (2013-04-14 17:45:16 -0700) are

[GIT PULL v2] KVM/ARM Minor fixes for 3.9

2013-04-16 Thread Christoffer Dall
The following changes since commit 31880c37c11e28cb81c70757e38392b42e695dc6: Linux 3.9-rc6 (2013-04-07 20:49:54 -0700) are available in the git repository at: git://github.com/columbia/linux-kvm-arm.git kvm-arm-fixes-3.9 for you to fetch changes up to

[GIT PULL] KVM fixes for 3.9-rc7

2013-04-16 Thread Marcelo Tosatti
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following PPC and ARM KVM fixes Marc Zyngier (2): ARM: KVM: fix KVM_CAP_ARM_SET_DEVICE_ADDR reporting ARM: KVM: fix L_PTE_S2_RDWR to actually be Read/Write Marcelo Tosatti (1): Merge

Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel

2013-04-16 Thread Sasha Levin
On 04/16/2013 12:18 PM, Borislav Petkov wrote: On Sun, Apr 14, 2013 at 01:03:20PM +0200, Borislav Petkov wrote: On Sun, Apr 14, 2013 at 12:31:12PM +0300, Pekka Enberg wrote: I obviously support having something like this in mainline. I wonder though if we could just call this default

[PATCH] KVM: ia64: Fix kvm_vm_ioctl_irq_line

2013-04-16 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Fix the compliling error with kvm_vm_ioctl_irq_line. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/ia64/kvm/kvm-ia64.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/ia64/kvm/kvm-ia64.c

Re: [PATCH v5 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-16 Thread Asias He
On Tue, Apr 16, 2013 at 08:58:27PM +0300, Michael S. Tsirkin wrote: On Tue, Apr 16, 2013 at 05:16:51PM +0800, Asias He wrote: This patch makes vhost_scsi_flush() wait for all the pending requests issued before the flush operation to be finished. Changes in v5: - Use kref and completion

Re: [Virt-test-devel] [virt-test][PATCH 4/7] virt: Adds named variants to Cartesian config.

2013-04-16 Thread Alex Jia
Jiří, okay, got it and thanks. -- Regards, Alex - Original Message - From: Jiri Zupka jzu...@redhat.com To: Alex Jia a...@redhat.com Cc: virt-test-de...@redhat.com, kvm@vger.kernel.org, kvm-autot...@redhat.com, l...@redhat.com, ldok...@redhat.com, ehabk...@redhat.com,

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-16 Thread Xiao Guangrong
On 04/17/2013 02:08 AM, Robin Holt wrote: On Tue, Apr 16, 2013 at 09:07:20PM +0800, Xiao Guangrong wrote: On 04/16/2013 07:43 PM, Robin Holt wrote: Argh. Taking a step back helped clear my head. For the -stable releases, I agree we should just go with your revert-plus-hlist_del_init_rcu

[PATCH 0/7] KVM: irqfd generalization prepare patch set

2013-04-16 Thread Alexander Graf
The concept of an irqfd and interrupt routing are nothing particularly tied into the IOAPIC implementation. In fact, most of the code already is perfectly generic. This patch set decouples most bits of the existing irqchip and irqfd implementation to make it reusable for non-IOAPIC platforms,

[PATCH 4/7] KVM: Move irq routing to generic code

2013-04-16 Thread Alexander Graf
The IRQ routing set ioctl lives in the hacky device assignment code inside of KVM today. This is definitely the wrong place for it. Move it to the much more natural kvm_main.c. Signed-off-by: Alexander Graf ag...@suse.de --- virt/kvm/assigned-dev.c | 30 --

[PATCH 3/7] KVM: Remove kvm_get_intr_delivery_bitmask

2013-04-16 Thread Alexander Graf
The prototype has been stale for a while, I can't spot any real function define behind it. Let's just remove it. Signed-off-by: Alexander Graf ag...@suse.de --- include/linux/kvm_host.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH 6/7] KVM: Move irq routing setup to irqchip.c

2013-04-16 Thread Alexander Graf
Setting up IRQ routes is nothing IOAPIC specific. Extract everything that really is generic code into irqchip.c and only leave the ioapic specific bits to irq_comm.c. Signed-off-by: Alexander Graf ag...@suse.de --- include/linux/kvm_host.h |3 ++ virt/kvm/irq_comm.c | 76

[PATCH 5/7] KVM: Extract generic irqchip logic into irqchip.c

2013-04-16 Thread Alexander Graf
The current irq_comm.c file contains pieces of code that are generic across different irqchip implementations, as well as code that is fully IOAPIC specific. Split the generic bits out into irqchip.c. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/Makefile |2 +-

[PATCH 7/7] KVM: Move irqfd resample cap handling to generic code

2013-04-16 Thread Alexander Graf
Now that we have most irqfd code completely platform agnostic, let's move irqfd's resample capability return to generic code as well. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/x86.c |1 - virt/kvm/kvm_main.c |3 +++ 2 files changed, 3 insertions(+), 1 deletions(-)

[PATCH 2/7] KVM: Introduce __KVM_HAVE_IRQCHIP

2013-04-16 Thread Alexander Graf
Quite a bit of code in KVM has been conditionalized on availability of IOAPIC emulation. However, most of it is generically applicable to platforms that don't have an IOPIC, but a different type of irq chip. Introduce a new define to distinguish between generic code and IOAPIC specific code.

Re: [PULL 0/7] ppc patch queue 2013-03-22

2013-04-16 Thread Alexander Graf
On 12.04.2013, at 22:56, Alexander Graf wrote: On 12.04.2013, at 22:54, Marcelo Tosatti wrote: On Thu, Apr 11, 2013 at 03:50:13PM +0200, Alexander Graf wrote: On 11.04.2013, at 15:45, Marcelo Tosatti wrote: On Tue, Mar 26, 2013 at 12:59:04PM +1100, Paul Mackerras wrote: On Tue, Mar