Re: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-21 Thread Kevin Wolf
Am 20.11.2011 11:59, schrieb Pekka Enberg: On Sun, 2011-11-20 at 14:14 +0800, Lan, Tianyu wrote: OK. Thx. But fsync is too slow. I try to find a way to sync a range of file. Are there any solutions to meet my purpose? On Sun, 2011-11-20 at 08:23 +0200, Sasha Levin wrote: fdatasync() is as

Re: KVM device assignment and user privileges

2011-11-21 Thread Avi Kivity
On 11/21/2011 06:42 AM, Chris Wright wrote: * Avi Kivity (a...@redhat.com) wrote: On 11/20/2011 04:58 PM, Sasha Levin wrote: Hi all, I've been working on adding device assignment to KVM tools, and started with the basics of just getting a device assigned using the

Re: [PATCH v2 3/6] KVM: introduce kvm_for_each_memslot macro

2011-11-21 Thread Avi Kivity
On 11/21/2011 02:54 AM, Takuya Yoshikawa wrote: (2011/11/20 20:21), Avi Kivity wrote: On 11/18/2011 11:18 AM, Xiao Guangrong wrote: index bb8728e..10524c0 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -307,6 +307,10 @@ static inline struct kvm_vcpu

Re: [PATCH v2 3/6] KVM: introduce kvm_for_each_memslot macro

2011-11-21 Thread Takuya Yoshikawa
(2011/11/21 17:34), Avi Kivity wrote: Do you have any preference for the arguments ordering? I think placing the target one, memslot in this case, first is conventional in the kernel code, except when we want to place kvm or something like that. But in kvm code, there seems to be some

Re: [PATCH v2 3/6] KVM: introduce kvm_for_each_memslot macro

2011-11-21 Thread Xiao Guangrong
On 11/21/2011 04:40 PM, Takuya Yoshikawa wrote: (2011/11/21 17:34), Avi Kivity wrote: Do you have any preference for the arguments ordering? I think placing the target one, memslot in this case, first is conventional in the kernel code, except when we want to place kvm or something like

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

2011-11-21 Thread Kevin Wolf
Am 21.11.2011 08:12, schrieb 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

Re: [PATCH 2/3] kvm: use this_cpu_xxx replace percpu_xxx funcs

2011-11-21 Thread Alex,Shi
On Mon, 2011-10-24 at 19:05 +0800, Avi Kivity wrote: On 10/24/2011 04:50 AM, Alex,Shi wrote: On Thu, 2011-10-20 at 15:34 +0800, Alex,Shi wrote: percpu_xxx funcs are duplicated with this_cpu_xxx funcs, so replace them for further code clean up. And in preempt safe scenario,

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

2011-11-21 Thread Pekka Enberg
On Mon, Nov 21, 2011 at 9:12 AM, Lan Tianyu tianyu@intel.com wrote: +/*Allocate clusters according to the size. Find a postion that + *can satisfy the size. free_clust_idx is initialized to zero and + *Record last position. +*/ Can you please fix up your comments to use the following

Re: [PATCH 3/3] Code clean up for percpu_xxx() functions

2011-11-21 Thread Alex,Shi
refreshed the patch on latest upstream kernel. Any comments or picking up are appreciated. === From 0dce61dc88b8ed2687b4d5c0633aa54d1f66fdc0 Mon Sep 17 00:00:00 2001 From: Alex Shi alex@intel.com Date: Tue, 22 Nov 2011 00:05:37 +0800 Subject: [PATCH 3/3] Code clean up for percpu_xxx()

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

2011-11-21 Thread Lan, Tianyu
Yeah. I will fix them in the next version. -Original Message- From: penb...@gmail.com [mailto:penb...@gmail.com] On Behalf Of Pekka Enberg Sent: Monday, November 21, 2011 5:06 PM To: Lan, Tianyu Cc: kvm@vger.kernel.org; asias.he...@gmail.com; levinsasha...@gmail.com;

Re: [PATCH 2/3] kvm: use this_cpu_xxx replace percpu_xxx funcs

2011-11-21 Thread Avi Kivity
On 11/21/2011 11:02 AM, Alex,Shi wrote: On Mon, 2011-10-24 at 19:05 +0800, Avi Kivity wrote: On 10/24/2011 04:50 AM, Alex,Shi wrote: On Thu, 2011-10-20 at 15:34 +0800, Alex,Shi wrote: percpu_xxx funcs are duplicated with this_cpu_xxx funcs, so replace them for further code clean up.

Re: [PATCH 2/3] kvm: use this_cpu_xxx replace percpu_xxx funcs

2011-11-21 Thread Alex,Shi
percpu_xxx funcs are duplicated with this_cpu_xxx funcs, so replace them for further code clean up. And in preempt safe scenario, __this_cpu_xxx funcs has a bit better performance since __this_cpu_xxx has no redundant preempt_disable() Avi: Would

[Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization

2011-11-21 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Ivshmem cannot work, and the command lspci cannot show ivshmem BAR2 in the guest. As for pci_register_bar(), parameter MemoryRegion should be s-bar instead of s-ivshmem. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- hw/ivshmem.c |2 +-

Re: [PATCH 5 of 5] virtio: expose added descriptors immediately

2011-11-21 Thread Michael S. Tsirkin
On Mon, Nov 21, 2011 at 12:18:45PM +1030, Rusty Russell wrote: On Wed, 16 Nov 2011 09:18:38 +0200, Michael S. Tsirkin m...@redhat.com wrote: My unlocked kick patches will trip this warning: they make virtio-net do add + get without kick. Heh, it's a good sign if they do, since that means

[RFC] Consistent Snapshots Idea

2011-11-21 Thread Richard Laager
I'm not an expert on the architecture of KVM, so perhaps this is a QEMU question. If so, please let me know and I'll ask on a different list. Background: Assuming the block layer can make instantaneous snapshots of a guest's disk (e.g. lvcreate -s), one can get crash consistent (i.e. as if the

Re: [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization

2011-11-21 Thread Avi Kivity
On 11/21/2011 12:56 PM, zanghongy...@huawei.com wrote: From: Hongyong Zang zanghongy...@huawei.com Ivshmem cannot work, and the command lspci cannot show ivshmem BAR2 in the guest. As for pci_register_bar(), parameter MemoryRegion should be s-bar instead of s-ivshmem. Signed-off-by:

Re: [RFC] Consistent Snapshots Idea

2011-11-21 Thread Avi Kivity
On 11/21/2011 02:01 PM, Richard Laager wrote: I'm not an expert on the architecture of KVM, so perhaps this is a QEMU question. If so, please let me know and I'll ask on a different list. It is a qemu question, yes (though fork()ing a guest also relates to kvm). Background: Assuming the

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

2011-11-21 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: [Qemu-devel] [RFC] Consistent Snapshots Idea

2011-11-21 Thread shu ming
On 2011-11-21 20:31, Avi Kivity wrote: On 11/21/2011 02:01 PM, Richard Laager wrote: I'm not an expert on the architecture of KVM, so perhaps this is a QEMU question. If so, please let me know and I'll ask on a different list. It is a qemu question, yes (though fork()ing a guest also relates

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-21 Thread Bharata B Rao
On Tue, Nov 08, 2011 at 09:33:04AM -0800, Chris Wright wrote: * Alexander Graf (ag...@suse.de) wrote: On 29.10.2011, at 20:45, Bharata B Rao wrote: As guests become NUMA aware, it becomes important for the guests to have correct NUMA policies when they run on NUMA aware hosts.

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-21 Thread Peter Zijlstra
On Mon, 2011-11-21 at 20:48 +0530, Bharata B Rao wrote: I looked at Peter's recent work in this area. (https://lkml.org/lkml/2011/11/17/204) It introduces two interfaces: 1. ms_tbind() to bind a thread to a memsched(*) group 2. ms_mbind() to bind a memory region to memsched group I

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-21 Thread Bharata B Rao
On Mon, Nov 21, 2011 at 04:25:26PM +0100, Peter Zijlstra wrote: On Mon, 2011-11-21 at 20:48 +0530, Bharata B Rao wrote: I looked at Peter's recent work in this area. (https://lkml.org/lkml/2011/11/17/204) It introduces two interfaces: 1. ms_tbind() to bind a thread to a

KVM call agenda for Novemeber 22

2011-11-21 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. Later, Juan. -- 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: Memory sync algorithm during migration

2011-11-21 Thread Oliver Hookins
On Tue, Nov 15, 2011 at 11:47:58AM +0100, ext Juan Quintela wrote: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp wrote: Adding qemu-devel ML to CC. Your question should have been sent to qemu-devel ML because the logic is implemented in QEMU, not KVM. (2011/11/11 1:35), Oliver

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-21 Thread Peter Zijlstra
On Mon, 2011-11-21 at 21:30 +0530, Bharata B Rao wrote: In the original post of this mail thread, I proposed a way to export guest RAM ranges (Guest Physical Address-GPA) and their corresponding host host virtual mappings (Host Virtual Address-HVA) from QEMU (via QEMU monitor). The idea was

[PATCH for v1.0] qemu-kvm: msix: Fire mask notifier on global mask changes

2011-11-21 Thread Michael S. Tsirkin
From: Jan Kiszka jan.kis...@siemens.com Also invoke the mask notifier if the global MSI-X mask is modified. For this purpose, we push the notifier call from the per-vector mask update to the central msix_handle_mask_update. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Michael

Re: [net-next-2.6 PATCH 0/6 v4] macvlan: MAC Address filtering support for passthru mode

2011-11-21 Thread Greg Rose
On 11/18/2011 9:40 AM, Ben Hutchings wrote: On Fri, 2011-11-18 at 08:58 -0800, Greg Rose wrote: On 11/17/2011 4:44 PM, Ben Hutchings wrote: On Thu, 2011-11-17 at 16:32 -0800, Greg Rose wrote: On 11/17/2011 4:15 PM, Ben Hutchings wrote: Sorry to come to this rather late. On Tue, 2011-11-08

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-21 Thread Avi Kivity
On 11/21/2011 05:25 PM, Peter Zijlstra wrote: On Mon, 2011-11-21 at 20:48 +0530, Bharata B Rao wrote: I looked at Peter's recent work in this area. (https://lkml.org/lkml/2011/11/17/204) It introduces two interfaces: 1. ms_tbind() to bind a thread to a memsched(*) group 2.

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-21 Thread Peter Zijlstra
On Mon, 2011-11-21 at 20:03 +0200, Avi Kivity wrote: Does ms_mbind() require that its vmas in its area be completely contained in the region, or does it split vmas on demand? I suggest the latter to avoid exposing implementation details. as implemented (which is still rather incomplete) it

Re: [PATCHv4 0/3] acpi: DSDT/SSDT runtime patching

2011-11-21 Thread Michael S. Tsirkin
On Sun, Nov 20, 2011 at 04:08:59PM -0500, Kevin O'Connor wrote: On Sun, Nov 20, 2011 at 07:56:43PM +0200, Michael S. Tsirkin wrote: Here's an updated revision of acpi runtime patching patchset. Lightly tested. It looks good to me. -Kevin Run some linux and windows tests, things seem to

Re: [Qemu-devel] KVM call agenda for Novemeber 22

2011-11-21 Thread Anthony Liguori
On 11/21/2011 10:00 AM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. I'm technical on holiday this week so I won't be attending. But as an FYI, I ran across seccomp-nurse[1] this weekend. It more or less let's you write a python program to

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-21 Thread Chris Wright
* Peter Zijlstra (a.p.zijls...@chello.nl) wrote: On Mon, 2011-11-21 at 21:30 +0530, Bharata B Rao wrote: In the original post of this mail thread, I proposed a way to export guest RAM ranges (Guest Physical Address-GPA) and their corresponding host host virtual mappings (Host Virtual

Re: [PATCH 3/3] Code clean up for percpu_xxx() functions

2011-11-21 Thread t...@kernel.org
(cc'ing hpa and quoting whole body) On Mon, Nov 21, 2011 at 05:10:12PM +0800, Alex,Shi wrote: refreshed the patch on latest upstream kernel. Any comments or picking up are appreciated. === From 0dce61dc88b8ed2687b4d5c0633aa54d1f66fdc0 Mon Sep 17 00:00:00 2001 From: Alex Shi

Re: [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization

2011-11-21 Thread Anthony Liguori
On 11/21/2011 04:56 AM, zanghongy...@huawei.com wrote: From: Hongyong Zangzanghongy...@huawei.com Ivshmem cannot work, and the command lspci cannot show ivshmem BAR2 in the guest. As for pci_register_bar(), parameter MemoryRegion should be s-bar instead of s-ivshmem. Signed-off-by: Hongyong

[FYI] Need to do a full rebuild if you are on Linux x86 host

2011-11-21 Thread Anthony Liguori
Due to this commit: commit 40d6444e91c6ab17e5e8ab01d4eece90cbc4afed Author: Avi Kivity a...@redhat.com Date: Tue Nov 15 20:12:17 2011 +0200 configure: build position independent executables on x86-Linux hosts PIE binaries cannot be linked with non-PIE binaries and make is not smart

Re: [PATCH 5 of 5] virtio: expose added descriptors immediately

2011-11-21 Thread Rusty Russell
On Mon, 21 Nov 2011 13:57:04 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Nov 21, 2011 at 12:18:45PM +1030, Rusty Russell wrote: On Wed, 16 Nov 2011 09:18:38 +0200, Michael S. Tsirkin m...@redhat.com wrote: My unlocked kick patches will trip this warning: they make

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-21 Thread Anthony Liguori
On 11/21/2011 04:50 PM, Chris Wright wrote: * Peter Zijlstra (a.p.zijls...@chello.nl) wrote: On Mon, 2011-11-21 at 21:30 +0530, Bharata B Rao wrote: In the original post of this mail thread, I proposed a way to export guest RAM ranges (Guest Physical Address-GPA) and their corresponding host

[PATCH 0/7] KVM: x86 emulator: Use opcode::execute for some instructions

2011-11-21 Thread Takuya Yoshikawa
This patch set eats the remaining spaghetti in the emulator and cleans up the large plate. After this, only trivial cases will be there. Passed emulator.flat test: SUMMARY: 90 tests, 0 failures Thanks, Takuya -- To unsubscribe from this list: send the line unsubscribe kvm in the

[PATCH 1/7] KVM: x86 emulator: Use opcode::execute for IN/OUT

2011-11-21 Thread Takuya Yoshikawa
IN : E4, E5, EC, ED OUT: E6, E7, EE, EF Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/emulate.c | 54 --- 1 files changed, 28 insertions(+), 26 deletions(-) diff --git a/arch/x86/kvm/emulate.c

[PATCH 2/7] KVM: x86 emulator: Use opcode::execute for BT family

2011-11-21 Thread Takuya Yoshikawa
BT : 0F A3 BTS: 0F AB BTR: 0F B3 BTC: 0F BB Group 8: 0F BA Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/emulate.c | 77 +++ 1 files changed, 38 insertions(+), 39 deletions(-) diff --git a/arch/x86/kvm/emulate.c

[PATCH 3/7] KVM: x86 emulator: Use opcode::execute for CALL

2011-11-21 Thread Takuya Yoshikawa
CALL: E8 Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/emulate.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 7a9ce6d..6b7a03b 100644 --- a/arch/x86/kvm/emulate.c

[PATCH 4/7] KVM: x86 emulator: Use opcode::execute for MOV to cr/dr

2011-11-21 Thread Takuya Yoshikawa
MOV: 0F 22 (move to control registers) MOV: 0F 23 (move to debug registers) Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/emulate.c | 52 +++ 1 files changed, 30 insertions(+), 22 deletions(-) diff --git

[PATCH 5/7] KVM: x86 emulator: Use opcode::execute for WRMSR/RDMSR

2011-11-21 Thread Takuya Yoshikawa
WRMSR: 0F 30 RDMSR: 0F 32 Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/emulate.c | 52 1 files changed, 26 insertions(+), 26 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[PATCH 6/7] KVM: x86 emulator: Use opcode::execute for CMPXCHG

2011-11-21 Thread Takuya Yoshikawa
CMPXCHG: 0F B0, 0F B1 Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/emulate.c | 37 +++-- 1 files changed, 19 insertions(+), 18 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 906c5eb..799000d

[PATCH 7/7] KVM: x86 emulator: Use opcode::execute for BSF/BSR

2011-11-21 Thread Takuya Yoshikawa
BSF: 0F BC BSR: 0F BD Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/emulate.c | 60 1 files changed, 35 insertions(+), 25 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

Re: [PATCH 5 of 5] virtio: expose added descriptors immediately

2011-11-21 Thread Michael S. Tsirkin
On Tue, Nov 22, 2011 at 11:03:04AM +1030, Rusty Russell wrote: On Mon, 21 Nov 2011 13:57:04 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Nov 21, 2011 at 12:18:45PM +1030, Rusty Russell wrote: On Wed, 16 Nov 2011 09:18:38 +0200, Michael S. Tsirkin m...@redhat.com wrote:

Re: [PATCH 01/11] KVM: PPC: Add memory-mapping support for PCI passthrough and emulation

2011-11-21 Thread Paul Mackerras
On Sun, Nov 20, 2011 at 02:23:52PM +0200, Avi Kivity wrote: There is no the VMA. There could be multiple VMAs, or none (with the mmap() coming afterwards). You could do all the checks you want here, only to have host userspace remap it under your feet. This needs to be done on a per-page

Re: [PATCH 01/11] KVM: PPC: Add memory-mapping support for PCI passthrough and emulation

2011-11-21 Thread Avi Kivity
On 11/21/2011 01:03 PM, Paul Mackerras wrote: On Sun, Nov 20, 2011 at 02:23:52PM +0200, Avi Kivity wrote: There is no the VMA. There could be multiple VMAs, or none (with the mmap() coming afterwards). You could do all the checks you want here, only to have host userspace remap it

Re: [PATCH 01/11] KVM: PPC: Add memory-mapping support for PCI passthrough and emulation

2011-11-21 Thread Paul Mackerras
On Mon, Nov 21, 2011 at 02:22:58PM +0200, Avi Kivity wrote: On 11/21/2011 01:03 PM, Paul Mackerras wrote: OK, so that's a somewhat different mental model than I had in mind. I can change the code to do almost everything on a per-page basis at fault time on POWER7. There is one thing we