[Qemu-devel] [PATCH v2 07/13] vfio: VFIO core

2012-05-21 Thread Alex Williamson
VFIO is a secure user level driver for use with both virtual machines and user level drivers. VFIO makes use of IOMMU groups to ensure the isolation of devices in use, allowing unprivileged user access. It's intended that VFIO will replace KVM device assignment and UIO drivers (in cases where the

Re: [Qemu-devel] [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-21 Thread Alexander Graf
On 22.05.2012, at 08:11, Alexey Kardashevskiy wrote: > On 22/05/12 15:52, Alexander Graf wrote: >> >> >> On 22.05.2012, at 05:44, Alexey Kardashevskiy wrote: >> >>> On 22/05/12 13:21, Alexander Graf wrote: On 22.05.2012, at 04:02, Benjamin Herrenschmidt wrote:

[Qemu-devel] [PATCH v2 10/13] pci: export pci_user functions for use by other drivers

2012-05-21 Thread Alex Williamson
VFIO PCI support will make use of these for user initiated PCI config accesses. Signed-off-by: Alex Williamson Acked-by: Bjorn Helgaas --- drivers/pci/access.c |6 -- drivers/pci/pci.h|7 --- include/linux/pci.h |8 3 files changed, 12 insertions(+), 9 deletio

Re: [Qemu-devel] [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-21 Thread Alexander Graf
On 22.05.2012, at 08:11, Alexey Kardashevskiy wrote: > On 22/05/12 15:52, Alexander Graf wrote: >> >> >> On 22.05.2012, at 05:44, Alexey Kardashevskiy wrote: >> >>> On 22/05/12 13:21, Alexander Graf wrote: On 22.05.2012, at 04:02, Benjamin Herrenschmidt wrote:

Re: [Qemu-devel] [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-21 Thread Alexey Kardashevskiy
On 22/05/12 15:52, Alexander Graf wrote: > > > On 22.05.2012, at 05:44, Alexey Kardashevskiy wrote: > >> On 22/05/12 13:21, Alexander Graf wrote: >>> >>> >>> On 22.05.2012, at 04:02, Benjamin Herrenschmidt >>> wrote: >>> On Fri, 2012-05-18 at 15:12 +1000, Alexey Kardashevskiy wrote:

Re: [Qemu-devel] [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-21 Thread Alexander Graf
On 22.05.2012, at 05:44, Alexey Kardashevskiy wrote: > On 22/05/12 13:21, Alexander Graf wrote: >> >> >> On 22.05.2012, at 04:02, Benjamin Herrenschmidt >> wrote: >> >>> On Fri, 2012-05-18 at 15:12 +1000, Alexey Kardashevskiy wrote: Alexander, Is that any better? :) >>> >>

Re: [Qemu-devel] qemu-microblaze-system

2012-05-21 Thread Peter Crosthwaite
Hi Michael, The microblaze linux kernel is available at: http://wiki.xilinx.com/ If you wish to do your own kernel config from scratch. There is some brief documentation there on how to do a bringup. The qemu port for mb maintained by PetaLogix and I notice you are using a student email domain,

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function

2012-05-21 Thread Michael S. Tsirkin
On Tue, May 22, 2012 at 08:56:12AM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2012-05-22 at 01:22 +0300, Michael S. Tsirkin wrote: > > > Again, from which originator ? From a given initiator, nothing > > bypasses > > > anything, so the right thing to do here is a full mb(). However, I > > > sus

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-21 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 14:34 +1000, Benjamin Herrenschmidt wrote: > So here's the latest try :-) I've kept is simple, I don't > add anything to map/unmap at this stage, so we might still > have a problem with drivers who do that a lot without any > explicit barrier (ahci ?). My preference is to also

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function

2012-05-21 Thread Rusty Russell
On Tue, 22 May 2012 07:58:17 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2012-05-21 at 15:18 +0300, Michael S. Tsirkin wrote: > > But I can also live with a global flag "latest_dma_read" > > and on read we could do > > if (unlikely(latest_dma_read)) > > smp_mb(); > > > > if yo

[Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-21 Thread Benjamin Herrenschmidt
The emulated devices can run simultaneously with the guest, so we need to be careful with ordering of load and stores done by them to the guest system memory, which need to be observed in the right order by the guest operating system. This adds a barrier call to the basic DMA read/write ops which

Re: [Qemu-devel] [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-21 Thread Alexey Kardashevskiy
On 22/05/12 13:21, Alexander Graf wrote: > > > On 22.05.2012, at 04:02, Benjamin Herrenschmidt > wrote: > >> On Fri, 2012-05-18 at 15:12 +1000, Alexey Kardashevskiy wrote: >>> Alexander, >>> >>> Is that any better? :) >> >> Alex (Graf that is), ping ? >> >> The original patch from Alexey was f

Re: [Qemu-devel] [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-21 Thread Alexander Graf
On 22.05.2012, at 04:02, Benjamin Herrenschmidt wrote: > On Fri, 2012-05-18 at 15:12 +1000, Alexey Kardashevskiy wrote: >> Alexander, >> >> Is that any better? :) > > Alex (Graf that is), ping ? > > The original patch from Alexey was fine btw. > > VFIO will always call things with the exis

Re: [Qemu-devel] Is it possible to retrieve pre-process information in QEMU?

2012-05-21 Thread 陳韋任
> >  I would like to know if I can retrieve pre-process information in QEMU > > system mode. For example, I want to know each process's page fault ratio. > > Is there a way to do that? > > logically, it's possible, but you need to locate the task_struct of > each processes first. Using GDB, that m

Re: [Qemu-devel] [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-21 Thread Benjamin Herrenschmidt
On Fri, 2012-05-18 at 15:12 +1000, Alexey Kardashevskiy wrote: > Alexander, > > Is that any better? :) Alex (Graf that is), ping ? The original patch from Alexey was fine btw. VFIO will always call things with the existing capability offset so there's no real risk of doing the wrong thing or br

Re: [Qemu-devel] The image size of instance VM keeps growing

2012-05-21 Thread Charles . Tsai-蔡清海-研究發展部
Stefan, Thank you for information. We will try to isolate the issue here and give you an update. -Original Message- From: Stefan Hajnoczi [mailto:stefa...@gmail.com] Sent: Monday, May 21, 2012 9:24 PM To: Charles.Tsai-蔡清海-研究發展部 Cc: qemu-devel@nongnu.org; Jonah.Wu-吳君勉-研究發展部 Subject: Re:

Re: [Qemu-devel] [PATCH next v2 00/74] QOM CPUState, part 3: CPU reset

2012-05-21 Thread Andreas Färber
Am 21.05.2012 20:20, schrieb Blue Swirl: > On Mon, May 21, 2012 at 9:09 AM, Andreas Färber wrote: >> Am 14.05.2012 23:22, schrieb Blue Swirl: >>> On Mon, May 14, 2012 at 8:59 PM, Andreas Färber wrote: Am 14.05.2012 21:54, schrieb Blue Swirl: > On Mon, May 14, 2012 at 4:15 PM, Andreas Fär

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function

2012-05-21 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 01:22 +0300, Michael S. Tsirkin wrote: > > Again, from which originator ? From a given initiator, nothing > bypasses > > anything, so the right thing to do here is a full mb(). However, I > > suspect what you are talking about here is read -responses- not > > bypassing writes

[Qemu-devel] [ANNOUNCE] kvm-kmod-3.4

2012-05-21 Thread Jan Kiszka
After the release of kernel 3.4, this is now the announcements of the corresponding kvm-kmod-3.4. The package is available from http://sourceforge.net/projects/kvm/files/kvm-kmod/3.4/kvm-kmod-3.4.tar.bz2/download See [1] for further details on kvm-kmod. Major KVM changes since kvm-kmod-3.3.6: -

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions

2012-05-21 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 01:44 +0300, Michael S. Tsirkin wrote: > > OK. Just not another level of indirect function callbacks please. Make > it a library so each bus can do the right thing. There are not so many > buses. I think we are a long way from having to deal with subtly different ordering

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function

2012-05-21 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 01:22 +0300, Michael S. Tsirkin wrote: > > Again, from which originator ? From a given initiator, nothing > bypasses > > anything, so the right thing to do here is a full mb(). However, I > > suspect what you are talking about here is read -responses- not > > bypassing writes

[Qemu-devel] [Bug 990364] Re: virtio_ioport_write: unexpected address 0x13 value 0x1

2012-05-21 Thread Vitalis
But with new drivers i got "virtio_ioport_write: unexpected address 0x13 value 0x1" again. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/990364 Title: virtio_ioport_write: unexpected address 0x13 v

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions

2012-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2012 at 05:31:06PM -0500, Anthony Liguori wrote: > On 05/21/2012 05:26 PM, Benjamin Herrenschmidt wrote: > >On Mon, 2012-05-21 at 17:18 -0500, Anthony Liguori wrote: > >>But this isn't what this series is about. > >> > >>This series is only attempting to make sure that writes are or

Re: [Qemu-devel] [PATCH next v2 00/74] QOM CPUState, part 3: CPU reset

2012-05-21 Thread Andreas Färber
Am 21.05.2012 15:52, schrieb Alexander Graf: > Very simple, nice and clean ;) > > PowerPC parts are: > > Acked-by: Alexander Graf Thanks, applied to qom-next: http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/qom-next David and Edgar, you two were apparently not cc'ed. Could you subm

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions

2012-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2012 at 05:18:21PM -0500, Anthony Liguori wrote: > On 05/21/2012 03:31 AM, Michael S. Tsirkin wrote: > >More than that. smp_mb is pretty expensive. You > >often can do just smp_wmb and smp_rmb and that is > >very cheap. > >Many operations run in the vcpu context > >or start when gue

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions

2012-05-21 Thread Anthony Liguori
On 05/21/2012 05:26 PM, Benjamin Herrenschmidt wrote: On Mon, 2012-05-21 at 17:18 -0500, Anthony Liguori wrote: But this isn't what this series is about. This series is only attempting to make sure that writes are ordered with respect to other writes in main memory. Actually, it applies to bo

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions

2012-05-21 Thread Benjamin Herrenschmidt
On Mon, 2012-05-21 at 17:18 -0500, Anthony Liguori wrote: > But this isn't what this series is about. > > This series is only attempting to make sure that writes are ordered > with respect > to other writes in main memory. Actually, it applies to both reads and writes. They can't pass each other

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function

2012-05-21 Thread Michael S. Tsirkin
On Tue, May 22, 2012 at 07:58:17AM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2012-05-21 at 15:18 +0300, Michael S. Tsirkin wrote: > > > > mb is more than just "read flush writes" (besides it's not a statement > > > about flushing, it's a statement about ordering. whether it has a > > > flushi

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions

2012-05-21 Thread Anthony Liguori
On 05/21/2012 03:31 AM, Michael S. Tsirkin wrote: More than that. smp_mb is pretty expensive. You often can do just smp_wmb and smp_rmb and that is very cheap. Many operations run in the vcpu context or start when guest exits to host and work is bounced from there and thus no barrier is needed he

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-21 Thread Edgar E. Iglesias
On Mon, May 21, 2012 at 06:40:38PM +, Blue Swirl wrote: > On Mon, May 21, 2012 at 6:28 PM, Peter Maydell > wrote: > > On 21 May 2012 19:08, Blue Swirl wrote: > >> On Mon, May 21, 2012 at 10:36 AM, Peter Maydell > >> wrote: > >>> I think it would be nice to have this in upstream qemu; howeve

Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function

2012-05-21 Thread Benjamin Herrenschmidt
On Mon, 2012-05-21 at 15:18 +0300, Michael S. Tsirkin wrote: > > mb is more than just "read flush writes" (besides it's not a statement > > about flushing, it's a statement about ordering. whether it has a > > flushing side effect on x86 is a separate issue, it doesn't on power for > > example). >

Re: [Qemu-devel] [RFC PATCH 3/4] block: Enable QEMU to retrieve passed fd before attempting open

2012-05-21 Thread Eric Blake
On 05/21/2012 02:19 PM, Corey Bryant wrote: > With this patch, when QEMU needs to "open" a file, it will first > check to see if a matching filename/fd pair were passed via the > -filefd command line option or the getfd_file monitor command. > If a match is found, QEMU will use the passed fd and wi

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-21 Thread Eric Blake
On 05/21/2012 02:19 PM, Corey Bryant wrote: > This patch provides support for the getfd_file monitor command. > This command will allow passing of a filename and its corresponding > file descriptor to a guest via the monitor. This command could be > followed, for example, by a drive_add command to

Re: [Qemu-devel] [RFC PATCH 1/4] qemu-options: Add -filefd command line option

2012-05-21 Thread Eric Blake
On 05/21/2012 02:19 PM, Corey Bryant wrote: > This patch provides support for the -filefd command line option. > This option will allow passing of a filename and its corresponding > file descriptor to QEMU at exec time. > > Signed-off-by: Corey Bryant > +DEF("filefd", HAS_ARG, QEMU_OPTION_filefd

Re: [Qemu-devel] [PATCH 1/2] pci: Add pci_device_get_host_irq

2012-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2012 at 03:58:57PM -0300, Jan Kiszka wrote: > On 2012-05-21 14:34, Michael S. Tsirkin wrote: > > On Mon, May 21, 2012 at 10:13:47AM -0300, Jan Kiszka wrote: > >> Add a PCI IRQ path discovery function that walks from a given device to > >> the host bridge, returning the IRQ number th

Re: [Qemu-devel] [PATCH 1/2] pci: Add pci_device_get_host_irq

2012-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2012 at 05:35:34PM -0300, Jan Kiszka wrote: > On 2012-05-21 16:05, Michael S. Tsirkin wrote: > > On Mon, May 21, 2012 at 10:13:47AM -0300, Jan Kiszka wrote: > >> @@ -386,6 +387,14 @@ static void piix3_set_irq(void *opaque, int pirq, int > >> level) > >> piix3_set_irq_level(pii

Re: [Qemu-devel] [PATCH 1/1] virtio-rng: device to send host entropy to guest

2012-05-21 Thread Anthony Liguori
On 05/21/2012 02:39 PM, Amit Shah wrote: On (Wed) 16 May 2012 [13:23:11], Anthony Liguori wrote: On 05/16/2012 12:21 PM, Amit Shah wrote: On (Wed) 16 May 2012 [08:24:22], Anthony Liguori wrote: On 05/16/2012 06:30 AM, Amit Shah wrote: The Linux kernel already has a virtio-rng driver, this is

[Qemu-devel] [ANNOUNCE] libguestfs 1.18 released - tools for managing virtual machines and disk images

2012-05-21 Thread Richard W.M. Jones
I'm pleased to announce the latest stable release of libguestfs, a library and a set of tools for reading, writing, managing, inspecting, rescuing, resizing and aligning disk images, and offline and live virtual machines. There are many new features and bug fixes in this release; see the release

Re: [Qemu-devel] [PATCH 1/2] pci: Add pci_device_get_host_irq

2012-05-21 Thread Jan Kiszka
On 2012-05-21 16:05, Michael S. Tsirkin wrote: > On Mon, May 21, 2012 at 10:13:47AM -0300, Jan Kiszka wrote: >> @@ -386,6 +387,14 @@ static void piix3_set_irq(void *opaque, int pirq, int >> level) >> piix3_set_irq_level(piix3, pirq, level); >> } >> >> +static int piix3_map_host_irq(void *o

Re: [Qemu-devel] [PATCH 2/9] tcg: declare __jit_debug_descriptor to be static

2012-05-21 Thread Peter Maydell
On 21 May 2012 21:10, Jim Meyering wrote: > Peter Maydell wrote: >> On 21 May 2012 20:51, Jim Meyering wrote: >>> From: Jim Meyering >>> >>> >>> Signed-off-by: Jim Meyering >>> --- >>>  tcg/tcg.c | 2 +- >>>  1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/tcg/tcg.c b/tcg/tcg.

[Qemu-devel] [PATCH 9/9] convert many more globals to static

2012-05-21 Thread Jim Meyering
From: Jim Meyering Minor exceptions: * arm-dis: move now-detected-as-unused static variables into #if-0'd block of code where they *are* used. * microblaze: remove decls of now-detected-as-unused vars Signed-off-by: Jim Meyering --- arm-dis.c | 8 ++--- cpus.c

[Qemu-devel] [RFC PATCH 0/4] block: file descriptor passing using -filefd and getfd_file

2012-05-21 Thread Corey Bryant
libvirt's sVirt security driver provides SELinux MAC isolation for Qemu guest processes and their corresponding image files. In other words, sVirt uses SELinux to prevent a QEMU process from opening files that do not belong to it. sVirt provides this support by labeling guests and resources with

[Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-21 Thread Corey Bryant
This patch provides support for the getfd_file monitor command. This command will allow passing of a filename and its corresponding file descriptor to a guest via the monitor. This command could be followed, for example, by a drive_add command to hot attach a disk drive. Signed-off-by: Corey Brya

[Qemu-devel] [RFC PATCH 3/4] block: Enable QEMU to retrieve passed fd before attempting open

2012-05-21 Thread Corey Bryant
With this patch, when QEMU needs to "open" a file, it will first check to see if a matching filename/fd pair were passed via the -filefd command line option or the getfd_file monitor command. If a match is found, QEMU will use the passed fd and will not attempt to open the file. Otherwise, if a ma

[Qemu-devel] [RFC PATCH 4/4] Example -filefd and getfd_file server

2012-05-21 Thread Corey Bryant
This example demonstrates use of the -filefd command to open two disk drives at start-up time. It also demonstrates hot attaching a third disk drive with the getfd_file monitor command. I still have some learning to do with regards to QMP, so the example is using a not-so-program-friendly HMP met

[Qemu-devel] [RFC PATCH 1/4] qemu-options: Add -filefd command line option

2012-05-21 Thread Corey Bryant
This patch provides support for the -filefd command line option. This option will allow passing of a filename and its corresponding file descriptor to QEMU at exec time. Signed-off-by: Corey Bryant --- qemu-config.c | 17 + qemu-config.h |1 + qemu-options.hx | 17 +++

[Qemu-devel] [PATCH 7/9] mips-dis: declare four globals to be "static"

2012-05-21 Thread Jim Meyering
From: Jim Meyering Signed-off-by: Jim Meyering --- mips-dis.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mips-dis.c b/mips-dis.c index e3a6e0b..f6109a1 100644 --- a/mips-dis.c +++ b/mips-dis.c @@ -888,10 +888,9 @@ enum Many instructions are short ha

[Qemu-devel] [PATCH v2 0/3] Event notifications for balloon driver

2012-05-21 Thread Daniel P. Berrange
This series is a followup to 2 previously posted patches * BALLOON_CHANGE QMP event: http://lists.nongnu.org/archive/html/qemu-devel/2012-05/msg02215.html * query-events QMP command: http://lists.nongnu.org/archive/html/qemu-devel/2012-05/msg02255.html Changes since v1: - Use a static

[Qemu-devel] [PATCH 16/16] qapi: convert netdev_del

2012-05-21 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +-- hmp.c|9 + hmp.h|1 + net.c| 11 +-- net.h|1 - qapi-schema.json | 14 ++ qmp-commands.hx |5 + 7 fi

[Qemu-devel] [PATCH 07/16] qemu-option: opt_set(): use error_set()

2012-05-21 Thread Luiz Capitulino
The functions qemu_opt_set() and opts_do_parse() both call opt_set(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 31 --- 1 file changed, 2

[Qemu-devel] [PATCH 10/16] qerror: introduce QERR_INVALID_OPTION_GROUP

2012-05-21 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 5092fe7..92c4eff 100644 --- a/qerror.c +++ b/qerror.c @@ -156,6 +156,10 @@ static const QErrorStringTable qerror_table[] = { .desc =

[Qemu-devel] [PATCH qmp-next v5 00/16]: qapi: convert netdev_add & netdev_del

2012-05-21 Thread Luiz Capitulino
v5 - Simplify set_option_parameter() [Laszlo] - Fix bad patch split in patch 15/16, hunk changing net_init_netdev() pertains to patch 14/16 [Laszlo] blockdev.c |2 +- hmp-commands.hx |6 +- hmp.c| 30 + hmp.h|2 + hw/pci-hotp

Re: [Qemu-devel] [PATCH 2/9] tcg: declare __jit_debug_descriptor to be static

2012-05-21 Thread Jim Meyering
Peter Maydell wrote: > On 21 May 2012 20:51, Jim Meyering wrote: >> From: Jim Meyering >> >> >> Signed-off-by: Jim Meyering >> --- >>  tcg/tcg.c | 2 +- >>  1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tcg/tcg.c b/tcg/tcg.c >> index ab589c7..350fdad 100644 >> --- a/tcg/tcg.c >

[Qemu-devel] [PATCH 10/19] msix: Invoke msix_handle_mask_update on msix_mask_all

2012-05-21 Thread Avi Kivity
From: Jan Kiszka In preparation of firing vector notifiers on mask changes, call msix_handle_mask_update also from msix_mask_all. So far, this will have no real effect. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- hw/msix.c |4 1 file changed, 4 insertions(+) diff --git a

[Qemu-devel] [PATCH 11/16] qemu-config: find_list(): use error_set()

2012-05-21 Thread Luiz Capitulino
Note that qemu_find_opts() and qemu_config_parse() need to call error_report() to maintain their semantics on error. Signed-off-by: Luiz Capitulino --- qemu-config.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/qemu-config.c b/qemu-confi

[Qemu-devel] [PATCH 5/9] ccid: make backend_enum_table "static const" and adjust users

2012-05-21 Thread Jim Meyering
From: Jim Meyering Signed-off-by: Jim Meyering --- hw/ccid-card-emulated.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ccid-card-emulated.c b/hw/ccid-card-emulated.c index f4a6da4..440f050 100644 --- a/hw/ccid-card-emulated.c +++ b/hw/ccid-card-emulated.c @@ -4

[Qemu-devel] [PATCH 13/19] kvm: Introduce kvm_irqchip_add_msi_route

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Add a service that establishes a static route from a virtual IRQ line to an MSI message. Will be used for IRQFD and device assignment. As we will use this service outside of CONFIG_KVM protected code, stub it properly. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- k

[Qemu-devel] [PATCH 13/16] net: purge the monitor object from all init functions

2012-05-21 Thread Luiz Capitulino
The only backend that really uses it is the socket one, which calls monitor_get_fd(). But it can use 'cur_mon' instead. Signed-off-by: Luiz Capitulino --- hw/pci-hotplug.c |2 +- hw/usb/dev-network.c |2 +- net.c| 18 +++--- net.h|2 +

[Qemu-devel] [PATCH 18/19] msix: Add msix_nr_vectors_allocated

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Analogously to msi_nr_vectors_allocated, add a service for MSI-X. Will be used by the virtio-pci layer. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- hw/msix.c |5 + hw/msix.h |2 ++ 2 files changed, 7 insertions(+) diff --git a/hw/msix.c b/hw/msix.c in

Re: [Qemu-devel] [PATCH 2/9] tcg: declare __jit_debug_descriptor to be static

2012-05-21 Thread Peter Maydell
On 21 May 2012 20:51, Jim Meyering wrote: > From: Jim Meyering > > > Signed-off-by: Jim Meyering > --- >  tcg/tcg.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tcg/tcg.c b/tcg/tcg.c > index ab589c7..350fdad 100644 > --- a/tcg/tcg.c > +++ b/tcg/tcg.c > @@ -2293,7 +229

[Qemu-devel] [PATCH 8/9] bonito: declare bonito_state to be static

2012-05-21 Thread Jim Meyering
From: Jim Meyering Signed-off-by: Jim Meyering --- hw/bonito.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/bonito.c b/hw/bonito.c index 77786f8..6bd0242 100644 --- a/hw/bonito.c +++ b/hw/bonito.c @@ -218,7 +218,7 @@ typedef struct PCIBonitoState } PCIBonitoState;

[Qemu-devel] [PATCH 4/9] linux-user: arg_table need not have global scope

2012-05-21 Thread Jim Meyering
From: Jim Meyering Declare arg_table to be "static const", and adjust the two users to also be const. Signed-off-by: Jim Meyering --- linux-user/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 191b750..cc5b54b 100644

[Qemu-devel] [PATCH 6/9] sheepdog: declare bdrv_sheepdog to be static

2012-05-21 Thread Jim Meyering
From: Jim Meyering Signed-off-by: Jim Meyering --- block/sheepdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index e01d371..fdb3eca 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2014,7 +2014,7 @@ static QEMUOptionParamet

[Qemu-devel] [PATCH 03/19] kvm: Introduce basic MSI support for in-kernel irqchips

2012-05-21 Thread Avi Kivity
From: Jan Kiszka This patch basically adds kvm_irqchip_send_msi, a service for sending arbitrary MSI messages to KVM's in-kernel irqchip models. As the original KVM API requires us to establish a static route from a pseudo GSI to the target MSI message and inject the MSI via toggling that virtua

[Qemu-devel] [PATCH 16/19] kvm: Introduce kvm_irqchip_add/remove_irqfd

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Add services to associate an eventfd file descriptor as input with an IRQ line as output. Such a line can be an input pin of an in-kernel irqchip or a virtual line returned by kvm_irqchip_add_route. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- kvm-all.c | 30 +++

[Qemu-devel] [PATCH 3/9] alpha-dis: remove unused global; declare others to be static

2012-05-21 Thread Jim Meyering
From: Jim Meyering alpha_num_operands: Remove both declarations of this unused global. alpha_opcodes: Declare static to limit scope. Remove duplicate decl. alpha_num_opcodes: Likewise. alpha_operands: Likewise. Signed-off-by: Jim Meyering --- alpha-dis.c | 26 +- 1 file

[Qemu-devel] [PATCH 09/19] msix: Factor out msix_get_message

2012-05-21 Thread Avi Kivity
From: Jan Kiszka This helper will also be used by the upcoming config notifier. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- hw/msix.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 3835eaa..3197465 100644 ---

[Qemu-devel] [PATCH 3/9] alpha-dis: remove unused global; declare others to be static

2012-05-21 Thread Jim Meyering
From: Jim Meyering alpha_num_operands: Remove both declarations of this unused global. alpha_opcodes: Declare static to limit scope. Remove duplicate decl. alpha_num_opcodes: Likewise. alpha_operands: Likewise. Signed-off-by: Jim Meyering --- alpha-dis.c | 26 +- 1 file

[Qemu-devel] [PATCH 2/9] tcg: declare __jit_debug_descriptor to be static

2012-05-21 Thread Jim Meyering
From: Jim Meyering Signed-off-by: Jim Meyering --- tcg/tcg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index ab589c7..350fdad 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2293,7 +2293,7 @@ void __jit_debug_register_code(void) /* Must statically i

[Qemu-devel] [PATCH 2/9] tcg: declare __jit_debug_descriptor to be static

2012-05-21 Thread Jim Meyering
From: Jim Meyering Signed-off-by: Jim Meyering --- tcg/tcg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index ab589c7..350fdad 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2293,7 +2293,7 @@ void __jit_debug_register_code(void) /* Must statically i

[Qemu-devel] [PATCH 1/9] ccid: declare DEFAULT_ATR table to be "static const"

2012-05-21 Thread Jim Meyering
From: Jim Meyering Signed-off-by: Jim Meyering --- hw/ccid-card-passthru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c index bd6c777..1caaa45 100644 --- a/hw/ccid-card-passthru.c +++ b/hw/ccid-card-passthru.c @@ -27,7 +2

[Qemu-devel] [PATCH 1/9] ccid: declare DEFAULT_ATR table to be "static const"

2012-05-21 Thread Jim Meyering
From: Jim Meyering Signed-off-by: Jim Meyering --- hw/ccid-card-passthru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c index bd6c777..1caaa45 100644 --- a/hw/ccid-card-passthru.c +++ b/hw/ccid-card-passthru.c @@ -27,7 +2

[Qemu-devel] [PATCH 0/9] convert many more globals to "static"

2012-05-21 Thread Jim Meyering
From: Jim Meyering Following up on discussion here, http://marc.info/?t=13375948768&r=1&w=2 here are patches to limit the scope of the remaining global variables. Most changes simply added a preceding "static". However, in some cases, I've made minor additional changes, e.g., to make a s

Re: [Qemu-devel] [PATCH v2 2/3] Add event notification for guest balloon changes

2012-05-21 Thread Daniel P. Berrange
On Tue, May 22, 2012 at 01:14:59AM +0530, Amit Shah wrote: > On (Mon) 21 May 2012 [17:59:52], Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > After setting a balloon target value, applications have to > > continually poll 'query-balloon' to determine whether the > > guest has rea

[Qemu-devel] [PATCH 14/19] kvm: Publicize kvm_irqchip_release_virq

2012-05-21 Thread Avi Kivity
From: Jan Kiszka This allows to drop routes created by kvm_irqchip_add_irq/msi_route again. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- kvm-all.c |2 +- kvm-stub.c |4 kvm.h |1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kvm-all.c b/kvm-

Re: [Qemu-devel] [PATCH v2 2/3] Add event notification for guest balloon changes

2012-05-21 Thread Amit Shah
On (Mon) 21 May 2012 [17:59:52], Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > After setting a balloon target value, applications have to > continually poll 'query-balloon' to determine whether the > guest has reacted to this request. The virtio-balloon backend > knows exactly when t

[Qemu-devel] [PATCH 19/19] virtio/vhost: Add support for KVM in-kernel MSI injection

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Make use of the new vector notifier to track changes of the MSI-X configuration of virtio PCI devices. On enabling events, we establish the required virtual IRQ to MSI-X message route and link the signaling eventfd file descriptor to this vIRQ line. That way, vhost-generated inte

Re: [Qemu-devel] [PATCH 1/1] virtio-rng: device to send host entropy to guest

2012-05-21 Thread Amit Shah
On (Wed) 16 May 2012 [13:23:11], Anthony Liguori wrote: > On 05/16/2012 12:21 PM, Amit Shah wrote: > >On (Wed) 16 May 2012 [08:24:22], Anthony Liguori wrote: > >>On 05/16/2012 06:30 AM, Amit Shah wrote: > >>>The Linux kernel already has a virtio-rng driver, this is the device > >>>implementation. >

[Qemu-devel] [PATCH 06/16] qemu-option: qemu_opts_validate(): use error_set()

2012-05-21 Thread Luiz Capitulino
net_client_init() propagates the error up by calling qerror_report_err(), because its users expect QError semantics. Signed-off-by: Luiz Capitulino --- net.c |6 +- qemu-option.c | 13 + qemu-option.h |2 +- 3 files changed, 11 insertions(+), 10 deletions(-) di

Re: [Qemu-devel] [PATCH 1/1] virtio-rng: device to send host entropy to guest

2012-05-21 Thread Amit Shah
On (Wed) 16 May 2012 [13:24:10], Anthony Liguori wrote: > On 05/16/2012 12:26 PM, Amit Shah wrote: > >On (Wed) 16 May 2012 [14:45:34], Daniel P. Berrange wrote: > >>On Wed, May 16, 2012 at 08:24:22AM -0500, Anthony Liguori wrote: > >>>On 05/16/2012 06:30 AM, Amit Shah wrote: > The Linux kernel

[Qemu-devel] [PATCH 06/19] kvm: Update kernel headers

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Corresponding kvm.git hash: f2569053e0 Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- linux-headers/linux/kvm.h | 38 ++ 1 file changed, 38 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h in

Re: [Qemu-devel] [PATCH 1/1] virtio-rng: device to send host entropy to guest

2012-05-21 Thread Amit Shah
On (Wed) 16 May 2012 [08:48:20], Anthony Liguori wrote: > On 05/16/2012 08:45 AM, Daniel P. Berrange wrote: > >On Wed, May 16, 2012 at 08:24:22AM -0500, Anthony Liguori wrote: > >>On 05/16/2012 06:30 AM, Amit Shah wrote: > >>>The Linux kernel already has a virtio-rng driver, this is the device > >>

[Qemu-devel] [PATCH 07/19] kvm: Add support for direct MSI injections

2012-05-21 Thread Avi Kivity
From: Jan Kiszka If the kernel supports KVM_SIGNAL_MSI, we can avoid the route-based MSI injection mechanism. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- kvm-all.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/kvm-all.c b/kvm-al

[Qemu-devel] [PATCH 01/19] kvm: Refactor KVMState::max_gsi to gsi_count

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Instead of the bitmap size, store the maximum of GSIs the kernel support. Move the GSI limit assertion to the API function kvm_irqchip_add_route and make it stricter. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- kvm-all.c |8 1 file changed, 4 ins

Re: [Qemu-devel] [PATCH 11/13] pci: Create common pcibios_err_to_errno

2012-05-21 Thread Konrad Rzeszutek Wilk
On Fri, May 11, 2012 at 04:56:44PM -0600, Alex Williamson wrote: > For returning errors out to non-PCI code. Re-name xen's version. > > Signed-off-by: Alex Williamson Acked-by: Konrad Rzeszutek Wilk > --- > > drivers/xen/xen-pciback/conf_space.c |6 +++--- > include/linux/pci.h

[Qemu-devel] Current differences between qemu --enable-kvm and qemu-kvm?

2012-05-21 Thread Erik Rull
Hi all, is there a summary existing that shows up the rough or actual differences between qemu --enable-kvm and qemu-kvm? I tested both versions with the same compile and start options, the CPU performance results are identical, only the bootup time of my guest system with qemu-kvm seemed to b

Re: [Qemu-devel] [PATCH V2] booke_206_tlbwe: Discard invalid bits in MAS2

2012-05-21 Thread Alexander Graf
On 21.05.2012, at 18:31, Andreas Färber wrote: > Am 21.05.2012 18:11, schrieb Fabien Chouteau: >> The size of EPN field in MAS2 depends on page size. This patch adds a >> mask to discard invalid bits in EPN field. >> >> Definition of EPN field from e500v2 RM: >> EPN Effective page number: Depe

[Qemu-devel] [PATCH 15/16] qapi: convert netdev_add

2012-05-21 Thread Luiz Capitulino
This is not a full QAPI conversion, but an intermediate step. In essence, do_netdev_add() is split into three functions: 1. netdev_add(): performs the actual work. This function is fully converted to Error (thus, it's "qapi-friendly") 2. qmp_netdev_add(): the QMP front-end for netdev_add()

[Qemu-devel] [PATCH v2 3/3] Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events

2012-05-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Allow certain event types to be rate limited to avoid flooding monitor clients. The monitor_protocol_event() method is changed such that instead of immediately emitting the event to Monitor instances, it will call a new monitor_protocol_event_queue() method. This will

[Qemu-devel] [PATCH 12/19] kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_route

2012-05-21 Thread Avi Kivity
From: Jan Kiszka We will add kvm_irqchip_add_msi_route, so let's make the difference clearer. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- hw/pc_piix.c |8 kvm-all.c|2 +- kvm.h|2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 09/16] qemu-option: qemu_opts_from_qdict(): use error_set()

2012-05-21 Thread Luiz Capitulino
do_device_add() and do_netdev_add() call qerror_report_err() to maintain their QError semantics. Signed-off-by: Luiz Capitulino --- hw/qdev-monitor.c |7 +-- net.c |5 - qemu-option.c | 31 --- qemu-option.h |3 ++- 4 files ch

[Qemu-devel] [PATCH 11/19] msix: Introduce vector notifiers

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Vector notifiers shall be triggered by the MSI/MSI-X core whenever a relevant configuration change is programmed by the guest. In case of MSI-X, changes are reported when the effective mask (global && per-vector) alters its state. On unmask, the current vector configuration is in

Re: [Qemu-devel] [PATCH 1/2] pci: Add pci_device_get_host_irq

2012-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2012 at 10:13:47AM -0300, Jan Kiszka wrote: > @@ -386,6 +387,14 @@ static void piix3_set_irq(void *opaque, int pirq, int > level) > piix3_set_irq_level(piix3, pirq, level); > } > > +static int piix3_map_host_irq(void *opaque, int pci_intx) > +{ > +PIIX3State *piix3 = op

[Qemu-devel] [PATCH 05/19] kvm: x86: Wire up MSI support for in-kernel irqchip

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Catch writes to the MSI MMIO region in the KVM APIC and forward them to the kernel. Provide the kernel support GSI routing, this allows to enable MSI support also for in-kernel irqchip mode. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- hw/kvm/apic.c | 34 +++

Re: [Qemu-devel] [PATCH 1/2] pci: Add pci_device_get_host_irq

2012-05-21 Thread Jan Kiszka
On 2012-05-21 14:34, Michael S. Tsirkin wrote: > On Mon, May 21, 2012 at 10:13:47AM -0300, Jan Kiszka wrote: >> Add a PCI IRQ path discovery function that walks from a given device to >> the host bridge, returning the IRQ number that is reported to the >> attached interrupt controller. For this pur

[Qemu-devel] [PATCH 08/19] kvm: Enable in-kernel irqchip support by default

2012-05-21 Thread Avi Kivity
From: Jan Kiszka As MSI is now fully supported by KVM (/wrt available features in upstream), we can finally enable the in-kernel irqchip by default. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- kvm-all.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kv

[Qemu-devel] [PATCH v2 2/3] Add event notification for guest balloon changes

2012-05-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" After setting a balloon target value, applications have to continually poll 'query-balloon' to determine whether the guest has reacted to this request. The virtio-balloon backend knows exactly when the guest has reacted though, and thus it is possible to emit a JSON eve

[Qemu-devel] [PATCH v2 1/3] Add 'query-events' command to QMP to query async events

2012-05-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Sometimes it is neccessary for an application to determine whether a particular QMP event is available, so they can decide whether to use compatibility code instead. This introduces a new 'query-events' command to QMP to do just that { "execute": "query-events" } {"r

[Qemu-devel] [PATCH 17/19] kvm: Enable use of kvm_irqchip_in_kernel in hwlib code

2012-05-21 Thread Avi Kivity
From: Jan Kiszka Provide a dummy kvm_kernel_irqchip so that kvm_irqchip_in_kernel can be used by code that is not under CONFIG_KVM protection. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- kvm-stub.c |1 + 1 file changed, 1 insertion(+) diff --git a/kvm-stub.c b/kvm-stub.c inde

Re: [Qemu-devel] [PATCH 0/3] tighten scope of accidentally global variables

2012-05-21 Thread Jim Meyering
Blue Swirl wrote: > On Mon, May 21, 2012 at 6:10 PM, Jim Meyering wrote: >> Blue Swirl wrote: >>> On Mon, May 21, 2012 at 10:03 AM, Jim Meyering wrote: From: Jim Meyering I noticed this commit,    virtio-pci: add missing 'static' which made this change: >>

  1   2   3   >