Re: [Question]About KVM network zero-copy feature!

2012-08-13 Thread Michael S. Tsirkin
Last patchset version was this: [PATCH v16 00/17] Provide a zero-copy method on KVM virtio-net IIRC the main issue was the need to integrate the patchset with macvtap (as opposed to using a separate device). On Mon, Aug 13, 2012 at 09:24:54AM +0800, Peter Huang(Peng) wrote: Hi, Michael IIt

Re: [PATCH] kvm tools: Add initial virtio-scsi support

2012-08-13 Thread Pekka Enberg
On Thu, Aug 9, 2012 at 3:51 AM, Asias He asias.he...@gmail.com wrote: This patch brings virito-scsi support to kvm tool. With the introduce of tcm_vhost (vhost-scsi) tcm_vhost: Initial merge for vhost level target fabric driver we can implement virito-scsi by simply having vhost-scsi to

Re: [PATCH 2/2] kvm tools: Check for unknown parameters in network option handling

2012-08-13 Thread Pekka Enberg
On Mon, Aug 13, 2012 at 6:31 AM, Michael Ellerman mich...@ellerman.id.au wrote: diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index a36bd00..9e5c1d4 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -257,7 +257,8 @@ static int set_net_param(struct

Re: [PATCH] kvm tools: Fix crash when /etc/resolv.conf doesn't exist

2012-08-13 Thread Pekka Enberg
I've applied all Michal's patches. Thanks guys! -- 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] KVM: vmx: restore MSR_IA32_DEBUGCTLMSR after VMEXIT

2012-08-13 Thread Avi Kivity
On 08/12/2012 08:28 PM, Gleb Natapov wrote: On Sun, Aug 12, 2012 at 04:40:48PM +0300, Avi Kivity wrote: On 08/12/2012 04:25 PM, Gleb Natapov wrote: How expensive is this? We may want a follow-on patch to cache it in a per-cpu variable. I have patches ready. I couldn't measure any

[RFC-v2 0/6] vhost-scsi: Add support for host virtualized target

2012-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Hi Paolo, Stefan, QEMU folks, The following is the second RFC series for vhost-scsi patches against mainline QEMU v1.1.0. The series is available from the following working branch: git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git

[RFC-v2 2/6] vhost: Pass device path to vhost_dev_init()

2012-08-13 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com The path to /dev/vhost-net is currently hardcoded in vhost_dev_init(). This needs to be changed so that /dev/vhost-scsi can be used. Pass in the device path instead of hardcoding it. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Cc:

[RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This is required to get past the following assert with: commit 1523ed9e1d46b0b54540049d491475ccac7e6421 Author: Jan Kiszka jan.kis...@siemens.com Date: Thu May 17 10:32:39 2012 -0300 virtio/vhost: Add support for KVM in-kernel MSI injection

[RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-13 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi emulated device will make use of vhost-scsi to process virtio-scsi

[RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI-cmd_vqs[0] definition

2012-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch fixes bug in the definition of VirtIOSCSI-cmd_vqs[0], where the return of virtio_add_queue() in virtio_scsi_init() ends up overwriting past the end of -cmd_vqs[0]. Since virtio_scsi currently assumes a single vqs for data, this patch

[RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-13 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized, which means the virtqueues have been set up by the guest. v2:

[RFC-v2 5/6] virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This QEMU patch sets VirtIOSCSIConfig-max_target=0 for vhost-scsi operation to restrict virtio-scsi LLD guest scanning to max_id=0 (a single target ID instance) when connected to individual tcm_vhost endpoints. This ensures that virtio-scsi LLD only

Re: [PATCH 1/2] QEMU: extract file_load() function from rom_add_file() for reusing

2012-08-13 Thread Alexander Graf
On 13.08.2012, at 07:21, Olivia Yin hong-hua@freescale.com wrote: Sanity check in rom_add_file() could be reused by other image loaders. Signed-off-by: Olivia Yin hong-hua@freescale.com These are QEMU patches and don't have anything to do with KVM :). Please send them again to

Re: [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 08:35:12AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This is required to get past the following assert with: commit 1523ed9e1d46b0b54540049d491475ccac7e6421 Author: Jan Kiszka jan.kis...@siemens.com Date: Thu May 17

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 08:35:14AM +, Nicholas A. Bellinger wrote: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The

Re: [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver.

2012-08-13 Thread Cornelia Huck
On Wed, 08 Aug 2012 13:52:57 +0930 Rusty Russell ru...@rustcorp.com.au wrote: On Tue, 7 Aug 2012 16:52:47 +0200, Cornelia Huck cornelia.h...@de.ibm.com wrote: Add a driver for kvm guests that matches virtual ccw devices provided by the host as virtio bridge devices. Hi Cornelia,

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 08:35:14AM +, Nicholas A. Bellinger wrote: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The

Re: [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI-cmd_vqs[0] definition

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 08:35:17AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch fixes bug in the definition of VirtIOSCSI-cmd_vqs[0], where the return of virtio_add_queue() in virtio_scsi_init() ends up overwriting past the end of -cmd_vqs[0].

Re: [RFC-v2 0/6] vhost-scsi: Add support for host virtualized target

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 08:35:11AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi Paolo, Stefan, QEMU folks, The following is the second RFC series for vhost-scsi patches against mainline QEMU v1.1.0. The series is available from the following

[RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious problem is that not all interrupts (namely IPIs and MSIs using KVM_CAP_SIGNAL_MSI) use irq routing table, so they cannot be cached. Gleb Natapov (2): Call irq_rt callback under

[RFC PATCH 1/2] Call irq_rt callback under rcu_read_lock()

2012-08-13 Thread Gleb Natapov
Callbacks are no longer sleep. Signed-off-by: Gleb Natapov g...@redhat.com --- virt/kvm/irq_comm.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 7118be0..aad58e7 100644 --- a/virt/kvm/irq_comm.c +++

[RFC PATCH 2/2] Cache msi irq destination.

2012-08-13 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/lapic.c |2 +- include/linux/kvm_host.h |1 + virt/kvm/ioapic.c|2 +- virt/kvm/ioapic.h|3 ++- virt/kvm/irq_comm.c | 16 5 files changed, 17 insertions(+), 7 deletions(-)

Re: [RFC PATCH 2/2] Cache msi irq destination.

2012-08-13 Thread Avi Kivity
On 08/13/2012 12:16 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov g...@redhat.com -int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, +int kvm_irq_delivery_to_apic(struct kvm_kernel_irq_routing_entry *e, + struct kvm *kvm, struct kvm_lapic *src,

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 12:16:46PM +0300, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious problem is that not all interrupts (namely IPIs and MSIs using KVM_CAP_SIGNAL_MSI) use irq routing table, so they

Re: [RFC PATCH 2/2] Cache msi irq destination.

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 12:32:44PM +0300, Avi Kivity wrote: On 08/13/2012 12:16 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov g...@redhat.com -int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, +int kvm_irq_delivery_to_apic(struct kvm_kernel_irq_routing_entry *e,

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 12:34:32PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:16:46PM +0300, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious problem is that not all interrupts (namely

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious problem is that not all interrupts (namely IPIs and MSIs using KVM_CAP_SIGNAL_MSI) use irq routing table, so they cannot be cached. We

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious problem is that not all interrupts (namely IPIs and MSIs using KVM_CAP_SIGNAL_MSI) use irq routing table, so they cannot be cached.

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 12:36:27PM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 12:34:32PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:16:46PM +0300, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 12:46:09PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:36:27PM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 12:34:32PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:16:46PM +0300, Gleb Natapov wrote: Here is a quick prototype of

KVM call agenda for Tuesday, August 14

2012-08-13 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. Thanks, 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: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 12:43:50PM +0300, Avi Kivity wrote: On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious problem is that not all interrupts (namely IPIs and MSIs using

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 12:51:49PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:43:50PM +0300, Avi Kivity wrote: On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 12:36:41PM +0300, Avi Kivity wrote: On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious problem is that not all interrupts (namely IPIs and MSIs using

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 01:12:46PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:36:41PM +0300, Avi Kivity wrote: On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 01:16 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:12:46PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:36:41PM +0300, Avi Kivity wrote: On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 01:21:33PM +0300, Avi Kivity wrote: On 08/13/2012 01:16 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:12:46PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:36:41PM +0300, Avi Kivity wrote: On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 01:24 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:21:33PM +0300, Avi Kivity wrote: On 08/13/2012 01:16 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:12:46PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 12:36:41PM +0300, Avi Kivity wrote: On 08/13/2012

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 12:43:50PM +0300, Avi Kivity wrote: On 08/13/2012 12:16 PM, Gleb Natapov wrote: Here is a quick prototype of what we discussed yesterday. This one caches only MSI interrupts for now. The obvious problem is that not all interrupts (namely IPIs and MSIs using

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 01:31:36PM +0300, Avi Kivity wrote: On 08/13/2012 01:24 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:21:33PM +0300, Avi Kivity wrote: On 08/13/2012 01:16 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:12:46PM +0300, Michael S. Tsirkin wrote: On Mon, Aug

Re: [PATCH] tsc: use kvmclock for calibration

2012-08-13 Thread Gerd Hoffmann
Hi, Isnt pmtimer ioport usable? 14MHz. Can give it a try. 14 MHz looks wrong though, apci.h says: /* PM Timer ticks per second (HZ) */ #define PM_TIMER_FREQUENCY 3579545 Is this fixed? Or hardware specific? cheers, Gerd -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 01:31:36PM +0300, Avi Kivity wrote: On 08/13/2012 01:24 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:21:33PM +0300, Avi Kivity wrote: On 08/13/2012 01:16 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:12:46PM +0300, Michael S. Tsirkin wrote: On Mon, Aug

[PATCH repost] kvm: drop parameter validation

2012-08-13 Thread Michael S. Tsirkin
We validate irq pin number when routing is setup, so code handling illegal irq # in pic and ioapic on each injection is never called. Drop it. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Reposting, applies without changes to kvm/next. arch/x86/kvm/i8259.c | 16 +++-

Re: [PATCH] tsc: use kvmclock for calibration

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 12:37:11PM +0200, Gerd Hoffmann wrote: Hi, Isnt pmtimer ioport usable? 14MHz. Can give it a try. 14 MHz looks wrong though, apci.h says: /* PM Timer ticks per second (HZ) */ #define PM_TIMER_FREQUENCY 3579545 Is this fixed? Or hardware specific?

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 01:38 PM, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 01:31:36PM +0300, Avi Kivity wrote: On 08/13/2012 01:24 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:21:33PM +0300, Avi Kivity wrote: On 08/13/2012 01:16 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 01:58:21PM +0300, Avi Kivity wrote: On 08/13/2012 01:38 PM, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 01:31:36PM +0300, Avi Kivity wrote: On 08/13/2012 01:24 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:21:33PM +0300, Avi Kivity wrote: On 08/13/2012

[PATCH 1/2] KVM: PPC: Add return value in prepare_to_enter

2012-08-13 Thread Alexander Graf
Our prepare_to_enter helper wants to be able to return in more circumstances to the host than only when an interrupt is pending. Broaden the interface a bit and move even more generic code to the generic helper. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c | 12

[PATCH 0/2] Make request checks return value aware

2012-08-13 Thread Alexander Graf
These 2 patches allow us to return for arbitrary reasons in the prepare_to_enter and check_reqest functions. They are a prerequisite for Bharat's watchdog work. Alex Alexander Graf (2): KVM: PPC: Add return value in prepare_to_enter KVM: PPC: Add return value to core_check_requests

[PATCH 2/2] KVM: PPC: Add return value to core_check_requests

2012-08-13 Thread Alexander Graf
Requests may want to tell us that we need to go back into host state, so add a return value for the checks. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_ppc.h |2 +- arch/powerpc/kvm/book3s_pr.c |6 +- arch/powerpc/kvm/booke.c |6

Re: [PATCH 1/4] Introduce a common kvm requests handler

2012-08-13 Thread Alexander Graf
On 09.08.2012, at 08:38, Bharat Bhushan wrote: Added a common requests handler which is called before returning to guest. This returns non zero value when some request demands exit to userspace. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Thanks, applied patches 2 and 3 on

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually this is overkill. Suppose we do an apicid-vcpu translation cache? Then we retain O(1) behaviour, no need for a huge cache. Not sure I follow. Unicast MSIs and IPIs can be speeded up by looking up the vcpu using the apic id, using a

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually this is overkill. Suppose we do an apicid-vcpu translation cache? Then we retain O(1) behaviour, no need for a huge cache. Not sure I follow. Unicast MSIs and IPIs can

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually this is overkill. Suppose we do an apicid-vcpu translation cache? Then we retain O(1) behaviour, no need for a huge cache. Not sure I follow. Unicast MSIs and IPIs can

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 02:12:41PM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually this is overkill. Suppose we do an apicid-vcpu translation cache? Then we retain O(1) behaviour, no need for

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 02:22:14PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 02:12:41PM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually this is overkill. Suppose we do an

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 02:12 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually this is overkill. Suppose we do an apicid-vcpu translation cache? Then we retain O(1) behaviour, no need for a huge cache.

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 02:30:49PM +0300, Avi Kivity wrote: On 08/13/2012 02:12 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually this is overkill. Suppose we do an apicid-vcpu translation cache?

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 02:29:31PM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:22:14PM +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 02:12:41PM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov

Re: [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-13 Thread Jan Kiszka
On 2012-08-13 10:35, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This is required to get past the following assert with: commit 1523ed9e1d46b0b54540049d491475ccac7e6421 Author: Jan Kiszka jan.kis...@siemens.com Date: Thu May 17 10:32:39 2012 -0300

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 02:41 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:30:49PM +0300, Avi Kivity wrote: On 08/13/2012 02:12 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually this is overkill.

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Avi Kivity
On 08/13/2012 02:43 PM, Gleb Natapov wrote: MSI does not have shorthand, so it is simpler but the code above does work for APIC_DFR_CLUSTER as far as I can tell and it does not check lowest prio, which is not multicast, but should bot be cached. It also a little bit pessimistic for logical

[PATCH] KVM: VMX: Advertize RDTSC exiting to nested guests

2012-08-13 Thread Avi Kivity
All processors that support VMX have that feature, and guests (Xen) depend on it. As we already implement it, advertize it to the guest. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-13 Thread Fred .
Add a comment about it in the source code. -#define PM_TIMER_FREQUENCY 3579545 +#define PM_TIMER_FREQUENCY 3579545 // 3.579545 MHz clock required by ACPI spec. On Mon, Aug 13, 2012 at 12:46 PM, Gleb Natapov g...@redhat.com wrote: On Mon, Aug 13, 2012 at 12:37:11PM +0200, Gerd Hoffmann wrote:

Re: [RFC PATCH 0/2] irq destination caching prototype

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 02:41:47PM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:30:49PM +0300, Avi Kivity wrote: On 08/13/2012 02:12 PM, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 02:03:51PM +0300, Avi Kivity wrote: On 08/13/2012 02:01 PM, Gleb Natapov wrote: Actually

[PATCH] add acpi pmtimer support

2012-08-13 Thread Gerd Hoffmann
This patch makes seabios use the acpi pmtimer instead of tsc for timekeeping. The pmtimer has a fixed frequency and doesn't need calibration, thus it doesn't suffer from calibration errors due to a loaded host machine. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- src/clock.c | 29

Re: [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip

2012-08-13 Thread Jan Kiszka
On 2012-08-12 11:24, Michael Tokarev wrote: On 12.08.2012 12:10, Gleb Natapov wrote: [] Any chance to bisect it? The bisecion leads to this commit: commit 17ee47418e65b1593defb30edbab33ccd47fc1f8 Merge: 13b0496 5d17c0d Author: Jan Kiszka jan.kis...@siemens.com Date: Tue Apr 10

Re: [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip

2012-08-13 Thread Michael Tokarev
On 13.08.2012 17:07, Jan Kiszka wrote: [] The bisecion leads to this commit: commit 17ee47418e65b1593defb30edbab33ccd47fc1f8 Merge: 13b0496 5d17c0d Author: Jan Kiszka jan.kis...@siemens.com Date: Tue Apr 10 16:26:23 2012 +0200 Merge commit '5d17c0d2df4998598e6002b27b8e47e792899a0f'

[PATCH 0/2] KVM: PPC: Assorted 440 fixes

2012-08-13 Thread Alexander Graf
With these patches, I get at least shortly into a KVM guest on 440. It fails for me later on, but I'm quite sure that's an orthogonal issue. Alexander Graf (2): KVM: PPC: 44x: Initialize PVR KVM: PPC: BookE: Add MCSR SPR support arch/powerpc/kvm/44x.c |1 +

[PATCH 1/2] KVM: PPC: 44x: Initialize PVR

2012-08-13 Thread Alexander Graf
We need to make sure that vcpu-arch.pvr is initialized to a sane value, so let's just take the host PVR. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/44x.c b/arch/powerpc/kvm/44x.c

[PATCH 2/2] KVM: PPC: BookE: Add MCSR SPR support

2012-08-13 Thread Alexander Graf
Add support for the MCSR SPR. This only implements the SPR storage bits, not actual machine checks. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke_emulate.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/booke_emulate.c

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Anthony Liguori
Alex Williamson alex.william...@redhat.com writes: VFIO kernel support was just merged into Linux, so I'd like to formally propose inclusion of the QEMU vfio-pci driver for QEMU 1.2. Included here is support for x86 PCI device assignment. PCI INTx is not yet enabled, but devices making use

Re: [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip

2012-08-13 Thread Jan Kiszka
On 2012-08-13 15:16, Michael Tokarev wrote: On 13.08.2012 17:07, Jan Kiszka wrote: [] The bisecion leads to this commit: commit 17ee47418e65b1593defb30edbab33ccd47fc1f8 Merge: 13b0496 5d17c0d Author: Jan Kiszka jan.kis...@siemens.com Date: Tue Apr 10 16:26:23 2012 +0200 Merge

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Avi Kivity
On 08/13/2012 04:27 PM, Anthony Liguori wrote: Thanks for pushing this forward! Hopefully this will finally kill off qemu-kvm.git for good. No, it won't. vfio requires a 3.6 kernel, which we cannot assume anyone has. We'll need the original device assignment code side-by-side. -- error

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Jan Kiszka
On 2012-08-13 15:58, Avi Kivity wrote: On 08/13/2012 04:27 PM, Anthony Liguori wrote: Thanks for pushing this forward! Hopefully this will finally kill off qemu-kvm.git for good. No, it won't. vfio requires a 3.6 kernel, which we cannot assume anyone has. We'll need the original device

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: Alex Williamson alex.william...@redhat.com writes: VFIO kernel support was just merged into Linux, so I'd like to formally propose inclusion of the QEMU vfio-pci driver for QEMU 1.2. Included here is support for x86 PCI device

Re: [PATCH repost] kvm: drop parameter validation

2012-08-13 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 01:43:58PM +0300, Michael S. Tsirkin wrote: We validate irq pin number when routing is setup, so code handling illegal irq # in pic and ioapic on each injection is never called. Drop it. I would leave BUG_ON there for a while. Signed-off-by: Michael S. Tsirkin

Re: [PATCHv5 0/4] improve speed of rep ins emulation

2012-08-13 Thread Richard W.M. Jones
On Mon, Jul 30, 2012 at 05:38:17PM +0300, Gleb Natapov wrote: And now for something completely different. So this series (or rather the last patch of it) takes different approach to rep ins optimization. Instead of writing separate fast path for it do the fast path inside emulator itself.

[Bug 16630] New: Intermittently fails to start VM.

2012-08-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=16630 Summary: Intermittently fails to start VM. Product: Virtualization Version: unspecified Kernel Version: 2.6.18-164.el5 Platform: All OS/Version: Linux Tree: Mainline

[Bug 16631] Intermittently fails to start VM.

2012-08-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=16631 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|NEW |RESOLVED

[Bug 17591] kvm hangs when resuming guest (deadlock?)

2012-08-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=17591 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|NEW |RESOLVED

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Andreas Hartmann
Alex Williamson wrote: On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: Alex Williamson alex.william...@redhat.com writes: VFIO kernel support was just merged into Linux, so I'd like to formally propose inclusion of the QEMU vfio-pci driver for QEMU 1.2. Included here is support

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 17:48 +0200, Andreas Hartmann wrote: Alex Williamson wrote: On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: Alex Williamson alex.william...@redhat.com writes: VFIO kernel support was just merged into Linux, so I'd like to formally propose inclusion of the

[Bug 17902] qemu/kvm seem to cause warning or panic

2012-08-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=17902 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|NEW |RESOLVED

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly

2012-08-13 Thread Marcelo Tosatti
On Sat, Aug 11, 2012 at 10:37:54AM +1000, Paul Mackerras wrote: On Fri, Aug 10, 2012 at 03:35:53PM -0300, Marcelo Tosatti wrote: There's no plan. I just wanted to confirm this before converting to per-memslot flush. 1) __kvm_set_memory_region line 807: * -

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Andreas Hartmann
Alex Williamson schrieb: On Mon, 2012-08-13 at 17:48 +0200, Andreas Hartmann wrote: Alex Williamson wrote: On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: Alex Williamson alex.william...@redhat.com writes: VFIO kernel support was just merged into Linux, so I'd like to formally

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Sun, 2012-08-12 at 10:49 +0300, Michael S. Tsirkin wrote: On Wed, Aug 01, 2012 at 01:06:42PM -0600, Alex Williamson wrote: On Mon, 2012-07-30 at 19:12 -0600, Alex Williamson wrote: On Tue, 2012-07-31 at 03:36 +0300, Michael S. Tsirkin wrote: On Mon, Jul 30, 2012 at 06:26:31PM -0600,

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 18:36 +0200, Andreas Hartmann wrote: Alex Williamson schrieb: On Mon, 2012-08-13 at 17:48 +0200, Andreas Hartmann wrote: Alex Williamson wrote: On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: Alex Williamson alex.william...@redhat.com writes: VFIO

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 10:48:15AM -0600, Alex Williamson wrote: On Sun, 2012-08-12 at 10:49 +0300, Michael S. Tsirkin wrote: On Wed, Aug 01, 2012 at 01:06:42PM -0600, Alex Williamson wrote: On Mon, 2012-07-30 at 19:12 -0600, Alex Williamson wrote: On Tue, 2012-07-31 at 03:36 +0300,

Re: [PATCH 2/4] s390: Add a mechanism to get the subchannel id.

2012-08-13 Thread Sebastian Ott
On Tue, 7 Aug 2012, Cornelia Huck wrote: This will be needed by the new virtio-ccw transport. We already have ccw_device_get_subchannel_id which is currently used by qdio only and thus buried in an internal header file. So it would be better to just clean up this one and make it available to

[PATCH] kvm tools: Fix segfault on lkvm run

2012-08-13 Thread Paul Neumann
The errors from kvm_cmd_run_init() are not handled properly as they are returned as positive values. Signed-off-by: Paul Neumann paul1...@yahoo.de --- tools/kvm/builtin-run.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c

Re: [PATCH] powerpc/epapr: export epapr_hypercall_start

2012-08-13 Thread Scott Wood
On 08/11/2012 08:07 AM, Tabi Timur-B04825 wrote: On Sat, Aug 11, 2012 at 2:01 AM, Geert Uytterhoeven ge...@linux-m68k.org wrote: On Sat, Aug 11, 2012 at 12:21 AM, Scott Wood scottw...@freescale.com wrote: +EXPORT_SYMBOL(epapr_hypercall_start); EXPORT_SYMBOL_GPL? We prefer EXPORT_SYMBOL.

Re: [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 02:06:10PM +0200, Jan Kiszka wrote: On 2012-08-13 10:35, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This is required to get past the following assert with: commit 1523ed9e1d46b0b54540049d491475ccac7e6421 Author: Jan Kiszka

Re: [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-13 Thread Jan Kiszka
On 2012-08-13 20:03, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 02:06:10PM +0200, Jan Kiszka wrote: On 2012-08-13 10:35, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This is required to get past the following assert with: commit

Re: vhost-scsi port to v1.1.0 + MSI-X performance regression

2012-08-13 Thread Michael S. Tsirkin
On Tue, Jul 24, 2012 at 01:20:56PM -0700, Nicholas A. Bellinger wrote: On Tue, 2012-07-24 at 09:57 +0200, Jan Kiszka wrote: On 2012-07-24 09:42, Nicholas A. Bellinger wrote: Hi Anthony, Stefan QEMU folks, SNIP However, thus far I've not been able to get virtio-scsi - tcm_vhost

Re: [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 08:06:17PM +0200, Jan Kiszka wrote: On 2012-08-13 20:03, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 02:06:10PM +0200, Jan Kiszka wrote: On 2012-08-13 10:35, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This is required to get

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 19:59 +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 10:48:15AM -0600, Alex Williamson wrote: On Sun, 2012-08-12 at 10:49 +0300, Michael S. Tsirkin wrote: On Wed, Aug 01, 2012 at 01:06:42PM -0600, Alex Williamson wrote: On Mon, 2012-07-30 at 19:12 -0600,

[PATCH uq/master] kvm: i8254: Finish time conversion fix

2012-08-13 Thread Jan Kiszka
0cdd3d1444 fixed reading back the counter load time from the kernel while assuming the kernel would always update its load time on writing the state. That is only true for channel 1, and so pit_get_channel_info returned wrong output pin states for high counter values. Fix this by applying the

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-13 Thread Marcelo Tosatti
On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Andreas Hartmann
Alex Williamson wrote: On Mon, 2012-08-13 at 18:36 +0200, Andreas Hartmann wrote: [...] If I'm using your qemu instead of qemu from kvm-0.15 (opensuse package), this error comes up when passing through a PCIe device, which works absolutely fine with kvm 0.15. I would have expected, that your

Re: [PATCH uq/master] kvm: i8254: Finish time conversion fix

2012-08-13 Thread Michael Tokarev
On 13.08.2012 22:18, Jan Kiszka wrote: 0cdd3d1444 fixed reading back the counter load time from the kernel while assuming the kernel would always update its load time on writing the state. That is only true for channel 1, and so pit_get_channel_info returned wrong output pin states for high

  1   2   >