Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2011 at 11:25:43AM +1030, Rusty Russell wrote: But I'm *terrified* of making the spec more complex; All you do is move stuff around. Why do you think it simplifies the spec so much? No, but it reduces the yuk factor. Which has been important to adoption. Sorry if I'm

Re: [Qemu-devel] [PATCH 2/2] kvm: exit to userspace with reason KVM_EXIT_VCPU_DEAD

2011-11-28 Thread Gleb Natapov
On Mon, Nov 28, 2011 at 03:16:01PM +0800, Liu ping fan wrote: On Sun, Nov 27, 2011 at 6:50 PM, Gleb Natapov g...@redhat.com wrote: On Sun, Nov 27, 2011 at 12:36:55PM +0200, Avi Kivity wrote: On 11/27/2011 04:42 AM, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-28 Thread Sasha Levin
On Mon, 2011-11-28 at 11:25 +1030, Rusty Russell wrote: I'd like to see kvmtools remove support for legacy mode altogether, but they probably have existing users. While we can't simply remove it right away, instead of mixing our implementation for both legacy and new spec in the same code we

[PATCH v2] KVM: Refactor and simplify kvm_dev_ioctl_get_supported_cpuid

2011-11-28 Thread Sasha Levin
This patch cleans and simplifies kvm_dev_ioctl_get_supported_cpuid by using a table instead of duplicating code as Avi suggested. This patch also fixes a bug where kvm_dev_ioctl_get_supported_cpuid would return -E2BIG when amount of entries passed was just right. Cc: Avi Kivity a...@redhat.com

Re: [PATCH] X86: expose latest Intel cpu new features to guest

2011-11-28 Thread Avi Kivity
On 11/28/2011 07:10 AM, Liu, Jinsong wrote: From 8bb5d052825149c211afa92458912bc49a50ee2f Mon Sep 17 00:00:00 2001 From: Liu, Jinsong jinsong@intel.com Date: Mon, 28 Nov 2011 03:55:19 -0800 Subject: [PATCH] X86: expose latest Intel cpu new features to guest Intel latest cpu add 6 new

Re: [PATCH v2] KVM: Refactor and simplify kvm_dev_ioctl_get_supported_cpuid

2011-11-28 Thread Avi Kivity
On 11/28/2011 11:20 AM, Sasha Levin wrote: This patch cleans and simplifies kvm_dev_ioctl_get_supported_cpuid by using a table instead of duplicating code as Avi suggested. This patch also fixes a bug where kvm_dev_ioctl_get_supported_cpuid would return -E2BIG when amount of entries

Re: [PATCH v2] KVM: Refactor and simplify kvm_dev_ioctl_get_supported_cpuid

2011-11-28 Thread Avi Kivity
On 11/28/2011 11:52 AM, Avi Kivity wrote: On 11/28/2011 11:20 AM, Sasha Levin wrote: This patch cleans and simplifies kvm_dev_ioctl_get_supported_cpuid by using a table instead of duplicating code as Avi suggested. This patch also fixes a bug where kvm_dev_ioctl_get_supported_cpuid

Re: [PATCH 08/62] x86: remove the second argument of k[un]map_atomic()

2011-11-28 Thread Avi Kivity
On 11/27/2011 07:26 AM, Cong Wang wrote: Signed-off-by: Cong Wang amw...@redhat.com --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/paging_tmpl.h |4 ++-- arch/x86/kvm/x86.c |8 The kvm parts are: Acked-by: Avi Kivity

[PATCH 1/5] jump-label: export jump_label_inc/jump_label_dec

2011-11-28 Thread Xiao Guangrong
Export these two symbols, they will be used by mmu audit Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- kernel/jump_label.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/jump_label.c b/kernel/jump_label.c index bbdfe2a..7d3d452 100644 ---

[PATCH 2/5] KVM: MMU: audit: replace mmu audit tracepoint with jump-lable

2011-11-28 Thread Xiao Guangrong
The tracepoint is only used to audit mmu code, it should not be exposed to user, let us replace it with jump-lable Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 16 +++- arch/x86/kvm/mmu_audit.c | 28 +---

[PATCH 3/5] KVM: x86: remove the dead code of KVM_EXIT_HYPERCALL

2011-11-28 Thread Xiao Guangrong
KVM_EXIT_HYPERCALL is not used anymore, so remove the code Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index d54746c..7b6fd72 100644 ---

[PATCH 4/5] KVM: MMU: move the relevant mmu code to mmu.c

2011-11-28 Thread Xiao Guangrong
Move the mmu code in kvm_arch_vcpu_init() to kvm_mmu_create() Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_host.h |6 ++ arch/x86/kvm/mmu.c |6 +- arch/x86/kvm/x86.c | 11 +-- 3 files changed, 12

[PATCH 5/5] KVM: MMU: remove oos_shadow parameter

2011-11-28 Thread Xiao Guangrong
The unsync code should be stable now, maybe it is the time to remove this parameter to cleanup the code a little bit Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- Documentation/kernel-parameters.txt |3 --- arch/x86/kvm/mmu.c |5 - 2 files

[PATCH kvm-unit-tests] emulator: fix bsf/bsr tests

2011-11-28 Thread Avi Kivity
The inline assembly constraints did not specify ax as an output, confusing the compiler. Rewrite the test to properly specify all outputs. Signed-off-by: Avi Kivity a...@redhat.com --- x86/emulator.c | 89 +-- 1 files changed, 34

Re: [Qemu-devel] KVM call agenda for November 29

2011-11-28 Thread Anthony Liguori
On 11/28/2011 08:30 AM, Avi Kivity wrote: On 11/28/2011 04:28 PM, Anthony Liguori wrote: On 11/28/2011 08:24 AM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. - 1.1 development window logistics (somewhat related) memory API conversion queue merge

Re: [PATCH 5/5] KVM: MMU: remove oos_shadow parameter

2011-11-28 Thread Avi Kivity
On 11/28/2011 02:43 PM, Xiao Guangrong wrote: The unsync code should be stable now, maybe it is the time to remove this parameter to cleanup the code a little bit Thanks, all applied. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the

[kvm-autotest] tests.cgroup: Add CpuShare test

2011-11-28 Thread Lukas Doktor
Hi guys, I have a new kvm cgroup test for you. This time it's in cpu cgroup and it uses cpu.shares capability. It modifies the number of shares/time_slices which each process gets from the scheduler As the verification is kind of tricky I'm testing only three different scenerios and only

[PATCH] [kvm-autotest] tests.cgroup: Add CpuShare test

2011-11-28 Thread Lukas Doktor
* Adds base _TestCpuShare * Adds TestCpuShare10 - cpu.shares ratio is 1:10 * Adds TestCpuShare50 - cpu.shares ratio is 1:1 * cgroup_common - incorrect lookup for mounted cgroups * kvm cgroup - sort the executed tests (per expression) * minor bugfixies Tests the cpu.share cgroup capability.

[PATCH] kvm tools: Support virtio indirect buffers

2011-11-28 Thread Sasha Levin
Indirect buffers are ring descriptors which point to more (even more) descriptors. This can be used to increase the effective ring capacity, which helps the guest to batch large requests - very useful for blk devices. This patch also enables indirect buffers for virtio-net and virtio-blk. The

Re: [PATCH] kvm tools: Support virtio indirect buffers

2011-11-28 Thread Pekka Enberg
On Mon, Nov 28, 2011 at 7:54 PM, Sasha Levin levinsasha...@gmail.com wrote: Indirect buffers are ring descriptors which point to more (even more) descriptors. This can be used to increase the effective ring capacity, which helps the guest to batch large requests - very useful for blk devices.

Re: [PATCH] kvm tools: Improve virtio blk request processing

2011-11-28 Thread Pekka Enberg
On Mon, Nov 28, 2011 at 7:34 AM, Asias He asias.he...@gmail.com wrote: There are at most bdev-reqs[VIRTIO_BLK_QUEUE_SIZE] outstanding requests at any time.  We can simply use the head of each request to fetch the right 'struct blk_dev_req' in bdev-reqs[]. So, we can eliminate the list and

Re: [PATCH] kvm tools: Support virtio indirect buffers

2011-11-28 Thread Sasha Levin
On Mon, 2011-11-28 at 20:49 +0200, Pekka Enberg wrote: On Mon, Nov 28, 2011 at 7:54 PM, Sasha Levin levinsasha...@gmail.com wrote: Indirect buffers are ring descriptors which point to more (even more) descriptors. This can be used to increase the effective ring capacity, which helps the

Re: [PATCH v2] KVM: PPC: booke: Improve timer register emulation

2011-11-28 Thread Stuart Yoder
On Fri, Nov 18, 2011 at 7:54 AM, Alexander Graf ag...@suse.de wrote: On 17.11.2011, at 23:39, Scott Wood wrote: 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

Re: [PATCH] kvm tools: Support virtio indirect buffers

2011-11-28 Thread Sasha Levin
On Mon, 2011-11-28 at 22:17 +0200, Sasha Levin wrote: On Mon, 2011-11-28 at 20:49 +0200, Pekka Enberg wrote: On Mon, Nov 28, 2011 at 7:54 PM, Sasha Levin levinsasha...@gmail.com wrote: Indirect buffers are ring descriptors which point to more (even more) descriptors. This can be

Re: [PATCH v2] KVM: PPC: booke: Improve timer register emulation

2011-11-28 Thread Alexander Graf
On 28.11.2011, at 21:59, Stuart Yoder wrote: On Fri, Nov 18, 2011 at 7:54 AM, Alexander Graf ag...@suse.de wrote: On 17.11.2011, at 23:39, Scott Wood wrote: Decrementers are now properly driven by TCR/TSR, and the guest has full read/write access to these registers. The decrementer

Re: [PATCH 2/5] KVM: MMU: audit: replace mmu audit tracepoint with jump-lable

2011-11-28 Thread Jason Baron
On Mon, Nov 28, 2011 at 08:41:00PM +0800, Xiao Guangrong wrote: +static void kvm_mmu_audit(struct kvm_vcpu *vcpu, int point) { static DEFINE_RATELIMIT_STATE(ratelimit_state, 5 * HZ, 10); - if (!__ratelimit(ratelimit_state)) - return; + if

Re: Improving RAID5 write performance in a KVM VM

2011-11-28 Thread Simon Wilson
- Message from Simon Wilson si...@simonandkate.net - Date: Fri, 25 Nov 2011 20:34:47 +1000 From: Simon Wilson si...@simonandkate.net Subject: Improving RAID5 write performance in a KVM VM To: kvm@vger.kernel.org Good afternoon list. I have a CentOS 6 server running six

[PATCH 0/3] KVM: PPC: e500: misc MMU stuff

2011-11-28 Thread Scott Wood
Liu Yu (1): KVM: booke: Add booke206 TLB trace Scott Wood (2): KVM: PPC: e500: Fix TLBnCFG in KVM_CONFIG_TLB KVM: PPC: e500: use hardware hint when loading TLB0 entries arch/powerpc/include/asm/mmu-book3e.h |1 + arch/powerpc/kvm/e500_tlb.c | 97

[PATCH 1/3] KVM: PPC: e500: Fix TLBnCFG in KVM_CONFIG_TLB

2011-11-28 Thread Scott Wood
The associativity, not just total size, can differ from the host hardware. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/e500_tlb.c | 19 ++- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c

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

2011-11-28 Thread Scott Wood
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 now only used for TLB1. Reported-by: Liu Yu

[PATCH 2/3] KVM: booke: Add booke206 TLB trace

2011-11-28 Thread Scott Wood
From: Liu Yu yu@freescale.com Signed-off-by: Liu Yu yu@freescale.com [scottw...@freescale.com: made mas2 64-bit, and added mas8 init] Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/e500_tlb.c | 10 --- arch/powerpc/kvm/trace.h| 57

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-28 Thread Alexey Kardashevskiy
Hi! I tried (successfully) to run it on POWER and while doing that I found some issues. I'll try to explain them in separate mails. IOMMU domain setup. On POWER, the linux drivers capable of DMA transfer want to know a DMA window, i.e. its start and length in the PHB address space. This comes

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-28 Thread Alexey Kardashevskiy
Hi all, Another problem I hit on POWER - MSI interrupts allocation. The existing VFIO does not expect a PBH to support less interrupts that a device might request. In my case, PHB's limit is 8 interrupts while my test card (10Gb ethernet CXGB3) wants 9. Below are the patches to demonstrate the

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-28 Thread Alexey Kardashevskiy
Hi all again, It was actually the very first problem - endianess :-) I am still not sure what format is better for cached config space or whether we should cache it all. Also, as Benh already mentioned, vfio_virt_init reads a config space to a cache by pci_read_config_dword for the whole space

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-28 Thread Alex Williamson
On Tue, 2011-11-29 at 12:52 +1100, Alexey Kardashevskiy wrote: Hi! I tried (successfully) to run it on POWER and while doing that I found some issues. I'll try to explain them in separate mails. Great! IOMMU domain setup. On POWER, the linux drivers capable of DMA transfer want to know

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-28 Thread Alex Williamson
On Tue, 2011-11-29 at 13:01 +1100, Alexey Kardashevskiy wrote: Hi all, Another problem I hit on POWER - MSI interrupts allocation. The existing VFIO does not expect a PBH to support less interrupts that a device might request. In my case, PHB's limit is 8 interrupts while my test card

Re: [PATCH 2/5] KVM: MMU: audit: replace mmu audit tracepoint with jump-lable

2011-11-28 Thread Xiao Guangrong
On 11/29/2011 06:33 AM, Jason Baron wrote: hmmm..this always going to do a call to 'kvm_mmu_audit' and then return. I think you want to avoid the function call altogether. You could do something like: #define kvm_mmu_audit() if (static_branch((mmu_audit_key))) {

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-28 Thread Alexey Kardashevskiy
Hi! On 29/11/11 14:46, Alex Williamson wrote: On Tue, 2011-11-29 at 12:52 +1100, Alexey Kardashevskiy wrote: Hi! I tried (successfully) to run it on POWER and while doing that I found some issues. I'll try to explain them in separate mails. Great! IOMMU domain setup. On POWER, the

[PATCH 0/3] KVM: MMU: Trivial fix and cleanups

2011-11-28 Thread Takuya Yoshikawa
Made when I was reading mmu code. Takuya BTW, is threre any good way to test large page functionality? -- 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 http://vger.kernel.org/majordomo-info.html

[PATCH 1/3] KVM: MMU: Remove for_each_unsync_children() macro

2011-11-28 Thread Takuya Yoshikawa
There is only one user of it and for_each_set_bit() does the same. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/mmu.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index d737443..09da963

[PATCH 2/3] KVM: MMU: Add missing large page accounting to drop_large_spte()

2011-11-28 Thread Takuya Yoshikawa
Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/mmu.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 09da963..5e761ff 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1803,6 +1803,7

[PATCH 3/3] KVM: MMU: Make drop_large_spte() more generic

2011-11-28 Thread Takuya Yoshikawa
There are many places where we drop large spte and we are always doing much the same as drop_large_spte(). To avoid these duplications, this patch makes drop_large_spte() more generically usable: it now takes an argument to know if it must flush the remote tlbs and returns true or false depending

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-28 Thread Alex Williamson
On Tue, 2011-11-29 at 15:34 +1100, Alexey Kardashevskiy wrote: Hi! On 29/11/11 14:46, Alex Williamson wrote: On Tue, 2011-11-29 at 12:52 +1100, Alexey Kardashevskiy wrote: Hi! I tried (successfully) to run it on POWER and while doing that I found some issues. I'll try to explain

Re: [PATCH] kvm tools: Support virtio indirect buffers

2011-11-28 Thread Cyrill Gorcunov
On Mon, Nov 28, 2011 at 07:54:27PM +0200, Sasha Levin wrote: +/* + * Each buffer in the virtqueues is actually a chain of descriptors. This + * function returns the next descriptor in the chain, or vq-vring.num if we're + * at the end. + */ +static unsigned next_desc(struct vring_desc

Re: [Qemu-devel] [PATCH v2] ivshmem: add a new PIO BAR3(Doorbell) besides MMIO BAR0 to reduce notification time

2011-11-28 Thread Cam Macdonell
On Thu, Nov 17, 2011 at 10:50 PM, zanghongy...@huawei.com wrote: From: Hongyong Zang zanghongy...@huawei.com This patch, adds a PIO BAR3 for guest notifying qemu. And we find the new notification way of PIO BAR3 reduces 30% time in comparison with the original MMIO BAR0 way. Come to think

Re: [Qemu-devel] [PATCH v2] ivshmem: add a new PIO BAR3(Doorbell) besides MMIO BAR0 to reduce notification time

2011-11-28 Thread Zang Hongyong
于 2011/11/29,星期二 14:38, Cam Macdonell 写道: On Thu, Nov 17, 2011 at 10:50 PM,zanghongy...@huawei.com wrote: From: Hongyong Zangzanghongy...@huawei.com This patch, adds a PIO BAR3 for guest notifying qemu. And we find the new notification way of PIO BAR3 reduces 30% time in comparison with the

[PATCH v5] kvm tools, qcow: Add the support for copy-on-write cluster

2011-11-28 Thread Lan Tianyu
When meeting request to write the cluster without copied flag, allocate a new cluster and write original data with modification to the new cluster. This also adds support for the writing operation of the qcow2 compressed image. After testing, image file can pass through qemu-img check. The

Re: [PATCH] kvm tools: Support virtio indirect buffers

2011-11-28 Thread Sasha Levin
On Tue, 2011-11-29 at 10:31 +0400, Cyrill Gorcunov wrote: On Mon, Nov 28, 2011 at 07:54:27PM +0200, Sasha Levin wrote: +/* + * Each buffer in the virtqueues is actually a chain of descriptors. This + * function returns the next descriptor in the chain, or vq-vring.num if we're + *