Re: [PATCH 06/18] virtio_ring: avail event index interface

2011-05-17 Thread Michael S. Tsirkin
On Mon, May 16, 2011 at 03:53:19PM +0930, Rusty Russell wrote: On Sun, 15 May 2011 15:47:27 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 09, 2011 at 01:43:15PM +0930, Rusty Russell wrote: On Wed, 4 May 2011 23:51:19 +0300, Michael S. Tsirkin m...@redhat.com wrote:

Re: [PATCH 09/18] virtio: use avail_event index

2011-05-17 Thread Michael S. Tsirkin
On Mon, May 16, 2011 at 04:42:21PM +0930, Rusty Russell wrote: On Sun, 15 May 2011 16:55:41 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 09, 2011 at 02:03:26PM +0930, Rusty Russell wrote: On Wed, 4 May 2011 23:51:47 +0300, Michael S. Tsirkin m...@redhat.com wrote:

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Michael S. Tsirkin
On Mon, May 16, 2011 at 04:32:18PM -0700, Shirley Ma wrote: Hello Michael, Looks like to use a new flag requires more time/work. I am thinking whether we can just use HIGHDMA flag to enable zero-copy in macvtap to avoid the new flag for now since mavctap uses real NICs as lower device?

[PATCH 2/2] kvm tools: Add MMIO address mapper

2011-05-17 Thread Sasha Levin
When we have a MMIO exit, we need to find which device has registered to use the accessed MMIO space. The mapper maps ranges of guest physical addresses to callback functions. Implementation is based on an interval red-black tree. Signed-off-by: Sasha Levin levinsasha...@gmail.com ---

[PATCH 1/2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Sasha Levin
Interval rb-tree allows to directly store interval ranges and quickly lookup an overlap with a single point or a range. The helper is based on the kernel rb-tree implementation (located in linux/rbtree.h) which alows for the augmention of the classical rb-tree to be used as an interval tree.

Re: [PATCH 1/2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: Interval rb-tree allows to directly store interval ranges and quickly lookup an overlap with a single point or a range. The helper is based on the kernel rb-tree implementation (located in linux/rbtree.h) which alows for the augmention of the

Re: [PATCH 2/2] kvm tools: Add MMIO address mapper

2011-05-17 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: When we have a MMIO exit, we need to find which device has registered to use the accessed MMIO space. The mapper maps ranges of guest physical addresses to callback functions. Implementation is based on an interval red-black tree.

Re: [PATCH 11/13] kvm/powerpc: Handle some PAPR hcalls in the kernel

2011-05-17 Thread Alexander Graf
On 11.05.2011, at 12:45, Paul Mackerras wrote: This adds the infrastructure for handling PAPR hcalls in the kernel, either early in the guest exit path while we are still in real mode, or later once the MMU has been turned back on and we are in the full kernel context. The advantage of

Re: [PATCH 1/2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Sasha Levin
On Tue, 2011-05-17 at 09:41 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: +#include kvm/interval-rbtree.h +#include stdio.h +#include stdlib.h At first sight i dont think you really need the stdio.h and stlib.h includes - you added these while having

Re: [PATCH 12/13] kvm/powerpc: Accelerate H_PUT_TCE by implementing it in real mode

2011-05-17 Thread Alexander Graf
On 11.05.2011, at 12:46, Paul Mackerras wrote: From: David Gibson d...@au1.ibm.com This improves I/O performance for guests using the PAPR paravirtualization interface by making the H_PUT_TCE hcall faster, by implementing it in real mode. H_PUT_TCE is used for updating virtual IOMMU

Re: [PATCH 1/2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: On Tue, 2011-05-17 at 09:41 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: +#include kvm/interval-rbtree.h +#include stdio.h +#include stdlib.h At first sight i dont think you really need the stdio.h and

Re: [PATCH 1/2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Pekka Enberg
On Tue, May 17, 2011 at 11:05 AM, Ingo Molnar mi...@elte.hu wrote: * Sasha Levin levinsasha...@gmail.com wrote: On Tue, 2011-05-17 at 09:41 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: +#include kvm/interval-rbtree.h +#include stdio.h +#include stdlib.h

An Invitation to Neuroscientists and Physicists: Singapore Citizen Mr. Teo En Ming (Zhang Enming) Reports First Hand Account of Mind Intrusion and Mind Reading

2011-05-17 Thread Singapore Citizen Mr. Teo En Ming (Zhang Enming)
16 May 2011 Monday 7:28 P.M. Singapore Time For Immediate Release SINGAPORE, SINGAPORE - Singapore Citizen Mr. Teo En Ming (Zhang Enming) would like to report first hand account of mind intrusion and mind reading. I have been hearing voices for quite some time now but I have not been able to

Re: [PATCH 1/2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Sasha Levin
On Tue, 2011-05-17 at 11:18 +0300, Pekka Enberg wrote: On Tue, May 17, 2011 at 11:05 AM, Ingo Molnar mi...@elte.hu wrote: * Sasha Levin levinsasha...@gmail.com wrote: On Tue, 2011-05-17 at 09:41 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: +#include

Re: [PATCH 13/13] kvm/powerpc: Allow book3s_hv guests to use SMT processor modes

2011-05-17 Thread Alexander Graf
On 11.05.2011, at 12:46, Paul Mackerras wrote: This lifts the restriction that book3s_hv guests can only run one hardware thread per core, and allows them to use up to 4 threads per core on POWER7. The host still has to run single-threaded. This capability is advertised to qemu through a

Re: [PATCH 12/13] kvm/powerpc: Accelerate H_PUT_TCE by implementing it in real mode

2011-05-17 Thread Benjamin Herrenschmidt
On Tue, 2011-05-17 at 10:01 +0200, Alexander Graf wrote: I'm not sure I fully understand how this is supposed to work. If the tables are kept inside the kernel, how does userspace get to know where to DMA to? The guest gets a dma range from the device-tree which is the range of device-side dma

Re: [PATCH 12/13] kvm/powerpc: Accelerate H_PUT_TCE by implementing it in real mode

2011-05-17 Thread Alexander Graf
On 17.05.2011, at 11:11, Benjamin Herrenschmidt wrote: On Tue, 2011-05-17 at 10:01 +0200, Alexander Graf wrote: I'm not sure I fully understand how this is supposed to work. If the tables are kept inside the kernel, how does userspace get to know where to DMA to? The guest gets a dma

Re: [PATCH 12/13] kvm/powerpc: Accelerate H_PUT_TCE by implementing it in real mode

2011-05-17 Thread Benjamin Herrenschmidt
On Tue, 2011-05-17 at 11:31 +0200, Alexander Graf wrote: On 17.05.2011, at 11:11, Benjamin Herrenschmidt wrote: On Tue, 2011-05-17 at 10:01 +0200, Alexander Graf wrote: I'm not sure I fully understand how this is supposed to work. If the tables are kept inside the kernel, how does

Re: [PATCH 12/13] kvm/powerpc: Accelerate H_PUT_TCE by implementing it in real mode

2011-05-17 Thread Alexander Graf
On 17.05.2011, at 11:35, Benjamin Herrenschmidt wrote: On Tue, 2011-05-17 at 11:31 +0200, Alexander Graf wrote: On 17.05.2011, at 11:11, Benjamin Herrenschmidt wrote: On Tue, 2011-05-17 at 10:01 +0200, Alexander Graf wrote: I'm not sure I fully understand how this is supposed to work. If

Re: [PATCH 0/13] Hypervisor-mode KVM on POWER7

2011-05-17 Thread Alexander Graf
On 11.05.2011, at 12:34, Paul Mackerras wrote: The following series of patches enable KVM to exploit the hardware hypervisor mode on 64-bit Power ISA Book3S machines. At present only POWER7 is supported, but it would be easy to add other processors. Running the KVM host in hypervisor mode

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-17 Thread Avi Kivity
On 05/11/2011 06:55 PM, Avi Kivity wrote: perf maintainers: please consider the first three patches for merging (the first two make sense even without the rest). If you're familiar with the Intel PMU, please review patch 5 as well - it effectively undoes all your work of abstracting the PMU

Re: [PATCH 10/13] kvm/powerpc: Add support for Book3S processors in hypervisor mode

2011-05-17 Thread Alexander Graf
On 16.05.2011, at 07:58, Paul Mackerras wrote: On Sun, May 15, 2011 at 11:58:12PM +0200, Alexander Graf wrote: On 11.05.2011, at 12:44, Paul Mackerras wrote: +#ifdef CONFIG_KVM_BOOK3S_NONHV I really liked how you called the .c file _pr - why call it NONHV now? I agree,

[PATCH 1/2 V2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Sasha Levin
Interval rb-tree allows to directly store interval ranges and quickly lookup an overlap with a single point or a range. The helper is based on the kernel rb-tree implementation (located in linux/rbtree.h) which alows for the augmention of the classical rb-tree to be used as an interval tree.

[PATCH 2/2 V2] kvm tools: Add MMIO address mapper

2011-05-17 Thread Sasha Levin
When we have a MMIO exit, we need to find which device has registered to use the accessed MMIO space. The mapper maps ranges of guest physical addresses to callback functions. Implementation is based on an interval red-black tree. Signed-off-by: Sasha Levin levinsasha...@gmail.com ---

Re: [PATCH 1/2 V2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: +#define max(x, y) ((x) (y)) ? (x) : (y) Please have a look at tools/perf/util/include/linux/kernel.h where we have a type-safe version of the same - please put that into a header in tools/kvm/. ( There was some reason why perf could not use the

Re: [PATCH 2/2 V2] kvm tools: Add MMIO address mapper

2011-05-17 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: When we have a MMIO exit, we need to find which device has registered to use the accessed MMIO space. The mapper maps ranges of guest physical addresses to callback functions. Implementation is based on an interval red-black tree.

Re: [PATCH 0/13] Hypervisor-mode KVM on POWER7

2011-05-17 Thread Paul Mackerras
On Tue, May 17, 2011 at 11:46:34AM +0200, Alexander Graf wrote: Very nice patches indeed :). Is there any way I can test them? I don't like pulling code that I couldn't run anywhere yet. I can understand that, but unfortunately there are no machines available outside of IBM at this stage that

Re: [PATCH 13/13] kvm/powerpc: Allow book3s_hv guests to use SMT processor modes

2011-05-17 Thread Paul Mackerras
On Tue, May 17, 2011 at 10:21:56AM +0200, Alexander Graf wrote: On 11.05.2011, at 12:46, Paul Mackerras wrote: -#define KVM_MAX_VCPUS 1 +#define KVM_MAX_VCPUS NR_CPUS +#define KVM_THREADS_PER_CORE 4 So what if POWER8 (or whatever it will be called) comes along with

Re: [PATCH 11/13] kvm/powerpc: Handle some PAPR hcalls in the kernel

2011-05-17 Thread Paul Mackerras
On Tue, May 17, 2011 at 09:54:35AM +0200, Alexander Graf wrote: Not sure I like the name - when is it used? :) When the real-mode hcall handler decides it can't handle the hcall and wants to pass it up. Also, if it's not in the PAPR, the guest should never receive it, right? Right. It's

Re: [PATCH 13/13] kvm/powerpc: Allow book3s_hv guests to use SMT processor modes

2011-05-17 Thread Alexander Graf
Am 17.05.2011 um 12:44 schrieb Paul Mackerras pau...@samba.org: On Tue, May 17, 2011 at 10:21:56AM +0200, Alexander Graf wrote: On 11.05.2011, at 12:46, Paul Mackerras wrote: -#define KVM_MAX_VCPUS 1 +#define KVM_MAX_VCPUSNR_CPUS +#define KVM_THREADS_PER_CORE4 So what if

Re: [PATCH 0/13] Hypervisor-mode KVM on POWER7

2011-05-17 Thread Alexander Graf
Am 17.05.2011 um 13:15 schrieb Paul Mackerras pau...@samba.org: On Tue, May 17, 2011 at 11:46:34AM +0200, Alexander Graf wrote: Very nice patches indeed :). Is there any way I can test them? I don't like pulling code that I couldn't run anywhere yet. I can understand that, but

Re: [PATCH 1/2 V2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Sasha Levin
On Tue, 2011-05-17 at 12:50 +0200, Ingo Molnar wrote: ( There was some reason why perf could not use the kernel's min/max definitions, the details escape me. ) perf's min/max are surrounded by #ifdef - unlike the ones in the kernel's linux/kernel.h. Commit messages didn't mention why, so

Sharing memory between Android [host] and Win7 [host]

2011-05-17 Thread soumendra satapathy
Hi, I am trying to port the KVM on to the Android operating system. As one of the requirement i have to share some memory areas in the host (android) with the guest OS(Win7) hosted by KVM. I am in a fix how to share a memory area in the android with Win7 hosted by KVM. In case you have

Re: [PATCH 0/13] Hypervisor-mode KVM on POWER7

2011-05-17 Thread Avi Kivity
On 05/17/2011 02:38 PM, Alexander Graf wrote: What would be the path for these patches to get upstream? Would this stuff normally go through Avi's tree? There is a bit of a complication in that they are based on Ben's next branch. Would Avi pull Ben's next branch, or would they go in

Re: Sharing memory between Android [host] and Win7 [host]

2011-05-17 Thread Avi Kivity
On 05/17/2011 02:39 PM, soumendra satapathy wrote: Hi, I am trying to port the KVM on to the Android operating system. As one of the requirement i have to share some memory areas in the host (android) with the guest OS(Win7) hosted by KVM. I am in a fix how to share a memory area in

Re: [PATCH 1/2 V2] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: On Tue, 2011-05-17 at 12:50 +0200, Ingo Molnar wrote: ( There was some reason why perf could not use the kernel's min/max definitions, the details escape me. ) perf's min/max are surrounded by #ifdef - unlike the ones in the kernel's

[PATCH 1/2 V3] kvm tools: Add interval red-black tree helper

2011-05-17 Thread Sasha Levin
Interval rb-tree allows to directly store interval ranges and quickly lookup an overlap with a single point or a range. The helper is based on the kernel rb-tree implementation (located in linux/rbtree.h) which alows for the augmention of the classical rb-tree to be used as an interval tree.

[PATCH 2/2 V3] kvm tools: Add MMIO address mapper

2011-05-17 Thread Sasha Levin
When we have a MMIO exit, we need to find which device has registered to use the accessed MMIO space. The mapper maps ranges of guest physical addresses to callback functions. Implementation is based on an interval red-black tree. Acked-by: Ingo Molnar mi...@elte.hu Signed-off-by: Sasha Levin

[PATCH] kvm tools: Use virtio IDs from linux/virtio_ids.h

2011-05-17 Thread Sasha Levin
Instead of redefining virtio IDs in our headers, use IDs defined in linux/virtio_ids.h. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/virtio-pci-dev.h |7 ++- tools/kvm/virtio/blk.c |4 ++-- tools/kvm/virtio/console.c |4

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Marcelo Tosatti
On Mon, May 16, 2011 at 10:48:01PM +0300, Nadav Har'El wrote: In VMX, before we bring down a CPU we must VMCLEAR all VMCSs loaded on it because (at least in theory) the processor might not have written all of its content back to memory. Since a patch from June 26, 2008, this is done using a

Re: [PATCH 07/30] nVMX: Introduce vmcs02: VMCS used to run L2

2011-05-17 Thread Marcelo Tosatti
On Mon, May 16, 2011 at 09:32:53PM +0300, Nadav Har'El wrote: On Mon, May 16, 2011, Marcelo Tosatti wrote about Re: [PATCH 07/30] nVMX: Introduce vmcs02: VMCS used to run L2: +static void __nested_free_saved_vmcs(void *arg) +{ + struct saved_vmcs *saved_vmcs = arg; + +

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Avi Kivity
On 05/17/2011 04:19 PM, Marcelo Tosatti wrote: +/* + * Maintain the vcpus_on_cpu and saved_vmcss_on_cpu lists of vcpus and + * inactive saved_vmcss on nested entry (L1-L2) or nested exit (L2-L1). + * + * nested_maintain_per_cpu_lists should be called after the VMCS was switched + *

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Nadav Har'El
On Tue, May 17, 2011, Avi Kivity wrote about Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling: (local_vcpus_link must be manipulated with interrupts disabled, BTW). Thanks, I'll look into that. What about having a per-CPU VMCS list instead of per-CPU vcpu list? Perhaps even easier

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Marcelo Tosatti
On Tue, May 17, 2011 at 05:35:32PM +0300, Nadav Har'El wrote: On Tue, May 17, 2011, Avi Kivity wrote about Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling: static DEFINE_PER_CPU(struct list_head, vmcss_on_cpu); This is an interesting suggestion. My initial plan was to do something

[PATCH] Account for Fedora kernels with backported vzalloc

2011-05-17 Thread Bernhard Kohl
kvm-kmod-2.6.38.6 does not compile on Fedora kernels = 2.6.35.11. Signed-off-by: Bernhard Kohl bernhard.k...@nsn.com --- configure |8 external-module-compat-comm.h |5 - 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/configure

KVM call of May 17th

2011-05-17 Thread Juan Quintela
Minutes of today KVM call: - import of headers in marcelo hands through kvm tree - libtool integration * autoconf * gnulib - if we move to glib, we have something similar for free * recursive Makefile Paolo item: propose timeline plan on wiki, and discuss from there - SCSI integration

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Avi Kivity
On 05/17/2011 05:35 PM, Nadav Har'El wrote: What about having a per-CPU VMCS list instead of per-CPU vcpu list? Perhaps even easier (avoids duplication): struct raw_vmcs { u32 revision_id; u32 abort; char data[0]; }; struct vmcs { struct raw_vmcs *raw_vmcs; struct

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 08:55 +0300, Michael S. Tsirkin wrote: Something in your patch that overwrites the id in vhost and makes it put the wrong id in the used ring? By the way, need to keep in mind that a guest can give us the same head twice, need to make sure this at least does not

Re: [PATCH] Account for Fedora kernels with backported vzalloc

2011-05-17 Thread Jan Kiszka
On 2011-05-17 16:55, Bernhard Kohl wrote: kvm-kmod-2.6.38.6 does not compile on Fedora kernels = 2.6.35.11. Signed-off-by: Bernhard Kohl bernhard.k...@nsn.com --- configure |8 external-module-compat-comm.h |5 - 2 files changed, 12 insertions(+),

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Michael S. Tsirkin
On Tue, May 17, 2011 at 08:22:14AM -0700, Shirley Ma wrote: On Tue, 2011-05-17 at 08:55 +0300, Michael S. Tsirkin wrote: Something in your patch that overwrites the id in vhost and makes it put the wrong id in the used ring? By the way, need to keep in mind that a guest can give us the

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 18:28 +0300, Michael S. Tsirkin wrote: Which is the order the descriptors are put on avail ring. By design, guest should not depend on used ring entries being in order with avail ring (and btw with virtio block, they aren't). If it does, it's a bug I think. Ok, I

RE: [PATCH] Account for Fedora kernels with backported vzalloc

2011-05-17 Thread Kohl, Bernhard (NSN - DE/Munich)
-Original Message- From: ext Jan Kiszka [mailto:jan.kis...@siemens.com] Sent: Tuesday, May 17, 2011 5:27 PM To: Kohl, Bernhard (NSN - DE/Munich) Cc: kvm@vger.kernel.org Subject: Re: [PATCH] Account for Fedora kernels with backported vzalloc On 2011-05-17 16:55, Bernhard Kohl

Re: [PATCH] kvm: log directly from the guest to the host kvm buffer

2011-05-17 Thread Steven Rostedt
On Thu, 2011-05-12 at 17:39 +0200, Dhaval Giani wrote: +int kvm_pv_ftrace(struct kvm_vcpu *vcpu, unsigned long ip, gpa_t addr) +{ + int ret; + char *fmt = (char *) kzalloc(PAGE_SIZE, GFP_KERNEL); + + ret = kvm_read_guest(vcpu-kvm, addr, fmt, PAGE_SIZE); + +

Re: [PATCH 09/18] virtio: use avail_event index

2011-05-17 Thread Tom Lendacky
On Monday, May 16, 2011 02:12:21 AM Rusty Russell wrote: On Sun, 15 May 2011 16:55:41 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 09, 2011 at 02:03:26PM +0930, Rusty Russell wrote: On Wed, 4 May 2011 23:51:47 +0300, Michael S. Tsirkin m...@redhat.com wrote: Use the

Re: [PATCH] Account for Fedora kernels with backported vzalloc

2011-05-17 Thread Jan Kiszka
On 2011-05-17 17:44, Kohl, Bernhard (NSN - DE/Munich) wrote: -Original Message- From: ext Jan Kiszka [mailto:jan.kis...@siemens.com] Sent: Tuesday, May 17, 2011 5:27 PM To: Kohl, Bernhard (NSN - DE/Munich) Cc: kvm@vger.kernel.org Subject: Re: [PATCH] Account for Fedora kernels with

Re: [PATCH] Account for Fedora kernels with backported vzalloc

2011-05-17 Thread Avi Kivity
On 05/17/2011 05:55 PM, Bernhard Kohl wrote: kvm-kmod-2.6.38.6 does not compile on Fedora kernels= 2.6.35.11. index a40c39f..b91587c 100755 --- a/configure +++ b/configure @@ -153,6 +153,13 @@ if [ -n $no_uname -a $want_module ]; then depmod_version=$kernel_version fi +# Check if

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Nadav Har'El
On Tue, May 17, 2011, Marcelo Tosatti wrote about Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling: For example, currently, vmclear_local_vcpus() not only VMCLEARs the vmcss, it also sets vmx-vcpu.cpu = -1, xmv-launched=0 for the vcpus holding these VMCSs. If we had only a list of

Re: [PATCH 08/13] kvm/powerpc: Move guest enter/exit down into subarch-specific code

2011-05-17 Thread Marcelo Tosatti
On Wed, May 11, 2011 at 08:43:31PM +1000, Paul Mackerras wrote: From 964ee93b2d728e4fb16ae66eaceb6e912bf114ad Mon Sep 17 00:00:00 2001 From: Paul Mackerras pau...@samba.org Date: Tue, 10 May 2011 22:23:18 +1000 Subject: [PATCH 08/13] kvm/powerpc: Move guest enter/exit down into

Re: [PATCH 08/13] kvm/powerpc: Move guest enter/exit down into subarch-specific code

2011-05-17 Thread Marcelo Tosatti
On Tue, May 17, 2011 at 03:05:12PM -0300, Marcelo Tosatti wrote: - ret = __kvmppc_vcpu_entry(kvm_run, vcpu); + kvm_guest_enter(); kvm_guest_enter should run with interrupts disabled. Its fine, please ignore message. -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Nadav Har'El
On Tue, May 17, 2011, Avi Kivity wrote about Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling: VMCSs. If we had only a list of VMCSs, how can we mark the vcpus as being not currently loaded (cpu=-1)? -launched and -cpu simply move into struct vmcs. As I explained in the sister

Re: [PATCH] KVM: Document KVM_GET_LAPIC, KVM_SET_LAPIC ioctl

2011-05-17 Thread Marcelo Tosatti
On Wed, May 11, 2011 at 08:30:51AM -0400, Avi Kivity wrote: Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/kvm/api.txt | 32 1 files changed, 32 insertions(+), 0 deletions(-) Applied, thanks. -- To unsubscribe from this list: send the line

[PATCH 1/2] kvm tools: Copy net/9p/9p.h

2011-05-17 Thread Sasha Levin
Header could not be included directly because among some minor issues, the original header declared the same function twice: int p9_errstr2errno(char *errstr, int len); int p9_errstr2errno(char *, int); A patch has been sent to 9P maintainers, this header should be removed once the patch is in.

[PATCH 2/2] kvm tools: Add virtio-9p

2011-05-17 Thread Sasha Levin
Overview: 9p allows for simple RPC based resource sharing over different transports (in our case, virtio). This is the implementation of (most of) the original 9p2000 protocol, without the .u or the .l extensions. How to use: 1. Make sure kernel is compiled with: CONFIG_NET_9P=y

Re: [PATCH 2/2] kvm tools: Add virtio-9p

2011-05-17 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: 3. Within the guest, mount the fs: mount -t 9p -otrans=virtio kvm_9p local_dir -oversion=9p2000 This will mount the 9p server to local_dir. Really cool! Still todo (but can live without): - Multiple virtio-9p devices. - Ugly hack in

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Marcelo Tosatti
On Tue, May 17, 2011 at 09:11:32PM +0300, Nadav Har'El wrote: On Tue, May 17, 2011, Avi Kivity wrote about Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling: VMCSs. If we had only a list of VMCSs, how can we mark the vcpus as being not currently loaded (cpu=-1)? -launched

Re: [PATCH 00/16] qemu-kvm: Cleanup and switch to upstream - Part II

2011-05-17 Thread Marcelo Tosatti
On Fri, May 13, 2011 at 02:13:54PM +0200, Jan Kiszka wrote: The second round of merging qemu-kvm with upstream. This part stops after switching to upstreams kvm_init implementation. To achieve this, various small cleanups and refactorings are applied, the irq0 override management is

Re: [PATCH 2/2] kvm tools: Add virtio-9p

2011-05-17 Thread Sasha Levin
On Tue, 2011-05-17 at 20:40 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: 3. Within the guest, mount the fs: mount -t 9p -otrans=virtio kvm_9p local_dir -oversion=9p2000 This will mount the 9p server to local_dir. Really cool! Thanks! is root-9p possible?

Re: [PATCH 2/2] kvm tools: Add virtio-9p

2011-05-17 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: On Tue, 2011-05-17 at 20:40 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: 3. Within the guest, mount the fs: mount -t 9p -otrans=virtio kvm_9p local_dir -oversion=9p2000 This will mount the 9p server to

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Nadav Har'El
On Tue, May 17, 2011, Marcelo Tosatti wrote about Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling: this is what I planned to do, until it dawned on me that I can't, because cpu isn't part of vmx (where the vmcs and launched sit in the standard KVM), but ... vcpu-cpu remains there.

Re: [PATCH v1 5/5] KVM: Expose a version 1 architectural PMU to guests

2011-05-17 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: Caveats: - counters that have PMI (interrupt) enabled stop counting after the interrupt is signalled. This is because we need one-shot samples that keep counting, which perf doesn't support yet Hm, do you need more than perf_event::event_limit, or

Re: [PATCH 2/2] kvm tools: Add virtio-9p

2011-05-17 Thread Sasha Levin
On Tue, 2011-05-17 at 22:08 +0300, Sasha Levin wrote: 'kvm_9p' isn't created as a device under /dev, it's just a name used internally by 9pnet_virtio (and located under sysfs). I couldn't figure out which params the kernel would expect to boot using 9p over virtio (theres no device name to

[TEST PATCH net-next] vhost: accumulate multiple used and sigal in vhost TX test

2011-05-17 Thread Shirley Ma
Hello Michael, Here is the patch I used to test out of order before: add used in a pend array, and swap the last two ids. I used to hit an issue, but now it seems working well. This won't impact zero-copy patch since we need to maintain the pend used ids anyway. Signed-off-by: Shirley Ma

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
Resubmit the patch with most update. This patch passed some live-migration test against RHEL6.2. I will run more stress test w/i live migration. Signed-off-by: Shirley Ma x...@us.ibm.com --- drivers/vhost/net.c | 37 +++- drivers/vhost/vhost.c | 55

Re: [TEST PATCH net-next] vhost: accumulate multiple used and sigal in vhost TX test

2011-05-17 Thread Michael S. Tsirkin
On Tue, May 17, 2011 at 01:46:21PM -0700, Shirley Ma wrote: Hello Michael, Here is the patch I used to test out of order before: add used in a pend array, and swap the last two ids. I used to hit an issue, but now it seems working well. Aha, so if I apply this guest will *not* crash? :)

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 09:21 +0300, Michael S. Tsirkin wrote: Problem is, in your patch there are a set of restrictions on what the device can do with the skb that we need to enforce somehow. Also, how do we know it's a 'real NIC' and not a software device? I checked macvtap newlink, it doesn't

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Michael S. Tsirkin
On Tue, May 17, 2011 at 01:50:19PM -0700, Shirley Ma wrote: Resubmit the patch with most update. This patch passed some live-migration test against RHEL6.2. I will run more stress test w/i live migration. What changed from the last version? Signed-off-by: Shirley Ma x...@us.ibm.com ---

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 23:58 +0300, Michael S. Tsirkin wrote: On Tue, May 17, 2011 at 01:50:19PM -0700, Shirley Ma wrote: Resubmit the patch with most update. This patch passed some live-migration test against RHEL6.2. I will run more stress test w/i live migration. What changed from the

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Michael S. Tsirkin
On Tue, May 17, 2011 at 01:50:19PM -0700, Shirley Ma wrote: Resubmit the patch with most update. This patch passed some live-migration test against RHEL6.2. I will run more stress test w/i live migration. Signed-off-by: Shirley Ma x...@us.ibm.com Cool. cleanup path needs a fix - are you use

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Michał Mirosław
2011/5/17 Shirley Ma mashi...@us.ibm.com: Hello Michael, Looks like to use a new flag requires more time/work. I am thinking whether we can just use HIGHDMA flag to enable zero-copy in macvtap to avoid the new flag for now since mavctap uses real NICs as lower device? Is there any other

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Wed, 2011-05-18 at 00:28 +0300, Michael S. Tsirkin wrote: On Tue, May 17, 2011 at 01:50:19PM -0700, Shirley Ma wrote: Resubmit the patch with most update. This patch passed some live-migration test against RHEL6.2. I will run more stress test w/i live migration. Signed-off-by:

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: 2011/5/17 Shirley Ma mashi...@us.ibm.com: Hello Michael, Looks like to use a new flag requires more time/work. I am thinking whether we can just use HIGHDMA flag to enable zero-copy in macvtap to avoid the new flag for now since

Re: [Qemu-devel] [RFC] live snapshot, live merge, live block migration

2011-05-17 Thread Dor Laor
On 05/16/2011 11:23 AM, Jagane Sundar wrote: Hello Dor, Let me see if I understand live snapshot correctly: If I want to configure a VM for daily backup, then I would do the following: - Create a snapshot s1. s0 is marked read-only. - Do a full backup of s0 on day 0. - On day 1, I would create

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Michał Mirosław
W dniu 18 maja 2011 00:28 użytkownik Shirley Ma mashi...@us.ibm.com napisał: On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: 2011/5/17 Shirley Ma mashi...@us.ibm.com: Looks like to use a new flag requires more time/work. I am thinking whether we can just use HIGHDMA flag to enable

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Shirley Ma
On Wed, 2011-05-18 at 00:58 +0200, Michał Mirosław wrote: W dniu 18 maja 2011 00:28 użytkownik Shirley Ma mashi...@us.ibm.com napisał: On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: 2011/5/17 Shirley Ma mashi...@us.ibm.com: Looks like to use a new flag requires more time/work.

serial port reconfiguration

2011-05-17 Thread Michael Stroucken
Hi, If I start a KVM instance with -vnc none -serial null options, I can start a vnc server at a later time using the QEMU monitor's change command. Is there a way to also redirect the serial device elsewhere, like a telnet server? Thanks, Michael. -- To unsubscribe from this list: send the

Re: [PATCH 09/18] virtio: use avail_event index

2011-05-17 Thread Rusty Russell
On Tue, 17 May 2011 09:10:31 +0300, Michael S. Tsirkin m...@redhat.com wrote: Well one can imagine a driver doing: while (virtqueue_get_buf()) { virtqueue_add_buf() } virtqueue_kick() which looks sensible (batch kicks) but might process any number of

Re: [PATCH 06/18] virtio_ring: avail event index interface

2011-05-17 Thread Rusty Russell
On Tue, 17 May 2011 09:00:52 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 16, 2011 at 03:53:19PM +0930, Rusty Russell wrote: On Sun, 15 May 2011 15:47:27 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 09, 2011 at 01:43:15PM +0930, Rusty Russell wrote: On

Re: [PATCH 2/2] kvm tools: Add virtio-9p

2011-05-17 Thread Eric Van Hensbergen
On Tue, May 17, 2011 at 3:27 PM, Sasha Levin levinsasha...@gmail.com wrote: On Tue, 2011-05-17 at 22:08 +0300, Sasha Levin wrote: 'kvm_9p' isn't created as a device under /dev, it's just a name used internally by 9pnet_virtio (and located under sysfs). I couldn't figure out which params the

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Marcelo Tosatti
On Tue, May 17, 2011 at 10:30:30PM +0300, Nadav Har'El wrote: On Tue, May 17, 2011, Marcelo Tosatti wrote about Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling: this is what I planned to do, until it dawned on me that I can't, because cpu isn't part of vmx (where the vmcs and

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Wed, 2011-05-18 at 00:28 +0300, Michael S. Tsirkin wrote: On Tue, May 17, 2011 at 01:50:19PM -0700, Shirley Ma wrote: Resubmit the patch with most update. This patch passed some live-migration test against RHEL6.2. I will run more stress test w/i live migration. Signed-off-by:

Re: [PATCH 09/18] virtio: use avail_event index

2011-05-17 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 09:49:42AM +0930, Rusty Russell wrote: On Tue, 17 May 2011 09:10:31 +0300, Michael S. Tsirkin m...@redhat.com wrote: Well one can imagine a driver doing: while (virtqueue_get_buf()) { virtqueue_add_buf() } virtqueue_kick() which

Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling

2011-05-17 Thread Nadav Har'El
On Tue, May 17, 2011, Marcelo Tosatti wrote about Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling: On Tue, May 17, 2011 at 10:30:30PM +0300, Nadav Har'El wrote: So we'll have two fields, vmx.vcpu.cpu and vmx.vmcs.cpu, which are supposed to always contain the same value. Are you fine

[PATCH] KVM: PPC: fix partial application of exit timing in ticks

2011-05-17 Thread Stuart Yoder
When http://www.spinics.net/lists/kvm-ppc/msg02664.html was applied to produce commit b51e7aa7ed6d8d134d02df78300ab0f91cfff4d2, the removal of the conversion in add_exit_timing was left out. Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com

[PATCH 01/13] powerpc/e500: Save SPEFCSR in flush_spe_to_thread()

2011-05-17 Thread Scott Wood
From: yu liu yu@freescale.com giveup_spe() saves the SPE state which is protected by MSR[SPE]. However, modifying SPEFSCR does not trap when MSR[SPE]=0. And since SPEFSCR is already saved/restored in _switch(), not all the callers want to save SPEFSCR again. Thus, saving SPEFSCR should not

[PATCH 02/13] powerpc/e500: SPE register saving: take arbitrary struct offset

2011-05-17 Thread Scott Wood
Previously, these macros hardcoded THREAD_EVR0 as the base of the save area, relative to the base register passed. This base offset is now passed as a separate macro parameter, allowing reuse with other SPE save areas, such as used by KVM. Signed-off-by: Scott Wood scottw...@freescale.com ---

[PATCH 03/13] KVM: PPC: booke: use shadow_msr

2011-05-17 Thread Scott Wood
BKeep the guest MSR and the guest-mode true MSR separate, rather than modifying the guest MSR on each guest entry to produce a true MSR. Any bits which should be modified based on guest MSR must be explicitly propagated from vcpu-arch.shared-msr to vcpu-arch.shadow_msr in kvmppc_set_msr(). While

[PATCH 10/13] KVM: PPC: e500: Stop keeping shadow TLB

2011-05-17 Thread Scott Wood
From: Liu Yu yu@freescale.com Instead of a fully separate set of TLB entries, keep just the pfn and dirty status. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/kvm_e500.h | 20 ++- arch/powerpc/kvm/e500_tlb.c

[PATCH 12/13] KVM: PPC: e500: Don't search over the entire TLB0.

2011-05-17 Thread Scott Wood
Only look in the 4 entries that could possibly contain the entry we're looking for. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/e500_tlb.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c

[PATCH 13/13] KVM: PPC: e500: MMU API

2011-05-17 Thread Scott Wood
This implements a shared-memory API for giving Qemu access to the guest's TLB. Signed-off-by: Scott Wood scottw...@freescale.com --- Documentation/kvm/api.txt | 79 +++- arch/powerpc/include/asm/kvm.h | 35 +++ arch/powerpc/include/asm/kvm_e500.h | 23 +-

[PATCH 04/13] KVM: PPC: e500: Save/restore SPE state

2011-05-17 Thread Scott Wood
This is done lazily. The SPE save will be done only if the guest has used SPE since the last preemption or heavyweight exit. Restore will be done only on demand, when enabling MSR_SPE in the shadow MSR, in response to an SPE fault or mtmsr emulation. For SPEFSCR, Linux already switches it on

  1   2   >