Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-01-31 Thread Paul E. McKenney
On Tue, Jan 31, 2012 at 02:50:07PM +0100, Peter Zijlstra wrote: On Tue, 2012-01-31 at 15:47 +0200, Avi Kivity wrote: They really need to return quickly to userspace, and they really need to perform some operation between rcu_assign_pointer() and returning, so no. Bugger :/

Re: Unable to start a guest using qemu-kvm directly

2012-01-31 Thread Vinod Chegu
Michael Tokarev mjt at tls.msk.ru writes: You need to understand how to (pre-)configure networking for qemu (pre- if you want to run it as non-root), this is described in the users guide and in a lot of howtos all around the 'net. /mjt Thanks! I was able to find the needed info to

Re: [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Anthony Liguori
On 01/31/2012 04:05 PM, Jan Kiszka wrote: On 2012-01-31 22:02, Anthony Liguori wrote: On 01/31/2012 11:41 AM, Jan Kiszka wrote: In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ 8 but keeps track of the RTC output level and applies it when legacy mode is turned off again.

Re: [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Jan Kiszka
On 2012-01-31 23:38, Anthony Liguori wrote: On 01/31/2012 04:05 PM, Jan Kiszka wrote: On 2012-01-31 22:02, Anthony Liguori wrote: On 01/31/2012 11:41 AM, Jan Kiszka wrote: In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ 8 but keeps track of the RTC output level and

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Anthony Liguori
On 01/31/2012 04:00 PM, Jan Kiszka wrote: On 2012-01-31 21:49, Anthony Liguori wrote: On 01/31/2012 11:41 AM, Jan Kiszka wrote: Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. Signed-off-by: Jan

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Jan Kiszka
On 2012-01-31 23:40, Anthony Liguori wrote: On 01/31/2012 04:00 PM, Jan Kiszka wrote: On 2012-01-31 21:49, Anthony Liguori wrote: On 01/31/2012 11:41 AM, Jan Kiszka wrote: Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance.

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Anthony Liguori
On 01/31/2012 04:48 PM, Jan Kiszka wrote: On 2012-01-31 23:40, Anthony Liguori wrote: Why is what's in the tree not usable? Just don't do pcspk_init as a static inline (which is not that nice to do anyway) and you don't need to worry about the availability of an accessor. The current pattern

vCPU hotplug

2012-01-31 Thread Vinod Chegu
Dear All, I am using version 1.0 of qemu-kvm along with 3.2.x host+guest kernels on an X86_64 server. I was unable to trigger a hotplug of a vCPU from the qemu's monitor prompt (tripped over an assertion in qemu). Tried to look through the recent archives and noticed a couple of proposed

Re: VMXON region vs VMCS region?

2012-01-31 Thread Zhi Yong Wu
On Tue, Jan 31, 2012 at 8:29 PM, Orit Wasserman owass...@redhat.com wrote: On 01/31/2012 05:35 AM, Zhi Yong Wu wrote: HI, Can anyone let me know know the difference  between VMXON region and VMCS region? relationship? There is no relationship between them: VMXON region is created per

[PATCH] kvm tools: Fix segfault when failing to initialize KVM

2012-01-31 Thread Sasha Levin
Might happen when hardware virtualization is not supported. Reported-by: Ingo Molnar mi...@elte.hu Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/kvm/builtin-run.c

Re: [PATCH V4 2/7] kvm tools: Generate SPAPR PPC64 guest device tree

2012-01-31 Thread David Gibson
On Tue, Jan 31, 2012 at 05:34:37PM +1100, Matt Evans wrote: The generated DT is the bare minimum structure required for SPAPR (on which subsequent patches for VIO, XICS, PCI etc. will build); root node, cpus, memory. The DT contains CPU-specific configuration; a very simple 'cpu info'

Re: [PATCH V4 6/7] kvm tools: Add PPC64 PCI Host Bridge

2012-01-31 Thread David Gibson
On Tue, Jan 31, 2012 at 05:34:41PM +1100, Matt Evans wrote: This provides the PCI bridge, definitions for the address layout of the windows and wires in IRQs. Once PCI devices are all registered, they are enumerated and DT nodes generated for each. Signed-off-by: Matt Evans

Re: [PATCH V4 2/7] kvm tools: Generate SPAPR PPC64 guest device tree

2012-01-31 Thread Alexey Kardashevskiy
On 01/02/12 14:39, David Gibson wrote: On Tue, Jan 31, 2012 at 05:34:37PM +1100, Matt Evans wrote: The generated DT is the bare minimum structure required for SPAPR (on which subsequent patches for VIO, XICS, PCI etc. will build); root node, cpus, memory. The DT contains CPU-specific

Re: [PATCH V4 6/7] kvm tools: Add PPC64 PCI Host Bridge

2012-01-31 Thread Alexey Kardashevskiy
On 01/02/12 14:40, David Gibson wrote: On Tue, Jan 31, 2012 at 05:34:41PM +1100, Matt Evans wrote: This provides the PCI bridge, definitions for the address layout of the windows and wires in IRQs. Once PCI devices are all registered, they are enumerated and DT nodes generated for each.

Re: [PATCH 3/9] pci-assign: Update MSI-X MMIO to Memory API

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 14:13 -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 14:45 +0200, Avi Kivity wrote: On 01/28/2012 04:21 PM, Alex Williamson wrote: Stop using compatibility mode and at the same time fix available access sizes. The PCI spec indicates that the MSI-X table may

RFC: Device isolation groups

2012-01-31 Thread David Gibson
This patch series introduces a new infrastructure to the driver core for representing device isolation groups. That is, groups of devices which can be isolated in such a way that the rest of the system can be protected from them, even in the presence of userspace or a guest OS directly driving

[PATCH 3/3] device_isolation: Support isolation on POWER p7ioc (IODA) bridges

2012-01-31 Thread David Gibson
This patch adds code to the code for the powernv platform to create and populate isolation groups on hardware using the p7ioc (aka IODA) PCI host bridge used on some IBM POWER systems. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: David Gibson da...@gibson.dropbear.id.au ---

[PATCH 2/3] device_isolation: Support isolation on POWER p5ioc2 bridges

2012-01-31 Thread David Gibson
This patch adds code to the code for the powernv platform to create and populate isolation groups on hardware using the p5ioc2 PCI host bridge used on some IBM POWER systems. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: David Gibson da...@gibson.dropbear.id.au ---

[PATCH 1/3] Device isolation group infrastructure (v3)

2012-01-31 Thread David Gibson
In order to safely drive a device with a userspace driver, or to pass it through to a guest system, we must first make sure that the device is isolated in such a way that it cannot interfere with other devices on the system. This isolation is only available on some systems and will generally

[PATCH v2 0/8] pci-assign: better MSI-X table support

2012-01-31 Thread Alex Williamson
This series enables better runtime MSI-X table support so that we can track vector updates for routing, enabling guest interrupt smp_affinity, as well as vectors setup after the MSI-X PCI capability is enabled, allowing for MSI-X on devices assigned to FreeBSD guests. Thanks, Alex v2: -

[PATCH v2 1/8] pci-assign: Fix warnings with DEBUG enabled

2012-01-31 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 7f4a5ec..d82f274 100644 --- a/hw/device-assignment.c +++

[PATCH v2 2/8] pci-assign: Update MSI-X MMIO to Memory API

2012-01-31 Thread Alex Williamson
Stop using compatibility mode and at the same time fix available access sizes. The PCI spec indicates that the MSI-X table may only be accessed as DWORD or QWORD. 8-byte accesses are still getting split in exec.c, but this will pre-enable it. Signed-off-by: Alex Williamson

[PATCH v2 3/8] pci-assign: Use struct for MSI-X table

2012-01-31 Thread Alex Williamson
This makes access much easier. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 55 ++-- hw/device-assignment.h |9 +++- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git

[PATCH v2 4/8] pci-assign: Only calculate maximum MSI-X vector entries once

2012-01-31 Thread Alex Williamson
We'll use this in a few more places for reseting the MSI-X table and ignoring certain accesses, so it seems worth two bytes to not recalculate all the time. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 17 +++-- hw/device-assignment.h |

[PATCH v2 5/8] pci-assign: Proper initialization for MSI-X table

2012-01-31 Thread Alex Williamson
Per the PCI spec, all vectors should be masked at handoff. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 20 +++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index

[PATCH v2 6/8] pci-assign: Allocate entries for all MSI-X vectors

2012-01-31 Thread Alex Williamson
We still only initialize the number used in the host. This lets us do direct access based on MSI-X table offset on write without needing to translate between physical vector space and initalized vector space. It's expected that guests will typically use the majority of the available vectors, so

[PATCH v2 7/8] pci-assign: Use MSIX_PAGE_SIZE

2012-01-31 Thread Alex Williamson
We've already got it defined, use it. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index fe10a23..71685ee 100644 ---

[PATCH v2 8/8] pci-assign: Update MSI-X config based on table writes

2012-01-31 Thread Alex Williamson
When a guest enables MSI-X in PCI configuration space we walk through the MSI-X vector table trying to guess what might get used. We have to guess because we don't do anything with writes to the vector table, so we look for clues ahead of time to pre-enable the vectors we think will be used.

Re: [PATCH] kvm tools: Fix segfault when failing to initialize KVM

2012-01-31 Thread Pekka Enberg
On Tue, 31 Jan 2012, Sasha Levin wrote: Might happen when hardware virtualization is not supported. Reported-by: Ingo Molnar mi...@elte.hu Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

Partial review of kvm arm git patches.

2012-01-31 Thread Rusty Russell
Hi all, Started reading through the git tree at git://github.com/virtualopensystems/linux-kvm-arm.git (kvm-a15-v6-stage branch), and noticed some things. I'm learning ARM as I go, so apologies in advance for any dumb questions. Psuedo-quoted below:

Re: [PATCH] kvm tools: Fix segfault when failing to initialize KVM

2012-01-31 Thread Cyrill Gorcunov
On Wed, Feb 01, 2012 at 09:05:34AM +0200, Pekka Enberg wrote: On Tue, 31 Jan 2012, Sasha Levin wrote: Might happen when hardware virtualization is not supported. Reported-by: Ingo Molnar mi...@elte.hu Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c |4

Re: [PATCH v2 8/8] pci-assign: Update MSI-X config based on table writes

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 10:33:14PM -0700, Alex Williamson wrote: When a guest enables MSI-X in PCI configuration space we walk through the MSI-X vector table trying to guess what might get used. We have to guess because we don't do anything with writes to the vector table, so we look for

Re: [PATCH v2 8/8] pci-assign: Update MSI-X config based on table writes

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 10:33:14PM -0700, Alex Williamson wrote: @@ -1438,11 +1448,71 @@ static void msix_mmio_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) { AssignedDevice *adev = opaque; +PCIDevice *pdev = adev-dev; +

Re: [PATCH] kvm tools: Fix segfault when failing to initialize KVM

2012-01-31 Thread Pekka Enberg
On Wed, 1 Feb 2012, Cyrill Gorcunov wrote: I suspect we need something like --- tools/kvm/builtin-run.c |5 + tools/kvm/kvm.c |2 +- 2 files changed, 6 insertions(+), 1 deletion(-) Index: linux-2.6.git/tools/kvm/builtin-run.c

Re: [PATCH] kvm tools: Fix segfault when failing to initialize KVM

2012-01-31 Thread Cyrill Gorcunov
On Wed, Feb 01, 2012 at 09:26:00AM +0200, Pekka Enberg wrote: On Wed, 1 Feb 2012, Cyrill Gorcunov wrote: I suspect we need something like --- tools/kvm/builtin-run.c |5 + tools/kvm/kvm.c |2 +- 2 files changed, 6 insertions(+), 1 deletion(-) Index:

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Paolo Bonzini
On 01/31/2012 09:49 PM, Anthony Liguori wrote: +DEFINE_PROP_HEX32(iobase, PCSpkState, iobase, -1), +DEFINE_PROP_PTR(pit, PCSpkState, pit), Please don't introduce a pointer property here. They cannot be used in a meaningful way in qdev. Why not register a linkTYPE_PIT in

Re: [PATCH v4 0/3] virtio-scsi driver

2012-01-31 Thread Pekka Enberg
Hello Paolo, On Mon, Jan 30, 2012 at 10:48 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 01/20/2012 05:45 PM, Paolo Bonzini wrote: This is the first implementation of the virtio-scsi driver, a virtual HBA that will be supported by KVM.  It implements a subset of the spec, in particular it

Re: [PATCH V4 2/7] kvm tools: Generate SPAPR PPC64 guest device tree

2012-01-31 Thread Matt Evans
On 31 Jan 2012, at 18:59, Pekka Enberg wrote: On Tue, Jan 31, 2012 at 8:34 AM, Matt Evans m...@ozlabs.org wrote: +static struct cpu_info cpu_power7_info = { + POWER7, + power7_page_sizes_prop, sizeof(power7_page_sizes_prop), + power7_segment_sizes_prop,

Re: [PATCH V4 3/7] kvm tools: Add SPAPR PPC64 hcall rtascall structure

2012-01-31 Thread Matt Evans
On 31 Jan 2012, at 19:11, Pekka Enberg wrote: On Tue, Jan 31, 2012 at 8:34 AM, Matt Evans m...@ozlabs.org wrote: +#define DEBUG_SPAPR_HCALLS I suppose this shouldn't be defined by default? Well, I had a bit of a debate about it. I left it on as it is actually interesting whilst

Re: [PATCH V4 6/7] kvm tools: Add PPC64 PCI Host Bridge

2012-01-31 Thread Alexey Kardashevskiy
On 01/02/12 14:40, David Gibson wrote: On Tue, Jan 31, 2012 at 05:34:41PM +1100, Matt Evans wrote: This provides the PCI bridge, definitions for the address layout of the windows and wires in IRQs. Once PCI devices are all registered, they are enumerated and DT nodes generated for each.

<    1   2