[PATCH] KVM Test: Correct file_transfer import link.

2011-05-18 Thread fyang
From: Feng Yang modified: client/tests/kvm/tests/set_link.py modified: client/virt/tests/nic_promisc.py modified: client/virt/tests/nicdriver_unload.py Signed-off-by: Feng Yang --- client/tests/kvm/tests/set_link.py|2 +- client/virt/tests/nic_promisc.py

[Patch] kvm tools: build rbtree.o from source

2011-05-18 Thread Amerigo Wang
Don't link the rbtree.o from kernel object tree, build rbtree.o from source by ourselves. Reported-by: Ingo Molnar Signed-off-by: WANG Cong --- diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index 30f0f61..8cfa9a2 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -45,9 +45,10 @@

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

2011-05-18 Thread Paul Mackerras
On Tue, May 17, 2011 at 01:36:26PM +0200, Alexander Graf wrote: > > Just so I understand the scheme: One vcpu needs to go to MMU mode in > KVM, it then sends IPIs to stop the other threads and finally we > return from this wait here? Actually, if one thread needs to get the other threads out of th

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

2011-05-18 Thread Alexander Graf
On 19.05.2011, at 07:22, Paul Mackerras wrote: > On Tue, May 17, 2011 at 02:42:08PM +0300, Avi Kivity wrote: >> 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

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

2011-05-18 Thread Paul Mackerras
On Tue, May 17, 2011 at 02:42:08PM +0300, Avi Kivity wrote: > 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

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

2011-05-18 Thread Cyrill Gorcunov
On Thu, May 19, 2011 at 3:02 AM, Sasha Levin wrote: > 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.

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

2011-05-18 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 CONFIG_NE

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

2011-05-18 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. U

[PATCH RFC] virtio_net: fix patch: virtio_net: limit xmit polling

2011-05-18 Thread Michael S. Tsirkin
The patch virtio_net: limit xmit polling got the logic reversed: it polled while we had capacity not while ring was empty. Fix it up and clean up a bit by using a for loop. Signed-off-by: Michael S. Tsirkin --- OK, turns out that patch was borken. Here's a fix that survived stress test on my b

[PATCH RFC] vhost: fix enable notify: write out last avail value we saw

2011-05-18 Thread Michael S. Tsirkin
With RX ring and mergeable buffers, vhost-net sometimes enables notifications when ring is not empty - just doesn't have enough entries for the incoming packet. To get event when entries are added in this case, we should always write out the last index value we saw into event index field, which is

Re: [PATCH] kvm tools: Default guest cpu count to host cpu count

2011-05-18 Thread Cyrill Gorcunov
On 05/18/2011 11:56 PM, Sasha Levin wrote: > If user haven't specified cpu count for the guest, use > the amount of online cpus on the host. > > Signed-off-by: Sasha Levin Looks good to me, thanks Sasha! -- Cyrill -- To unsubscribe from this list: send the line "unsubscribe kvm" in

[PATCH] kvm tools: Default guest cpu count to host cpu count

2011-05-18 Thread Sasha Levin
If user haven't specified cpu count for the guest, use the amount of online cpus on the host. Signed-off-by: Sasha Levin --- tools/kvm/kvm-run.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-run.c index 63181bf..1517264 10064

[RFC/PATCH] kvm tools: Use preadv/pwritev syscalls directly

2011-05-18 Thread Pekka Enberg
"bornto befrag " reported the following compilation error: > When i compile i kvm native tool tools/kvm && make i get this > > CC read-write.o > cc1: warnings being treated as errors > read-write.c: In function ‘xpreadv’: > read-write.c:255: error: implicit declaration of functi

Re: [Qemu-devel] [RFC] Memory API

2011-05-18 Thread Avi Kivity
Copying kvm@. On 05/18/2011 04:12 PM, Avi Kivity wrote: The current memory APIs (cpu_register_io_memory, cpu_register_physical_memory) suffer from a number of drawbacks: - lack of centralized bookkeeping - a cpu_register_physical_memory() that overlaps an existing region will overwrite the

How to diagnose memory leak in kvm-qemu-0.14.0?

2011-05-18 Thread Steve Kemp
I'm running the most recent release of KVM, version 0.14.0 on a host kernel 2.6.32.15, and seem to be able to trigger a leak of memory pretty easily. Inside a guest the following one-liner will cause the KVM process on the host to gradually increase its memory consumption: while true

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

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 19:51 +0300, Michael S. Tsirkin wrote: > > > Yes, I agree. I think for tcpdump, we really need to copy the > data > > > anyway, to avoid guest changing it in between. So we do that and > then > > > use the copy everywhere, release the old one. Hmm? > > > > Yes. Old one use

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 09:45:40AM -0700, Shirley Ma wrote: > On Wed, 2011-05-18 at 19:36 +0300, Michael S. Tsirkin wrote: > > On Wed, May 18, 2011 at 09:07:37AM -0700, Shirley Ma wrote: > > > On Wed, 2011-05-18 at 18:47 +0300, Michael S. Tsirkin wrote: > > > > On Wed, May 18, 2011 at 07:38:27AM -0

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 01:40:29PM +0200, Michał Mirosław wrote: > W dniu 18 maja 2011 13:17 użytkownik Michael S. Tsirkin > napisał: > > On Wed, May 18, 2011 at 01:10:50PM +0200, Michał Mirosław wrote: > >> 2011/5/18 Michael S. Tsirkin : > >> > On Tue, May 17, 2011 at 03:28:38PM -0700, Shirley Ma

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

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 19:36 +0300, Michael S. Tsirkin wrote: > On Wed, May 18, 2011 at 09:07:37AM -0700, Shirley Ma wrote: > > On Wed, 2011-05-18 at 18:47 +0300, Michael S. Tsirkin wrote: > > > On Wed, May 18, 2011 at 07:38:27AM -0700, Shirley Ma wrote: > > > > On Wed, 2011-05-18 at 13:40 +0200, Mi

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 09:07:37AM -0700, Shirley Ma wrote: > On Wed, 2011-05-18 at 18:47 +0300, Michael S. Tsirkin wrote: > > On Wed, May 18, 2011 at 07:38:27AM -0700, Shirley Ma wrote: > > > On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > > > > >> >> Not more other restrictions, skb c

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 09:02:23AM -0700, Shirley Ma wrote: > On Wed, 2011-05-18 at 07:38 -0700, Shirley Ma wrote: > > On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > > > >> >> Not more other restrictions, skb clone is OK. > > pskb_expand_head() > > > looks > > > >> >> OK to me from cod

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

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 18:47 +0300, Michael S. Tsirkin wrote: > On Wed, May 18, 2011 at 07:38:27AM -0700, Shirley Ma wrote: > > On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > > > >> >> Not more other restrictions, skb clone is OK. > pskb_expand_head() > > > looks > > > >> >> OK to me fr

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

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 07:38 -0700, Shirley Ma wrote: > On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > > >> >> Not more other restrictions, skb clone is OK. > pskb_expand_head() > > looks > > >> >> OK to me from code review. > > >> > Hmm. pskb_expand_head calls skb_release_data while ke

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

2011-05-18 Thread Jagane Sundar
Hello Dor, I'm glad I could convince you of the value of Livebackup. I think Livesnapshot/Livemerge, Livebackup and Block Migration all have very interesting use cases. For example: - Livesnapshot/Livemerge is very useful in development/QA environments where one might want to create a snapshot

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 07:38:27AM -0700, Shirley Ma wrote: > On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > > >> >> Not more other restrictions, skb clone is OK. pskb_expand_head() > > looks > > >> >> OK to me from code review. > > >> > Hmm. pskb_expand_head calls skb_release_data whi

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

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > >> >> Not more other restrictions, skb clone is OK. pskb_expand_head() > looks > >> >> OK to me from code review. > >> > Hmm. pskb_expand_head calls skb_release_data while keeping > >> > references to pages. How is that ok? What do I miss?

Re: [PATCH v2 1/7] KVM: MMU: optimize pte write path if don't have protected sp

2011-05-18 Thread Avi Kivity
On 05/18/2011 04:12 PM, Marcelo Tosatti wrote: On Mon, May 16, 2011 at 02:25:02PM +0300, Avi Kivity wrote: > On 05/15/2011 06:20 PM, Xiao Guangrong wrote: > >Simply return from kvm_mmu_pte_write path if no shadow page is > >write-protected, then we can avoid to walk all shadow pages and hold >

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 02:48:24PM +0200, Michał Mirosław wrote: > W dniu 18 maja 2011 13:56 użytkownik Michael S. Tsirkin > napisał: > > On Wed, May 18, 2011 at 01:47:33PM +0200, Michał Mirosław wrote: > >> W dniu 18 maja 2011 13:17 użytkownik Michael S. Tsirkin > >> napisał: > >> > On Wed, May

Re: [PATCH v2 1/7] KVM: MMU: optimize pte write path if don't have protected sp

2011-05-18 Thread Marcelo Tosatti
On Mon, May 16, 2011 at 02:25:02PM +0300, Avi Kivity wrote: > On 05/15/2011 06:20 PM, Xiao Guangrong wrote: > >Simply return from kvm_mmu_pte_write path if no shadow page is > >write-protected, then we can avoid to walk all shadow pages and hold > >mmu-lock > > Patchset looks like a very good clea

Re: [PATCH 1/3] KVM: x86 emulator: Place insn_fetch helpers together

2011-05-18 Thread Marcelo Tosatti
On Sun, May 15, 2011 at 12:54:58AM +0900, Takuya Yoshikawa wrote: > From: Takuya Yoshikawa > > The two macros need special care to use: > Assume rc, ctxt, ops and done exist outside of them. > Can goto outside. > > Considering the fact that these are used only in decode functions, > moving t

Re: [PATCH 0/2] Inline vmcs_readl()

2011-05-18 Thread Marcelo Tosatti
On Sun, May 15, 2011 at 10:13:11AM -0400, Avi Kivity wrote: > The following two patches optimize vmcs_readl() to a single VMREAD > instruction, > instead of a call to a 7-instruction function. > > Avi Kivity (2): > KVM: VMX: Move VMREAD cleanup to exception handler > KVM: VMX: always_inline V

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

2011-05-18 Thread Kohl, Bernhard (NSN - DE/Munich)
> -Original Message- > From: ext Avi Kivity [mailto:a...@redhat.com] > Sent: Tuesday, May 17, 2011 7:30 PM > To: Kohl, Bernhard (NSN - DE/Munich) > Cc: kvm@vger.kernel.org; jan.kis...@siemens.com > Subject: Re: [PATCH] Account for Fedora kernels with backported vzalloc > > On 05/17/2011 05

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

2011-05-18 Thread Avi Kivity
On 05/18/2011 03:35 PM, Peter Zijlstra wrote: On Wed, 2011-05-18 at 14:37 +0300, Avi Kivity wrote: > On 05/18/2011 02:32 PM, Peter Zijlstra wrote: > > On Wed, 2011-05-18 at 13:07 +0200, Ingo Molnar wrote: > > > > > > It does through raw events - which are indeed model specific. > > > >

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

2011-05-18 Thread Michał Mirosław
W dniu 18 maja 2011 13:56 użytkownik Michael S. Tsirkin napisał: > On Wed, May 18, 2011 at 01:47:33PM +0200, Michał Mirosław wrote: >> W dniu 18 maja 2011 13:17 użytkownik Michael S. Tsirkin >> napisał: >> > On Wed, May 18, 2011 at 01:10:50PM +0200, Michał Mirosław wrote: >> >> 2011/5/18 Michael

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

2011-05-18 Thread Peter Zijlstra
On Wed, 2011-05-18 at 14:37 +0300, Avi Kivity wrote: > On 05/18/2011 02:32 PM, Peter Zijlstra wrote: > > On Wed, 2011-05-18 at 13:07 +0200, Ingo Molnar wrote: > > > > > > It does through raw events - which are indeed model specific. > > > > Which is exactly what is needed anyway, he gets a raw msr

[kvm tools] bug: rbtree.o build rule?

2011-05-18 Thread Ingo Molnar
something i just noticed, rbtree.o is built in the kernel directory: CC ../../lib/rbtree.o that's Not Nice (tm) (we should never modify the kernel's objects) and it can also cause problems like this when having a 32-bit tree built already: /usr/bin/ld: i386 architecture of input file

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

2011-05-18 Thread Sasha Levin
On Wed, 2011-05-18 at 14:06 +0200, Ingo Molnar wrote: > * Sasha Levin wrote: > > > When trying to boot a distribution rootfs we get a lot of symbolic link and > > file locking errors, since neither of those is supported by legacy 9p2000 - > > thats understandable. It just prevents from almost a

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

2011-05-18 Thread Nadav Har'El
On Wed, May 18, 2011, Marcelo Tosatti wrote about "Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling": > Note this is not just about the code being nicer, but simplicity is > crucial, the code is tricky enough with one linked list. Unfortunately, it's not obvious that the method you suggested

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

2011-05-18 Thread Marcelo Tosatti
On Wed, May 18, 2011 at 08:52:36AM +0300, Nadav Har'El wrote: > 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.c

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

2011-05-18 Thread Ingo Molnar
* Sasha Levin wrote: > When trying to boot a distribution rootfs we get a lot of symbolic link and > file locking errors, since neither of those is supported by legacy 9p2000 - > thats understandable. It just prevents from almost anything more complicated > than simple command line from worki

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

2011-05-18 Thread Sasha Levin
On Tue, 2011-05-17 at 23:27 +0300, Sasha Levin 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 kernel wou

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

2011-05-18 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Wed, 2011-05-18 at 13:07 +0200, Ingo Molnar wrote: > > > > Peter, what do you think about adding a inv and cmask attribute that is > > applied > > to generic events automatically? > > Have you read the PPC, ARM and SPARC64 PMU definition to check if that makes

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 01:47:33PM +0200, Michał Mirosław wrote: > W dniu 18 maja 2011 13:17 użytkownik Michael S. Tsirkin > napisał: > > On Wed, May 18, 2011 at 01:10:50PM +0200, Michał Mirosław wrote: > >> 2011/5/18 Michael S. Tsirkin : > >> > On Tue, May 17, 2011 at 03:28:38PM -0700, Shirley Ma

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 01:40:29PM +0200, Michał Mirosław wrote: > W dniu 18 maja 2011 13:17 użytkownik Michael S. Tsirkin > napisał: > > On Wed, May 18, 2011 at 01:10:50PM +0200, Michał Mirosław wrote: > >> 2011/5/18 Michael S. Tsirkin : > >> > On Tue, May 17, 2011 at 03:28:38PM -0700, Shirley Ma

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

2011-05-18 Thread Michał Mirosław
W dniu 18 maja 2011 13:17 użytkownik Michael S. Tsirkin napisał: > On Wed, May 18, 2011 at 01:10:50PM +0200, Michał Mirosław wrote: >> 2011/5/18 Michael S. Tsirkin : >> > On Tue, May 17, 2011 at 03:28:38PM -0700, Shirley Ma wrote: >> >> On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: >>

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

2011-05-18 Thread Michał Mirosław
W dniu 18 maja 2011 13:17 użytkownik Michael S. Tsirkin napisał: > On Wed, May 18, 2011 at 01:10:50PM +0200, Michał Mirosław wrote: >> 2011/5/18 Michael S. Tsirkin : >> > On Tue, May 17, 2011 at 03:28:38PM -0700, Shirley Ma wrote: >> >> On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: >>

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

2011-05-18 Thread Avi Kivity
On 05/18/2011 02:32 PM, Peter Zijlstra wrote: On Wed, 2011-05-18 at 13:07 +0200, Ingo Molnar wrote: > > It does through raw events - which are indeed model specific. Which is exactly what is needed anyway, he gets a raw msr value. The only thing that is not exposed is the ANY bit, but since KV

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

2011-05-18 Thread Peter Zijlstra
On Wed, 2011-05-18 at 13:07 +0200, Ingo Molnar wrote: > > It does through raw events - which are indeed model specific. Which is exactly what is needed anyway, he gets a raw msr value. The only thing that is not exposed is the ANY bit, but since KVM doesn't expose HT anyway that doesn't matter.

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

2011-05-18 Thread Peter Zijlstra
On Wed, 2011-05-18 at 13:07 +0200, Ingo Molnar wrote: > > Peter, what do you think about adding a inv and cmask attribute that is > applied > to generic events automatically? Have you read the PPC, ARM and SPARC64 PMU definition to check if that makes sense? -- To unsubscribe from this list: s

Re: [PATCH v1 3/3] kvm tools: Add QCOW level2 caching support

2011-05-18 Thread Sasha Levin
On Wed, 2011-05-18 at 11:17 +0100, Prasad Joshi wrote: > QCOW uses two tables level1 (L1) table and level2 > (L2) table. The L1 table points to offset of L2 > table. When a QCOW image is probed, the L1 table is > cached in the memory to avoid reading it from disk > on every reference. This caching

Re: [PATCH v1 3/3] kvm tools: Add QCOW level2 caching support

2011-05-18 Thread Pekka Enberg
On Wed, May 18, 2011 at 1:41 PM, Prasad Joshi wrote: > On Wed, May 18, 2011 at 11:27 AM, Pekka Enberg wrote: >> On Wed, May 18, 2011 at 1:17 PM, Prasad Joshi >> wrote: >>> QCOW uses two tables level1 (L1) table and level2 >>> (L2) table. The L1 table points to offset of L2 >>> table. When a QCO

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

2011-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2011 at 01:10:50PM +0200, Michał Mirosław wrote: > 2011/5/18 Michael S. Tsirkin : > > On Tue, May 17, 2011 at 03:28:38PM -0700, Shirley Ma wrote: > >> On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: > >> > 2011/5/17 Shirley Ma : > >> > > Hello Michael, > >> > > > >> > > Lo

Re: [PATCH v1 1/3] kvm tools: Close the disk images after the guest shuts down

2011-05-18 Thread Ingo Molnar
* Prasad Joshi wrote: > @@ -583,6 +585,11 @@ int kvm_cmd_run(int argc, const char **argv, const char > *prefix) > exit_code = 1; > } > > + for (i = 0; i < MAX_DISK_IMAGES; i++) { > + if (image_disks[i]) > + disk_image__clos

Re: [PATCH v1 2/3] kvm tools: Release memoty allocated during virtio block initialization

2011-05-18 Thread Ingo Molnar
FYI, since you are re-running this series anyway, there's a typo in the patch title. Thanks, Ingo -- 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

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

2011-05-18 Thread Michał Mirosław
2011/5/18 Michael S. Tsirkin : > On Tue, May 17, 2011 at 03:28:38PM -0700, Shirley Ma wrote: >> On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: >> > 2011/5/17 Shirley Ma : >> > > Hello Michael, >> > > >> > > Looks like to use a new flag requires more time/work. I am thinking >> > > whethe

Re: [PATCH v1 3/3] kvm tools: Add QCOW level2 caching support

2011-05-18 Thread Ingo Molnar
* Pekka Enberg wrote: > On Wed, May 18, 2011 at 1:17 PM, Prasad Joshi > wrote: > > QCOW uses two tables level1 (L1) table and level2 > > (L2) table. The L1 table points to offset of L2 > > table. When a QCOW image is probed, the L1 table is > > cached in the memory to avoid reading it from dis

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

2011-05-18 Thread Ingo Molnar
* Sasha Levin wrote: > On Wed, 2011-05-18 at 13:38 +0300, Pekka Enberg wrote: > > On Wed, May 18, 2011 at 1:35 PM, Sasha Levin > > wrote: > > > I'm not sure how to do the guest part automatically, it's just a simple > > > mount command - but I don't see how we can do it in a simple manner. > >

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

2011-05-18 Thread Ingo Molnar
* Avi Kivity wrote: > >> - some combinations of INV and CMASK are not supported > > > > Could you please describe this better, where does this limit come from? If > > perf then this needs fixing. > > perf_event_attr does not support generic INV and CMASK at all. [...] It does through raw eve

Re: [PATCH v2] KVM: Sanitize cpuid

2011-05-18 Thread Roedel, Joerg
On Wed, May 18, 2011 at 05:56:07AM -0400, Avi Kivity wrote: > Instead of blacklisting known-unsupported cpuid leaves, whitelist known- > supported leaves. This is more conservative and prevents us from reporting > features we don't support. Also whitelist a few more leaves while at it. > > Signe

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

2011-05-18 Thread Sasha Levin
On Wed, 2011-05-18 at 13:38 +0300, Pekka Enberg wrote: > On Wed, May 18, 2011 at 1:35 PM, Sasha Levin wrote: > > I'm not sure how to do the guest part automatically, it's just a simple > > mount command - but I don't see how we can do it in a simple manner. > > IIRC, Ingo suggested a kernel confi

Re: [PATCH v1 3/3] kvm tools: Add QCOW level2 caching support

2011-05-18 Thread Prasad Joshi
On Wed, May 18, 2011 at 11:27 AM, Pekka Enberg wrote: > On Wed, May 18, 2011 at 1:17 PM, Prasad Joshi > wrote: >> QCOW uses two tables level1 (L1) table and level2 >> (L2) table. The L1 table points to offset of L2 >> table. When a QCOW image is probed, the L1 table is >> cached in the memory to

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

2011-05-18 Thread Pekka Enberg
On Wed, May 18, 2011 at 1:35 PM, Sasha Levin wrote: > I'm not sure how to do the guest part automatically, it's just a simple > mount command - but I don't see how we can do it in a simple manner. IIRC, Ingo suggested a kernel config option - a kernel parameter might also work. Eric, Ingo, though

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

2011-05-18 Thread Michael S. Tsirkin
On Tue, May 17, 2011 at 03:28:38PM -0700, Shirley Ma wrote: > On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: > > 2011/5/17 Shirley Ma : > > > Hello Michael, > > > > > > Looks like to use a new flag requires more time/work. I am thinking > > > whether we can just use HIGHDMA flag to enabl

Re: [PATCH v1 1/3] kvm tools: Close the disk images after the guest shuts down

2011-05-18 Thread Prasad Joshi
On Wed, May 18, 2011 at 11:31 AM, Sasha Levin wrote: > On Wed, 2011-05-18 at 11:17 +0100, Prasad Joshi wrote: >> Signed-off-by: Prasad Joshi >> --- >>  tools/kvm/kvm-run.c |    7 +++ >>  1 files changed, 7 insertions(+), 0 deletions(-) >> >> diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-ru

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

2011-05-18 Thread Sasha Levin
On Wed, 2011-05-18 at 09:38 +0300, Pekka Enberg wrote: > On Tue, May 17, 2011 at 9:35 PM, Sasha Levin wrote: > > 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 > > 9p200

Re: [PATCH v1 1/3] kvm tools: Close the disk images after the guest shuts down

2011-05-18 Thread Sasha Levin
On Wed, 2011-05-18 at 11:17 +0100, Prasad Joshi wrote: > Signed-off-by: Prasad Joshi > --- > tools/kvm/kvm-run.c |7 +++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-run.c > index ba8e5ce..ef180e4 100644 > --- a/tools/kvm/kvm-run

Re: [PATCH v1 3/3] kvm tools: Add QCOW level2 caching support

2011-05-18 Thread Pekka Enberg
On Wed, May 18, 2011 at 1:17 PM, Prasad Joshi wrote: > QCOW uses two tables level1 (L1) table and level2 > (L2) table. The L1 table points to offset of L2 > table. When a QCOW image is probed, the L1 table is > cached in the memory to avoid reading it from disk > on every reference. This caching i

Re: [PATCH v1 2/3] kvm tools: Release memoty allocated during virtio block initialization

2011-05-18 Thread Pekka Enberg
On Wed, May 18, 2011 at 1:17 PM, Prasad Joshi wrote: > Add a new function virtio_blk__fini() which goes > through array of block devices and releases > memory allocated for block device. > > Signed-off-by: Prasad Joshi > @@ -6,5 +6,6 @@ >  struct kvm; > >  void virtio_blk__init(struct kvm *kvm, s

[PATCH v1 1/3] kvm tools: Close the disk images after the guest shuts down

2011-05-18 Thread Prasad Joshi
Signed-off-by: Prasad Joshi --- tools/kvm/kvm-run.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-run.c index ba8e5ce..ef180e4 100644 --- a/tools/kvm/kvm-run.c +++ b/tools/kvm/kvm-run.c @@ -46,6 +46,7 @@ #define MAX_DISK_IMAGES

[PATCH v1 3/3] kvm tools: Add QCOW level2 caching support

2011-05-18 Thread Prasad Joshi
QCOW uses two tables level1 (L1) table and level2 (L2) table. The L1 table points to offset of L2 table. When a QCOW image is probed, the L1 table is cached in the memory to avoid reading it from disk on every reference. This caching imporves the performance. The similar performance improvment can

[PATCH v1 2/3] kvm tools: Release memoty allocated during virtio block initialization

2011-05-18 Thread Prasad Joshi
Add a new function virtio_blk__fini() which goes through array of block devices and releases memory allocated for block device. Signed-off-by: Prasad Joshi --- tools/kvm/include/kvm/virtio-blk.h |1 + tools/kvm/kvm-run.c|2 ++ tools/kvm/virtio/blk.c |9 +++

[PATCH v2] KVM: Sanitize cpuid

2011-05-18 Thread Avi Kivity
Instead of blacklisting known-unsupported cpuid leaves, whitelist known- supported leaves. This is more conservative and prevents us from reporting features we don't support. Also whitelist a few more leaves while at it. Signed-off-by: Avi Kivity --- v2: 0x8008: fix overflow noted by Joerg

SKYLAX Insulating Ladders and Steps

2011-05-18 Thread Skylax Srl
SKYLAX Insulating Ladders and Steps Lightweight and portable like aluminium ladders Electrically isolated and slightly warm like wood or plastic ladders Hygienic and clean like stainless steel ladders Telescopic ladder "Country Star" http://www.skylax.com/public/catalog/index.php?cPath=35

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

2011-05-18 Thread Avi Kivity
On 05/18/2011 12:11 PM, Kohl, Bernhard (NSN - DE/Munich) wrote: > > Curious, why are you targetting Fedora kernels at all? They have a > really short shelf life. I though kvm-kmod was for people using longer > term kernels like enterprise distros or long lived embedded projects. Here at NSN

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

2011-05-18 Thread Avi Kivity
On 05/18/2011 12:02 PM, Nadav Har'El wrote: On Wed, May 18, 2011, Avi Kivity wrote about "Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling": > I did a quick audit and it seems fine. If it isn't, we'll fix it when > we see the problem. Ok, then, I'm working on the code with the new appro

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

2011-05-18 Thread Nadav Har'El
On Wed, May 18, 2011, Avi Kivity wrote about "Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling": > I did a quick audit and it seems fine. If it isn't, we'll fix it when > we see the problem. Ok, then, I'm working on the code with the new approach. My fear was that some CPU 7 is taken down

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

2011-05-18 Thread Michał Mirosław
W dniu 18 maja 2011 01:44 użytkownik Shirley Ma napisał: > On Wed, 2011-05-18 at 00:58 +0200, Michał Mirosław wrote: >> W dniu 18 maja 2011 00:28 użytkownik Shirley Ma >> napisał: >> > On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: >> >> 2011/5/17 Shirley Ma : >> >> > Looks like to use

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

2011-05-18 Thread Sasha Levin
On Tue, 2011-05-17 at 20:18 -0500, Eric Van Hensbergen wrote: > On Tue, May 17, 2011 at 3:27 PM, Sasha Levin 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

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

2011-05-18 Thread Avi Kivity
On 05/17/2011 10:41 PM, Ingo Molnar wrote: * Avi Kivity 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

Re: [PATCH 10/14] kvm tools: Rename raw_image_ops to blk_dev_ops

2011-05-18 Thread Ingo Molnar
* Asias He wrote: > - fd = open(filename, O_RDONLY); > + /* > + * Be careful! We are opening host block device! > + * Open it readonly since we do not want to break user's data on disk. > + */ > + fd = open(filename, O_RDONLY); >

Re: [PATCH 14/14] kvm tools: Print debug info for qcow1_nowrite_sector

2011-05-18 Thread Cyrill Gorcunov
On Wed, May 18, 2011 at 12:45 PM, Ingo Molnar wrote: > > * Asias He wrote: > >> Print debug info when we are in qcow1_nowrite_sector >> >> Signed-off-by: Asias He >> --- >>  tools/kvm/disk/qcow.c |    1 + >>  1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/tools/kvm/disk/qcow

Re: [PATCH 14/14] kvm tools: Print debug info for qcow1_nowrite_sector

2011-05-18 Thread Ingo Molnar
* Ingo Molnar wrote: > Could we make this pr_info(), to roughly match the in-kernel equivalent? > > There's also pr_warn(), pr_err(), etc. > > For us poor kernel namespace infested folks :) btw., if it's fine with Pekka: because you are already carrying a large number of patches my suggestio

Re: [PATCH 14/14] kvm tools: Print debug info for qcow1_nowrite_sector

2011-05-18 Thread Ingo Molnar
* Asias He wrote: > Print debug info when we are in qcow1_nowrite_sector > > Signed-off-by: Asias He > --- > tools/kvm/disk/qcow.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/tools/kvm/disk/qcow.c b/tools/kvm/disk/qcow.c > index dd11ed97..29964b9 100644 > --

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

2011-05-18 Thread Michael S. Tsirkin
On Tue, May 17, 2011 at 10:14:34PM -0700, Shirley Ma wrote: > Yes, fixed it already. I might change it to PAGE_SIZE for now since the > small message sizes regression issue. If that fixes it, let's do that for now. -- MST -- To unsubscribe from this list: send the line "unsubscribe kvm" in the bo

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

2011-05-18 Thread Michael S. Tsirkin
On Tue, May 17, 2011 at 11:16:23PM -0700, Shirley Ma wrote: > Hello Michael, > > Here is the update the patch based on all of your review comments except > the completion/wait for cleanup since I am worried about outstanding > DMAs would prevent vhost from shutting down. Don't see what you are wo

Re: [PATCH 01/14] kvm tools: Move disk image related code under disk directory

2011-05-18 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Asias He wrote: > > > This patch removes disk-image.c and qcow.c under disk directory. > > > > Signed-off-by: Asias He > > --- > > tools/kvm/Makefile|4 ++-- > > tools/kvm/{ => disk}/disk-image.c |0 > > btw., you may want to name it 'imag

Re: [PATCH 01/14] kvm tools: Move disk image related code under disk directory

2011-05-18 Thread Ingo Molnar
* Asias He wrote: > This patch removes disk-image.c and qcow.c under disk directory. > > Signed-off-by: Asias He > --- > tools/kvm/Makefile|4 ++-- > tools/kvm/{ => disk}/disk-image.c |0 btw., you may want to name it 'image.c' and thus have the intuitive: tools/kvm/

Re: [PATCH] KVM: Sanitize cpuid

2011-05-18 Thread Avi Kivity
On 05/18/2011 10:19 AM, Roedel, Joerg wrote: >break; > + case 0x8008: { > + u8 g_phys_as = entry->eax>> 16; > + u8 virt_as = max(entry->eax>> 8, 48U); Shouldn't that be 'max((entry->eax>> 8)& 0xff, 48U)'? Seems safer when the entry->eax contains a non-zero

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

2011-05-18 Thread Michael S. Tsirkin
On Tue, May 17, 2011 at 10:14:34PM -0700, Shirley Ma wrote: > 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 w

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

2011-05-18 Thread Avi Kivity
On 05/18/2011 08:52 AM, Nadav Har'El wrote: 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 suppos

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

2011-05-18 Thread Avi Kivity
On 05/17/2011 10:52 PM, Marcelo Tosatti wrote: 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, be

[PATCH 14/14] kvm tools: Print debug info for qcow1_nowrite_sector

2011-05-18 Thread Asias He
Print debug info when we are in qcow1_nowrite_sector Signed-off-by: Asias He --- tools/kvm/disk/qcow.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/kvm/disk/qcow.c b/tools/kvm/disk/qcow.c index dd11ed97..29964b9 100644 --- a/tools/kvm/disk/qcow.c +++ b/tools/kvm

[PATCH 13/14] kvm tools: Add debug info for disk_image__{read, write}

2011-05-18 Thread Asias He
Print debug info when read/write error occurs Signed-off-by: Asias He --- tools/kvm/disk/core.c | 91 +++-- 1 files changed, 65 insertions(+), 26 deletions(-) diff --git a/tools/kvm/disk/core.c b/tools/kvm/disk/core.c index f3dd0bb..b229f83 100644 -

[PATCH 12/14] kvm tools: Do not use 'inline' for disk_image__flush

2011-05-18 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/disk/core.c |8 tools/kvm/include/kvm/disk-image.h |9 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/kvm/disk/core.c b/tools/kvm/disk/core.c index 6894b17..f3dd0bb 100644 --- a/tools/kvm/disk/core

[PATCH 11/14] kvm tools: Remove unnecessary S_ISBLK check

2011-05-18 Thread Asias He
Let's do it in blkdev__probe. Signed-off-by: Asias He --- tools/kvm/disk/core.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/kvm/disk/core.c b/tools/kvm/disk/core.c index a0ccdc5..6894b17 100644 --- a/tools/kvm/disk/core.c +++ b/tools/kvm/disk/core.c

[PATCH 10/14] kvm tools: Rename raw_image_ops to blk_dev_ops

2011-05-18 Thread Asias He
This patch also adds some comments to disk/blk.c Signed-off-by: Asias He --- tools/kvm/disk/blk.c | 15 --- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/kvm/disk/blk.c b/tools/kvm/disk/blk.c index 7383967..59294e8 100644 --- a/tools/kvm/disk/blk.c +++ b/too

[PATCH 09/14] kvm tools: Rename struct disk_image_operations ops name for raw image

2011-05-18 Thread Asias He
This patch renames: raw_image__read_sector_ro_mmap to raw_image__read_sector raw_image__write_sector_ro_mmap to raw_image__write_sector raw_image__close_ro_mmap to raw_image__close Signed-off-by: Asias He --- tools/kvm/disk/blk.c | 10 +- tools/kvm/disk/qcow.c

[PATCH 08/14] kvm tools: Tune up ops in 'struct disk_image_operations'

2011-05-18 Thread Asias He
Make read/write ops in 'struct disk_image_operations' always return the number of bytes read/written and close/flush ops return int. Signed-off-by: Asias He --- tools/kvm/disk/core.c |8 +--- tools/kvm/disk/qcow.c | 18 ++ tools/kvm/disk/raw.c

[PATCH 07/14] kvm tools: Split blk device code from raw.c to blk.c

2011-05-18 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/disk/blk.c | 30 ++ tools/kvm/disk/raw.c | 32 ++-- tools/kvm/include/kvm/disk-image.h |6 ++ 4 files changed, 43 inse

[PATCH 06/14] kvm tools: Consolidate disk_image__{new, new_readonly}

2011-05-18 Thread Asias He
This patch simplifies the disk image API. Signed-off-by: Asias He --- tools/kvm/disk/core.c | 22 +- tools/kvm/disk/qcow.c | 14 ++ tools/kvm/disk/raw.c | 14 +++--- tools/kvm/include/kvm/disk-image.h |6 ++

  1   2   >