[Qemu-devel] [PATCH v5 2/4] qemu-socket: change inet_connect() to to support nonblock socket

2012-03-21 Thread Amos Kong
Change inet_connect(const char *str, int socktype) to inet_connect(const char *str, bool block), socktype is unused, block is used to assign if set socket to block/nonblock. Retry to connect when -EINTR/-EWOULDBLOCK is got. Connect's successful for nonblock socket when following errors are got:

[Qemu-devel] [PATCH v5 4/4] use inet_listen()/inet_connect() to support ipv6 migration

2012-03-21 Thread Amos Kong
Use help functions in qemu-socket.c for tcp migration, which already support ipv6 addresses. For IPv6 brackets must be mandatory if you require a port. Referencing to RFC5952, the recommended format is: [2312::8274]:5200 test status: Successed listen side: qemu-kvm -incoming tcp:[2312:

[Qemu-devel] [PATCH v5 3/4] sockets: pass back errors in inet_listen()

2012-03-21 Thread Amos Kong
Use set_socket_error() to restore real erron, set errno to EINVAL for parse error. Signed-off-by: Amos Kong --- qemu-sockets.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index 908479e..f1c6524 100644 --- a/qemu-so

[Qemu-devel] [PATCH v5 1/4] sockets: introduce set_socket_error()

2012-03-21 Thread Amos Kong
Introduce set_socket_error() to set the errno, use WSASetLastError() for win32. Sometimes, clean work would rewrite errno in error path, we can use this function to restore real errno. Signed-off-by: Amos Kong --- qemu_socket.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --

[Qemu-devel] [PATCH v5 0/2] support to migrate with IPv6 address

2012-03-21 Thread Amos Kong
Those patches make tcp migration use the help functions in qemu-socket.c for support IPv6 migration. Changes from v1: - split different changes to small patches, it will be easier to review - fixed some problem according to Kevin's comment Changes from v2: - fix issue of returning real error - s

[Qemu-devel] [PATCH 13/13] pseries: Implement IOMMU and DMA for PAPR PCI devices

2012-03-21 Thread David Gibson
Currently the pseries machine emulation does not support DMA for emulated PCI devices, because the PAPR spec always requires a (guest visible, paravirtualized) IOMMU which was not implemented. Now that we have infrastructure for IOMMU emulation, we can correct this and allow PCI DMA for pseries.

[Qemu-devel] [PATCH 06/13] usb-ohci: Use universal DMA helper functions

2012-03-21 Thread David Gibson
The OHCI device emulation can provide both PCI and SysBus OHCI implementations. Because of this, it was not previously converted to use the PCI DMA helper functions. This patch converts it to use the new universal DMA helper functions. In the PCI case, it obtains its DMAContext from pci_dma_conte

[Qemu-devel] [PATCH 09/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers

2012-03-21 Thread David Gibson
The USB UHCI and EHCI drivers were converted some time ago to use the pci_dma_*() helper functions. However, this conversion was not complete because in some places both these drivers do DMA via the usb_packet_map() function in usb-libhw.c. That function directly used cpu_physical_memory_map().

Re: [Qemu-devel] [PATCH v4 1/2] qemu-socket: change inet_connect() to to support nonblock socket

2012-03-21 Thread Amos Kong
- Original Message - > On Mon, Mar 19, 2012 at 10:11:54PM +0800, Amos Kong wrote: > > Change inet_connect(const char *str, int socktype) to > > inet_connect(const char *str, bool block, int *sock_err), > > socktype is unused, block is used to assign if set socket > > to block/nonblock, sock

Re: [Qemu-devel] [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Zhang, Yang Z
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, March 22, 2012 11:05 AM > To: Zhang, Yang Z > Cc: qemu-devel@nongnu.org; aligu...@us.ibm.com; k...@vger.kernel.org > Subject: Re: [PATCH v4 0/7] RTC: New logic to emulate RTC > > Il 22/03/2012 04:03,

Re: [Qemu-devel] [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Paolo Bonzini
Il 22/03/2012 04:03, Zhang, Yang Z ha scritto: >> > Yes, that's fine. But I also see some cases in which the first upgrade >> > cycle after divider reset is not reported. The second, 1.5 seconds >> > after divider reset, is fine. > I think your patch can fix it. Right? No. :( It makes it a lot

Re: [Qemu-devel] [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Zhang, Yang Z
-Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > > Il 22/03/2012 01:23, Zhang, Yang Z ha scritto: > > Actually, I also see some failures during testing. And most of them > > are fail to pass the 244us update cycle checking. Since we are in > > emulation environment,

[Qemu-devel] [PATCH 02/13] Better support for dma_addr_t variables

2012-03-21 Thread David Gibson
A while back, we introduced the dma_addr_t type, which is supposed to be used for bus visible memory addresses. At present, this is an alias for target_phys_addr_t, but this will change when we eventually add support for guest visible IOMMUs. There are some instances of target_phys_addr_t in the

[Qemu-devel] [PATCH 12/13] iommu: Allow PCI to use IOMMU infrastructure

2012-03-21 Thread David Gibson
This patch adds some hooks to let PCI devices and busses use the new IOMMU infrastructure. When IOMMU support is enabled, each PCI device now contains a DMAContext * which is used by the pci_dma_*() wrapper functions. By default, the contexts are initialized to NULL, assuming no IOMMU. However th

[Qemu-devel] [PATCH 10/13] iommu: Introduce IOMMU emulation infrastructure

2012-03-21 Thread David Gibson
This patch adds the basic infrastructure necessary to emulate an IOMMU visible to the guest. The DMAContext structure is extended with information and a callback describing the translation, and the various DMA functions used by devices will now perform IOMMU translation using this callback. Cc: M

[Qemu-devel] [PATCH 08/13] ide/ahci: Use universal DMA helper functions

2012-03-21 Thread David Gibson
The AHCI device can provide both PCI and SysBus AHCI device emulations. For this reason, it wasn't previously converted to use the pci_dma_*() helper functions. Now that we have universal DMA helper functions, this converts AHCI to use them. The DMAContext is obtained from pci_dma_context() in t

[Qemu-devel] [PATCH 01/13] Use DMADirection type for dma_bdrv_io

2012-03-21 Thread David Gibson
Currently dma_bdrv_io() takes a 'to_dev' boolean parameter to determine the direction of DMA it is emulating. We already have a DMADirection enum designed specifically to encode DMA directions. This patch uses it for dma_bdrv_io() as well. This involves removing the DMADirection definition from t

[Qemu-devel] [PATCH 07/13] iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers

2012-03-21 Thread David Gibson
dma-helpers.c contains a number of helper functions for doing scatter/gather DMA, and various block device related DMA. Currently, these directly access guest memory using cpu_physical_memory_*(), assuming no IOMMU translation. This patch updates this code to use the new universal DMA helper func

[Qemu-devel] [PATCH 04/13] Implement cpu_physical_memory_zero()

2012-03-21 Thread David Gibson
This patch adds cpu_physical_memory_zero() function. This is equivalent to calling cpu_physical_memory_write() with a buffer full of zeroes, but avoids actually allocating such a buffer along the way. Signed-off-by: David Gibson --- cpu-common.h |1 + exec.c | 53 +++

[Qemu-devel] [PATCH 03/13] usb-xhci: Use PCI DMA helper functions

2012-03-21 Thread David Gibson
Shortly before 1.0, we added helper functions / wrappers for doing PCI DMA from individual devices. This makes what's going on clearer and means that when we add IOMMU support somewhere in the future, only the general PCI code will have to change, not every device that uses PCI DMA. However, usb-

[Qemu-devel] [PATCH 11/13] pseries: Convert sPAPR TCEs to use generic IOMMU infrastructure

2012-03-21 Thread David Gibson
The pseries platform already contains an IOMMU implementation, since it is essential for the platform's paravirtualized VIO devices. This IOMMU support is currently built into the implementation of the VIO "bus" and the various VIO devices. This patch converts this code to make use of the new com

[Qemu-devel] [PATCH 05/13] iommu: Add universal DMA helper functions

2012-03-21 Thread David Gibson
Not that long ago, every device implementation using DMA directly accessed guest memory using cpu_physical_memory_*(). This meant that adding support for a guest visible IOMMU would require changing every one of these devices to go through IOMMU translation. Shortly before qemu 1.0, I made a star

[Qemu-devel] [0/13] RFC: Guest visible IOMMU

2012-03-21 Thread David Gibson
Here's another version of my series implementing the nevessary framework for emulation of guest-visible IOMMUs. I've incorporated the feedback from the last posting. I'm fairly confident that preliminary patches 1-3 are ready to go in, the rest might still need more consideration. In particular,

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Wen Congyang
At 03/22/2012 03:19 AM, Anthony Liguori Wrote: > On 03/21/2012 11:25 AM, Avi Kivity wrote: >> On 03/21/2012 06:18 PM, Corey Minyard wrote: >>> Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to >>>

[Qemu-devel] block stream: close unused files and update ->backing_hd

2012-03-21 Thread Marcelo Tosatti
Close the now unused images that were part of the previous backing file chain and adjust ->backing_hd properly. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=801449 Signed-off-by: Marcelo Tosatti diff --git a/block/stream.c b/block/stream.c index d1b3986..cbf041b 100644 --- a/block/stream.

Re: [Qemu-devel] [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Paolo Bonzini
Il 22/03/2012 01:23, Zhang, Yang Z ha scritto: > Actually, I also see some failures during testing. And most of them > are fail to pass the 244us update cycle checking. Since we are in > emulation environment, we cannot ensure it always greater than 244us. > So I think it should not be a bug. Yes,

Re: [Qemu-devel] [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Zhang, Yang Z
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > I attach a patch that fixes some problems with divider reset and in > general simplifies the logic. Even with the patch, however, I still see > failures in my test case unfortunately. Probably there are rounding > e

Re: [Qemu-devel] [PATCH 0/4] More whitespace and coding style clean ups ahead of future changes

2012-03-21 Thread Paolo Bonzini
Il 21/03/2012 22:02, Peter Portante ha scritto: > Hi Folks, > > Please forgive me if you find these changes are annoying, as I am trying to > learn the ropes of patch submission with git ahead of making a real patch. > > While working on the code, I found that scripts/checkpatch.pl will flag line

Re: [Qemu-devel] [PATCH v4 5/7] RTC:Add RTC update-ended interrupt support

2012-03-21 Thread Zhang, Yang Z
> -Original Message- > From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] > Sent: Wednesday, March 21, 2012 2:04 AM > > On Mon, 19 Mar 2012, Zhang, Yang Z wrote: > > Use a timer to emulate update cycle. When update cycle ended and UIE is > setting, then raise an interrupt.

[Qemu-devel] [PATCH 2/2] slirp: use socket_set_nonblock

2012-03-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- slirp/misc.c | 46 +- slirp/tcp_subr.c |4 ++-- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/slirp/misc.c b/slirp/misc.c index 0308a62..0bee864 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@

[Qemu-devel] [PATCH 1/2] slirp: clean up conflicts with system headers

2012-03-21 Thread Paolo Bonzini
Right now, slirp/slirp.h cannot include some system headers and, indirectly, qemu_socket.h. Clean this up, and remove a duplicate prototype that was introduced because of that. Signed-off-by: Paolo Bonzini --- slirp/slirp.h |8 +--- slirp/tcp.h | 21 +++-- 2 files c

[Qemu-devel] [PATCH 0/2] slirp: remove fd_block/fd_nonblock

2012-03-21 Thread Paolo Bonzini
Of these two functions, one is unused and the other is a dup of socket_set_nonblock. Unfortunately, there are some conflicts with system headers that need to be sorted out first. Paolo Bonzini (2): slirp: clean up conflicts with system headers slirp: use socket_set_nonblock slirp/misc.c

Re: [Qemu-devel] [PATCH v4 1/2] qemu-socket: change inet_connect() to to support nonblock socket

2012-03-21 Thread Michael Roth
On Mon, Mar 19, 2012 at 10:11:54PM +0800, Amos Kong wrote: > Change inet_connect(const char *str, int socktype) to > inet_connect(const char *str, bool block, int *sock_err), > socktype is unused, block is used to assign if set socket > to block/nonblock, sock_err is used to restore socket error. >

Re: [Qemu-devel] [PATCH] kvm: allow arbitrarily sized mmio ioeventfd

2012-03-21 Thread Amos Kong
- Original Message - > We use a 2 byte ioeventfd for virtio memory, > add support for this. > > Signed-off-by: Michael S. Tsirkin Reviewed-by: Amos Kong > --- > hw/ivshmem.c |8 > kvm-all.c| 15 --- > kvm-stub.c |2 +- > kvm.h|3 ++- >

[Qemu-devel] [Bug 961757] [NEW] wrong error for blockdev-snapshot-sync

2012-03-21 Thread Paolo Bonzini
Public bug reported: >From Laszlo Ersek: >> +proto_drv = bdrv_find_protocol(snapshot_file); >> if (!proto_drv) { >> -qerror_report(QERR_INVALID_BLOCK_FORMAT, format); >> -ret = -1; >> -goto out; >> +error_set(errp, QERR_INVALID_BLOCK_FORMAT, format); >> +

Re: [Qemu-devel] [PATCH V14 5/7] Add a TPM Passthrough backend driver implementation

2012-03-21 Thread Anthony Liguori
On 02/20/2012 07:03 PM, Stefan Berger wrote: On 02/20/2012 04:15 PM, Michael S. Tsirkin wrote: On Mon, Feb 20, 2012 at 03:25:37PM -0500, Stefan Berger wrote: On 02/20/2012 02:51 PM, Michael S. Tsirkin wrote: On Wed, Dec 14, 2011 at 08:43:20AM -0500, Stefan Berger wrote: From Andreas Niederl's

[Qemu-devel] [RFC][PATCH 1/2] kvm: Introduce basic MSI support in-kernel irqchips

2012-03-21 Thread Jan Kiszka
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 current KVI API requires us to establish a static route from a pseudo GSI to the target MSI message and inject the MSI via toggling that GSI, we

[Qemu-devel] [RFC][PATCH 2/2] KVM: x86: Wire up MSI support for in-kernel irqchip

2012-03-21 Thread Jan Kiszka
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 --- hw/apic.c |3 +++ hw/kvm/apic.c | 33 +

[Qemu-devel] [RFC][PATCH 0/2] uq/master: Basic MSI support for in-kernel irqchip mode

2012-03-21 Thread Jan Kiszka
Some half a year ago when I posted my first attempt to refactor MSI for KVM support, we came to the conclusion that it might suffice to do transparent dynamic routing for user-space injected MSI messages. These two patches now implement such an approach for upstream. As QEMU does not yet include i

Re: [Qemu-devel] [PATCH] Fix typo in i400FX chipset init code

2012-03-21 Thread Alexey Korolev
> On Wed, Feb 29, 2012 at 02:35:14PM +1300, Alexey Korolev wrote: > I've fixed the commit message and applied. Thank you! > How does one trigger the problem? > I'd like to know so I can test for it. The i440fx_init() function is called from pc_init code. The call looks like that: pci_bus = i440f

[Qemu-devel] [PATCH v2 uq/master] kvm: Drop unused kvm_pit_in_kernel

2012-03-21 Thread Jan Kiszka
From: Jan Kiszka This is now implied by kvm_irqchip_in_kernel. Signed-off-by: Jan Kiszka --- Rebased over latest uq/master. kvm-all.c |6 -- kvm-stub.c |6 -- kvm.h |2 -- 3 files changed, 0 insertions(+), 14 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index ba

[Qemu-devel] [PATCH v7 02/11] trace: [tracetool] Remove unused 'sizestr' attribute in 'Event'

2012-03-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 18 -- 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 91ae351..33e3c26 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -89,23 +89,6 @@ def

[Qemu-devel] [PATCH v7 10/11] trace: Provide a per-event status define for conditional compilation

2012-03-21 Thread Lluís Vilanova
Revives the functionality introduced by commit b7d66a76, which was temporarily removed on the tracetool conversion performed during this series. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py |7 +++ 1 files changed, 7 insertions(+), 0 deletions

[Qemu-devel] [PATCH v7 05/11] trace: [tracetool] Do not precompute the event number

2012-03-21 Thread Lluís Vilanova
An event number is implicit in its position on the list of events. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 21 + 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py i

Re: [Qemu-devel] [PATCH 12/36] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST

2012-03-21 Thread Igor Mitsyanko
On 20.03.2012 1:57 AM, Juan Quintela wrote: We have an array of structs whose size is an int32 in the same struct that depends on a test value to know if it is there or not. Signed-off-by: Juan Quintela --- vmstate.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff -

[Qemu-devel] [Bug 935945] Re: SLIRP still not working for win32

2012-03-21 Thread Kenneth Salerno
>From the latest QEMU from git: haddr = 17f hport = 11555 laddr = 502000a lport = 5632 flags = 1000 ip_slowtimo... tcp_slowtimo... if_start... if_start... if_start... if_start... [ if_start... repeats forever ] command-line used: ./testing/qemu/i386-softmmu/qemu-system-i386

Re: [Qemu-devel] [PATCH 16/36] vmstate: port sparc cpu

2012-03-21 Thread Michael Roth
On Mon, Mar 19, 2012 at 11:57:44PM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > hw/sun4u.c | 20 -- > target-sparc/cpu.h |9 +- > target-sparc/machine.c | 474 > > 3 files changed, 283 insertions(+), 22

Re: [Qemu-devel] [PATCH v3 1/2] Force timedrift=none on previous machines

2012-03-21 Thread Paolo Bonzini
Il 21/03/2012 17:06, Crístian Viana ha scritto: > The current value for the -rtc timedrift option is none. This patch > makes sure that the old machines configuration will work the same way > even after that option changes its default value. > > Signed-off-by: Crístian Viana > --- > hw/pc_piix.c

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Corey Minyard
Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to implement something more complex than simple hypercall for panic notification we better do something more interesting with it than just saying "panic hap

[Qemu-devel] [PATCH v7 03/11] trace: [tracetool] Do not rebuild event list in backend code

2012-03-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 33e3c26..ff1519c 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.p

[Qemu-devel] [PATCH 1/4] More whitespace cleanup in preparation for future commits.

2012-03-21 Thread Peter Portante
Signed-off-by: Peter Portante --- block_int.h |4 +- qemu-timer.c |6 +- slirp/slirp.c | 526 3 files changed, 268 insertions(+), 268 deletions(-) diff --git a/block_int.h b/block_int.h index b460c36..64e8b82 100644 --- a/block

[Qemu-devel] [PATCH v7 04/11] trace: [tracetool] Simplify event line parsing

2012-03-21 Thread Lluís Vilanova
Using regular expressions yields more compact and error-proof code when breaking the lines into pieces. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 43 +++ 1 files changed, 15 insertions(+), 28 deletions(-)

[Qemu-devel] [PATCH v7 01/11] Converting tracetool.sh to tracetool.py

2012-03-21 Thread Lluís Vilanova
Signed-off-by: Harsh Prateek Bora Signed-off-by: Lluís Vilanova --- Makefile.objs|6 Makefile.target | 10 - configure|4 scripts/tracetool| 648 -- scripts/tracetool.py | 533 +

[Qemu-devel] [PATCH 2/4] More work to fix up the formatting and the whitespace of this module to conform to the coding standard.

2012-03-21 Thread Peter Portante
Signed-off-by: Peter Portante --- slirp/slirp.c | 381 +++-- 1 files changed, 205 insertions(+), 176 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index ca0ff94..40f7523 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -295,15 +295,

[Qemu-devel] [PATCH v7 11/11] trace: [tracetool] Add error-reporting functions

2012-03-21 Thread Lluís Vilanova
Unifies the print+exit sequence into a single 'error' call. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 30 +- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.p

[Qemu-devel] [PATCH v7 09/11] trace: [tracetool] Make format-specific code optional and with access to events

2012-03-21 Thread Lluís Vilanova
First, routines for format-specific code are not mandatory. Second, all format-specific routines get the list of events as an argument. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 32 ++-- 1 files changed, 10 insertio

[Qemu-devel] [PATCH v7 06/11] trace: [tracetool] Add support for event properties

2012-03-21 Thread Lluís Vilanova
Using regular expressions yields more compact and error-proof code when breaking the event properties into pieces. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scrip

Re: [Qemu-devel] [PATCH 3/3] configure: add --confsuffix option

2012-03-21 Thread Paolo Bonzini
Il 21/03/2012 15:42, Eduardo Habkost ha scritto: > On Wed, Mar 21, 2012 at 01:39:39PM +0100, Paolo Bonzini wrote: >> Il 20/03/2012 21:15, Eduardo Habkost ha scritto: >>> This way we can choose a configuration file path different from >>> ${sysconfdir}/PACKAGE. >>> >>> This also changes the configur

Re: [Qemu-devel] [PATCH 14/36] vmstate: introduce VMSTATE_VARRAY_MULTIPLY

2012-03-21 Thread Igor Mitsyanko
On 20.03.2012 1:57 AM, Juan Quintela wrote: This allows to sent a partial array where the size is another structure field multiplied by a constant. Signed-off-by: Juan Quintela --- savevm.c |6 ++ vmstate.h | 35 +++ 2 files changed, 29 insertions(+

[Qemu-devel] [PATCH 4/4] Yet another missed use of tabs.

2012-03-21 Thread Peter Portante
Signed-off-by: Peter Portante --- slirp/slirp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index fd28f17..45a8de2 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -457,7 +457,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefd

[Qemu-devel] [PATCH v7 07/11] trace: [tracetool] Process the "disable" event property

2012-03-21 Thread Lluís Vilanova
Use different converters (depending on the 'disabled' property) regardless of the output format. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/tracetoo

Re: [Qemu-devel] [PATCH 13/36] vmstate: port ppc cpu

2012-03-21 Thread Peter Maydell
On 19 March 2012 22:57, Juan Quintela wrote: > +    /* Fields needed as intermediate for vmstate */ > +    target_ulong sdr1_vmstate; Personally I prefer how alpha handles this for fpcr rather than clogging up the CPUState with an intermediate field. (possibly with some macro assist so it's a lit

[Qemu-devel] [PATCH v7 08/11] trace: [tracetool] Rewrite event argument parsing

2012-03-21 Thread Lluís Vilanova
Adds an 'Arguments' class to describe event arguments. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 113 -- 1 files changed, 54 insertions(+), 59 deletions(-) diff --git a/scripts/tracetool.py b/scri

[Qemu-devel] [PATCH] Whitespace clean up.

2012-03-21 Thread Peter Portante
Signed-off-by: Peter Portante --- block/raw-posix.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 2d1bc13..719a590 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -112,7 +112,7 @@ reo

[Qemu-devel] [PATCH v7 00/11] Rewrite tracetool using python

2012-03-21 Thread Lluís Vilanova
The first patch in the series (by Harsh Prateek) is a rewrite of the tracetool shell script in python, which is easier to handle given the current complexity of the script. The following patches (by Lluís Vilanova) add a series of random code cleanups and generalizations. Signed-off-by: Lluís Vil

Re: [Qemu-devel] [PATCH 13/36] vmstate: port ppc cpu

2012-03-21 Thread Michael Roth
On Mon, Mar 19, 2012 at 11:57:41PM +0100, Juan Quintela wrote: > Added sdr1_vmstate because storing the value requires calling > ppc_store_sdr1(). > The position when the function is called also changes (I think it is save). Doesn't side-effect any loads that originally occurred after it, and sam

[Qemu-devel] [PATCH 3/4] And some final work to complete the coding style upgrade, missed by the previous commit.

2012-03-21 Thread Peter Portante
Signed-off-by: Peter Portante --- slirp/slirp.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index 40f7523..fd28f17 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -457,7 +457,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *w

[Qemu-devel] [PATCH 0/4] More whitespace and coding style clean ups ahead of future changes

2012-03-21 Thread Peter Portante
Hi Folks, Please forgive me if you find these changes are annoying, as I am trying to learn the ropes of patch submission with git ahead of making a real patch. While working on the code, I found that scripts/checkpatch.pl will flag lines that I am changing as not adhereing to the codeing standar

Re: [Qemu-devel] [PATCH v3 2/2] Change timedrift default value to slew

2012-03-21 Thread Paolo Bonzini
Il 21/03/2012 17:06, Crístian Viana ha scritto: > Windows 2008+ is very sensitive to missed ticks. The RTC is used by default as > the time source. If time drift is not enabled, Windows is prone to > blue screening. > > Signed-off-by: Crístian Viana > --- > hw/mc146818rtc.c |2 +- > vl.c

Re: [Qemu-devel] [PATCH 10/12] trace: [tracetool] Automatically establish available backends and formats

2012-03-21 Thread Lluís Vilanova
Lluís Vilanova writes: > Stefan Hajnoczi writes: > [...] >> In order to avoid rebasing and porting too many fixes from tracetool >> to tracetool.py I suggest you resend this series without the >> format/backend consolidation code. I can merge this series quickly >> and we can handle the format/ba

Re: [Qemu-devel] [PATCH v4 5/7] RTC:Add RTC update-ended interrupt support

2012-03-21 Thread Paolo Bonzini
Il 21/03/2012 17:54, Stefano Stabellini ha scritto: >> > >> > No, you need to set UF in case the code observes it without actually >> > enabling interrupt delivery on the ISA bus. > > Well, if it is just about updating UF, can we do it only when the user > reads REG_C? Perhaps, but for AF it is

Re: [Qemu-devel] [PATCH 1/2] Isolation groups

2012-03-21 Thread Alex Williamson
On Sat, 2012-03-17 at 15:57 +1100, David Gibson wrote: > On Fri, Mar 16, 2012 at 01:31:18PM -0600, Alex Williamson wrote: > > On Fri, 2012-03-16 at 14:45 +1100, David Gibson wrote: > > > On Thu, Mar 15, 2012 at 02:15:01PM -0600, Alex Williamson wrote: > > > > On Wed, 2012-03-14 at 20:58 +1100, Davi

Re: [Qemu-devel] [PATCH 03/36] vmstate: unicore32 don't support cpu migration

2012-03-21 Thread Michael Roth
On Mon, Mar 19, 2012 at 11:57:31PM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > target-unicore32/cpu.h |2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) > > diff --git a/target-unicore32/cpu.h b/target-unicore32/cpu.h > index a3f8589..be85250 100644 > --- a/targ

Re: [Qemu-devel] [PATCH V9 5/8] Introduce Xen PCI Passthrough, qdevice (1/3)

2012-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2012 at 06:29:02PM +, Anthony PERARD wrote: > diff --git a/hw/xen_pci_passthrough.h b/hw/xen_pci_passthrough.h > new file mode 100644 > index 000..2c5e83d > --- /dev/null > +++ b/hw/xen_pci_passthrough.h > @@ -0,0 +1,250 @@ > +#ifndef QEMU_HW_XEN_PCI_PASSTHROUGH_H > +# defi

Re: [Qemu-devel] [PATCH 01/36] vmstate: Simplify test for CPU_SAVE_VERSION

2012-03-21 Thread Michael Roth
On Mon, Mar 19, 2012 at 11:57:29PM +0100, Juan Quintela wrote: > Some cpu's definitions define CPU_SAVE_VERSION, others not, but they have > defined cpu_save/load. I'm guessing this patch becomes useful later in the series, but as it stands I'm not seeing where this helps with cpus like target-alp

Re: [Qemu-devel] [PATCH V9 3/8] Introduce HostPCIDevice to access a pci device on the host.

2012-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2012 at 06:29:00PM +, Anthony PERARD wrote: > Signed-off-by: Anthony PERARD > Acked-by: Stefano Stabellini So this interface is really LinuxSysfsPCIDevice. For example the assumption that you can just open device by pci address is broken with vfio. Domain number is also not s

Re: [Qemu-devel] [PATCH 10/12] trace: [tracetool] Automatically establish available backends and formats

2012-03-21 Thread Lluís Vilanova
Stefan Hajnoczi writes: [...] > In order to avoid rebasing and porting too many fixes from tracetool > to tracetool.py I suggest you resend this series without the > format/backend consolidation code. I can merge this series quickly > and we can handle the format/backend consolidation code in a se

Re: [Qemu-devel] [PATCH 08/36] vmstate: machine.c is only compiled for !CONFIG_USER_ONLY

2012-03-21 Thread Peter Maydell
On 19 March 2012 22:57, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- >  target-ppc/machine.c |    8 >  1 files changed, 0 insertions(+), 8 deletions(-) Could we give this patch a more informative commit message, please? In particular it doesn't actually say that this is fix

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Anthony Liguori
On 03/21/2012 11:25 AM, Avi Kivity wrote: On 03/21/2012 06:18 PM, Corey Minyard wrote: Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to implement something more complex than simple hypercall for panic

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Anthony Liguori
On 03/15/2012 06:46 AM, Avi Kivity wrote: On 03/15/2012 01:25 PM, Jan Kiszka wrote: There was such vm exit (KVM_EXIT_HYPERCALL), but it was deemed to be a bad idea. BTW, this would help a lot in emulating hypercalls of other hypervisors (or of KVM's VAPIC in the absence of in-kernel irqchip

Re: [Qemu-devel] [PATCH 24/36] vmstate: port arm cpu

2012-03-21 Thread Juan Quintela
Andreas Färber wrote: > Am 19.03.2012 23:57, schrieb Juan Quintela: >> Use one subsection for each feature. This means that we don't need to >> bump the version field each time that a new feature gets introduced. >> >> Introduce cpsr_vmstate field, as I am not sure if I can "use" >> uncached_cps

[Qemu-devel] [PATCH V9 1/8] pci_ids: Add INTEL_82599_SFP_VF id.

2012-03-21 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/pci_ids.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci_ids.h b/hw/pci_ids.h index e8235a7..649e6b3 100644 --- a/hw/pci_ids.h +++ b/hw/pci_ids.h @@ -118,6 +118,7 @@ #define PCI_DEVICE_ID_INTEL_82801I_UHCI6 0x2939 #define PCI

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Anthony Liguori
On 03/13/2012 05:47 AM, Avi Kivity wrote: On 03/13/2012 11:18 AM, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 12:33:33PM +0200, Avi Kivity wrote: On 03/12/2012 11:04 AM, Wen Congyang wrote: Do you have any other comments about this patch? Not really, but I'm not 100% convinced the pat

Re: [Qemu-devel] [RESEND][PATCH 2/2 v3] deal with guest panicked event

2012-03-21 Thread Anthony Liguori
On 03/09/2012 04:22 PM, Marcelo Tosatti wrote: On Thu, Mar 08, 2012 at 11:56:56AM +, Daniel P. Berrange wrote: On Thu, Mar 08, 2012 at 01:52:45PM +0200, Avi Kivity wrote: On 03/08/2012 01:36 PM, Daniel P. Berrange wrote: On Thu, Mar 08, 2012 at 01:28:56PM +0200, Avi Kivity wrote: On 03/08

[Qemu-devel] [PATCH V9 8/8] Introduce Xen PCI Passthrough, MSI (3/3)

2012-03-21 Thread Anthony PERARD
From: Jiang Yunhong A more complete history can be found here: git://xenbits.xensource.com/qemu-xen-unstable.git Signed-off-by: Jiang Yunhong Signed-off-by: Shan Haitao Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- Makefile.target |1 + hw/xen_pci_p

[Qemu-devel] [PATCH V9 4/8] pci.c: Add opaque argument to pci_for_each_device.

2012-03-21 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/pci.c | 11 +++ hw/pci.h |4 +++- hw/xen_platform.c |8 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 77001fa..49f1bf0 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1123,7 +112

Re: [Qemu-devel] [PATCH V9 3/8] Introduce HostPCIDevice to access a pci device on the host.

2012-03-21 Thread Anthony PERARD
On Wed, Mar 21, 2012 at 18:32, Michael S. Tsirkin wrote: > Host is really linux sysfs, right? Yes, it is. > Better reflect this in naming. If someone need to access to a device by an other ways, it's could be implemented also in this file, no ? > Or maybe even xen-host-pci-device? These funct

[Qemu-devel] [PATCH V9 0/8] Xen PCI Passthrough

2012-03-21 Thread Anthony PERARD
Hi all, This patch series introduces the PCI passthrough for Xen. Please review patches number 1, 2, 3, 4 and 7. First, we have HostPCIDevice that help to access one PCI device of the host. Last part, but not least, the PCI passthrough device himself. Cut in 3 parts (or file), there is one t

[Qemu-devel] [PATCH V9 6/8] Introduce Xen PCI Passthrough, PCI config space helpers (2/3)

2012-03-21 Thread Anthony PERARD
From: Allen Kay A more complete history can be found here: git://xenbits.xensource.com/qemu-xen-unstable.git Signed-off-by: Allen Kay Signed-off-by: Guy Zana Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- hw/xen_pci_passthrough.c | 10 + hw/xen_pci_passthrough.

Re: [Qemu-devel] [PATCH v4 00/36] VMState port of all cpus

2012-03-21 Thread Andreas Färber
Am 21.03.2012 18:24, schrieb Juan Quintela: > Andreas Färber wrote: >> Am 19.03.2012 23:57, schrieb Juan Quintela: >>> This repository contains all the changes: >>> >>> git://repo.or.cz/qemu/quintela.git vmstate-cpus-v4 >>> >>> [v4] >>> - rebase to top >>> - adapt to vmstate.h change >>> - adapt

[Qemu-devel] [PATCH V9 5/8] Introduce Xen PCI Passthrough, qdevice (1/3)

2012-03-21 Thread Anthony PERARD
From: Allen Kay A more complete history can be found here: git://xenbits.xensource.com/qemu-xen-unstable.git Signed-off-by: Allen Kay Signed-off-by: Guy Zana Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- Makefile.target |2 + hw/xen_common.h

Re: [Qemu-devel] [PATCH V9 3/8] Introduce HostPCIDevice to access a pci device on the host.

2012-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2012 at 06:29:00PM +, Anthony PERARD wrote: > Signed-off-by: Anthony PERARD > Acked-by: Stefano Stabellini Host is really linux sysfs, right? Better reflect this in naming. Or maybe even xen-host-pci-device? > --- > Makefile.target |3 + > hw/host-pci-device.c | 2

[Qemu-devel] [PATCH V9 2/8] configure: Introduce --enable-xen-pci-passthrough.

2012-03-21 Thread Anthony PERARD
Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- configure | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 8b4e3c1..f61bd48 100755 --- a/configure +++ b/configure @@ -136,6 +136,7 @@ vnc_png="" vnc_threa

[Qemu-devel] [PATCH V9 3/8] Introduce HostPCIDevice to access a pci device on the host.

2012-03-21 Thread Anthony PERARD
Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- Makefile.target |3 + hw/host-pci-device.c | 278 ++ hw/host-pci-device.h | 75 ++ 3 files changed, 356 insertions(+), 0 deletions(-) create mode 100644 hw/host

[Qemu-devel] [PATCH V9 7/8] Introduce apic-msidef.h

2012-03-21 Thread Anthony PERARD
This patch move the msi definition from apic.c to apic-msidef.h. So it can be used also by other .c files. Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- hw/apic-msidef.h | 30 ++ hw/apic.c| 11 +-- 2 files changed, 31 insertions(+

Re: [Qemu-devel] [PATCH] Remove PCI class code from virtio balloon device

2012-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2012 at 11:33:21AM -0500, Anthony Liguori wrote: > On 03/21/2012 11:26 AM, Anthony Liguori wrote: > >On 03/21/2012 11:11 AM, Michael S. Tsirkin wrote: > >>Frankly I don't see value in making it visible to the user, > >>at all. We are just triggering windows reactivations > >>without

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Jan Kiszka
On 2012-03-21 18:34, Avi Kivity wrote: > On 03/21/2012 07:04 PM, Daniel P. Berrange wrote: >>> >>> In fact the feature can be implemented 100% host side by searching for a >>> panic string signature in the console logs. >> >> You can even go one better and search for the panic string in the >> gues

Re: [Qemu-devel] [PATCH] ui/spice-display: use uintptr_t when casting qxl physical addresses

2012-03-21 Thread Alon Levy
On Wed, Mar 21, 2012 at 05:42:25PM +0100, Gerd Hoffmann wrote: > On 03/21/12 17:17, Alon Levy wrote: > > This fixes running "-vga qxl -spice" with 32 bit compiled > > qemu-system-i386. > > Patch added to spice patch queue. So perhaps you can also ack those: http://patchwork.freedesktop.org/patch

Re: [Qemu-devel] [PATCH] Remove PCI class code from virtio balloon device

2012-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2012 at 11:26:50AM -0500, Anthony Liguori wrote: > On 03/21/2012 11:11 AM, Michael S. Tsirkin wrote: > >On Wed, Mar 21, 2012 at 10:14:35AM -0500, Anthony Liguori wrote: > >>On 03/21/2012 10:10 AM, Michael S. Tsirkin wrote: > >>>On Wed, Mar 21, 2012 at 09:42:41AM -0500, Anthony Liguo

Re: [Qemu-devel] [PATCH 08/36] vmstate: machine.c is only compiled for !CONFIG_USER_ONLY

2012-03-21 Thread Andreas Färber
Confirmed, in Makefile.target machine.o is confined to ifdef CONFIG_SOFTMMU. Am 19.03.2012 23:57, schrieb Juan Quintela: > Signed-off-by: Juan Quintela I verified that the right #endifs were removed and compile-tested it. Acked-by: Andreas Färber Andreas -- SUSE LINUX Products GmbH, Maxfeld

  1   2   >