[PATCH v2] intel-iommu: Add device info into list before doing context mapping

2011-12-22 Thread Hao, Xudong
Add device info into list before do context mapping, because device info will be used by iommu_enable_dev_iotlb function, in this function, pci_enable_ats would not be called without this patch. Signed-off-by: Xudong Hao xudong@intel.com Signed-off-by: Xiantao Zhang xiantao.zh...@intel.com

Re: [PATCH 0/5 V5] Avoid soft lockup message when KVM is stopped by host

2011-12-22 Thread Dor Laor
On 12/19/2011 07:59 PM, Amit Shah wrote: On (Mon) 19 Dec 2011 [14:59:36], Avi Kivity wrote: On 12/19/2011 02:52 PM, Amit Shah wrote: (snip) S4 needs some treatment, though, as resume after s4 doesn't work with kvmclock enabled. I didn't realise this series was only handling the soft lockup

Re: [PATCH 0/5 V5] Avoid soft lockup message when KVM is stopped by host

2011-12-22 Thread Avi Kivity
On 12/19/2011 07:50 PM, Marcelo Tosatti wrote: Maybe it is good (not sure), need to look into schedstats and think of cases that would break legitimate guest hangs. And it probably also affects the position of clearing the flag on the guest side as its currently done in Eric's

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-22 Thread Avi Kivity
On 12/08/2011 07:31 AM, Sasha Levin wrote: It sounds like Alex is considering KVM PPC's return value in this case (and updating api.txt if appropriate) -- what say you on this patch? It actually brings kvmtool's KVM_RUN return val check in line with QEMU's (also 0) and nothing PPC

Re: [PATCH 3/4 V7] Add ioctl for KVMCLOCK_GUEST_STOPPED

2011-12-22 Thread Avi Kivity
On 12/15/2011 09:42 PM, Eric B Munson wrote: Now that we have a flag that will tell the guest it was suspended, create an interface for that communication using a KVM ioctl. +4.64 KVMCLOCK_GUEST_PAUSED + +Capability: basic +Architechtures: Any that implement pvclocks (currently x86 only)

Re: [PATCH 3/4 V7] Add ioctl for KVMCLOCK_GUEST_STOPPED

2011-12-22 Thread Avi Kivity
On 12/15/2011 09:42 PM, Eric B Munson wrote: +4.64 KVMCLOCK_GUEST_PAUSED + +Capability: basic Capability: basic means that this ioctl is available on any Linux version that has KVM (apart from 2.6.2[01], before the ABI was stabilized). You need to define a new KVM_CAP, document it, and

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-22 Thread Sasha Levin
On Thu, 2011-12-22 at 12:03 +0200, Avi Kivity wrote: On 12/08/2011 07:31 AM, Sasha Levin wrote: It sounds like Alex is considering KVM PPC's return value in this case (and updating api.txt if appropriate) -- what say you on this patch? It actually brings kvmtool's KVM_RUN

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-22 Thread Avi Kivity
On 12/22/2011 12:18 PM, Sasha Levin wrote: On Thu, 2011-12-22 at 12:03 +0200, Avi Kivity wrote: On 12/08/2011 07:31 AM, Sasha Levin wrote: It sounds like Alex is considering KVM PPC's return value in this case (and updating api.txt if appropriate) -- what say you on this

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-22 Thread Sasha Levin
On Thu, 2011-12-22 at 12:21 +0200, Avi Kivity wrote: On 12/22/2011 12:18 PM, Sasha Levin wrote: On Thu, 2011-12-22 at 12:03 +0200, Avi Kivity wrote: On 12/08/2011 07:31 AM, Sasha Levin wrote: It sounds like Alex is considering KVM PPC's return value in this case (and

[patch 1/3] kvm: provide synchronous registers in kvm_run

2011-12-22 Thread Christian Borntraeger
From: Christian Borntraeger borntrae...@de.ibm.com On some cpus the overhead for virtualization instructions is in the same range as a system call. Having to call multiple ioctls to get set registers will make userspace handled exits more expensive than necessary. Lets provide two sections in

[patch 3/3] kvm-s390: provide general purpose registers via kvm_run

2011-12-22 Thread Christian Borntraeger
From: Christian Borntraeger borntrae...@de.ibm.com The general purpose registers are often necessary to handle SIE exits. Avoid additional ioctls by providing the guest registers in the r/w section of the kvm_run structure. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com ---

[patch 0/3] RFC: provide synchronous registers in kvm_run

2011-12-22 Thread Christian Borntraeger
Avi, Marcelo, currently userspace can access guest registers via several ioctls. Some of these registers might be useful very often. Here the system call overhead for ioctl can make an exit more expensive than necessary. In a discussion with Alex Graf we concluded that it might be beneficial to

[patch 2/3] kvm-s390: provide the prefix register via kvm_run

2011-12-22 Thread Christian Borntraeger
From: Christian Borntraeger borntrae...@de.ibm.com The prefix register is a read-mostly value that is necessary to emulate memory accesses in an architecture compliant-way. Avoid an additional ioctl by providing the prefix content in the r/o section of kvm_run. Signed-off-by: Christian

Re: [PATCH 4/6] virtio-blk: implement -make_request

2011-12-22 Thread Stefan Hajnoczi
On Wed, Dec 21, 2011 at 1:00 AM, Minchan Kim minc...@kernel.org wrote: +static void virtblk_add_buf_wait(struct virtio_blk *vblk, +       struct virtblk_req *vbr, unsigned long out, unsigned long in) +{ +       DEFINE_WAIT(wait); +       bool retry, notify; + +       for (;;) { +          

Re: [patch 1/3] kvm: provide synchronous registers in kvm_run

2011-12-22 Thread Avi Kivity
On 12/22/2011 01:56 PM, Christian Borntraeger wrote: From: Christian Borntraeger borntrae...@de.ibm.com On some cpus the overhead for virtualization instructions is in the same range as a system call. Having to call multiple ioctls to get set registers will make userspace handled exits more

Re: [patch 3/3] kvm-s390: provide general purpose registers via kvm_run

2011-12-22 Thread Avi Kivity
On 12/22/2011 01:56 PM, Christian Borntraeger wrote: From: Christian Borntraeger borntrae...@de.ibm.com The general purpose registers are often necessary to handle SIE exits. Avoid additional ioctls by providing the guest registers in the r/w section of the kvm_run structure. This is only

Re: [patch 0/3] RFC: provide synchronous registers in kvm_run

2011-12-22 Thread Avi Kivity
On 12/22/2011 01:56 PM, Christian Borntraeger wrote: Avi, Marcelo, currently userspace can access guest registers via several ioctls. Some of these registers might be useful very often. Here the system call overhead for ioctl can make an exit more expensive than necessary. In a discussion

Re: [patch 3/3] kvm-s390: provide general purpose registers via kvm_run

2011-12-22 Thread Christian Borntraeger
On 22/12/11 13:34, Avi Kivity wrote: The general purpose registers are often necessary to handle SIE exits. Avoid additional ioctls by providing the guest registers in the r/w section of the kvm_run structure. This is only needed for S390_UCONTROL? No for the standard path. It was more

Re: [patch 3/3] kvm-s390: provide general purpose registers via kvm_run

2011-12-22 Thread Heiko Carstens
On Thu, Dec 22, 2011 at 12:56:49PM +0100, Christian Borntraeger wrote: From: Christian Borntraeger borntrae...@de.ibm.com The general purpose registers are often necessary to handle SIE exits. Avoid additional ioctls by providing the guest registers in the r/w section of the kvm_run

Re: [PATCH 20/23] vhost: avoid cpu_get_physical_page_desc()

2011-12-22 Thread Michael S. Tsirkin
On Mon, Dec 19, 2011 at 04:13:41PM +0200, Avi Kivity wrote: @@ -871,7 +899,10 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev) hdev-vqs + i, i); } -vhost_sync_dirty_bitmap(hdev, 0,

Re: [patch 3/3] kvm-s390: provide general purpose registers via kvm_run

2011-12-22 Thread Avi Kivity
On 12/22/2011 02:41 PM, Heiko Carstens wrote: Index: b/arch/s390/include/asm/kvm_host.h === Btw. you may want to set QUILT_NO_DIFF_INDEX to get rid of the Index lines junk :) Or just use git, when I switched some years ago I

Re: [PATCH 14/23] vhost: convert to MemoryListener API

2011-12-22 Thread Michael S. Tsirkin
On Mon, Dec 19, 2011 at 04:13:35PM +0200, Avi Kivity wrote: +static void vhost_log_start(MemoryListener *listener, +MemoryRegionSection *section) +{ +/* FIXME: implement */ +} + +static void vhost_log_stop(MemoryListener *listener, +

Re: [PATCH 20/23] vhost: avoid cpu_get_physical_page_desc()

2011-12-22 Thread Avi Kivity
On 12/22/2011 02:48 PM, Michael S. Tsirkin wrote: On Mon, Dec 19, 2011 at 04:13:41PM +0200, Avi Kivity wrote: @@ -871,7 +899,10 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev) hdev-vqs + i, i); }

Re: [PATCH 14/23] vhost: convert to MemoryListener API

2011-12-22 Thread Avi Kivity
On 12/22/2011 02:50 PM, Michael S. Tsirkin wrote: On Mon, Dec 19, 2011 at 04:13:35PM +0200, Avi Kivity wrote: +static void vhost_log_start(MemoryListener *listener, +MemoryRegionSection *section) +{ +/* FIXME: implement */ +} + +static void

Re: [patch 0/3] RFC: provide synchronous registers in kvm_run

2011-12-22 Thread Avi Kivity
On 12/22/2011 02:49 PM, Christian Borntraeger wrote: Interesting. Other archs emulate everything to do with registers in the kernel, so this is not a fast path. What workload does this benefit? My main concern was the prefix register (this is a per cpu register that defines the

Re: [PATCH 14/23] vhost: convert to MemoryListener API

2011-12-22 Thread Michael S. Tsirkin
On Thu, Dec 22, 2011 at 02:50:27PM +0200, Avi Kivity wrote: On 12/22/2011 02:50 PM, Michael S. Tsirkin wrote: On Mon, Dec 19, 2011 at 04:13:35PM +0200, Avi Kivity wrote: +static void vhost_log_start(MemoryListener *listener, +MemoryRegionSection *section) +{

Re: [PATCH 0/6][RFC] virtio-blk: Change I/O path from request to BIO

2011-12-22 Thread Stefan Hajnoczi
On Wed, Dec 21, 2011 at 1:00 AM, Minchan Kim minc...@kernel.org wrote: This patch is follow-up of Christohp Hellwig's work [RFC: -make_request support for virtio-blk]. http://thread.gmane.org/gmane.linux.kernel/1199763 Quote from hch This patchset allows the virtio-blk driver to support much

Re: [PATCH 14/23] vhost: convert to MemoryListener API

2011-12-22 Thread Avi Kivity
On 12/22/2011 02:57 PM, Michael S. Tsirkin wrote: On Thu, Dec 22, 2011 at 02:50:27PM +0200, Avi Kivity wrote: On 12/22/2011 02:50 PM, Michael S. Tsirkin wrote: On Mon, Dec 19, 2011 at 04:13:35PM +0200, Avi Kivity wrote: +static void vhost_log_start(MemoryListener *listener, +

Re: [patch 0/3] RFC: provide synchronous registers in kvm_run

2011-12-22 Thread Christian Borntraeger
On 22/12/11 13:54, Avi Kivity wrote: My main concern was the prefix register (this is a per cpu register that defines the address of two pages that are swapped with the pages at 0 for this cpu). SMP on s390 is done that way (e.g. interrupt things are stored in page 0 for this cpu) The

Re: [patch 0/3] RFC: provide synchronous registers in kvm_run

2011-12-22 Thread Avi Kivity
On 12/22/2011 03:17 PM, Christian Borntraeger wrote: On 22/12/11 13:54, Avi Kivity wrote: My main concern was the prefix register (this is a per cpu register that defines the address of two pages that are swapped with the pages at 0 for this cpu). SMP on s390 is done that way (e.g.

Re: [PATCH] kvm: ensure that debugfs entries have been created

2011-12-22 Thread Marcelo Tosatti
On Thu, Dec 15, 2011 at 02:23:16PM +0800, Hamo wrote: by checking the return value from kvm_init_debug, we can ensure that the entries under debugfs for KVM have been created correctly. Signed-off-by: Yang Bai hamo...@gmail.com Applied, thanks. -- To unsubscribe from this list: send the

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

2011-12-22 Thread Marcelo Tosatti
On Thu, Dec 01, 2011 at 06:40:31PM +0100, Peter Zijlstra wrote: On Wed, 2011-11-23 at 16:03 +0100, Andrea Arcangeli wrote: snip From what I gather what you propose is to periodically unmap all user memory (or map it !r !w !x, which is effectively the same) and take the fault. This fault will

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

2011-12-22 Thread Marcelo Tosatti
On Thu, Dec 01, 2011 at 06:40:31PM +0100, Peter Zijlstra wrote: On Wed, 2011-11-23 at 16:03 +0100, Andrea Arcangeli wrote: Hi! On Mon, Nov 21, 2011 at 07:51:21PM -0600, Anthony Liguori wrote: Fundamentally, the entity that should be deciding what memory should be present and

SOLVED [was Re: Controlling (WinXP-Guest)- Textmode via chardev pipe broken?]

2011-12-22 Thread Oliver Rath
Am 20.12.2011 13:08, schrieb Sasha Levin: [..] Whats wrong? Are you sure that windows is using the serial device at all? You're not emulating a keyboard there, you're emulating input from a serial device. HI Sasha, Ive found a better solution: It is possible to pipe the qemu-monitor:

Re: [PATCH 0/6][RFC] virtio-blk: Change I/O path from request to BIO

2011-12-22 Thread Vivek Goyal
On Thu, Dec 22, 2011 at 10:05:38AM +0900, Minchan Kim wrote: [..] May be using deadline or noop in guest is better to benchmark against PCI-E based flash. Good suggestion. I tested it by deadline on guest side. The result is not good. Although gap is within noise, Batch BIO's random

[PATCH] arch/powerpc/kvm/e500: Additional module.h = export.h fixup

2011-12-22 Thread Kyle Moffett
This file, like many others, needs to include linux/export.h. Signed-off-by: Kyle Moffett kyle.d.moff...@boeing.com --- arch/powerpc/kvm/e500.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c index 26d2090..387c383 100644

Re: [PATCH 1/8] KVM: MMU: combine unsync and unsync_children

2011-12-22 Thread Marcelo Tosatti
On Fri, Dec 16, 2011 at 06:13:42PM +0800, Xiao Guangrong wrote: unsync is only used for the page of level == 1 and unsync_children is only used in the upper page, so combine them to reduce the size of shadow page structure Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com ---

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

2011-12-22 Thread Anthony Liguori
On 12/22/2011 05:01 AM, Marcelo Tosatti wrote: On Thu, Dec 01, 2011 at 06:40:31PM +0100, Peter Zijlstra wrote: No virt is crap, it needs to die, its horrid, and any solution aimed squarely at virt only is shit and not worth considering, that simple. Removing this phrase from context (feel

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

2011-12-22 Thread Peter Zijlstra
On Thu, 2011-12-22 at 09:01 -0200, Marcelo Tosatti wrote: No virt is crap, it needs to die, its horrid, and any solution aimed squarely at virt only is shit and not worth considering, that simple. Removing this phrase from context (feel free to object on that basis to the following

[PATCH 5/5] enable architectural PMU cpuid leaf for kvm

2011-12-22 Thread Marcelo Tosatti
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- target-i386/cpuid.c | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index

[PATCH 4/5] Set numa topology for max_cpus

2011-12-22 Thread Marcelo Tosatti
From: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com qemu-kvm passes numa/SRAT topology information for smp_cpus to SeaBIOS. However SeaBIOS always expects to setup max_cpus number of SRAT cpu entries (MaxCountCPUs variable in build_srat function of Seabios). When qemu-kvm runs with

[PATCH 2/5] kvm: x86: Avoid runtime allocation of xsave buffer

2011-12-22 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Keep a per-VCPU xsave buffer for kvm_put/get_xsave instead of continuously allocating and freeing it on state sync. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- target-i386/cpu.h |3 ++-

[PATCH 3/5] kvm: x86: Drop redundant apic base and tpr update from kvm_get_sregs

2011-12-22 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com The latter was already commented out, the former is redundant as well. We always get the latest changes after return from the guest via kvm_arch_post_run. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

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

2011-12-22 Thread Marcelo Tosatti
On Thu, Dec 22, 2011 at 11:13:15AM -0600, Anthony Liguori wrote: On 12/22/2011 05:01 AM, Marcelo Tosatti wrote: On Thu, Dec 01, 2011 at 06:40:31PM +0100, Peter Zijlstra wrote: No virt is crap, it needs to die, its horrid, and any solution aimed squarely at virt only is shit and not worth

Re: [PATCH 4/6] virtio-blk: implement -make_request

2011-12-22 Thread Christoph Hellwig
On Thu, Dec 22, 2011 at 12:20:01PM +, Stefan Hajnoczi wrote: virtblk_make_request() checks that the queue is not plugged. Do we need to do that here too? biot based drivers don't have a queue that could be plugged. -- To unsubscribe from this list: send the line unsubscribe kvm in the body

[PATCH 0/5] [PULL] qemu-kvm.git uq/master queue

2011-12-22 Thread Marcelo Tosatti
The following changes since commit 03ecd2c80a64d030a22fe67cc7a60f24e17ff211: virtio-serial-bus: Ports are expected to implement 'have_data' callback (2011-12-21 15:00:29 -0600) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Gleb Natapov

[PATCH 1/5] kvm: x86: Use symbols for all xsave field

2011-12-22 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Field 0 (FCW+FSW) and 1 (FTW+FOP) were hard-coded so far. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- target-i386/kvm.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-)

Re: [PATCH 0/6][RFC] virtio-blk: Change I/O path from request to BIO

2011-12-22 Thread Minchan Kim
On Thu, Dec 22, 2011 at 10:45:06AM -0500, Vivek Goyal wrote: On Thu, Dec 22, 2011 at 10:05:38AM +0900, Minchan Kim wrote: [..] May be using deadline or noop in guest is better to benchmark against PCI-E based flash. Good suggestion. I tested it by deadline on guest side. The

Re: [PATCH 0/6][RFC] virtio-blk: Change I/O path from request to BIO

2011-12-22 Thread Minchan Kim
On Thu, Dec 22, 2011 at 12:57:40PM +, Stefan Hajnoczi wrote: On Wed, Dec 21, 2011 at 1:00 AM, Minchan Kim minc...@kernel.org wrote: This patch is follow-up of Christohp Hellwig's work [RFC: -make_request support for virtio-blk]. http://thread.gmane.org/gmane.linux.kernel/1199763

Re: [PATCH 4/8] KVM: MMU: drop unsync_child_bitmap

2011-12-22 Thread Xiao Guangrong
On 12/18/2011 04:59 PM, Avi Kivity wrote: On 12/16/2011 12:16 PM, Xiao Guangrong wrote: unsync_child_bitmap is used to record which spte has unsync page or unsync children, we can set a free bit in the spte instead of it unsync_child_bitmap takes one cacheline; the shadow page table takes

Re: [PATCH 8/8] KVM: MMU: remove PT64_SECOND_AVAIL_BITS_SHIFT

2011-12-22 Thread Xiao Guangrong
On 12/18/2011 06:42 PM, Avi Kivity wrote: On 12/16/2011 12:18 PM, Xiao Guangrong wrote: It is not used, remove it Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git

Re: [PATCH 1/8] KVM: MMU: combine unsync and unsync_children

2011-12-22 Thread Xiao Guangrong
On 12/23/2011 12:06 AM, Marcelo Tosatti wrote: On Fri, Dec 16, 2011 at 06:13:42PM +0800, Xiao Guangrong wrote: unsync is only used for the page of level == 1 and unsync_children is only used in the upper page, so combine them to reduce the size of shadow page structure Signed-off-by: Xiao

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-22 Thread Avi Kivity
On 12/22/2011 12:18 PM, Sasha Levin wrote: On Thu, 2011-12-22 at 12:03 +0200, Avi Kivity wrote: On 12/08/2011 07:31 AM, Sasha Levin wrote: It sounds like Alex is considering KVM PPC's return value in this case (and updating api.txt if appropriate) -- what say you on this

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-22 Thread Sasha Levin
On Thu, 2011-12-22 at 12:21 +0200, Avi Kivity wrote: On 12/22/2011 12:18 PM, Sasha Levin wrote: On Thu, 2011-12-22 at 12:03 +0200, Avi Kivity wrote: On 12/08/2011 07:31 AM, Sasha Levin wrote: It sounds like Alex is considering KVM PPC's return value in this case (and

[PATCH] arch/powerpc/kvm/e500: Additional module.h = export.h fixup

2011-12-22 Thread Kyle Moffett
This file, like many others, needs to include linux/export.h. Signed-off-by: Kyle Moffett kyle.d.moff...@boeing.com --- arch/powerpc/kvm/e500.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c index 26d2090..387c383 100644