[PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Sheng Yang
This patch enable per-vector mask for assigned devices using MSI-X. This patch provided two new APIs: one is for guest to specific device's MSI-X table address in MMIO, the other is for userspace to get information about mask bit. All the mask bit operation are kept in kernel, in order to

Re: [PATCH 2/3] KVM: MMU: don not retry #PF for nonpaging guest

2010-11-05 Thread Gleb Natapov
On Fri, Nov 05, 2010 at 01:39:18PM +0800, Xiao Guangrong wrote: On 11/04/2010 06:35 PM, Gleb Natapov wrote: On Thu, Nov 04, 2010 at 06:32:42PM +0800, Xiao Guangrong wrote: nonpaing guest's 'direct_map' is also true, retry #PF for those guests is useless, so use 'tdp_enabled' instead

Re: [PATCH 2/3] KVM: MMU: don not retry #PF for nonpaging guest

2010-11-05 Thread Xiao Guangrong
On 11/05/2010 03:45 PM, Gleb Natapov wrote: It looks like something broken: apfs can generated in L2 guest (nested ntp guest) and be retried in L1 guest. Why is this a problem? apf will be generate on direct map even when L2 guest is running so it should be OK to prefault it into direct

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 10:44:19AM +0800, Sheng Yang wrote: +}; + +This ioctl would enable in-kernel MSI-X emulation, which would handle MSI-X +mask bit in the kernel. What happens on repeated calls when it's already enabled? How does one disable after it's enabled? Suppose

Re: [V2 PATCH] virtio-net: init link state correctly

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 10:50:08AM +0800, Jason Wang wrote: For device that supports VIRTIO_NET_F_STATUS, there's no need to assume the link is up and we need to call nerif_carrier_off() before querying device status, otherwise we may get wrong operstate after diver was loaded because the link

Re: [V2 PATCH] virtio-net: init link state correctly

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 11:00:53AM +0800, Jason Wang wrote: Jason Wang writes: CC netdev missed in the original patch. You'll have to repost it properly. Patches with a at start can't be applied :) You can add my ack when you do. For device that supports VIRTIO_NET_F_STATUS, there's no

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 03:16:23PM +0800, Sheng Yang wrote: This patch enable per-vector mask for assigned devices using MSI-X. This patch provided two new APIs: one is for guest to specific device's MSI-X table address in MMIO, the other is for userspace to get information about mask bit.

Re: [PATCH 1/3] qemu-kvm: Ioctl for in-kernel mask support

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 10:59:23AM +0800, Sheng Yang wrote: We are trying to move away from using ifdefs. Stub these out instead? Example? 37859f054986fab6b4094cd5950266ae56a6ca6a and 889e30cc18e21f2091b77267dca8096d7dd34f8b that depends on it. -- regards Yang, Sheng -- To unsubscribe

Re: [PATCH 3/3] qemu-kvm: device assignment: emulate MSI-X mask bits

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 11:14:48AM +0800, Sheng Yang wrote: On Thursday 04 November 2010 18:04:08 Michael S. Tsirkin wrote: On Thu, Nov 04, 2010 at 02:18:21PM +0800, Sheng Yang wrote: This patch emulated MSI-X per vector mask bit on assigned device. Signed-off-by: Sheng Yang

Re: [PATCH 3/3] qemu-kvm: device assignment: emulate MSI-X mask bits

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 11:20:37AM +0800, Sheng Yang wrote: On Thursday 04 November 2010 17:44:27 Michael S. Tsirkin wrote: Thanks very much for reviewing this! Seems nobody cares about userspace one before... On Thu, Nov 04, 2010 at 02:18:21PM +0800, Sheng Yang wrote: This patch

Disk I/O stuck with KVM - no clue what to do

2010-11-05 Thread Hermann Himmelbauer
Hi, As already posted, I experience disk I/O stucks with KVM, which make the guest systems alsmost unusable. These stucks come periodically, e.g. every 2 to 10 seconds and last between 3 and sometimes over 120 seconds, which trigger kernel messages like this: INFO: task postgres:2195 blocked

[RESEND PATCH] virtio-net: init link state correctly

2010-11-05 Thread Jason Wang
For device that supports VIRTIO_NET_F_STATUS, there's no need to assume the link is up and we need to call nerif_carrier_off() before querying device status, otherwise we may get wrong operstate after diver was loaded because the link watch event was not fired as expected. For device that does

Re: [PATCH 2/3] KVM: MMU: don not retry #PF for nonpaging guest

2010-11-05 Thread Gleb Natapov
On Fri, Nov 05, 2010 at 04:03:28PM +0800, Xiao Guangrong wrote: On 11/05/2010 03:45 PM, Gleb Natapov wrote: It looks like something broken: apfs can generated in L2 guest (nested ntp guest) and be retried in L1 guest. Why is this a problem? apf will be generate on direct map even

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Sheng Yang
On Friday 05 November 2010 16:43:33 Michael S. Tsirkin wrote: On Fri, Nov 05, 2010 at 10:44:19AM +0800, Sheng Yang wrote: +}; + +This ioctl would enable in-kernel MSI-X emulation, which would handle MSI-X +mask bit in the kernel. What happens on repeated calls when it's

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Sheng Yang
On Friday 05 November 2010 16:51:33 Michael S. Tsirkin wrote: On Fri, Nov 05, 2010 at 03:16:23PM +0800, Sheng Yang wrote: This patch enable per-vector mask for assigned devices using MSI-X. This patch provided two new APIs: one is for guest to specific device's MSI-X table address in

Re: [PATCH 3/3] qemu-kvm: device assignment: emulate MSI-X mask bits

2010-11-05 Thread Sheng Yang
On Friday 05 November 2010 17:05:32 Michael S. Tsirkin wrote: On Fri, Nov 05, 2010 at 11:20:37AM +0800, Sheng Yang wrote: On Thursday 04 November 2010 17:44:27 Michael S. Tsirkin wrote: Thanks very much for reviewing this! Seems nobody cares about userspace one before... On Thu,

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Sheng Yang
On Friday 05 November 2010 18:53:50 Sheng Yang wrote: On Friday 05 November 2010 16:43:33 Michael S. Tsirkin wrote: On Fri, Nov 05, 2010 at 10:44:19AM +0800, Sheng Yang wrote: +}; + +This ioctl would enable in-kernel MSI-X emulation, which would handle MSI-X +mask bit in the

Re: [Cbe-oss-dev] [PATCH 03/49] arch/powerpc: Use vzalloc

2010-11-05 Thread Jeremy Kerr
Hi Joe, diff --git a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c index a101abf..3b894f5 100644 --- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c +++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c @@ -36,10 +36,9 @@ static int

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 06:53:50PM +0800, Sheng Yang wrote: On Friday 05 November 2010 16:43:33 Michael S. Tsirkin wrote: On Fri, Nov 05, 2010 at 10:44:19AM +0800, Sheng Yang wrote: +}; + +This ioctl would enable in-kernel MSI-X emulation, which would handle MSI-X +mask bit

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 08:01:53PM +0800, Sheng Yang wrote: Go back to me if someone want to implement MSI device assignment on big-endian machine. Sorry, just realized it's very likely that I don't have an big endian machine to test it even at that time... I think it's really should

Re: [PATCH 3/3] qemu-kvm: device assignment: emulate MSI-X mask bits

2010-11-05 Thread Michael S. Tsirkin
On Fri, Nov 05, 2010 at 07:02:02PM +0800, Sheng Yang wrote: On Friday 05 November 2010 17:05:32 Michael S. Tsirkin wrote: On Fri, Nov 05, 2010 at 11:20:37AM +0800, Sheng Yang wrote: On Thursday 04 November 2010 17:44:27 Michael S. Tsirkin wrote: Thanks very much for reviewing this!

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-05 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 03:22:50PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 09:46:57AM +0100, Markus Armbruster wrote: But why order of device creation is important? It shouldn't be if we want to

Re: [Qemu-devel] [PATCHv2 1/8] Introduce deriver_name field to DeviceInfo structure.

2010-11-05 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 03:58:03PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 10:20:18AM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: Add deriver_name to DeviceInfo to use

Re: [Qemu-devel] [PATCHv2 1/8] Introduce deriver_name field to DeviceInfo structure.

2010-11-05 Thread Gleb Natapov
On Fri, Nov 05, 2010 at 03:14:20PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 03:58:03PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 10:20:18AM +0100, Markus Armbruster wrote: Gleb

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-05 Thread Gleb Natapov
On Fri, Nov 05, 2010 at 03:04:05PM +0100, Markus Armbruster wrote: [skip] Passing bus numbers explicitly isn't hard either. Programmer is free to pass nonsensical numbers. For the most common case of one bus, the bus number parameter is just noise. If programmer makes an error this is a

Re: [Qemu-devel] [PATCHv2 1/8] Introduce deriver_name field to DeviceInfo structure.

2010-11-05 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: On Fri, Nov 05, 2010 at 03:14:20PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 03:58:03PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 10:20:18AM

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-05 Thread Markus Armbruster
Gleb Natapov g...@redhat.com writes: On Fri, Nov 05, 2010 at 03:04:05PM +0100, Markus Armbruster wrote: [...] There has been quite some discussion on canonical path on the list, but no consensus. Ironically, one of the places where we got stuck was ISA. You cut right through that, so

Disk I/O stuck with KVM - no clue how to solve that

2010-11-05 Thread Hermann Himmelbauer
Hi, I already tried to get some help on the KVM list for my problem but had no success, so the problem could be not KVM related at all, therefore maybe someone here has an idea: I experience strange disk I/O stucks on my Linux Host + Guest with KVM, which make the system (especially the

[PATCH 1/2] vfio: Fix config space virtualization

2010-11-05 Thread Alex Williamson
We're currently masking out virtualized bits when updating both physical device registers and vconfig. I think we really want vconfig to track virtualized bits, otherwise they're not much different that unwritable bits. Signed-off-by: Alex Williamson alex.william...@redhat.com ---

[PATCH 0/2] vfio: virtualize INTX_DISABLE

2010-11-05 Thread Alex Williamson
Tom, Since we use INTX_DISABLE internally for PCI 2.3 devices, it's probably not a good idea to allow vfio users direct access to it. In trying to virtualize it, I stumbled on some config space virtualization issues. I think we want vconfig and the value written to hardware to be different when

[PATCH 2/2] vfio: Virtualize PCI_COMMAND_INTX_DISABLE

2010-11-05 Thread Alex Williamson
As we use this internally for interrupt control, it's dangerous to let the user manipulate it. Instead, virtualize it. Also, de-assert INTX_DISABLE when device is opened, the device reset doesn't seem to clear this. Signed-off-by: Alex Williamson alex.william...@redhat.com ---

Re: [Qemu-devel] [PATCHv2 1/8] Introduce deriver_name field to DeviceInfo structure.

2010-11-05 Thread Gleb Natapov
On Fri, Nov 05, 2010 at 05:24:01PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Fri, Nov 05, 2010 at 03:14:20PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Thu, Nov 04, 2010 at 03:58:03PM +0100, Markus Armbruster wrote: Gleb

Re: [Qemu-devel] [PATCHv2 4/8] Store IDE bus id in IDEBus structure for easy access.

2010-11-05 Thread Gleb Natapov
On Fri, Nov 05, 2010 at 05:31:38PM +0100, Markus Armbruster wrote: Gleb Natapov g...@redhat.com writes: On Fri, Nov 05, 2010 at 03:04:05PM +0100, Markus Armbruster wrote: [...] There has been quite some discussion on canonical path on the list, but no consensus. Ironically, one of

[RFC PATCH v2] VFIO based device assignment

2010-11-05 Thread Alex Williamson
This is an update to the original QEMU VFIO driver I sent several months ago. Since then, I've ported it to the qemu-kvm.git tree, and back, incorporated common msix and msi code, added irqfd support, created an irqfd-like mechanism for EOIs, and likely numerous other things that I've forgotten.

Re: kvm unhandled exit 4400

2010-11-05 Thread Michael Tokarev
[Replying to my own email] 04.11.2010 00:16, Michael Tokarev wrote: 03.11.2010 22:44, Khaled El Mously wrote: The host kernel is on Ubuntu: 2.6.32-25-generic The guest kernel is 2.6.34-something. I have figured out what the problem is. When I first attempted to run kvm, it said access to

Re: [PATCH 0/5 v3] MSI-X mask supporting for assigned device(kernel)

2010-11-05 Thread Marcelo Tosatti
On Thu, Nov 04, 2010 at 02:15:16PM +0800, Sheng Yang wrote: Here is the latest series of MSI-X mask supporting patches. The bigest change from last version is, in order to reduce the complexity, I moved all mask bit operation to kernel, including disabled entries. This addressed two

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Marcelo Tosatti
On Fri, Nov 05, 2010 at 06:53:50PM +0800, Sheng Yang wrote: On Friday 05 November 2010 16:43:33 Michael S. Tsirkin wrote: On Fri, Nov 05, 2010 at 10:44:19AM +0800, Sheng Yang wrote: +}; + +This ioctl would enable in-kernel MSI-X emulation, which would handle MSI-X +mask bit

[GIT PULL] KVM updates for 2.6.37-rc1

2010-11-05 Thread Marcelo Tosatti
Linus, please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/2.6.37 To receive the following updates: Jan Kiszka (1): KVM: x86: Issue smp_call_function_many with preemption disabled Marcelo Tosatti (1): KVM: MMU: fix rmap_remove on non present sptes

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

2010-11-05 Thread Marcelo Tosatti
The following changes since commit d33ea50a958b2e050d2b28e5f17e3b55e91c6d74: scsi-disk: Fix immediate failure of bdrv_aio_* (2010-11-04 13:54:37 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Gleb Natapov (1): Add support

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

2010-11-05 Thread Marcelo Tosatti
The following changes since commit d33ea50a958b2e050d2b28e5f17e3b55e91c6d74: scsi-disk: Fix immediate failure of bdrv_aio_* (2010-11-04 13:54:37 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Gleb Natapov (1): Add support

[PATCH 1/1] Add support for async page fault to qemu

2010-11-05 Thread Marcelo Tosatti
From: Gleb Natapov g...@redhat.com Add save/restore of MSR for migration and cpuid bit. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- target-i386/cpu.h |1 + target-i386/cpuid.c |2 +- target-i386/kvm.c | 14 ++

[PATCH 1/1] Add support for async page fault to qemu

2010-11-05 Thread Marcelo Tosatti
From: Gleb Natapov g...@redhat.com Add save/restore of MSR for migration and cpuid bit. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- target-i386/cpu.h |1 + target-i386/cpuid.c |2 +- target-i386/kvm.c | 14 ++

Re: kvm unhandled exit 4400

2010-11-05 Thread Khaled El Mously
On Sat, Nov 06, 2010 at 01:32:20AM +0300, Michael Tokarev wrote: [Replying to my own email] 04.11.2010 00:16, Michael Tokarev wrote: 03.11.2010 22:44, Khaled El Mously wrote: The host kernel is on Ubuntu: 2.6.32-25-generic The guest kernel is 2.6.34-something. I have figured out

[PATCH 1/1] virt: ack_flush() function removed for lack of apparent use 2.6.37-rc1

2010-11-05 Thread André Luis Pereira dos Santos - BSRSoft
Hello Ack_flush function () is not used anywhere in the code and apparently has no function currently defined. Unless there are plans to use it in the future, I took it out via this patch code for readability. Signed-off-by: Andre Luis Pereira dos Santos an...@bsrsoft.com.br ---

Re: [Qemu-devel] qemu-kvm build issue on RHEL5.1

2010-11-05 Thread Hidetoshi Seto
(2010/11/05 2:03), Chris Wright wrote: * Hidetoshi Seto (seto.hideto...@jp.fujitsu.com) wrote: (2010/10/14 4:11), Blue Swirl wrote: On Wed, Oct 13, 2010 at 8:00 AM, Hidetoshi Seto seto.hideto...@jp.fujitsu.com wrote: (Add CC to k...@vger) (2010/10/12 10:52), Hao, Xudong wrote: Hi,

[PATCH] virtio-9p: fix build on !CONFIG_UTIMENSAT v2

2010-11-05 Thread Hidetoshi Seto
This patch introduce a fallback mechanism for old systems that do not support utimensat. This will fix build failure with following warnings: hw/virtio-9p-local.c: In function 'local_utimensat': hw/virtio-9p-local.c:479: warning: implicit declaration of function 'utimensat'

Re: [Cbe-oss-dev] [PATCH 03/49] arch/powerpc: Use vzalloc

2010-11-05 Thread Jeremy Kerr
Hi Joe, diff --git a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c index a101abf..3b894f5 100644 --- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c +++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c @@ -36,10 +36,9 @@ static int