[Qemu-devel] [PATCH 1.1] qemu-timer: Fix wrong error message

2012-05-11 Thread Stefan Weil
Function timeSetEvent returns 0 when it fails, but it does not set an error code which can be retrieved by GetLastError. Therefore calling GetLastError is useless. Signed-off-by: Stefan Weil --- qemu-timer.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/qemu-tim

[Qemu-devel] [PATCH] kernel vfio: PCI ROM size calculation

2012-05-11 Thread Alexey Kardashevskiy
The original code calculated the real size of the ROM and passed it to QEMU which tried to do pci_register_bar and failed with error message "ERROR: PCI region size must be pow2". The example card is PCIe Intel E1000E with the ROM size 0x9c00. pci_resource_len seems to be a proper solution. Sign

[Qemu-devel] [PATCH] qemu msi/msix: added functions to API to set up message address and data

2012-05-11 Thread Alexey Kardashevskiy
Added msi_set_address_data and msix_set_address_data in order to support sPAPR-specific implementation of MSI/MSIX configuration mechanism. POWER guest does not initialize these fields, it expects a supervisor to get them initialized. Required for VFIO on POWER. Signed-off-by: Alexey Kardashevski

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

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

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

2012-05-11 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 --- include/linux/pci_regs.h | 112 +- 1 files changed, 100 insertions(+), 12 deletions(-) diff --git

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

2012-05-11 Thread Greg KH
On Fri, May 11, 2012 at 04:55:35PM -0600, Alex Williamson wrote: > 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 s

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

2012-05-11 Thread Alex Williamson
Signed-off-by: Alex Williamson --- Documentation/vfio.txt | 315 1 files changed, 315 insertions(+), 0 deletions(-) create mode 100644 Documentation/vfio.txt diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt new file mode 100644 inde

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

2012-05-11 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,

[Qemu-devel] [PATCH 04/13] pci: New pci_dma_quirk()

2012-05-11 Thread Alex Williamson
Integrating IOMMU groups more closely into the driver core allows us to more easily work around DMA quirks. The Ricoh multifunction controller is a favorite example of devices that are currently incompatible with IOMMU isolation as all the functions use the requestor ID of function 0 for DMA. Pas

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

2012-05-11 Thread Alex Williamson
On Fri, 2012-05-11 at 16:38 -0700, Greg KH wrote: > On Fri, May 11, 2012 at 04:55:35PM -0600, Alex Williamson wrote: > > 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 point

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

2012-05-11 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 t

[Qemu-devel] [PATCH 05/13] pci: New pci_acs_enabled()

2012-05-11 Thread Alex Williamson
In a PCIe environment, transactions aren't always required to reach the root bus before being re-routed. Peer-to-peer DMA may actually not be seen by the IOMMU in these cases. For IOMMU groups, we want to provide IOMMU drivers a way to detect these restrictions. Provided with a PCI device, pci_a

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

2012-05-11 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 --- drivers/i

[Qemu-devel] [PATCH for-1.1 0/2] tcg/ppc64: AREG0 support

2012-05-11 Thread Andreas Färber
Hello malc and Alex, Here's patches to optimize and fix potential AREG0 issues on ppc64. So far I've only tested on Darwin/ppc64 - Debian/sparc, HelenOS/sparc64, Haiku/i386, Haiku/x86_64 guests work. Still TODO: testing on Linux and testing AREG0 ppc(64). Regards, Andreas Cc: malc Cc: Alexande

[Qemu-devel] [PATCH for-1.1 2/2] tcg/ppc64: Fix CONFIG_TCG_PASS_AREG0

2012-05-11 Thread Andreas Färber
In qemu_ld/st load the registers for the helper calls directly rather than rotating them around afterwards for AREG0. Also clobber the additional register. Signed-off-by: Andreas Färber --- tcg/ppc64/tcg-target.c | 32 1 files changed, 12 insertions(+), 20 del

[Qemu-devel] [PATCH for-1.1 1/2] tcg/ppc64: Don't hardcode register numbers for qemu_ld/st

2012-05-11 Thread Andreas Färber
Facilitates using r3 for prepended AREG0. Signed-off-by: Andreas Färber --- tcg/ppc64/tcg-target.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index d0b067b..0573a72 100644 --- a/tcg/ppc64/tcg-target.c ++

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

2012-05-11 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] [PATCH 01/13] driver core: Add iommu_group tracking to struct device

2012-05-11 Thread Greg KH
On Fri, May 11, 2012 at 05:58:01PM -0600, Alex Williamson wrote: > On Fri, 2012-05-11 at 16:38 -0700, Greg KH wrote: > > On Fri, May 11, 2012 at 04:55:35PM -0600, Alex Williamson wrote: > > > IOMMU groups allow IOMMU drivers to represent DMA visibility > > > and isolation of devices. Multiple devi

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

2012-05-11 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. Signed-off-by: Alex Williamson --- drivers/iommu/amd_iommu.c |3 +++ drivers/iomm

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

2012-05-11 Thread Alex Williamson
For returning errors out to non-PCI code. Re-name xen's version. Signed-off-by: Alex Williamson --- drivers/xen/xen-pciback/conf_space.c |6 +++--- include/linux/pci.h | 26 ++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/driver

Re: [Qemu-devel] [PATCH next v2 41/74] target-lm32: Let cpu_lm32_init() return LM32CPU

2012-05-11 Thread Andreas Färber
Am 11.05.2012 18:28, schrieb Michael Walle: >> Make the include paths for cpu-qom.h consistent to allow using LM32CPU >> in cpu.h. >> >> Turn cpu_init macro into a static inline function returning CPULM32State >> for backwards compatibility. >> >> Signed-off-by: Andreas Färber > Acked-by: Michael

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

2012-05-11 Thread Alex Williamson
On Fri, 2012-05-11 at 16:39 -0700, Greg KH wrote: > On Fri, May 11, 2012 at 04:55:41PM -0600, Alex Williamson wrote: > > 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 in

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

2012-05-11 Thread Greg KH
On Fri, May 11, 2012 at 04:55:41PM -0600, Alex Williamson wrote: > 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 b

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

2012-05-11 Thread Alex Williamson
or a group. I've poorly chosen the name "x86" for the current IOMMU backend, simply for lack of a good way to describe a non-window based, page table driven IOMMU implementation. These patches can be found in git here: git://github.com/awilliam/linux-vfio.git (iommu-group-vfio-201

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

2012-05-11 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 Will

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

2012-05-11 Thread Alexey Kardashevskiy
12.05.2012 5:20, Jason Baron написал: > On Fri, May 11, 2012 at 04:45:21PM +1000, Alexey Kardashevskiy wrote: >> Normally the pci_add_capability is called on devices to add new >> capability. This is ok for emulated devices which capabilities list >> is being built by QEMU. >> >> In the case of VFI

Re: [Qemu-devel] [PATCH 08/21] qdev: use object_property_print in info qtree

2012-05-11 Thread Andreas Färber
Am 11.05.2012 16:45, schrieb Paolo Bonzini: > Il 11/05/2012 16:20, Andreas Färber ha scritto: >> char *string = NULL; >> mo = string_output_visitor_new(); -object_property_get(obj, string_output_get_visitor(mo), name, NULL); +object_property_get(obj, string_output

[Qemu-devel] [PATCH] ISCSI: iscsi_process_read callback for when the iscsi socket becomes readable may be invoked by qemu after the fd-is-readable event has cleared.

2012-05-11 Thread Ronnie Sahlberg
Libiscsi treats a situation such as POLLIN was invoked and the socket is readable but ioctl(...FIONREAD...) returns that there are no bytes available to read as an error and that the socket is faulty or has been closed. which may trigger a slow process of closing down the socket completely and t

[Qemu-devel] [PATCH 0/1] ISCSI: Dont call libiscsi for POLLIN if there are no bytes readable from the socket

2012-05-11 Thread Ronnie Sahlberg
Kevin, List, Paolo Updated patch based on Paolo's suggestion to do these checks in iscsi_process_read instead. Additionally, since this means we can no remain setting a fd-is-readable event unconditionally we can handle target initiated NOPs better. For example the case when the initiator is i

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: guest-shutdown: become synchronous

2012-05-11 Thread Eric Blake
On 05/11/2012 01:19 PM, Luiz Capitulino wrote: > Last commit dropped qemu-ga's SIGCHLD handler, used to automatically > reap terminated children processes. This introduced a bug to > qmp_guest_shutdown(): it will generate zombies. > > This problem probably doesn't matter in the success case, as th

Re: [Qemu-devel] [PATCH 1/2] qemu-ga: guest-suspend: make the API synchronous

2012-05-11 Thread Eric Blake
On 05/11/2012 01:19 PM, Luiz Capitulino wrote: > Currently, qemu-ga has a SIGCHLD handler that automatically reaps terminated > children processes. The idea is to avoid having qemu-ga commands blocked > waiting for children to terminate. > > + > +rpid = waitpid(pid, &status, 0); You need to

Re: [Qemu-devel] [PATCH 0/2]: qemu-ga: Fix fd handling in daemon mode

2012-05-11 Thread Michael Roth
On Thu, May 10, 2012 at 04:50:40PM -0300, Luiz Capitulino wrote: > Hi Michael, > > There's a problem on how we handle fds in daemon mode that may cause > suspend to fail. This series fixes it. Please, check patch 2/2 for full > details. Thanks, applied to qemu-ga branch. > > qemu-ga.c

Re: [Qemu-devel] [PATCH 4/4] qemu-doc: Use QEMU instead of qemu for product name

2012-05-11 Thread Andreas Färber
Am 11.05.2012 23:07, schrieb Stefan Weil: > When 'qemu' was used as a product name or as a generic process name, > it is now replaced by the official upper case 'QEMU'. > > Signed-off-by: Stefan Weil > --- > qemu-doc.texi | 10 +- > qemu-options.hx | 30 +++-

Re: [Qemu-devel] [PATCH 1/4] configure: Use QEMU instead of Qemu

2012-05-11 Thread Andreas Färber
Am 11.05.2012 23:07, schrieb Stefan Weil: > This new 'Qemu' was recently added. > Replace it by the official all upper case 'QEMU' and also fix the column > alignment. > > Signed-off-by: Stefan Weil Reviewed-by: Andreas Färber /-F -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg,

[Qemu-devel] [PATCH 3/4] qemu-doc: Fix executable name in examples

2012-05-11 Thread Stefan Weil
The executable name qemu was replaced some time ago by qemu-system-i386. Fix all examples accordingly. Some examples will only work with qemu-system-i386 or qemu-system-x86_64 for obvious reasons ("dos.img"). To keep things simple, I did not vary the executable name. Place holders like qemu-syste

[Qemu-devel] [PATCH 1/4] configure: Use QEMU instead of Qemu

2012-05-11 Thread Stefan Weil
This new 'Qemu' was recently added. Replace it by the official all upper case 'QEMU' and also fix the column alignment. Signed-off-by: Stefan Weil --- configure |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 491109d..b55a792 100755 --- a/co

[Qemu-devel] [PATCH 4/4] qemu-doc: Use QEMU instead of qemu for product name

2012-05-11 Thread Stefan Weil
When 'qemu' was used as a product name or as a generic process name, it is now replaced by the official upper case 'QEMU'. Signed-off-by: Stefan Weil --- qemu-doc.texi | 10 +- qemu-options.hx | 30 +++--- 2 files changed, 20 insertions(+), 20 deletions(-)

[Qemu-devel] [PATCH 2/4] qemu-doc: Add missing parameter in description of -D option

2012-05-11 Thread Stefan Weil
'logfile' is a place holder for a non optional parameter. Signed-off-by: Stefan Weil --- qemu-options.hx |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index a169792..4170d61 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -231

[Qemu-devel] [PATCH 1.1 0/4] Documentation patches

2012-05-11 Thread Stefan Weil
These patches try to improve the documentation for QEMU 1.1. They don't depend on each other, so it's possible to apply any (or best: all) of them. [PATCH 1/4] configure: Use QEMU instead of Qemu [PATCH 2/4] qemu-doc: Add missing parameter in description of -D [PATCH 3/4] qemu-doc: Fix executable

[Qemu-devel] [PATCH] qemu-img: Fix segmentation fault

2012-05-11 Thread Charles Arnold
The following command generates a segmentation fault. qemu-img convert -O vpc -o ? test test2 This is because the 'goto out;' statement calls qemu_progress_end before qemu_progress_init is called resulting in a NULL pointer invocation. Signed-off-by: Charles Arnold --- diff --git a/qemu-img.c b

[Qemu-devel] [PATCH] audio: fix bug in mixeng_template.h build on NetBSD

2012-05-11 Thread Roger Pau Monne
This is a bug fix for rc1, although I think this bug has been present for a long time. NetBSD has typedefs and defines of types, so all the types specified in mixeng.c IN_T define (int8_t, uint8_t...) got expanded to __int8_t, __uint8_t, and the construction of types in mixeng_template.h failed.

[Qemu-devel] [Bug 591666] Re: broken "pci_add auto storage"

2012-05-11 Thread vikas pandey
this is vikas pandey, 1:would u please give me ur kernel and initrd source to me ..am also trying to add pci and usb device in guest os .. 2: i am using qemu and i am abe to run some of kernel image and initrd which is available on qemu site for testing purpose. now my ami is to connect the hos

Re: [Qemu-devel] [PATCH next v2 33/74] pxa2xx: Use cpu_arm_init() and store ARMCPU

2012-05-11 Thread andrzej zaborowski
On 11 May 2012 13:16, Peter Maydell wrote: > On 10 May 2012 01:14, Andreas Färber wrote: >> Also use cpu_reset() in place of cpu_state_reset(). >> >> Signed-off-by: Andreas Färber > > The pxa2xx stuff is probably going to clash with the cp15 > rework, but I guess we'll sort that out when one or

Re: [Qemu-devel] [PATCH 1.1] qapi: QMP input visitor, handle floats parsed as ints

2012-05-11 Thread Luiz Capitulino
On Fri, 11 May 2012 12:43:24 -0500 Michael Roth wrote: > JSON numbers can be interpreted as either integers or floating point > values depending on their representation. As a result, QMP input visitor > might visit a QInt when it was expecting a QFloat, so add handling to > account for this. > >

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

2012-05-11 Thread Jason Baron
On Fri, May 11, 2012 at 04:45:21PM +1000, Alexey Kardashevskiy wrote: > Normally the pci_add_capability is called on devices to add new > capability. This is ok for emulated devices which capabilities list > is being built by QEMU. > > In the case of VFIO the capability may already exist and addin

[Qemu-devel] [PATCH 2/2] qemu-ga: guest-shutdown: become synchronous

2012-05-11 Thread Luiz Capitulino
Last commit dropped qemu-ga's SIGCHLD handler, used to automatically reap terminated children processes. This introduced a bug to qmp_guest_shutdown(): it will generate zombies. This problem probably doesn't matter in the success case, as the VM will shutdown anyway, but let's do the right thing a

[Qemu-devel] [PATCH 1/2] qemu-ga: guest-suspend: make the API synchronous

2012-05-11 Thread Luiz Capitulino
Currently, qemu-ga has a SIGCHLD handler that automatically reaps terminated children processes. The idea is to avoid having qemu-ga commands blocked waiting for children to terminate. That approach has two problems: 1. qemu-ga is unable to detect errors in the child, meaning that qemu-ga re

[Qemu-devel] [PATCH 0/2]: qemu-ga: make shutdown & suspend synchronous

2012-05-11 Thread Luiz Capitulino
The main motivation for this series is fixing two possible race conditions in the guest-suspend-* API due to the complexity that arose from the way we handle terminated children processes today. Full details in the first patch. This series applies on top of my two other qemu-ga series submitted pr

Re: [Qemu-devel] [PATCH] audio: fix bug in mixeng_template.h build on NetBSD

2012-05-11 Thread malc
On Fri, 11 May 2012, Roger Pau Monne wrote: > This is a bug fix for rc1, although I think this bug has been present > for a long time. If there's a bug than it's within NetBSD itself, this issue has been discussed few times (at least twice it hink) in the past, please search the ML archives. [..

Re: [Qemu-devel] [PATCH v3 4/8] pc: Enable MSI support at APIC level

2012-05-11 Thread Jan Kiszka
On 2012-05-11 13:24, Stefano Stabellini wrote: > On Thu, 10 May 2012, Jan Kiszka wrote: >> Push msi_supported enabling to the APIC implementations where we can >> encapsulate the decision more cleanly, hiding the details from the >> generic code. >> >> CC: Stefano Stabellini >> Signed-off-by: Jan

[Qemu-devel] [PATCH 2/3] qemu-img check: Print fixed clusters and recheck

2012-05-11 Thread Kevin Wolf
When any inconsistencies have been fixed, print the statistics and run another check to make sure everything is correct now. Signed-off-by: Kevin Wolf --- block.h |2 ++ block/qed-check.c |2 ++ qemu-img.c| 10 ++ 3 files changed, 14 insertions(+), 0 deletions

[Qemu-devel] [PATCH block-next 0/3] qemu-img check/qcow2: Allow fixing refcounts

2012-05-11 Thread Kevin Wolf
A prerequisite for a "QED mode" in qcow2, which doesn't update the refcount table except on clean shutdown, is that refcounts can be repaired when the image is opened the next time after a crash. This series adds a qemu-img check option that doesn't only check, but also tries to fix the errors tha

[Qemu-devel] [PATCH 1/3] qemu-img check -r for repairing images

2012-05-11 Thread Kevin Wolf
The QED block driver already provides the functionality to not only detect inconsistencies in images, but also fix them. However, this functionality cannot be manually invoked with qemu-img, but the check happens only automatically during bdrv_open(). This adds a -r switch to qemu-img check that a

Re: [Qemu-devel] [PATCH 2/7] qapi: QMP input visitor, handle floats parsed as ints

2012-05-11 Thread Luiz Capitulino
On Fri, 11 May 2012 12:04:47 -0500 Michael Roth wrote: > On Fri, May 11, 2012 at 01:22:33PM -0300, Luiz Capitulino wrote: > > On Fri, 27 Apr 2012 15:21:18 -0500 > > Michael Roth wrote: > > > > > JSON numbers can be interpreted as either integers or floating point > > > values depending on their

Re: [Qemu-devel] PCI: Hot-removing a virtio-blk causes guest panic

2012-05-11 Thread Michael S. Tsirkin
On Fri, May 11, 2012 at 12:37:49PM +0800, Amos Kong wrote: > good: 3.3.0 guest kernel & qemu-kvm-rhel6 > guest panic: 3.3.0 guest kernel & qemu-upstream (contains fix [1]) > > I didn't change anything of guest kernel, > It seems a bug of qemu-upstream. > > [1] http://marc.info/?l=qemu-devel&m=13

[Qemu-devel] [PATCH 3/3] qcow2: Support for fixing refcount inconsistencies

2012-05-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 27 +-- block/qcow2.c |6 +- block/qcow2.h |3 ++- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 443c021..6a9a672

Re: [Qemu-devel] [SeaBIOS] [RESEND PATCH v3] hotplug: add device per func in ACPI DSDT tables

2012-05-11 Thread Gleb Natapov
On Fri, May 11, 2012 at 11:44:02PM +0800, Jiang Liu wrote: > On 05/11/2012 06:14 PM, Gleb Natapov wrote: > >> I'm not familiar with qemu:( > >> On native OS, admin could trigger PCI device hotplug operations through > >> /sys/bus/pci/slot/xx/power. Not sure whether that's needed for guest OS > >>

Re: [Qemu-devel] [PATCH 1.1] qapi: QMP input visitor, handle floats parsed as ints

2012-05-11 Thread Andreas Färber
Am 11.05.2012 19:43, schrieb Michael Roth: > JSON numbers can be interpreted as either integers or floating point > values depending on their representation. As a result, QMP input visitor > might visit a QInt when it was expecting a QFloat, so add handling to > account for this. > > Signed-off-by

Re: [Qemu-devel] [PATCH 4/7] qapi: String visitor, use %f represenation for floats

2012-05-11 Thread Andreas Färber
Am 11.05.2012 19:32, schrieb Michael Roth: > On Fri, May 11, 2012 at 01:34:01PM -0300, Luiz Capitulino wrote: >> On Fri, 27 Apr 2012 15:21:20 -0500 >> Michael Roth wrote: >> >>> Currently string-output-visitor formats floats as %g, which is nice in >>> that trailing 0's are automatically truncated

[Qemu-devel] [PATCH 1.1] qapi: QMP input visitor, handle floats parsed as ints

2012-05-11 Thread Michael Roth
JSON numbers can be interpreted as either integers or floating point values depending on their representation. As a result, QMP input visitor might visit a QInt when it was expecting a QFloat, so add handling to account for this. Signed-off-by: Michael Roth --- qapi/qmp-input-visitor.c | 11 ++

Re: [Qemu-devel] [PATCH 2/7] qapi: QMP input visitor, handle floats parsed as ints

2012-05-11 Thread Michael Roth
On Fri, May 11, 2012 at 07:16:18PM +0200, Andreas Färber wrote: > Am 11.05.2012 19:04, schrieb Michael Roth: > > On Fri, May 11, 2012 at 01:22:33PM -0300, Luiz Capitulino wrote: > >> On Fri, 27 Apr 2012 15:21:18 -0500 > >> Michael Roth wrote: > >> > >>> JSON numbers can be interpreted as either in

Re: [Qemu-devel] [PATCH 4/7] qapi: String visitor, use %f represenation for floats

2012-05-11 Thread Michael Roth
On Fri, May 11, 2012 at 01:34:01PM -0300, Luiz Capitulino wrote: > On Fri, 27 Apr 2012 15:21:20 -0500 > Michael Roth wrote: > > > Currently string-output-visitor formats floats as %g, which is nice in > > that trailing 0's are automatically truncated, but otherwise this causes > > some issues: >

Re: [Qemu-devel] [PATCH 2/7] qapi: QMP input visitor, handle floats parsed as ints

2012-05-11 Thread Andreas Färber
Am 11.05.2012 19:04, schrieb Michael Roth: > On Fri, May 11, 2012 at 01:22:33PM -0300, Luiz Capitulino wrote: >> On Fri, 27 Apr 2012 15:21:18 -0500 >> Michael Roth wrote: >> >>> JSON numbers can be interpreted as either integers or floating point >>> values depending on their representation. As a

Re: [Qemu-devel] [Xen-devel] [PATCH] qemu/xendisk: set maximum number of grants to be used

2012-05-11 Thread Stefano Stabellini
On Fri, 11 May 2012, Jan Beulich wrote: > >>> On 11.05.12 at 09:19, "Jan Beulich" wrote: > > Legacy (non-pvops) gntdev drivers may require this to be done when the > > number of grants intended to be used simultaneously exceeds a certain > > driver specific default limit. > > > > Signed-off-by: J

Re: [Qemu-devel] [PATCH 2/7] qapi: QMP input visitor, handle floats parsed as ints

2012-05-11 Thread Michael Roth
On Fri, May 11, 2012 at 01:22:33PM -0300, Luiz Capitulino wrote: > On Fri, 27 Apr 2012 15:21:18 -0500 > Michael Roth wrote: > > > JSON numbers can be interpreted as either integers or floating point > > values depending on their representation. As a result, QMP input visitor > > might visit a QIn

Re: [Qemu-devel] [PATCH 4/7] qapi: String visitor, use %f represenation for floats

2012-05-11 Thread Luiz Capitulino
On Fri, 27 Apr 2012 15:21:20 -0500 Michael Roth wrote: > Currently string-output-visitor formats floats as %g, which is nice in > that trailing 0's are automatically truncated, but otherwise this causes > some issues: > > - it 6 uses significant figures instead of 6 decimal places, which >m

Re: [Qemu-devel] [PATCH next v2 41/74] target-lm32: Let cpu_lm32_init() return LM32CPU

2012-05-11 Thread Michael Walle
> Make the include paths for cpu-qom.h consistent to allow using LM32CPU > in cpu.h. > > Turn cpu_init macro into a static inline function returning CPULM32State > for backwards compatibility. > > Signed-off-by: Andreas Färber Acked-by: Michael Walle -- Michael

Re: [Qemu-devel] [PATCH] linux-user: Fix stale tbs after mmap

2012-05-11 Thread Peter Maydell
On 11 May 2012 09:40, Alexander Graf wrote: > If we execute linux-user code that does the following: > >  * A = mmap() >  * execute code in A >  * munmap(A) >  * B = mmap(), but mmap returns the same address as A >  * execute code in B > > we end up executing a stale cached tb that contains transl

Re: [Qemu-devel] [PATCH v3 4/8] pc: Enable MSI support at APIC level

2012-05-11 Thread Stefano Stabellini
On Thu, 10 May 2012, Jan Kiszka wrote: > Push msi_supported enabling to the APIC implementations where we can > encapsulate the decision more cleanly, hiding the details from the > generic code. > > CC: Stefano Stabellini > Signed-off-by: Jan Kiszka This patch is missing the KVM part, but assum

Re: [Qemu-devel] [PATCH 2/7] qapi: QMP input visitor, handle floats parsed as ints

2012-05-11 Thread Luiz Capitulino
On Fri, 27 Apr 2012 15:21:18 -0500 Michael Roth wrote: > JSON numbers can be interpreted as either integers or floating point > values depending on their representation. As a result, QMP input visitor > might visit a QInt when it was expecting a QFloat, so add handling to > account for this. > >

Re: [Qemu-devel] [PATCH] linux-user: Fix stale tbs after mmap

2012-05-11 Thread Alexander Graf
On 11.05.2012, at 17:46, Peter Maydell wrote: > On 7 May 2012 12:38, Alexander Graf wrote: >> >> On 07.05.2012, at 13:32, Alexander Graf wrote: >> >>> >>> On 07.05.2012, at 12:37, Peter Maydell wrote: >>> On 7 May 2012 10:30, Alexander Graf wrote: > @@ -587,6 +587,7 @@ abi_long tar

[Qemu-devel] [PATCH] linux-user: Fix stale tbs after mmap

2012-05-11 Thread Alexander Graf
If we execute linux-user code that does the following: * A = mmap() * execute code in A * munmap(A) * B = mmap(), but mmap returns the same address as A * execute code in B we end up executing a stale cached tb that contains translated code from A, while we want new code from B. This p

Re: [Qemu-devel] qemu/xendisk: properly update stats in ioreq_release()

2012-05-11 Thread Stefano Stabellini
On Thu, 10 May 2012, Jan Beulich wrote: > While for the "normal" case (called from blk_send_response_all()) > decrementing requests_finished is correct, doing so in the parse error > case is wrong; requests_inflight needs to be decremented instead. > > Signed-off-by: Jan Beulich > > --- a/hw/xen

[Qemu-devel] [PATCH] KVM: Add wrapper script around QEMU to test kernels

2012-05-11 Thread Alexander Graf
On LinuxCon I had a nice chat with Linus on what he thinks kvm-tool would be doing and what he expects from it. Basically he wants a small and simple tool he and other developers can run to try out and see if the kernel they just built actually works. Fortunately, QEMU can do that today already! T

Re: [Qemu-devel] [PATCH] linux-user: Fix stale tbs after mmap

2012-05-11 Thread Peter Maydell
On 7 May 2012 12:38, Alexander Graf wrote: > > On 07.05.2012, at 13:32, Alexander Graf wrote: > >> >> On 07.05.2012, at 12:37, Peter Maydell wrote: >> >>> On 7 May 2012 10:30, Alexander Graf wrote: @@ -587,6 +587,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,

Re: [Qemu-devel] [SeaBIOS] [RESEND PATCH v3] hotplug: add device per func in ACPI DSDT tables

2012-05-11 Thread Jiang Liu
On 05/11/2012 06:14 PM, Gleb Natapov wrote: >> I'm not familiar with qemu:( >> On native OS, admin could trigger PCI device hotplug operations through >> /sys/bus/pci/slot/xx/power. Not sure whether that's needed for guest OS too. >> > Why is it needed on physical HW? May be it is needed in a VM f

[Qemu-devel] [PATCH v3 7/8] msi: Invoke msi/msix_write_config from PCI core

2012-05-11 Thread Jan Kiszka
Also this functions is better invoked by the core than by each and every device. This allows to drop the config_write callbacks from ich and intel-hda. CC: Alexander Graf CC: Gerd Hoffmann CC: Isaku Yamahata Signed-off-by: Jan Kiszka --- hw/ide/ich.c|8 hw/intel-hda.c

[Qemu-devel] [PATCH v3 4/8] msi: Guard msi_reset with msi_present

2012-05-11 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- hw/msi.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index 5d6ceb6..b2903fc 100644 --- a/hw/msi.c +++ b/hw/msi.c @@ -191,6 +191,10 @@ void msi_reset(PCIDevice *dev) uint16_t flags; bool msi64bit; +if

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

2012-05-11 Thread Jan Kiszka
Call msi_reset on device reset as still required by the core. CC: Alexander Graf CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka --- hw/ide/ich.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 560ae37..242254e 100644 -

[Qemu-devel] [PATCH v3 6/8] msi: Guard msi/msix_write_config with msi_present

2012-05-11 Thread Jan Kiszka
Terminate msi/msix_write_config early if support is not enabled. This allows to remove checks at the caller site if MSI is optional. Signed-off-by: Jan Kiszka --- hw/msi.c |3 ++- hw/msix.c |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index b

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

2012-05-11 Thread Jan Kiszka
Properly register reset functions via the device class. CC: Alexander Graf Signed-off-by: Jan Kiszka --- hw/ide/ahci.c | 25 +++-- hw/ide/ahci.h |2 +- hw/ide/ich.c | 10 -- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/hw/ide/ahci.c b/hw/

Re: [Qemu-devel] [RFC PATCH 0/2] Split fdd devices off the floppy controller

2012-05-11 Thread Markus Armbruster
Forgot to cc: Paolo and Mike, apologies!

[Qemu-devel] [RFC PATCH 2/2] Split fdd devices off the floppy controller

2012-05-11 Thread Markus Armbruster
For historical reasons, and unlike other block devices, our floppy devices isa-fdc, sysbus-fdc and SUNW,fdtwo integrate the controller and the drive(s) in a single qdev. This makes them weird: we need -global to set up floppy drives, unlike every other optional device. This patch explores separat

[Qemu-devel] [RFC PATCH 1/2] Un-inline fdctrl_init_isa()

2012-05-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/fdc.c | 20 hw/fdc.h | 24 ++-- hw/ide/piix.c |3 ++- hw/isa.h |2 -- hw/pc_sysfw.c |1 + qemu-common.h |1 + 6 files changed, 26 insertions(+), 25 deletions(-) diff --git a/hw/fd

[Qemu-devel] [RFC PATCH 0/2] Split fdd devices off the floppy controller

2012-05-11 Thread Markus Armbruster
This is probaly more about QOM than about floppy. It's not a working solution, yet. I'm posting it to give us something concrete to discuss. Based on Kevin's block branch, commit ad431215. Markus Armbruster (2): Un-inline fdctrl_init_isa() Split fdd devices off the floppy controller hw/fd

Re: [Qemu-devel] [PATCH v5 0/7] add fixed-width visitors and serialization tests/fixes

2012-05-11 Thread Michael Roth
On Fri, May 11, 2012 at 03:22:15AM +0200, Andreas Färber wrote: > Am 27.04.2012 22:21, schrieb Michael Roth: > > These patches apply on top of qemu.git master, and can also be obtained > > from: > > git://github.com/mdroth/qemu.git visitor-fixed-width-v5 > > > > Some of these were being carried a

[Qemu-devel] [PATCH v3 5/8] msi: Invoke msi/msix_reset from PCI core

2012-05-11 Thread Jan Kiszka
There is no point in pushing this burden to the devices, they may rather forget to call them (like intel-hda, ahci, xhci did). Instead, reset functions are now called from pci_device_reset and pci_bridge_reset. They do nothing if MSI/MSI-X is not in use. CC: Alexander Graf CC: Gerd Hoffmann CC:

Re: [Qemu-devel] [PATCH] usb-host: handle guest-issued clear halt

2012-05-11 Thread Gerd Hoffmann
On 05/08/12 14:06, Gerd Hoffmann wrote: > Most important here is to update our internal endpoint state so we know > the endpoint isn't in halted state any more. Without this usb-host > tries to clear halt again with the next data transfer submitted. Doing > this twice is (a) not correct and (b) c

Re: [Qemu-devel] [PATCH v2 02/24] qom: add object_child_foreach

2012-05-11 Thread Andreas Färber
Am 12.04.2012 18:03, schrieb Andreas Färber: > Am 11.04.2012 23:30, schrieb Paolo Bonzini: >> A utility function that will be used to implement hierarchical realization. >> >> Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori >> --- >> include/qemu/object.h | 14 +- >> qo

Re: [Qemu-devel] [PATCH] xhci: Clean up reset function

2012-05-11 Thread Gerd Hoffmann
On 05/11/12 16:36, Jan Kiszka wrote: > Properly register reset function via the device class. Patch added to usb patch queue. thanks, Gerd

[Qemu-devel] [PATCH] pci: unplug all devs of same slot once

2012-05-11 Thread Amos Kong
The whole PCI slot should be removed once. Currently only one func is cleaned in pci_unplug_device(), if you try to remove a single func by monitor cmd. Start VM with 8 multiple-function block devs, hot-removing those block devs by 'device_del ...' would cause qemu abort. | (qemu) device_del virt

Re: [Qemu-devel] [PATCH] qom: fix refcounting in object_property_del_child()

2012-05-11 Thread Amos Kong
On 05/11/2012 02:42 PM, Paolo Bonzini wrote: > Il 11/05/2012 04:15, Amos Kong ha scritto: >> Start VM with 8 multiple-function block devs, hot-removing >> those block devs by 'device_del ...' would cause qemu abort. >> >> object_ref() is called in object_property_add_child(), >> but we don't unref

Re: [Qemu-devel] [PATCH 08/21] qdev: use object_property_print in info qtree

2012-05-11 Thread Paolo Bonzini
Il 11/05/2012 16:20, Andreas Färber ha scritto: > char *string = NULL; > >> > >> > mo = string_output_visitor_new(); >> > -object_property_get(obj, string_output_get_visitor(mo), name, NULL); >> > +object_property_get(obj, string_output_get_visitor(mo), name, errp); > If we do error

[Qemu-devel] [PATCH v3 8/8] msi: Use msi/msix_present more consistently

2012-05-11 Thread Jan Kiszka
Replace some open-coded msi/msix_present checks. Signed-off-by: Jan Kiszka --- hw/msi.c |2 +- hw/msix.c | 13 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index 556c7c4..5233204 100644 --- a/hw/msi.c +++ b/hw/msi.c @@ -175,7 +175,7 @@ v

[Qemu-devel] [PATCH v3 2/8] intel-hda: Fix reset of MSI function

2012-05-11 Thread Jan Kiszka
Call msi_reset on device reset as still required by the core. CC: Gerd Hoffmann CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka --- hw/intel-hda.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/intel-hda.c b/hw/intel-hda.c index bb11af2..e38861e 100644 --- a/

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

2012-05-11 Thread Jan Kiszka
v3 is v2 - xhci changes as MSI is instable there anyway. So, only patches 1 and 2 are for 1.1/stable now. CC: Alexander Graf CC: Gerd Hoffmann CC: Isaku Yamahata CC: qemu-sta...@nongnu.org Jan Kiszka (8): ahci: Fix reset of MSI function intel-hda: Fix reset of MSI function ahci: Clean up

[Qemu-devel] [PATCH] xhci: Clean up reset function

2012-05-11 Thread Jan Kiszka
Properly register reset function via the device class. Signed-off-by: Jan Kiszka --- Broken out from the MSI series where I will no longer touch xhci. hw/usb/hcd-xhci.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index

[Qemu-devel] [PATCH] qcow2: Don't ignore failure to clear autoclear flags

2012-05-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qcow2.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3bae2d8..655799c 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -300,7 +300,10 @@ static int qcow2_open(BlockDriverState *bs, int flags)

Re: [Qemu-devel] [PATCH 08/21] qdev: use object_property_print in info qtree

2012-05-11 Thread Andreas Färber
Am 02.05.2012 13:31, schrieb Paolo Bonzini: > Otherwise, non-string properties without a legacy counterpart are missed. > Also fix error propagation in object_property_print itself. > > Signed-off-by: Paolo Bonzini > --- > hw/qdev-monitor.c |2 +- > qom/object.c |2 +- > 2 files cha

Re: [Qemu-devel] [Xen-devel] [PATCH] qemu/xendisk: set maximum number of grants to be used

2012-05-11 Thread Jan Beulich
>>> On 11.05.12 at 09:19, "Jan Beulich" wrote: > Legacy (non-pvops) gntdev drivers may require this to be done when the > number of grants intended to be used simultaneously exceeds a certain > driver specific default limit. > > Signed-off-by: Jan Beulich > > --- a/hw/xen_disk.c > +++ b/hw/xen_

  1   2   >