[COMMIT master] Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

2010-04-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Conflicts: arch/x86/kvm/mmu.c arch/x86/kvm/x86.c Signed-off-by: Avi Kivity a...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at

[COMMIT master] KVM: X86: Add callback to let modules decide over some supported cpuid bits

2010-04-25 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch adds the get_supported_cpuid callback to kvm_x86_ops. It will be used in do_cpuid_ent to delegate the decission about some supported cpuid bits to the architecture modules. Cc: sta...@kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com

[COMMIT master] KVM: Remove test-before-set optimization for dirty bits

2010-04-25 Thread Avi Kivity
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp As Avi pointed out, testing bit part in mark_page_dirty() was important in the days of shadow paging, but currently EPT and NPT has already become common and the chance of faulting a page more that once per iteration is small. So let's remove

[COMMIT master] KVM: SVM: Propagate nested entry failure into guest hypervisor

2010-04-25 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch implements propagation of a failes guest vmrun back into the guest instead of killing the whole guest. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/svm.c

[COMMIT master] KVM: SVM: Make sure rip is synced to vmcb before nested vmexit

2010-04-25 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch fixes a bug where a nested guest always went over the same instruction because the rip was not advanced on a nested vmexit. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Avi Kivity a...@redhat.com diff --git

[COMMIT master] KVM: SVM: Handle MCE intercepts always on host level

2010-04-25 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch prevents MCE intercepts from being propagated into the L1 guest if they happened in an L2 guest. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c

[COMMIT master] KVM: x86: Allow marking an exception as reinjected

2010-04-25 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch adds logic to kvm/x86 which allows to mark an injected exception as reinjected. This allows to remove an ugly hack from svm_complete_interrupts that prevented exceptions from being reinjected at all in the nested case. The hack was necessary

[PATCH v2 0/10] KVM MMU: allow more shadow pages become asynchronous

2010-04-25 Thread Xiao Guangrong
Changlog v2: - when level is PT_DIRECTORY_LEVEL, the 'offset' should be 'role.quadrant 8', thanks Avi for point it out - keep invlpg code in paging_tmpl.h address Avi's suggestion - split kvm_sync_page() into kvm_sync_page() and kvm_sync_page_transient() to clarify the code address Avi's

[PATCH v2 1/10] KVM MMU: fix for calculating gpa in invlpg code

2010-04-25 Thread Xiao Guangrong
If the guest is 32-bit, we should use 'quadrant' to adjust gpa offset Changlog v2: - when level is PT_DIRECTORY_LEVEL, the 'offset' should be 'role.quadrant 8', thanks Avi for point it out Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/paging_tmpl.h | 13

[PATCH v2 2/10] KVM MMU: convert mmu tracepoints

2010-04-25 Thread Xiao Guangrong
Convert mmu tracepoints by using DECLARE_EVENT_CLASS Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmutrace.h | 69 +- 1 files changed, 26 insertions(+), 43 deletions(-) diff --git a/arch/x86/kvm/mmutrace.h

[PATCH v2 3/10] KVM MMU: move unsync/sync tracpoints to proper place

2010-04-25 Thread Xiao Guangrong
Move unsync/sync tracepoints to the proper place, it's good for us to obtain unsync page live time Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c

[PATCH v2 4/10] KVM MMU: cleanup invlpg code

2010-04-25 Thread Xiao Guangrong
Using is_last_spte() to cleanup invlpg code Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/paging_tmpl.h |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 83cc72f..8eb98eb 100644

[PATCH v2 5/10] KVM MMU: split kvm_sync_page() function

2010-04-25 Thread Xiao Guangrong
Split kvm_sync_page() into kvm_sync_page() and kvm_sync_page_transient() to clarify the code address Avi's suggestion kvm_sync_page_transient() function only update shadow page but not mark it sync and not write protect sp-gfn. it will be used by later patch Signed-off-by: Xiao Guangrong

[PATCH v2 6/10] KVM MMU: don't write-protect if have new mapping to unsync page

2010-04-25 Thread Xiao Guangrong
Two cases maybe happen in kvm_mmu_get_page() function: - one case is, the goal sp is already in cache, if the sp is unsync, we only need update it to assure this mapping is valid, but not mark it sync and not write-protect sp-gfn since it not broke unsync rule(one shadow page for a gfn) -

[PATCH v2 7/10] KVM MMU: allow more page become unsync at gfn mapping time

2010-04-25 Thread Xiao Guangrong
In current code, shadow page can become asynchronous only if one shadow page for a gfn, this rule is too strict, in fact, we can let all last mapping page(i.e, it's the pte page) become unsync, and sync them at invlpg or flush tlb time. This patch allow more page become asynchronous at gfn

[PATCH v2 8/10] KVM MMU: allow more page become unsync at getting sp time

2010-04-25 Thread Xiao Guangrong
Allow more page become asynchronous at getting sp time, if need create new shadow page for gfn but it not allow unsync(level 1), we should unsync all gfn's unsync page Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 21 +++-- 1 files

[PATCH v2 9/10] KVM MMU: separate invlpg code form kvm_mmu_pte_write()

2010-04-25 Thread Xiao Guangrong
Let invlpg not depends on kvm_mmu_pte_write path, later patch will need this feature Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 12 +++- arch/x86/kvm/paging_tmpl.h | 33 ++--- 2 files changed, 29

[PATCH v2 10/10] KVM MMU: optimize sync/update unsync-page

2010-04-25 Thread Xiao Guangrong
invlpg only need update unsync page, sp-unsync and sp-unsync_children can help us to find it Now, a gfn may have many shadow pages, when one sp need be synced, we write protect sp-gfn and sync this sp but we keep other shadow pages asynchronous So, while gfn happen page fault, let it not touch

Re: [PATCH 0/8] More fixes for nested svm

2010-04-25 Thread Avi Kivity
On 04/22/2010 01:33 PM, Joerg Roedel wrote: Hi Avi, Marcelo, here is another set of nested svm fixes. They fix NMI code to make UP Hyper-V root domain booting. The patches also add better handling for nested entry failures and mce intercepts. Also in this patchset are the fixes for the

[RFC][PATCH v4 01/18] Add a new struct for device to manipulate external buffer.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/netdevice.h | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git

[RFC][PATCH v4 03/18] Add a ndo_mp_port_prep pointer to net_device_ops.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com If the driver want to allocate external buffers, then it can export it's capability, as the skb buffer header length, the page length can be DMA, etc. The external buffers owner may utilize this. Signed-off-by: Xin Xiaohui xiaohui@intel.com

[RFC][PATCH v4 04/18] Add a function make external buffer owner to query capability.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com The external buffer owner can use the functions to get the capability of the underlying NIC driver. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com ---

[RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/netdevice.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git

[RFC][PATCH v4 02/18] Export 2 func for device to assign/dassign new structure.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Export 2 func for device to assign/deassign new strucure Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/netdevice.h |3 +++ net/core/dev.c

[RFC][PATCH v4 10/18] Use callback to deal with skb_release_data() specially.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com If buffer is external, then use the callback to destruct buffers. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- net/core/skbuff.c | 11 +++ 1 files

[RFC][PATCH v4 11/18] Add a hook to intercept external buffers from NIC driver.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com The hook is called in netif_receive_skb(). Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- net/core/dev.c | 35 +++ 1 files

[RFC][PATCH v4 07/18] Make __alloc_skb() to get external buffer.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Add a dev parameter to __alloc_skb(), skb-data points to external buffer, recompute skb-head, maintain shinfo of the external buffer, record external buffer info into destructor_arg field. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by:

[RFC][PATCH v4 06/18] Add interface to get external buffers.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Currently, it can get external buffers from mp device. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/skbuff.h | 12 net/core/skbuff.c

[RFC][PATCH v4 08/18] Ignore skb_reserve() when device is using external buffer.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Make the skb-data and skb-head from external buffer to be consistent, we ignore the room reserved by driver for kernel skb. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike

[RFC][PATCH v4 09/18] Don't do skb recycle, if device use external buffer.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- net/core/skbuff.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net/core/skbuff.c

[RFC][PATCH v4 13/18] Add header file for mp device.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- include/linux/mpassthru.h | 29 + 1 files changed, 29 insertions(+), 0 deletions(-)

[RFC][PATCH v4 14/18] Add basic func and special ioctl to mp device.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com The ioctl is used by mp device to bind an underlying NIC, it will query hardware capability and declare the NIC to use external buffers. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike

[RFC][PATCH v4 12/18] To skip GRO if buffer is external.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- net/core/dev.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/core/dev.c

[RFC][PATCH v4 16/18] Export proto_ops to vhost-net driver.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Currently, vhost-net is only user to the mp device. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- drivers/vhost/mpassthru.c | 321

[RFC][PATCH v4 17/18] Add a kconfig entry and make entry for mp device.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Signed-off-by: Xin Xiaohui xiaohui@intel.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- drivers/vhost/Kconfig | 10 ++ drivers/vhost/Makefile |2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git

[RFC][PATCH v4 15/18] Manipulate external buffers in mp device.

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com How external buffer comes from, how to destroy. Signed-off-by: Xin Xiaohui xiaohui@intel.com Signed-off-by: Zhao Yu yzha...@gmail.com Reviewed-by: Jeff Dike jd...@linux.intel.com --- drivers/vhost/mpassthru.c | 237

[RFC][PATCH v4 18/18] Provides multiple submits and async notifications

2010-04-25 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Provides multiple submits and asynchronous notifications. The vhost-net backend now only supports synchronous send/recv operations. The patch provides multiple submits and asynchronous notifications. This is needed for zero-copy case.

[RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.

2010-04-25 Thread xiaohui . xin
We provide an zero-copy method which driver side may get external buffers to DMA. Here external means driver don't use kernel space to allocate skb buffers. Currently the external buffer can be from guest virtio-net driver. The idea is simple, just to pin the guest VM user space and then let host

Re: [RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer.

2010-04-25 Thread Changli Gao
On Sun, Apr 25, 2010 at 5:19 PM, xiaohui@intel.com wrote: +static int dev_is_mpassthru(struct net_device *dev) +{ +       if (dev dev-mp_port) +               return 1; +       return 0; +} + Please make it a inline function. And you would write it with less lines of code. return

Re: [RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer.

2010-04-25 Thread Changli Gao
On Sun, Apr 25, 2010 at 5:19 PM, xiaohui@intel.com wrote: +static int dev_is_mpassthru(struct net_device *dev) bool return value should be better here. -- Regards, Changli Gao(xiao...@gmail.com) -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH v2 1/10] KVM MMU: fix for calculating gpa in invlpg code

2010-04-25 Thread Avi Kivity
On 04/25/2010 10:00 AM, Xiao Guangrong wrote: If the guest is 32-bit, we should use 'quadrant' to adjust gpa offset Changlog v2: - when level is PT_DIRECTORY_LEVEL, the 'offset' should be 'role.quadrant 8', thanks Avi for point it out Signed-off-by: Xiao

Re: [PATCH v2 5/10] KVM MMU: split kvm_sync_page() function

2010-04-25 Thread Avi Kivity
On 04/25/2010 10:00 AM, Xiao Guangrong wrote: Split kvm_sync_page() into kvm_sync_page() and kvm_sync_page_transient() to clarify the code address Avi's suggestion kvm_sync_page_transient() function only update shadow page but not mark it sync and not write protect sp-gfn. it will be used by

Re: [RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer.

2010-04-25 Thread David Miller
From: Changli Gao xiao...@gmail.com Date: Sun, 25 Apr 2010 17:33:02 +0800 On Sun, Apr 25, 2010 at 5:19 PM, xiaohui@intel.com wrote: +static int dev_is_mpassthru(struct net_device *dev) +{ +       if (dev dev-mp_port) +               return 1; +       return 0; +} + Please make it

Re: [RFC][PATCH v4 05/18] Add a function to indicate if device use external buffer.

2010-04-25 Thread David Miller
From: Changli Gao xiao...@gmail.com Date: Sun, 25 Apr 2010 17:35:01 +0800 On Sun, Apr 25, 2010 at 5:19 PM, xiaohui@intel.com wrote: +static int dev_is_mpassthru(struct net_device *dev) bool return value should be better here. Right. -- To unsubscribe from this list: send the line

Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.

2010-04-25 Thread David Miller
From: xiaohui@intel.com Date: Sun, 25 Apr 2010 17:20:06 +0800 The idea is simple, just to pin the guest VM user space and then let host NIC driver has the chance to directly DMA to it. Isn't it much easier to map the RX ring of the network device into the guest's address space, have DMA

Re: [PATCH v2 9/10] KVM MMU: separate invlpg code form kvm_mmu_pte_write()

2010-04-25 Thread Avi Kivity
On 04/25/2010 10:02 AM, Xiao Guangrong wrote: Let invlpg not depends on kvm_mmu_pte_write path, later patch will need this feature if (mmu_topup_memory_caches(vcpu)) return; - kvm_mmu_pte_write(vcpu, pte_gpa, NULL, sizeof(pt_element_t), 0); + +

Re: [PATCH v2 6/10] KVM MMU: don't write-protect if have new mapping to unsync page

2010-04-25 Thread Avi Kivity
On 04/25/2010 10:00 AM, Xiao Guangrong wrote: Two cases maybe happen in kvm_mmu_get_page() function: - one case is, the goal sp is already in cache, if the sp is unsync, we only need update it to assure this mapping is valid, but not mark it sync and not write-protect sp-gfn since it not

Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.

2010-04-25 Thread Michael S. Tsirkin
On Sun, Apr 25, 2010 at 02:55:29AM -0700, David Miller wrote: From: xiaohui@intel.com Date: Sun, 25 Apr 2010 17:20:06 +0800 The idea is simple, just to pin the guest VM user space and then let host NIC driver has the chance to directly DMA to it. Isn't it much easier to map the RX

Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.

2010-04-25 Thread Michael S. Tsirkin
On Sun, Apr 25, 2010 at 05:20:06PM +0800, xiaohui@intel.com wrote: We provide an zero-copy method which driver side may get external buffers to DMA. Here external means driver don't use kernel space to allocate skb buffers. Currently the external buffer can be from guest virtio-net driver.

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Avi Kivity
On 04/24/2010 10:34 AM, Jan Kiszka wrote: Marcelo Tosatti wrote: Otherwise there is no way to differentiate between global and slot specific logging, so for example vga dirty log start migration start migration fail Disables dirty logging for the vga slot. This is not true (unless

Re: [uq/master patch 0/5] prepare for qemu-kvm's usage of upstream memslot code

2010-04-25 Thread Avi Kivity
On 04/23/2010 08:04 PM, Marcelo Tosatti wrote: Looks good. -- error compiling committee.c: too many arguments to function -- 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

Re: [PATCH] block: Free iovec arrays allocated by multiwrite_merge()

2010-04-25 Thread Avi Kivity
On 04/21/2010 11:13 PM, Leszek Urbanski wrote: 20100421200358.gh24...@us.ibm.com; from Ryan Harper on Wed, Apr 21, 2010 at 15:03:58 -0500 Debugging with mtrace() also pointed to the iovec code as the culprit. I've not used mtrace before, could you dump your command invocation for

[PATCH] KVM: Document KVM_GET_MP_STATE and KVM_SET_MP_STATE

2010-04-25 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/kvm/api.txt | 44 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index baa8fde..a237518 100644 ---

Re: KVM_SET_MP_STATE is undocumented

2010-04-25 Thread Avi Kivity
On 04/22/2010 08:18 PM, Pekka Enberg wrote: Hi! I noticed that QEMU uses KVM_SET_MP_STATE but the ioctl() is completely undocumented. I assume it has something to do with multiprocessor but I am unable to work out the details unless I take a peek at arch/x86/kvm. Patch sent. -- error

Re: [PATCH] KVM: Document KVM_GET_MP_STATE and KVM_SET_MP_STATE

2010-04-25 Thread Pekka Enberg
Avi Kivity wrote: Signed-off-by: Avi Kivity a...@redhat.com Acked-by: Pekka Enberg penb...@cs.helsinki.fi -- 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] block: Free iovec arrays allocated by multiwrite_merge()

2010-04-25 Thread Stefan Hajnoczi
From: Stefan Hajnoczi stefa...@gmail.com The MALLOC_TRACE output didn't look useful when I tried it either. Instead I used the following to find origin of the leak. Still very basic but works better with qemu_malloc() and friends. This is just a hack but I wanted to share it in case someone

Re: [PATCH] block: Free iovec arrays allocated by multiwrite_merge()

2010-04-25 Thread Avi Kivity
On 04/25/2010 04:27 PM, Stefan Hajnoczi wrote: From: Stefan Hajnoczistefa...@gmail.com The MALLOC_TRACE output didn't look useful when I tried it either. Instead I used the following to find origin of the leak. Still very basic but works better with qemu_malloc() and friends. This is just a

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Jan Kiszka
Avi Kivity wrote: On 04/24/2010 10:34 AM, Jan Kiszka wrote: Marcelo Tosatti wrote: Otherwise there is no way to differentiate between global and slot specific logging, so for example vga dirty log start migration start migration fail Disables dirty logging for the vga slot.

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Avi Kivity
On 04/25/2010 04:57 PM, Jan Kiszka wrote: It's still a good idea. The current API assumes that there will be only one slot-based client (or that multiple clients will keep the refcount themselves). After the bytemap - multiple bitmaps conversion this can be extended to each client getting

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Jan Kiszka
Avi Kivity wrote: On 04/25/2010 04:57 PM, Jan Kiszka wrote: It's still a good idea. The current API assumes that there will be only one slot-based client (or that multiple clients will keep the refcount themselves). After the bytemap - multiple bitmaps conversion this can be extended to

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Avi Kivity
On 04/25/2010 05:29 PM, Jan Kiszka wrote: There isn't. But I don't like hidden breakage. It's (so far) an unproblematic API property we can document. I don't like changing APIs just for there might be the case that I guess it's one of those agree to disagree things. I

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Jan Kiszka
Avi Kivity wrote: On 04/25/2010 05:29 PM, Jan Kiszka wrote: There isn't. But I don't like hidden breakage. It's (so far) an unproblematic API property we can document. I don't like changing APIs just for there might be the case that I guess it's one of those agree to

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Avi Kivity
On 04/25/2010 05:51 PM, Jan Kiszka wrote: Avi Kivity wrote: On 04/25/2010 05:29 PM, Jan Kiszka wrote: There isn't. But I don't like hidden breakage. It's (so far) an unproblematic API property we can document. I don't like changing APIs just for there might be

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Jan Kiszka
Avi Kivity wrote: On 04/25/2010 05:51 PM, Jan Kiszka wrote: Avi Kivity wrote: On 04/25/2010 05:29 PM, Jan Kiszka wrote: There isn't. But I don't like hidden breakage. It's (so far) an unproblematic API property we can document. I don't like changing APIs just

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Avi Kivity
On 04/25/2010 06:07 PM, Jan Kiszka wrote: The fact that the API assumes a single user is what's broken IMO. If the API were to take a memory slot as parameter you could say it is the responsibility of the slot's owner to multiplex (and since vga has a single owner, no need to multiplex). But

Re: Mount and unmount CD Bug reporting

2010-04-25 Thread David S. Ahern
It's been a while since I dug into this, as I recall the media change needs to be detected to flush cached data. I believe mounting and unmounting the DVD in the host will work as well, as well as dropping the cache on the host. I needed an event mechanism rather than polling for a once in a blue

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Jan Kiszka
Avi Kivity wrote: On 04/25/2010 06:07 PM, Jan Kiszka wrote: The fact that the API assumes a single user is what's broken IMO. If the API were to take a memory slot as parameter you could say it is the responsibility of the slot's owner to multiplex (and since vga has a single owner, no need

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-25 Thread Dor Laor
On 04/23/2010 10:36 AM, Fernando Luis Vázquez Cao wrote: On 04/23/2010 02:17 PM, Yoshiaki Tamura wrote: Dor Laor wrote: [...] Second, even if it wasn't the case, the tsc delta and kvmclock are synchronized as part of the VM state so there is no use of trapping it in the middle. I should

VIA Nano support

2010-04-25 Thread Rusty Burchfield
When trying to boot installer iso's on this platform I get the following error about 40 times per second in my kern.log. kernel: [ 4857.828875] handle_exception: unexpected, vectoring info 0x880e intr info 0x8b0d These options have no effect: -no-kvm-irqchip or -no-kvm-pit QEMU is working

Re: [PATCH v2 1/10] KVM MMU: fix for calculating gpa in invlpg code

2010-04-25 Thread Xiao Guangrong
Avi Kivity wrote: On 04/25/2010 10:00 AM, Xiao Guangrong wrote: If the guest is 32-bit, we should use 'quadrant' to adjust gpa offset Changlog v2: - when level is PT_DIRECTORY_LEVEL, the 'offset' should be 'role.quadrant 8', thanks Avi for point it out Signed-off-by: Xiao

Re: [PATCH v2 5/10] KVM MMU: split kvm_sync_page() function

2010-04-25 Thread Xiao Guangrong
Avi Kivity wrote: This isn't a split; it duplicates the code. Since there are some parts in the middle of kvm_sync_page() you don't want in sync_page_transient(), you can put them into helpers so that sync_page and sync_page_transient only call helpers. Will fix it in v3, thanks

Re: [PATCH v2 9/10] KVM MMU: separate invlpg code form kvm_mmu_pte_write()

2010-04-25 Thread Xiao Guangrong
Avi Kivity wrote: On 04/25/2010 10:02 AM, Xiao Guangrong wrote: Let invlpg not depends on kvm_mmu_pte_write path, later patch will need this feature if (mmu_topup_memory_caches(vcpu)) return; -kvm_mmu_pte_write(vcpu, pte_gpa, NULL, sizeof(pt_element_t), 0); + +

Re: [PATCH v2 6/10] KVM MMU: don't write-protect if have new mapping to unsync page

2010-04-25 Thread Xiao Guangrong
Avi Kivity wrote: On 04/25/2010 10:00 AM, Xiao Guangrong wrote: Two cases maybe happen in kvm_mmu_get_page() function: - one case is, the goal sp is already in cache, if the sp is unsync, we only need update it to assure this mapping is valid, but not mark it sync and not

Re: [uq/master patch 2/5] kvm: add logging count to slots

2010-04-25 Thread Avi Kivity
On 04/25/2010 07:42 PM, Jan Kiszka wrote: Unrelated: cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa, 0xa8000); cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb); Will this sync to the right place (whatever those windows alias to)? It should. Or

Re: KVM Page Fault Question

2010-04-25 Thread Marek Olszewski
Avi, I guess I only really care about intercepting ring 0 - ring 3 transitions in the guest. Is there an easier way of intercepting these? Never mind about this. I figured out a solution to my problem that didn't need to intercept these transitions. Unfortunately, now I have a new