Re: [PATCH] kvm: rework remove-write-access for a slot

2010-06-04 Thread Lai Jiangshan
Avi Kivity wrote: On 06/02/2010 11:53 AM, Lai Jiangshan wrote: Current code uses slot_bitmap to find ptes who map a page from the memory slot, it is not precise: some ptes in the shadow page are not map any page from the memory slot. This patch uses rmap to find the ptes precisely, and

Re: [PATCHv3 1/2] virtio: support layout with avail ring before idx

2010-06-04 Thread Michael S. Tsirkin
On Fri, Jun 04, 2010 at 12:04:57PM +0930, Rusty Russell wrote: On Wed, 2 Jun 2010 12:17:12 am Michael S. Tsirkin wrote: This adds an (unused) option to put available ring before control (avail index, flags), and adds padding between index and flags. This avoids cache line sharing between

Re: [RFC PATCH v4 3/3] block: add sheepdog driver for distributed storage support

2010-06-04 Thread Kevin Wolf
Am 03.06.2010 18:23, schrieb MORITA Kazutaka: +static void sd_aio_cancel(BlockDriverAIOCB *blockacb) +{ + SheepdogAIOCB *acb = (SheepdogAIOCB *)blockacb; + + acb-canceled = 1; +} Does this provide the right semantics? You haven't really cancelled the request, but you pretend to. So

Re: [PATCHv3 1/2] virtio: support layout with avail ring before idx

2010-06-04 Thread Rusty Russell
On Fri, 4 Jun 2010 08:05:43 pm Michael S. Tsirkin wrote: On Fri, Jun 04, 2010 at 12:04:57PM +0930, Rusty Russell wrote: On Wed, 2 Jun 2010 12:17:12 am Michael S. Tsirkin wrote: This adds an (unused) option to put available ring before control (avail index, flags), and adds padding between

Re: [PATCHv3 1/2] virtio: support layout with avail ring before idx

2010-06-04 Thread Michael S. Tsirkin
On Fri, Jun 04, 2010 at 08:46:49PM +0930, Rusty Russell wrote: On Fri, 4 Jun 2010 08:05:43 pm Michael S. Tsirkin wrote: On Fri, Jun 04, 2010 at 12:04:57PM +0930, Rusty Russell wrote: On Wed, 2 Jun 2010 12:17:12 am Michael S. Tsirkin wrote: This adds an (unused) option to put available

Re: Opteron AMD-V support

2010-06-04 Thread Andre Przywara
Brian Jackson wrote: On Thursday 03 June 2010 21:33:24 Govender, Sashan wrote: Hi We bumped into this issue with VMWare ESX 4 where it doesn't support hardware virtualization if the processor is an AMD Athlon/Opteron (http://communities.vmware.com/docs/DOC-9150). Does linux-kvm have a similar

[PATCH v2 1/7] KVM: MMU: skip invalid sp when unprotect page

2010-06-04 Thread Xiao Guangrong
In kvm_mmu_unprotect_page(), the invalid sp can be skipped Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index a62e3ba..e962f26 100644 ---

[PATCH v2 2/7] KVM: MMU: introduce some macros to cleanup hlist traverseing

2010-06-04 Thread Xiao Guangrong
Introduce for_each_gfn_sp() and for_each_gfn_indirect_valid_sp() to cleanup hlist traverseing Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 122 1 files changed, 47 insertions(+), 75 deletions(-) diff

[PATCH v2 3/7] KVM: MMU: split the operations of kvm_mmu_zap_page()

2010-06-04 Thread Xiao Guangrong
Using kvm_mmu_prepare_zap_page() and kvm_mmu_commit_zap_page() to split kvm_mmu_zap_page() function, then we can: - traverse hlist safely - easily to gather remote tlb flush which occurs during page zapped Those feature can be used in the later patches Signed-off-by: Xiao Guangrong

[PATCH v2 4/7] KVM: MMU: don't get free page number in the loop

2010-06-04 Thread Xiao Guangrong
In the later patch, we will modify sp's zapping way like below: kvm_mmu_prepare_zap_page A kvm_mmu_prepare_zap_page B kvm_mmu_prepare_zap_page C kvm_mmu_commit_zap_page [ zaped multiple sps only need to call kvm_mmu_commit_zap_page once ] In

[PATCH v2 5/7] KVM: MMU: gather remote tlb flush which occurs during page zapped

2010-06-04 Thread Xiao Guangrong
Using kvm_mmu_prepare_zap_page() and kvm_mmu_zap_page() instead of kvm_mmu_zap_page() that can reduce remote tlb flush IPI Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 84 --- 1 files changed, 53

[PATCH v2 6/7] KVM: MMU: traverse sp hlish safely

2010-06-04 Thread Xiao Guangrong
Now, we can safely to traverse sp hlish Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 51 +++ 1 files changed, 23 insertions(+), 28 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

[PATCH v2 7/7] KVM: MMU: reduce remote tlb flush in kvm_mmu_pte_write()

2010-06-04 Thread Xiao Guangrong
collect remote tlb flush in kvm_mmu_pte_write() path Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 20 +++- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 845cba2..8528e5b

[PATCH resend] KVM: MMU: fix compile warning in kvm_send_hwpoison_signal()

2010-06-04 Thread Xiao Guangrong
fix: arch/x86/kvm/mmu.c: In function ‘kvm_send_hwpoison_signal’: arch/x86/kvm/mmu.c:2051: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_resul Reported-by: Jan Kiszka jan.kis...@web.de Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com ---

Re: [PATCH 1/2] [scsi-bus]: Add PR-OUT and PR-IN case for SCSIRequest xfer and xfer_mode setup

2010-06-04 Thread Kevin Wolf
Am 31.05.2010 03:43, schrieb Nicholas A. Bellinger: From: Nicholas Bellinger n...@linux-iscsi.org This patch updates hw/scsi-bus.c to add PERSISTENT_RESERVE_OUT and PERSISTENT_RESERVE_IN case in scsi_req_length() to extra the incoming buffer length into SCSIRequest-cmd.xfer, and adds a

Re: [PATCH] kvm/powerpc: fix a build error in e500_tlb.c

2010-06-04 Thread Alexander Graf
On 03.06.2010, at 07:52, Kevin Hao wrote: We use the wrong number arguments when invoking trace_kvm_stlb_inval, and cause the following build error. arch/powerpc/kvm/e500_tlb.c: In function 'kvmppc_e500_stlbe_invalidate': arch/powerpc/kvm/e500_tlb.c:230: error: too many arguments to function

Re: [PATCH] make-release: make mtime, owner, group consistent

2010-06-04 Thread Marcelo Tosatti
On Wed, Jun 02, 2010 at 06:27:20PM +0300, Michael S. Tsirkin wrote: Files from git have modification time set to one of commit, and owner/group to root. Making it so for generated files as well makes it easier to generate an identical tarball from git. Setting owner/group to root is

Re: [PATCH] msix: fix msix_set/unset_mask_notifier

2010-06-04 Thread Marcelo Tosatti
On Wed, Jun 02, 2010 at 08:49:35PM +0300, Michael S. Tsirkin wrote: Sridhar Samudrala reported hitting the following assertions in msix.c when doing a guest reboot or live migration using vhost. qemu-kvm/hw/msix.c:375: msix_mask_all: Assertion `r = 0' failed. qemu-kvm/hw/msix.c:640:

Re: [PATCHv2] virtio-net: stop vhost backend on vmstop

2010-06-04 Thread Marcelo Tosatti
On Wed, Jun 02, 2010 at 09:01:52PM +0300, Michael S. Tsirkin wrote: vhost net currently keeps running after vmstop, which causes trouble as qemy does not check for dirty pages anymore. The fix is to simply keep vm and vhost running/stopped status in sync. Tested-by: David L Stevens

Re: [PATCH] kvm: rework remove-write-access for a slot

2010-06-04 Thread Marcelo Tosatti
On Fri, Jun 04, 2010 at 04:14:08PM +0800, Lai Jiangshan wrote: Avi Kivity wrote: On 06/02/2010 11:53 AM, Lai Jiangshan wrote: Current code uses slot_bitmap to find ptes who map a page from the memory slot, it is not precise: some ptes in the shadow page are not map any page from the

Re: porting fixes regarding kvm-clock and lost irqs to stable qemu-kvm 0.12.4

2010-06-04 Thread Marcelo Tosatti
On Wed, Jun 02, 2010 at 05:13:30PM +0200, Peter Lieven wrote: Hi, I would like to get latest stable qemu-kvm (0.12.4) to a usable state regarding live-migration. Problems are fixed in git, but there is so much new stuff that has not extensively tested and therefore I would like to stay at

Re: [PATCH v3] KVM VMX: Make sure single type invvpid is supported before issuing invvpid instruction

2010-06-04 Thread Marcelo Tosatti
On Fri, Jun 04, 2010 at 08:51:39AM +0800, Gui Jianfeng wrote: According to SDM, we need check whether single-context INVVPID type is supported before issuing invvpid instruction. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/include/asm/vmx.h |2 ++

Re: [PATCH resend] KVM: MMU: fix compile warning in kvm_send_hwpoison_signal()

2010-06-04 Thread Marcelo Tosatti
On Fri, Jun 04, 2010 at 10:02:35PM +0800, Xiao Guangrong wrote: fix: arch/x86/kvm/mmu.c: In function ‘kvm_send_hwpoison_signal’: arch/x86/kvm/mmu.c:2051: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_resul Reported-by: Jan Kiszka

[PATCH] introduce -machine switch

2010-06-04 Thread Glauber Costa
This patch adds initial support for the -machine option, that allows command line specification of machine attributes. Besides its value per-se, it is the saner way we found to allow for enabling/disabling of kvm's in-kernel irqchip. machine-related options like kernel, initrd, etc, are now

Re: porting fixes regarding kvm-clock and lost irqs to stable qemu-kvm 0.12.4

2010-06-04 Thread Peter Lieven
Am 04.06.2010 um 17:31 schrieb Marcelo Tosatti: On Wed, Jun 02, 2010 at 05:13:30PM +0200, Peter Lieven wrote: Hi, I would like to get latest stable qemu-kvm (0.12.4) to a usable state regarding live-migration. Problems are fixed in git, but there is so much new stuff that has not

Re: porting fixes regarding kvm-clock and lost irqs to stable qemu-kvm 0.12.4

2010-06-04 Thread Peter Lieven
Am 04.06.2010 um 17:31 schrieb Marcelo Tosatti: On Wed, Jun 02, 2010 at 05:13:30PM +0200, Peter Lieven wrote: Hi, I would like to get latest stable qemu-kvm (0.12.4) to a usable state regarding live-migration. Problems are fixed in git, but there is so much new stuff that has not

[PATCH v6 2/6] Add function to assign ioeventfd to MMIO.

2010-06-04 Thread Cam Macdonell
--- kvm-all.c | 32 kvm.h |1 + 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 47f58a6..2982631 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1257,6 +1257,38 @@ int kvm_set_signal_mask(CPUState *env, const

[PATCH v6 3/6] Change phys_ram_dirty to phys_ram_status

2010-06-04 Thread Cam Macdonell
phys_ram_dirty are 8-bit values storing 3 dirty bits. Change to more generic phys_ram_flags and use lower 4-bits for dirty status and leave upper 4 for other uses. The names of functions may need to be changed as well, such as c_p_m_get_dirty(). --- cpu-all.h | 16 +--- exec.c

[PATCH v6 0/6] Inter-VM Shared Memory Device with migration support

2010-06-04 Thread Cam Macdonell
Latest patch for PCI shared memory device that maps a host shared memory object to be shared between guests new in this series - migration support with 'master' and 'peer' roles for guest to determine who owns memory. With 'master', the guest has the canonical copy of the shared

[PATCH v6 4/6] Add support for marking memory to not be migrated. On migration, memory is checked for the NO_MIGRATION_FLAG.

2010-06-04 Thread Cam Macdonell
This is useful for devices that do not want to take memory regions data with them on migration. --- arch_init.c | 28 cpu-all.h|2 ++ cpu-common.h |2 ++ exec.c | 12 4 files changed, 32 insertions(+), 12 deletions(-) diff --git

[PATCH v6 5/6] Inter-VM shared memory PCI device

2010-06-04 Thread Cam Macdonell
Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository. -device ivshmem,size=size in format accepted

[PATCH v6 6/6] the stand-alone shared memory server for inter-VM shared memory

2010-06-04 Thread Cam Macdonell
this code is a standalone server which will pass file descriptors for the shared memory region and eventfds to support interrupts between guests using inter-VM shared memory. --- contrib/ivshmem-server/Makefile | 16 ++ contrib/ivshmem-server/README | 30 +++

[PATCH v6] Shared memory uio_pci driver

2010-06-04 Thread Cam Macdonell
This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has three memory regions. The first memory region is for device registers for sending interrupts. The second BAR is for receiving MSI-X interrupts and the third memory region maps the shared memory.