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

2012-05-22 Thread Alexey Kardashevskiy
On 22/05/12 15:52, Alexander Graf wrote: On 22.05.2012, at 05:44, Alexey Kardashevskiy a...@ozlabs.ru wrote: On 22/05/12 13:21, Alexander Graf wrote: On 22.05.2012, at 04:02, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Fri, 2012-05-18 at 15:12 +1000, Alexey

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

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

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

2012-05-22 Thread Alex Williamson
VFIO PCI support will make use of these for user initiated PCI config accesses. Signed-off-by: Alex Williamson alex.william...@redhat.com Acked-by: Bjorn Helgaas bhelg...@google.com --- drivers/pci/access.c |6 -- drivers/pci/pci.h|7 --- include/linux/pci.h |8

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

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

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

2012-05-22 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

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

2012-05-22 Thread Alexey Kardashevskiy
On 22/05/12 16:31, Alexander Graf wrote: On 22.05.2012, at 08:11, Alexey Kardashevskiy a...@ozlabs.ru wrote: On 22/05/12 15:52, Alexander Graf wrote: On 22.05.2012, at 05:44, Alexey Kardashevskiy a...@ozlabs.ru wrote: On 22/05/12 13:21, Alexander Graf wrote: On 22.05.2012, at

[Qemu-devel] [PATCH v2 04/13] pci: Add PCI DMA source ID quirk

2012-05-22 Thread Alex Williamson
DMA transactions are tagged with the source ID of the device making the request. Occasionally hardware screws this up and uses the source ID of a different device (often the wrong function number of a multifunction device). A specific Ricoh multifunction device is a prime example of this problem

[Qemu-devel] [PATCH v2 09/13] vfio: x86 IOMMU implementation

2012-05-22 Thread Alex Williamson
x86 is probably the wrong name for this VFIO IOMMU driver, but x86 is the primary target for it. This driver support a very simple usage model using the existing IOMMU API. The IOMMU is expected to support the full host address space with no special IOVA windows, number of mappings restrictions,

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

2012-05-22 Thread Alexander Graf
On 22.05.2012, at 09:01, Alexey Kardashevskiy wrote: On 22/05/12 16:31, Alexander Graf wrote: On 22.05.2012, at 08:11, Alexey Kardashevskiy a...@ozlabs.ru wrote: On 22/05/12 15:52, Alexander Graf wrote: On 22.05.2012, at 05:44, Alexey Kardashevskiy a...@ozlabs.ru wrote: On

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

2012-05-22 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 14:34 +1000, Benjamin Herrenschmidt wrote: 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

[Qemu-devel] [PATCH v2 08/13] vfio: Add documentation

2012-05-22 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- Documentation/vfio.txt | 315 1 files changed, 315 insertions(+), 0 deletions(-) create mode 100644 Documentation/vfio.txt diff --git a/Documentation/vfio.txt

[Qemu-devel] [PATCH v2 03/13] iommu: IOMMU groups for VT-d and AMD-Vi

2012-05-22 Thread Alex Williamson
Add back group support for AMD Intel. amd_iommu already tracks devices and has init and uninit routines to manage groups. intel-iommu does this on the fly, so we make use of the notifier support built into iommu groups to create and remove groups. Signed-off-by: Alex Williamson

[Qemu-devel] [PATCH v2 05/13] pci: Add ACS validation utility

2012-05-22 Thread Alex Williamson
In a PCI environment, transactions aren't always required to reach the root bus before being re-routed. Intermediate switches between an endpoint and the root bus can redirect DMA back downstream before things like IOMMUs have a chance to intervene. Legacy PCI is always susceptible to this as it

[Qemu-devel] [PATCH v2 01/13] driver core: Add iommu_group tracking to struct device

2012-05-22 Thread Alex Williamson
IOMMU groups allow IOMMU drivers to represent DMA visibility and isolation of devices. Multiple devices may be grouped together for the purposes of DMA. Placing a pointer on struct device enable easy access for things like streaming DMA programming and drivers like VFIO. Signed-off-by: Alex

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

2012-05-22 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 09:13 +0200, Alexander Graf wrote: On 22.05.2012, at 09:01, Alexey Kardashevskiy wrote: This is internal kitchen of PCIDevice which I do not want to touch from anywhere but pci.c. And there is no fixup_capability or something. Hrm. Maybe we should have one? :) Or

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

2012-05-22 Thread Alex Williamson
For returning errors out to non-PCI code. Re-name xen's version. Signed-off-by: Alex Williamson alex.william...@redhat.com Acked-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/xen-pciback/conf_space.c |6 +++--- include/linux/pci.h | 26

[Qemu-devel] [PATCH v2 12/13] pci: Misc pci_reg additions

2012-05-22 Thread Alex Williamson
Fill in many missing definitions and add sizeof fields for many sections allowing for more extensive config parsing. Signed-off-by: Alex Williamson alex.william...@redhat.com --- include/linux/pci_regs.h | 112 +- 1 files changed, 100 insertions(+),

[Qemu-devel] [PATCH v2 00/13] IOMMU Groups + VFIO

2012-05-22 Thread Alex Williamson
Version 2 incorporating acks and feedback from v1. The PCI DMA quirk and ACS check are reworked, sysfs iommu groups ABI Documentation added as well as numerous other fixes, including patches from Alexey Kardashevskiy towards supporting POWER usage of VFIO and IOMMU groups. This series can be

[Qemu-devel] [PATCH v2 06/13] iommu: Make use of DMA quirking and ACS enabled check for groups

2012-05-22 Thread Alex Williamson
Incorporate DMA quirking and ACS checking into amd_iommu and intel-iommu. Note that IOMMU groups are not yet used for streaming DMA, so this doesn't immediately solve the problems with broken Ricoh devices. This a very strict implementation of ACS checking, which will often result in

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

2012-05-22 Thread Fabien Chouteau
On 05/22/2012 02:34 AM, Andreas Färber wrote: Am 21.05.2012 20:20, schrieb Blue Swirl: On Mon, May 21, 2012 at 9:09 AM, Andreas Färber afaer...@suse.de wrote: Am 14.05.2012 23:22, schrieb Blue Swirl: On Mon, May 14, 2012 at 8:59 PM, Andreas Färber afaer...@suse.de wrote: Am 14.05.2012 21:54,

[Qemu-devel] [PATCH v2 02/13] iommu: IOMMU Groups

2012-05-22 Thread Alex Williamson
IOMMU device groups are currently a rather vague associative notion with assembly required by the user or user level driver provider to do anything useful. This patch intends to grow the IOMMU group concept into something a bit more consumable. To do this, we first create an object representing

[Qemu-devel] [PATCH] Add MAINTAINERS entry for leon3

2012-05-22 Thread Fabien Chouteau
Signed-off-by: Fabien Chouteau chout...@adacore.com --- MAINTAINERS |6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b45f075..3d773d3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -387,6 +387,12 @@ M: Blue Swirl blauwir...@gmail.com S: Maintained F:

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

2012-05-22 Thread Kevin Wolf
Am 21.05.2012 22:19, schrieb 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

Re: [Qemu-devel] [PATCH 1/3] envlist.c: handle strdup failure

2012-05-22 Thread Kevin Wolf
Am 21.05.2012 19:56, schrieb Blue Swirl: On Mon, May 21, 2012 at 10:25 AM, Jim Meyering j...@meyering.net wrote: Blue Swirl wrote: On Tue, May 15, 2012 at 1:04 PM, j...@meyering.net wrote: From: Jim Meyering meyer...@redhat.com Without this, envlist_to_environ may silently fail to copy all

Re: [Qemu-devel] [PATCH] rbd: hook up cache options

2012-05-22 Thread Kevin Wolf
Am 17.05.2012 22:42, schrieb Josh Durgin: Writeback caching was added in Ceph 0.46, and writethrough will be in 0.47. These are controlled by general config options, so there's no need to check for librbd version. Signed-off-by: Josh Durgin josh.dur...@inktank.com Thanks, applied to the

Re: [Qemu-devel] [PATCH] Prevent disk data loss when closing qemu

2012-05-22 Thread Kevin Wolf
Am 16.05.2012 12:16, schrieb Pavel Dovgaluk: I use qemu under Windows and it has two windows when executes - console and SDL ones. When I close SDL window main loop function terminates correctly, and when I close console window to terminate qemu then the code after main loop is not

[Qemu-devel] [PATCH 0/2] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Per discussion, let's switch envlist.c to indent with spaces, and then make the fix: Jim Meyering (2): envlist.c: convert many leading TABs to spaces via expand -i envlist.c: handle strdup failure envlist.c | 272

[Qemu-devel] [PATCH 1/2] envlist.c: convert many leading TABs to spaces via expand -i

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Signed-off-by: Jim Meyering meyer...@redhat.com --- envlist.c | 256 +++--- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/envlist.c b/envlist.c index f2303cd..1d98108 100644 ---

[Qemu-devel] [PATCH 2/2] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Without this, envlist_to_environ may silently fail to copy all strings into the destination buffer, and both callers would leak any env strings allocated after a failing strdup, because the freeing code stops at the first NULL pointer. Signed-off-by: Jim

Re: [Qemu-devel] [PATCH 1/3] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
Kevin Wolf wrote: A patch replacing tabs by spaces isn't really the kind of patches that we would want to avoid during freeze. It's easy enough to check with git diff -w that it doesn't change anything semantically. That makes sense, so I've posted two patches: 1) two patches: one

Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes

2012-05-22 Thread ronnie sahlberg
Hi Stefan On Mon, May 21, 2012 at 11:20 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, May 21, 2012 at 12:00 PM, ronnie sahlberg ronniesahlb...@gmail.com wrote: Yes, I use IDE since I boot from this LUN. I just managed to track it down to the IDE changes. It looks like basically

Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes

2012-05-22 Thread ronnie sahlberg
Hi, Now that I see what happens, I can easily workaround this in block/iscsi.c by the patch below, but I dont know if this is the right thing to do. It does appear that here, when I use qemu_set_fd_handler() and add a handler for writeble it takes 55ms before the event system notices this and

Re: [Qemu-devel] [PATCH] rbd: hook up cache options

2012-05-22 Thread Paolo Bonzini
Il 17/05/2012 22:42, Josh Durgin ha scritto: + * Fallback to more conservative semantics if setting cache + * options fails. Ignore errors from setting rbd_cache because the + * only possible error is that the option does not exist, and + * librbd defaults to no caching. If

Re: [Qemu-devel] [PATCH] Prevent disk data loss when closing qemu

2012-05-22 Thread Paolo Bonzini
Il 22/05/2012 10:51, Kevin Wolf ha scritto: Am 16.05.2012 12:16, schrieb Pavel Dovgaluk: I use qemu under Windows and it has two windows when executes - console and SDL ones. When I close SDL window main loop function terminates correctly, and when I close console window to terminate qemu

Re: [Qemu-devel] [RFC:kvm] export host NUMA info to guest make emulated device NUMA attr

2012-05-22 Thread Liu ping fan
On Sat, May 19, 2012 at 12:14 AM, Shirley Ma mashi...@us.ibm.com wrote: On Thu, 2012-05-17 at 17:20 +0800, Liu Ping Fan wrote: Currently, the guest can not know the NUMA info of the vcpu, which will result in performance drawback. This is the discovered and experiment by         Shirley Ma

Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes

2012-05-22 Thread Paolo Bonzini
Il 22/05/2012 11:15, ronnie sahlberg ha scritto: Hi, Now that I see what happens, I can easily workaround this in block/iscsi.c by the patch below, but I dont know if this is the right thing to do. It does appear that here, when I use qemu_set_fd_handler() and add a handler for writeble

Re: [Qemu-devel] [PATCH 1/3] envlist.c: handle strdup failure

2012-05-22 Thread Kevin Wolf
Am 22.05.2012 11:05, schrieb Jim Meyering: Kevin Wolf wrote: A patch replacing tabs by spaces isn't really the kind of patches that we would want to avoid during freeze. It's easy enough to check with git diff -w that it doesn't change anything semantically. That makes sense, so I've posted

Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes

2012-05-22 Thread ronnie sahlberg
On Tue, May 22, 2012 at 7:29 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 22/05/2012 11:15, ronnie sahlberg ha scritto: Hi, Now that I see what happens, I can easily workaround this in block/iscsi.c by the patch below, but I dont know if this is the right thing to do. It does appear that

[Qemu-devel] [PATCHv2 0/2] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com This is the same as v1, except that two lines of non-leading TABs in envlist.c (indenting comments after code) have also been converted to use equivalent spaces instead of TABs. Jim Meyering (2): envlist.c: convert all TABs to equivalent spaces

[Qemu-devel] [PATCHv2 2/2] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Without this, envlist_to_environ may silently fail to copy all strings into the destination buffer, and both callers would leak any env strings allocated after a failing strdup, because the freeing code stops at the first NULL pointer. Signed-off-by: Jim

[Qemu-devel] [PATCHv2 1/2] envlist.c: convert all TABs to equivalent spaces

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Signed-off-by: Jim Meyering meyer...@redhat.com --- envlist.c | 256 +++--- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/envlist.c b/envlist.c index f2303cd..be0addb 100644 ---

Re: [Qemu-devel] [PATCH 1/3] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
Kevin Wolf wrote: Am 22.05.2012 11:05, schrieb Jim Meyering: Kevin Wolf wrote: A patch replacing tabs by spaces isn't really the kind of patches that we would want to avoid during freeze. It's easy enough to check with git diff -w that it doesn't change anything semantically. That makes

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

2012-05-22 Thread Michael Trimarchi
Hi Peter On 05/22/2012 07:45 AM, Peter Crosthwaite wrote: 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

Re: [Qemu-devel] [PATCHv2 1/2] envlist.c: convert all TABs to equivalent spaces

2012-05-22 Thread Peter Maydell
On 22 May 2012 10:50, Jim Meyering j...@meyering.net wrote: From: Jim Meyering meyer...@redhat.com If we're going to go to the effort of a complete reindent patch we should actually reindent to the QEMU coding style standard, which is four-space, not eight. -- PMM

[Qemu-devel] [PATCH] ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for.

2012-05-22 Thread Ronnie Sahlberg
Otherwise, If we add an event for -is-writeable but the socket is already writeable there may be a short delay before the event callback is actually triggered. Those delays would in particular hurt performance during BIOS boot and when the GRUB bootloader reads the kernel and initrd.

Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes

2012-05-22 Thread ronnie sahlberg
None of the other drivers in block/*.c call qemu_notify_event() Do you you think those should be audited and have this call added to where required ? regards ronnie sahlberg On Tue, May 22, 2012 at 7:48 PM, ronnie sahlberg ronniesahlb...@gmail.com wrote: On Tue, May 22, 2012 at 7:29 PM, Paolo

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

2012-05-22 Thread Stefan Hajnoczi
On Mon, May 21, 2012 at 5:54 PM, Erik Rull webmas...@rdsoftware.de wrote: 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,

[Qemu-devel] [PATCH] ISCSI: Switch to using READ16/WRITE16 for I/O to the LUN.

2012-05-22 Thread Ronnie Sahlberg
This allows using LUNs bigger than 2TB. Signed-off-by: Ronnie Sahlberg ronniesahlb...@gmail.com --- block/iscsi.c | 101 trace-events |4 +- 2 files changed, 74 insertions(+), 31 deletions(-) diff --git a/block/iscsi.c

Re: [Qemu-devel] [PATCH v3 0/8] msi: Refactorings and reset fixes

2012-05-22 Thread Alexander Graf
On 11.05.2012, at 16:42, Jan Kiszka wrote: v3 is v2 - xhci changes as MSI is instable there anyway. So, only patches 1 and 2 are for 1.1/stable now. Just saw these in my inbox as unanswered, so mst: ping? :) Alex

[Qemu-devel] [PATCHv3 0/2] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Same as v2, but now with TABs converted using expand --tabs=4. Jim Meyering (2): envlist.c: convert each TAB(width-4) to equivalent spaces envlist.c: handle strdup failure envlist.c | 272 --

[Qemu-devel] [PATCHv3 1/2] envlist.c: convert each TAB(width-4) to equivalent spaces

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Signed-off-by: Jim Meyering meyer...@redhat.com --- envlist.c | 256 +++--- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/envlist.c b/envlist.c index f2303cd..e44889b 100644 ---

Re: [Qemu-devel] [PATCH v3 3/8] ahci: Clean up reset functions

2012-05-22 Thread Alexander Graf
On 11.05.2012, at 16:42, Jan Kiszka wrote: Properly register reset functions via the device class. CC: Alexander Graf ag...@suse.de Signed-off-by: Jan Kiszka jan.kis...@siemens.com Looks good to me, but I'm no infrastructure expert :) Reviewed-by: Alexander Graf ag...@suse.de Alex

[Qemu-devel] [PATCHv2 2/9] tcg: __jit_debug_descriptor must *not* be static

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Add comments so no one else will be tempted to reduce the scope of this global variable. Signed-off-by: Jim Meyering meyer...@redhat.com --- tcg/tcg.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c

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

2012-05-22 Thread Jim Meyering
Peter Maydell wrote: On 21 May 2012 21:10, Jim Meyering j...@meyering.net wrote: Peter Maydell wrote: On 21 May 2012 20:51, Jim Meyering j...@meyering.net wrote: From: Jim Meyering meyer...@redhat.com Signed-off-by: Jim Meyering meyer...@redhat.com ---  tcg/tcg.c | 2 +-  1 file changed,

Re: [Qemu-devel] [PATCHv2 1/2] envlist.c: convert all TABs to equivalent spaces

2012-05-22 Thread Jim Meyering
Peter Maydell wrote: On 22 May 2012 10:50, Jim Meyering j...@meyering.net wrote: From: Jim Meyering meyer...@redhat.com If we're going to go to the effort of a complete reindent patch we should actually reindent to the QEMU coding style standard, which is four-space, not eight. Good point.

Re: [Qemu-devel] [PATCH v3 1/8] ahci: Fix reset of MSI function

2012-05-22 Thread Alexander Graf
On 11.05.2012, at 16:42, Jan Kiszka wrote: Call msi_reset on device reset as still required by the core. CC: Alexander Graf ag...@suse.de CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka jan.kis...@siemens.com Acked-by: Alexander Graf ag...@suse.de Alex

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

2012-05-22 Thread Jan Kiszka
On 2012-05-22 07:04, Stefan Hajnoczi wrote: On Mon, May 21, 2012 at 5:54 PM, Erik Rull webmas...@rdsoftware.de wrote: 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

[Qemu-devel] [PATCH qom-next 0/5] target-i386: re-factor CPU creation/initialization to QOM

2012-05-22 Thread Igor Mammedov
Moving code related to CPU creation and initialization internal parts from board level into apic and cpu objects will allow X86CPU to better model QOM object life-cycle. It will allow to create X86CPU as any other object by creating it with object_new() then setting properties and then calling

[Qemu-devel] [PATCH qom-next 2/5] target-i386: add cpu-model property to x86_cpu

2012-05-22 Thread Igor Mammedov
it's probably intermidiate step till cpu modeled as sub-classes. After then we probably could drop it. However it still could be used for overiding default cpu subclasses definition, and probably renamed to something like 'features'. Signed-off-by: Igor Mammedov imamm...@redhat.com ---

[Qemu-devel] [PATCH 02/16] qapi: introduce size type

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- qapi/qapi-visit-core.h |4 qapi/qapi-visit-core.c |7 +++ scripts/qapi.py|2 +- 3 files changed, 12 insertions(+), 1 deletions(-) diff --git a/qapi/qapi-visit-core.h b/qapi/qapi-visit-core.h index e850746..bab2fec

[Qemu-devel] [PATCH 14/16] convert net_init_tap() to NetClientOptions

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/tap.h |2 +- net/tap-aix.c |2 +- net/tap-bsd.c |2 +- net/tap-haiku.c |2 +- net/tap-linux.c |9 +++- net/tap-solaris.c |2 +- net/tap-win32.c | 11 +++-- net/tap.c | 111

Re: [Qemu-devel] [PATCH qom-next 3/5] pc: move apic_mapped initialization into common apic init code

2012-05-22 Thread Jan Kiszka
On 2012-05-22 07:35, Igor Mammedov wrote: Move from apic_init in pc.c the code that belongs to apic_init_common and create/init apic in pc_new_cpu instead of separate func. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/apic_common.c | 16 hw/msi.h |

Re: [Qemu-devel] [PATCH qom-next 3/5] pc: move apic_mapped initialization into common apic init code

2012-05-22 Thread Jan Kiszka
On 2012-05-22 07:35, Igor Mammedov wrote: Move from apic_init in pc.c the code that belongs to apic_init_common and create/init apic in pc_new_cpu instead of separate func. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/apic_common.c | 16 hw/msi.h |

Re: [Qemu-devel] [PATCH qom-next 4/5] target-i386: make initialize CPU in QOM way

2012-05-22 Thread Jan Kiszka
On 2012-05-22 07:35, Igor Mammedov wrote: Make CPU creation/initialization consistent with QOM object behavior in this, by moving tcg and apic initialization from board level into CPU's initfn/realize calls and cpu_model property setter. Which makes CPU object self-sufficient in respect of

[Qemu-devel] [PATCH qom-next 3/5] pc: move apic_mapped initialization into common apic init code

2012-05-22 Thread Igor Mammedov
Move from apic_init in pc.c the code that belongs to apic_init_common and create/init apic in pc_new_cpu instead of separate func. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/apic_common.c | 16 hw/msi.h |2 ++ hw/pc.c | 47

[Qemu-devel] [PATCH 06/16] qapi schema: add Netdev types

2012-05-22 Thread Laszlo Ersek
NetdevTapOptions::sndbuf and NetdevDumpOptions::len use the new size type. Signed-off-by: Laszlo Ersek ler...@redhat.com --- qapi-schema.json | 275 ++ 1 files changed, 275 insertions(+), 0 deletions(-) diff --git a/qapi-schema.json

Re: [Qemu-devel] [PATCH qom-next 1/5] target-i386: move cpu halted decision into x86_cpu_reset

2012-05-22 Thread Peter Maydell
On 22 May 2012 11:35, Igor Mammedov imamm...@redhat.com wrote: From: Igor Mammedov niall...@gmail.com MP initialization protocol differs between cpu families, and for P6 and onward models it is up to CPU to decide if it will be BSP using this protocol, so try to model this. However there is

[Qemu-devel] [PATCH 1/2] fdc: floppy drive should be visible after start without media

2012-05-22 Thread Pavel Hrdina
If you start guest with floppy drive but without media inserted, the guest now can see floppy drive. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- hw/pc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 4d34a33..967c17a 100644 --- a/hw/pc.c

[Qemu-devel] [PATCH 0/2] fdc: fix media handling

2012-05-22 Thread Pavel Hrdina
This patch series fixes handling of FDC when you don't have media inserted. Guest should see floppy drive if you start guest without media and should detect that there is no media in drive. Signed-off-by: Pavel Hrdina phrd...@redhat.com Pavel Hrdina (2): fdc: floppy drive should be visible

[Qemu-devel] [PATCH 15/16] convert net_init_bridge() to NetClientOptions

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/tap.c | 23 --- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/net/tap.c b/net/tap.c index 7501eba..fdaab2b 100644 --- a/net/tap.c +++ b/net/tap.c @@ -512,21 +512,22 @@ static int

[Qemu-devel] [PATCH 11/16] convert net_init_slirp() to NetClientOptions

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/slirp.c | 93 --- 1 files changed, 25 insertions(+), 68 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index 9b925b7..166304c 100644 --- a/net/slirp.c +++ b/net/slirp.c @@

[Qemu-devel] [PATCH 08/16] convert net_client_init() to OptsVisitor

2012-05-22 Thread Laszlo Ersek
The net_client_init() prototype is kept intact. Based on is_netdev, the QemuOpts-rooted QemuOpt-list is parsed as a Netdev or a NetLegacy. The original meat of net_client_init() is moved to and simplified in net_client_init1(): Fields not common between -net and -netdev are clearly separated:

[Qemu-devel] [PATCH 2/2] fdc: fix media detection

2012-05-22 Thread Pavel Hrdina
We have to set up 'media_changed' after guest start so floppy driver could detect that there is no media in drive. For this purpose we call 'fdctrl_change_cb' instead of 'fd_revalidate' in 'fdctrl_connect_drives'. 'fd_revalidate' is called inside 'fdctrl_change_cb'. In 'fdctrl_handle_seek' we

[Qemu-devel] [PATCH 04/16] qapi: introduce OptsVisitor

2012-05-22 Thread Laszlo Ersek
This visitor supports parsing -option [type=]discriminator[,optarg1=val1][,optarg2=val2][,...] style QemuOpts objects into native C structures. After defining the type tree in the qapi schema (see below), a root type traversal with this visitor linked to the underlying QemuOpts object will

[Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-05-22 Thread Laszlo Ersek
Inspired by [1], the first half of this series attempts to implement a new visitor that should clean up defining and processing command line options. For a more detailed description, please see [PATCH 04/16] qapi: introduce OptsVisitor. The second half converts -net/-netdev parsing to the new

[Qemu-devel] [PATCH qom-next 4/5] target-i386: make initialize CPU in QOM way

2012-05-22 Thread Igor Mammedov
Make CPU creation/initialization consistent with QOM object behavior in this, by moving tcg and apic initialization from board level into CPU's initfn/realize calls and cpu_model property setter. Which makes CPU object self-sufficient in respect of creation/initialization and matches a typical

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

2012-05-22 Thread Michael S. Tsirkin
On Tue, May 22, 2012 at 05:17:39PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2012-05-22 at 14:34 +1000, Benjamin Herrenschmidt wrote: 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

[Qemu-devel] [PATCH 05/16] qapi schema: remove trailing whitespace

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- qapi-schema.json | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index bb1f806..a8b3803 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -315,7 +315,7 @@ # @CPU: the

[Qemu-devel] [PATCH 10/16] convert net_init_dump() to NetClientOptions

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/dump.c | 21 + 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/net/dump.c b/net/dump.c index 27e9528..a1de09e 100644 --- a/net/dump.c +++ b/net/dump.c @@ -144,22 +144,35 @@ static int

Re: [Qemu-devel] [PATCH 3/3] deal with guest panicked event

2012-05-22 Thread Jan Kiszka
On 2012-05-21 03:50, Wen Congyang wrote: When the guest is panicked, it will write 0x1 to the port 0x505. So if qemu reads 0x1 from this port, we can do the folloing three things according to the parameter -onpanic: 1. emit QEVENT_GUEST_PANICKED only 2. emit QEVENT_GUEST_PANICKED and pause VM

[Qemu-devel] [PATCH 07/16] hw, net: net_client_type - NetClientOptionsKind (qapi-generated)

2012-05-22 Thread Laszlo Ersek
NET_CLIENT_TYPE_ - NET_CLIENT_OPTIONS_KIND_ Signed-off-by: Laszlo Ersek ler...@redhat.com --- net.h | 16 +- hw/cadence_gem.c|2 +- hw/dp8393x.c|2 +- hw/e1000.c |2 +- hw/eepro100.c |2 +-

[Qemu-devel] [PATCH qom-next 1/5] target-i386: move cpu halted decision into x86_cpu_reset

2012-05-22 Thread Igor Mammedov
From: Igor Mammedov niall...@gmail.com MP initialization protocol differs between cpu families, and for P6 and onward models it is up to CPU to decide if it will be BSP using this protocol, so try to model this. However there is no point in implementing MP initialization protocol in qemu. Thus

[Qemu-devel] [PATCH 16/16] remove unused QemuOpts parameter from net init functions

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/dump.h |5 ++--- net/slirp.h |5 ++--- net/socket.h|5 ++--- net/tap.h |9 - net/vde.h |5 ++--- net.c | 14 ++ net/dump.c |4 ++-- net/slirp.c |4

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

2012-05-22 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 14:14 +0300, Michael S. Tsirkin wrote: The baseline is the laptop without kvm talking to the server. The TCP_STREAM test results are: It's not a good test. The thing most affecting throughput results is how much CPU does you guest get. So as a minumum you need to

[Qemu-devel] [PATCH 01/16] qapi: fix error propagation

2012-05-22 Thread Laszlo Ersek
From: Paolo Bonzini pbonz...@redhat.com Don't overwrite / leak previously set errors. Don't try to end a container that could not be started. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Laszlo Ersek ler...@redhat.com --- error.h|4 +- error.c

[Qemu-devel] [PATCH 12/16] convert net_init_socket() to NetClientOptions

2012-05-22 Thread Laszlo Ersek
I reverse engineered the following permissions between the -socket sub-options: fd listen connect mcast udp | localaddr fd x . .. . | . listen . x .. . | . connect. . x. . | . mcast

[Qemu-devel] [PATCHv3 2/2] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Without this, envlist_to_environ may silently fail to copy all strings into the destination buffer, and both callers would leak any env strings allocated after a failing strdup, because the freeing code stops at the first NULL pointer. Signed-off-by: Jim

[Qemu-devel] [PATCH qom-next 5/5] target-i386: move reset callback to cpu.c

2012-05-22 Thread Igor Mammedov
Moving reset callback into cpu object from board level will allow properly create object during run-time (hotplug). When reset over QOM hierarchy is implemented, this reset callback should be removed. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/pc.c |7 ---

[Qemu-devel] [PATCH 03/16] expose QemuOpt and QemuOpts struct definitions to interested parties

2012-05-22 Thread Laszlo Ersek
The only clients should be the existent qemu-option.c, and the upcoming qapi/opts-visitor.c. Signed-off-by: Laszlo Ersek ler...@redhat.com --- qemu-option-internal.h | 53 qemu-option.c | 24 + 2 files changed, 54

[Qemu-devel] [PATCH 09/16] convert net_init_nic() to NetClientOptions

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- net.c | 39 ++- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/net.c b/net.c index 5ac5cf0..bd2fd23 100644 --- a/net.c +++ b/net.c @@ -748,12 +748,15 @@ int net_handle_fd_param(Monitor *mon,

Re: [Qemu-devel] [PATCH 2/2] fdc: fix media detection

2012-05-22 Thread Kevin Wolf
Am 22.05.2012 12:59, schrieb Pavel Hrdina: We have to set up 'media_changed' after guest start so floppy driver could detect that there is no media in drive. For this purpose we call 'fdctrl_change_cb' instead of 'fd_revalidate' in 'fdctrl_connect_drives'. 'fd_revalidate' is called inside

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

2012-05-22 Thread Eric Blake
On 05/22/2012 02:18 AM, Kevin Wolf wrote: This patch series adds the -filefd command-line option and the getfd_file monitor command. This will enable libvirt to open a file and push the corresponding filename and file descriptor to QEMU. When QEMU needs to open a file, it will first check

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

2012-05-22 Thread Michael S. Tsirkin
On Tue, May 22, 2012 at 09:41:41PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2012-05-22 at 14:14 +0300, Michael S. Tsirkin wrote: The baseline is the laptop without kvm talking to the server. The TCP_STREAM test results are: It's not a good test. The thing most affecting throughput

[Qemu-devel] [PATCH 13/16] convert net_init_vde() to NetClientOptions

2012-05-22 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/vde.c | 37 + 1 files changed, 29 insertions(+), 8 deletions(-) diff --git a/net/vde.c b/net/vde.c index 8e60f68..35e8113 100644 --- a/net/vde.c +++ b/net/vde.c @@ -110,20 +110,41 @@ static int

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

2012-05-22 Thread Kevin Wolf
Am 22.05.2012 14:02, schrieb Eric Blake: On 05/22/2012 02:18 AM, Kevin Wolf wrote: This patch series adds the -filefd command-line option and the getfd_file monitor command. This will enable libvirt to open a file and push the corresponding filename and file descriptor to QEMU. When QEMU

Re: [Qemu-devel] [PATCH] ISCSI: Switch to using READ16/WRITE16 for I/O to the LUN.

2012-05-22 Thread Paolo Bonzini
Il 22/05/2012 12:10, Ronnie Sahlberg ha scritto: This allows using LUNs bigger than 2TB. Applied to scsi-next for 1.2, thanks. Paolo Signed-off-by: Ronnie Sahlberg ronniesahlb...@gmail.com --- block/iscsi.c | 101 trace-events |

Re: [Qemu-devel] [PATCH] ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for.

2012-05-22 Thread Paolo Bonzini
Il 22/05/2012 11:56, Ronnie Sahlberg ha scritto: Otherwise, If we add an event for -is-writeable but the socket is already writeable there may be a short delay before the event callback is actually triggered. Those delays would in particular hurt performance during BIOS boot and when the

[Qemu-devel] ARM QEMU/KVM and TrustZone

2012-05-22 Thread Peter Maydell
Historically for QEMU we haven't implemented TrustZone support even though we claim to emulate CPUs that provide it. Instead we provide a CPU which mostly looks like a variant of the real thing without the TrustZone feature. We then bolt on a few extra cp15 registers (eg the SCR) as a pragmatic

[Qemu-devel] [PATCH 1/2] scsi: declare vmstate_info_scsi_requests to be static

2012-05-22 Thread Paolo Bonzini
From: Jim Meyering meyer...@redhat.com Signed-off-by: Jim Meyering meyer...@redhat.com --- hw/scsi-bus.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 8ab9bcd..f10f3ec 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -1561,7 +1561,7

[Qemu-devel] [PULL 1.1 0/2] SCSI patches for 1.1.0-rc3

2012-05-22 Thread Paolo Bonzini
The following changes since commit 76ee152a86d5f2533443ce4d2be6fe253cfb3c45: Update version to 1.1.0-rc2 (2012-05-14 17:56:50 -0500) are available in the git repository at: git://github.com/bonzini/qemu.git scsi-next for you to fetch changes up to e1a2d34f4abd8a117f5c5a25a5bb2e67d597de23:

  1   2   3   >