[Qemu-devel] [PATCH] monitor: fix parsing of big int

2013-07-31 Thread Fam Zheng
We call strtoull(3) to parse a string to int. the range we can accept with our local variable "int64_t n" is (-9223372036854775808 ~ 9223372036854775807), but strtoull(3) can return (0 ~ 18446744073709551615UL). So when we pass a int from HMP within the range of 9223372036854775808 ~ 1844674407370

Re: [Qemu-devel] vm performance degradation after kvm live migration or save-restore with ETP enabled

2013-07-31 Thread Gleb Natapov
On Tue, Jul 30, 2013 at 09:04:56AM +, Zhanghaoyu (A) wrote: > > >> >> hi all, > >> >> > >> >> I met similar problem to these, while performing live migration or > >> >> save-restore test on the kvm platform (qemu:1.4.0, host:suse11sp2, > >> >> guest:suse11sp2), running tele-communication so

Re: [Qemu-devel] [RFC v2 3/5] timer: make qemu_clock_enable sync between disable and timer's cb

2013-07-31 Thread liu ping fan
On Tue, Jul 30, 2013 at 5:17 PM, Paolo Bonzini wrote: > Il 30/07/2013 04:42, liu ping fan ha scritto: >> On Mon, Jul 29, 2013 at 7:21 PM, Paolo Bonzini wrote: >>> Il 29/07/2013 10:10, liu ping fan ha scritto: On Mon, Jul 29, 2013 at 2:30 PM, Paolo Bonzini wrote: > Il 29/07/2013 05:16, L

Re: [Qemu-devel] [PATCH 2/2] KVM: s390: add floating irq controller

2013-07-31 Thread Heiko Carstens
On Wed, Jul 31, 2013 at 11:08:15AM +0200, Cornelia Huck wrote: > On Mon, 29 Jul 2013 15:59:53 +0200 > Jens Freimann wrote: > > > This patch adds a floating irq controller as a kvm_device. > > It will be necesary for migration of floating interrupts as well > > as for hardening the reset code by a

Re: [Qemu-devel] [PATCH v3] block/iscsi.c: Fix printf format error.

2013-07-31 Thread Stefan Weil
Am 31.07.2013 23:20, schrieb Richard W.M. Jones: > From: "Richard W.M. Jones" > > The error on armv7hl was: > > block/iscsi.c: In function ‘is_request_lun_aligned’: > block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long > int’, but argument 3 has type ‘int64_t’ [-Werror=format

[Qemu-devel] [PATCH for-next v2 2/2] virtio-serial-port: Convert to QOM realize/unrealize

2013-07-31 Thread Andreas Färber
Note: virtconsole's/virtserialport's realizefn now registers its handlers before VirtIOSerialPort's realizefn. Signed-off-by: Andreas Färber --- hw/char/virtio-console.c | 41 + hw/char/virtio-serial-bus.c | 48 --

[Qemu-devel] [PATCH v2 2/9] block: vhdx - add header update capability.

2013-07-31 Thread Jeff Cody
This adds the ability to update the headers in a VHDX image, including generating a new MS-compatible GUID. As VHDX depends on uuid.h, VHDX is now a configurable build option. If VHDX support is enabled, that will also enable uuid as well. The default is to have VHDX enabled. To enable/disable

[Qemu-devel] [PATCH v2 3/9] block: vhdx code movement - VHDXMetadataEntries and BDRVVHDXState to header.

2013-07-31 Thread Jeff Cody
In preparation for VHDX log support, move these structures to the header. Signed-off-by: Jeff Cody --- block/vhdx.c | 51 --- block/vhdx.h | 47 +++ 2 files changed, 47 insertions(+), 51 deletions(-) dif

Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-31 Thread Alexey Kardashevskiy
On 08/01/2013 01:07 PM, Andreas Färber wrote: > Am 01.08.2013 04:08, schrieb Alexey Kardashevskiy: >> On 08/01/2013 11:29 AM, Andreas Färber wrote: >>> Am 01.08.2013 02:14, schrieb Alexey Kardashevskiy: On 08/01/2013 05:52 AM, Andreas Färber wrote: > Am 17.07.2013 08:37, schrieb Alexey Kar

[Qemu-devel] [PATCH v2 4/9] block: vhdx - log support struct and defines

2013-07-31 Thread Jeff Cody
This adds some magic number defines, and internal structure definitions for VHDX log replay support. Signed-off-by: Jeff Cody --- block/vhdx.h | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/block/vhdx.h b/block/vhdx.h index c8d8593..2db6615 100644 --- a

[Qemu-devel] [PATCH v2 6/9] block: vhdx - update log guid in header, and first write tracker

2013-07-31 Thread Jeff Cody
Allow tracking of first file write in the VHDX image, as well as the ability to update the GUID in the header. This is in preparation for log support. Signed-off-by: Jeff Cody --- block/vhdx.c | 28 +++- block/vhdx.h | 7 +-- 2 files changed, 28 insertions(+), 7 del

[Qemu-devel] [PATCH v2 9/9] block: vhdx write support

2013-07-31 Thread Jeff Cody
This adds support for writing to VHDX image files, using coroutines. Writes into the BAT table goes through the VHDX log. Currently, BAT table writes occur when expanding a dynamic VHDX file, and allocating a new BAT entry. Signed-off-by: Jeff Cody --- block/vhdx.c | 147 +++

[Qemu-devel] [PATCH v2 7/9] block: vhdx - log parsing, replay, and flush support

2013-07-31 Thread Jeff Cody
This adds support for VHDX v0 logs, as specified in Microsoft's VHDX Specification Format v1.00: https://www.microsoft.com/en-us/download/details.aspx?id=34750 The following support is added: * Log parsing, and validation - validate that an existing log is correct. * Log search - search throug

Re: [Qemu-devel] [PATCH v3] semaphore: fix a hangup problem under load on NetBSD hosts.

2013-07-31 Thread Brad
On 03/07/13 5:41 AM, Laszlo Ersek wrote: On 07/03/13 10:58, Izumi Tsutsui wrote: Fix following bugs in "fallback implementation of counting semaphores with mutex+condvar" added in c166cb72f1676855816340666c3b618beef4b976: - waiting threads are not restarted properly if more than one threads

[Qemu-devel] [PATCH v2 8/9] block: vhdx - add log write support

2013-07-31 Thread Jeff Cody
This adds support for writing to the VHDX log. For spec details, see VHDX Specification Format v1.00: https://www.microsoft.com/en-us/download/details.aspx?id=34750 There are a few limitations to this log support: 1.) There is no caching yet 2.) The log is flushed after each entry The primary wr

[Qemu-devel] [PATCH v2 1/9] block: vhdx - minor comments and typo correction.

2013-07-31 Thread Jeff Cody
Just a couple of minor comments to help note where allocated buffers are freed, and a typo fix. Signed-off-by: Jeff Cody --- block/vhdx.c | 6 -- block/vhdx.h | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index e9704b1..56bc88e 100644

[Qemu-devel] [PATCH v2 5/9] block: vhdx - break endian translation functions out

2013-07-31 Thread Jeff Cody
This moves the endian translation functions out from the vhdx.c source, into a separate source file. In addition to the previously defined endian functions, new endian translation functions for log support are added as well. Signed-off-by: Jeff Cody --- block/Makefile.objs | 2 +- block/vhdx-e

[Qemu-devel] [PATCH v2 0/9] VHDX log replay and write support

2013-07-31 Thread Jeff Cody
This patch series contains the initial VHDX log parsing, replay, and write support. v2 changes: incorporated Fam's review feedback This will allow an existing log in a VHDX image to be replayed (e.g., a VHDX image from a Hyper-V host that crashed). In addition, metadata writes are enabled throu

[Qemu-devel] [PULL 1/2] pci-host/prep: Set isa_mem_base in the PCI host bridge

2013-07-31 Thread Andreas Färber
From: Hervé Poussineau Currently, it is done by i82378 PCI-ISA bridge, which shouldn't care about it. Signed-off-by: Hervé Poussineau Signed-off-by: Andreas Färber --- hw/isa/i82378.c| 3 --- hw/pci-host/prep.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/isa/

[Qemu-devel] [PATCH for-next v2 0/2] QOM realize for virtio-console

2013-07-31 Thread Andreas Färber
Hello, This series converts VirtIOSerialPort to QOM realize/unrealize. As a side-effect, virtio-console realization is changed from in-order to pre-order. v2 splits off cleanups, requested by mst. Available from: https://github.com/afaerber/qemu-cpu/commits/realize-virtio-console.v2 git://gith

[Qemu-devel] [PATCH for-next v2 1/2] virtio-console: QOM cast cleanup for VirtConsole

2013-07-31 Thread Andreas Färber
Introduce type constant, cast macro and rename parent field. Signed-off-by: Andreas Färber --- hw/char/virtio-console.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index 2e00ad2..73e18

Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-31 Thread Andreas Färber
Am 01.08.2013 04:08, schrieb Alexey Kardashevskiy: > On 08/01/2013 11:29 AM, Andreas Färber wrote: >> Am 01.08.2013 02:14, schrieb Alexey Kardashevskiy: >>> On 08/01/2013 05:52 AM, Andreas Färber wrote: Am 17.07.2013 08:37, schrieb Alexey Kardashevskiy: > +/* > + * XICS-KVM > + */

Re: [Qemu-devel] [PATCH for-next v2 00/22] QOM realize for virtio

2013-07-31 Thread Andreas Färber
Am 01.08.2013 04:17, schrieb Andreas Färber: > Andreas Färber (22): > object: Add OBJECT_GET_PARENT_CLASS() macro > virtio-console: Use exitfn for virtserialport, too > virtio-9p-device: Avoid freeing uninitialized memory Sorry, managed to mess up my branches: These two were sent out for 1.

[Qemu-devel] [Bug 685096] Re: USB Passthrough not working for Windows 7 guest

2013-07-31 Thread Sam Stoelinga
Lol weird it's not marked as duplicate anymore anyway, guess it was not you then. Don't know what happened. Can this bug be fixed in KVM or is it really to Windows specific? Else I may have a look at it, never did any KVM development though, should be fun. @Serge: Did you get the license already

[Qemu-devel] [PATCH for-next v2 08/22] virtio-blk: QOM realize preparations

2013-07-31 Thread Andreas Färber
Rename variable qdev -> dev since that's what realize's argument is called by convention. Signed-off-by: Andreas Färber --- hw/block/virtio-blk.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 5fb006d..9efc8b7 10064

[Qemu-devel] [PATCH for-next v2 11/22] virtio-serial: Convert to QOM realize

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/char/virtio-serial-bus.c | 25 ++--- include/hw/virtio/virtio-serial.h | 2 ++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index a82786b..1bed93f 100644 -

[Qemu-devel] [PATCH for-next v2 21/22] virtio: Unrealize parent

2013-07-31 Thread Andreas Färber
VirtioDevice's DeviceClass::exit code cleaning up bus_name was overwritten by virtio-{blk,serial,net,scsi,balloon,rng} and vhost-scsi. Call their parent's DeviceClass::unrealize to fix this. Signed-off-by: Andreas Färber --- hw/block/virtio-blk.c | 4 hw/char/virtio-serial-bus.c | 4

[Qemu-devel] [PATCH for-next v2 18/22] virtio-scsi: QOM realize preparations

2013-07-31 Thread Andreas Färber
Rename qdev -> dev since that's what realize's argument is called by convention. No need to keep more "qdev" around than necessary. Avoid duplicate VIRTIO_DEVICE() cast. Signed-off-by: Andreas Färber --- hw/scsi/vhost-scsi.c | 8 hw/scsi/virtio-scsi.c | 22 +++--- 2 f

[Qemu-devel] [PATCH for-next v2 09/22] virtio-blk: Convert to QOM realize

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/block/virtio-blk.c | 32 +--- include/hw/virtio/virtio-blk.h | 2 ++ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 9efc8b7..18fb020 100644 --- a/hw/blo

[Qemu-devel] [PATCH for-next v2 19/22] virtio-scsi: Convert to QOM realize

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/scsi/vhost-scsi.c| 43 ++- hw/scsi/virtio-scsi.c | 45 + include/hw/virtio/vhost-scsi.h | 2 ++ include/hw/virtio/virtio-scsi.h | 6 -- 4 files changed, 53

[Qemu-devel] [PATCH for-next v2 04/22] virtio-blk-dataplane: Improve error reporting

2013-07-31 Thread Andreas Färber
Return an Error so that it can be propagated later. Tested-by: Stefan Hajnoczi Acked-by: Stefan Hajnoczi [AF: Rebased] Signed-off-by: Andreas Färber --- hw/block/dataplane/virtio-blk.c | 30 -- hw/block/dataplane/virtio-blk.h | 5 +++-- hw/block/virtio-blk.c

[Qemu-devel] [PATCH for-next v2 06/22] virtio-9p: QOM realize preparations

2013-07-31 Thread Andreas Färber
Avoid unnecessary VIRTIO_DEVICE(). Signed-off-by: Andreas Färber --- hw/9pfs/virtio-9p-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index f0ffbe8..ea21655 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs

[Qemu-devel] [PATCH RFC for-next v2 22/22] virtio-scsi: Convert virtio_scsi_common_[un]realize to QOM realize

2013-07-31 Thread Andreas Färber
VirtIOSCSI and VHostSCSI now perform some initializations after VirtIOSCSICommon's realize calls virtio_bus_plug_device(), namely creating the SCSIBus and initializing /dev/vhost-scsi respectively. Signed-off-by: Andreas Färber --- hw/scsi/vhost-scsi.c| 6 +- hw/scsi/virtio-scsi

[Qemu-devel] [PATCH for-next v2 17/22] virtio-rng: Convert to QOM realize

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/virtio/virtio-rng.c | 27 ++- include/hw/virtio/virtio-rng.h | 2 ++ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index 0accc9e..7c4526a 100644 --- a/hw/virtio

[Qemu-devel] [PATCH for-next v2 12/22] virtio-net: QOM realize preparations

2013-07-31 Thread Andreas Färber
Rename variable qdev -> dev since that's what realize's argument is called by convention. Avoid duplicate VIRTIO_DEVICE() cast. Signed-off-by: Andreas Färber --- hw/net/virtio-net.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/hw/net/virtio-ne

[Qemu-devel] [PATCH for-next v2 15/22] virtio-balloon: Convert to QOM realize

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/virtio/virtio-balloon.c | 22 +- include/hw/virtio/virtio-balloon.h | 2 ++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 3bab5db..9b65732 100644 --- a

[Qemu-devel] [PATCH for-next v2 02/22] virtio-console: Use exitfn for virtserialport, too

2013-07-31 Thread Andreas Färber
virtconsole and virtserialport are identical in every other aspect except for the distinguishing VirtIOSerialPortClass::is_console field. Cc: qemu-sta...@nongnu.org Signed-off-by: Andreas Färber --- hw/char/virtio-console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/virtio-conso

[Qemu-devel] [PATCH for-next v2 14/22] virtio-balloon: QOM realize preparations

2013-07-31 Thread Andreas Färber
Rename qdev -> dev since that's what realize's argument is called by convention. No need to keep more "qdev" around than necessary. Avoid duplicate VIRTIO_DEVICE() cast. Signed-off-by: Andreas Färber --- hw/virtio/virtio-balloon.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[Qemu-devel] [PATCH for-next v2 20/22] virtio: Convert VirtioDevice to QOM realize

2013-07-31 Thread Andreas Färber
Drop VirtioDevice::init. Signed-off-by: Andreas Färber --- hw/virtio/virtio.c | 18 +- include/hw/virtio/virtio.h | 6 -- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index c00c224..8f19095 100644 --- a/hw/vi

[Qemu-devel] [PATCH for-next v2 16/22] virtio-rng: QOM realize preparations

2013-07-31 Thread Andreas Färber
Rename qdev -> dev because that's what realize's argument is called by convention. No need to keep more "qdev" around than necessary. Signed-off-by: Andreas Färber --- hw/virtio/virtio-rng.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/virtio/virtio-r

[Qemu-devel] [PATCH for-next v2 10/22] virtio-serial: QOM realize preparations

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/char/virtio-serial-bus.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index da417c7..a82786b 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.

[Qemu-devel] [PATCH for-next v2 01/22] object: Add OBJECT_GET_PARENT_CLASS() macro

2013-07-31 Thread Andreas Färber
The object argument is currently unused and may be used to optimize the class lookup when needed. Inspired-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- include/qom/object.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h ind

[Qemu-devel] [PATCH for-next v2 05/22] virtio: Allow NULL VirtioDeviceClass::init hook

2013-07-31 Thread Andreas Färber
This is a temporary measure to allow mixing VirtioDeviceClass::init with DeviceClass::realize. Clean up variable naming in preparation for QOM realize. Signed-off-by: Andreas Färber --- hw/virtio/virtio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/virt

[Qemu-devel] [PATCH for-next v2 00/22] QOM realize for virtio

2013-07-31 Thread Andreas Färber
Hello, This series converts virtio devices to QOM realize/unrealize. It is intended as base for fixing virtio-net initialization order issues, as reported by Jesse. Only partially tested though. Note that while VirtioDevice was setting a DeviceClass::exit callback for cleaning up the bus name, th

[Qemu-devel] [PATCH for-next v2 07/22] virtio-9p: Convert to QOM realize

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/9pfs/virtio-9p-device.c | 44 +++- hw/9pfs/virtio-9p.h| 2 ++ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index ea21655..7d2990b 10064

[Qemu-devel] [PATCH for-next v2 13/22] virtio-net: Convert to QOM realize

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/net/virtio-net.c| 18 ++ include/hw/virtio/virtio-net.h | 2 ++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 05ad605..16c230f 100644 --- a/hw/net/virtio-net.c +++ b

[Qemu-devel] [PATCH for-next v2 03/22] virtio-9p-device: Avoid freeing uninitialized memory

2013-07-31 Thread Andreas Färber
In virtio_9p_device_init() there are 6x goto out that will lead to v9fs_path_free() attempting to free unitialized path.data field. Easiest way to trigger is: qemu-system-x86_64 -device virtio-9p-pci Fix this by moving v9fs_path_init() before any goto out. Signed-off-by: Andreas Färber --- hw/9

Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-31 Thread Alexey Kardashevskiy
On 08/01/2013 11:29 AM, Andreas Färber wrote: > Am 01.08.2013 02:14, schrieb Alexey Kardashevskiy: >> On 08/01/2013 05:52 AM, Andreas Färber wrote: >>> Am 17.07.2013 08:37, schrieb Alexey Kardashevskiy: +/* + * XICS-KVM + */ +static void xics_kvm_cpu_setup(XICSState *icp, PowerP

[Qemu-devel] [PATCH for-next 1/4] target-ppc: Turn POWER5gs CPU into alias for POWER5+

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- target-ppc/cpu-models.c | 3 +-- target-ppc/cpu-models.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c index 9578ed8..49b193f 100644 --- a/target-ppc/cpu-models.c +++ b/target-ppc/cpu-models

[Qemu-devel] [PATCH for-next 2/4] target-ppc: Turn POWER5gr CPU into alias for POWER5

2013-07-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- target-ppc/cpu-models.c | 3 +-- target-ppc/cpu-models.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c index 49b193f..3f7a6f4 100644 --- a/target-ppc/cpu-models.c +++ b/target-ppc/cpu-models

[Qemu-devel] [PATCH for-next 4/4] target-ppc: Add POWER5+ v2.1 CPU model

2013-07-31 Thread Andreas Färber
Let's avoid -cpu host barfing at this PVR. Linux recognizes it as "POWER5+ (gs) v2.1". Signed-off-by: Andreas Färber --- target-ppc/cpu-models.c | 2 ++ target-ppc/cpu-models.h | 1 + 2 files changed, 3 insertions(+) diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c index f2604eb..

[Qemu-devel] [PATCH for-next 3/4] target-ppc: Prepare POWER5P CPU family

2013-07-31 Thread Andreas Färber
It is ISA 2.03. Modelled as 970FX minus AltiVec flag. Cc: Benjamin Herrenschmidt Cc: Alexey Kardashevskiy Signed-off-by: Andreas Färber --- target-ppc/cpu-models.c | 2 - target-ppc/translate_init.c | 104 2 files changed, 104 insertions(+), 2

[Qemu-devel] [PATCH for-next 0/4] target-ppc: Complete POWER5+ CPU model support

2013-07-31 Thread Andreas Färber
Hello, This mini-series cleans up, enables and complements POWER5+ support, so that KVM with default -cpu host works on POWER5+ (gs) v2.1. Thanks to Ben for some valuable hints on how to model POWER5P family! Regards, Andreas Cc: Anthony Liguori Cc: Alexey Kardashevskiy Cc: Benjamin Herrensch

Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-31 Thread Andreas Färber
Am 01.08.2013 02:14, schrieb Alexey Kardashevskiy: > On 08/01/2013 05:52 AM, Andreas Färber wrote: >> Am 17.07.2013 08:37, schrieb Alexey Kardashevskiy: >>> +/* >>> + * XICS-KVM >>> + */ >>> +static void xics_kvm_cpu_setup(XICSState *icp, PowerPCCPU *cpu) >>> +{ >>> +CPUState *cs; >>> +ICPS

Re: [Qemu-devel] usb: a problem of using libusb for usb pass through

2013-07-31 Thread Gonglei (Arei)
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Wednesday, July 31, 2013 5:47 PM > To: Hans de Goede > Cc: Gonglei (Arei); qemu-devel@nongnu.org; Luonengjun; Huangweidong > (Hardware); Linqiangmin > Subject: Re: usb: a problem of using libusb for usb pass thro

[Qemu-devel] [PATCH for-next] spapr: Avoid "HOST@0" CPU node name in SLOF device tree for -cpu host

2013-07-31 Thread Andreas Färber
By default on KVM or when user asks for it via -cpu host, cpu_model will be "host" and sPAPR merely upper-cases it for the SLOF device tree. Change it so that we get the underlying CPU type, e.g., "POWER7_V2.3@0". Reported-by: Prerna Saxena Signed-off-by: Andreas Färber --- This avoids a PVR b

Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-31 Thread Alexey Kardashevskiy
On 08/01/2013 05:52 AM, Andreas Färber wrote: > Hi, > > Am 17.07.2013 08:37, schrieb Alexey Kardashevskiy: >> From: David Gibson >> >> Recent (host) kernels support emulating the PAPR defined "XICS" interrupt >> controller system within KVM. This patch allows qemu to initialize and >> configure

[Qemu-devel] [PATCH for-1.6] virtio-9p-device: Avoid freeing uninitialized memory

2013-07-31 Thread Andreas Färber
In virtio_9p_device_init() there are 6x goto out that will lead to v9fs_path_free() attempting to free unitialized path.data field. Easiest way to trigger is: qemu-system-x86_64 -device virtio-9p-pci Fix this by moving v9fs_path_init() before any goto out. Signed-off-by: Andreas Färber --- hw/9

Re: [Qemu-devel] [Qemu-trivial] [PATCH v1 1/5] block/nand: Factor out common code

2013-07-31 Thread Peter Crosthwaite
On Wed, Jun 19, 2013 at 6:09 PM, Michael Tokarev wrote: > 18.06.2013 15:08, peter.crosthwa...@xilinx.com wrote: >> From: Peter Crosthwaite >> >> Most of this computation of s->iolen is the same for both the if and >> else paths here. Factor out the common parts outside the if. >> >> Cc: qemu-triv

[Qemu-devel] [PATCH RESEND for-1.6] virtio-console: Use exitfn for virtserialport, too

2013-07-31 Thread Andreas Färber
virtconsole and virtserialport are identical in every other aspect except for the distinguishing VirtIOSerialPortClass::is_console field. Cc: qemu-sta...@nongnu.org Signed-off-by: Andreas Färber --- Cherry-picked and tested via device_del. hw/char/virtio-console.c | 1 + 1 file changed, 1 inse

[Qemu-devel] [PATCH v9 09/10] qemu-ga: Install Windows VSS provider on `qemu-ga -s install'

2013-07-31 Thread Tomoki Sekiyama
Register QGA VSS provider library into Windows when qemu-ga is installed as Windows service ('-s install' option). It is deregistered when the service is uninstalled ('-s uninstall' option). Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- qga/main.c | 10 +- qga/vss-

[Qemu-devel] [PATCH v9 03/10] checkpatch.pl: Check .cpp files

2013-07-31 Thread Tomoki Sekiyama
Enable checkpatch.pl to apply the same checks as C source files for C++ files with .cpp extensions. It also adds some exceptions for C++ sources to suppress errors for: - <> used in C++ template arguments (e.g. template ) - :: used to represent namespaces (e.g. SomeClass::method()) - : used

[Qemu-devel] [PATCH v9 08/10] qemu-ga: Call Windows VSS requester in fsfreeze command handler

2013-07-31 Thread Tomoki Sekiyama
Support guest-fsfreeze-freeze and guest-fsfreeze-thaw commands for Windows guests. When fsfreeze command is issued, it calls the VSS requester to freeze filesystems and applications. On thaw command, it again tells the VSS requester to thaw them. This also adds calling of initialize functions for

Re: [Qemu-devel] [PATCH] spapr-pci: rework MSI/MSIX

2013-07-31 Thread Anthony Liguori
Alexey Kardashevskiy writes: > On 08/01/2013 04:02 AM, Anthony Liguori wrote: >> Alexey Kardashevskiy writes: >> >>> On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAS >>> hypercalls which return global IRQ numbers to a guest so it only >>> operates with those and never touches M

[Qemu-devel] [PATCH v9 04/10] Add a script to extract VSS SDK headers on POSIX system

2013-07-31 Thread Tomoki Sekiyama
VSS SDK(*) setup.exe is only runnable on Windows. This adds a script to extract VSS SDK headers on POSIX-systems using msitools. * http://www.microsoft.com/en-us/download/details.aspx?id=23490 From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Tomoki Sekiyama Reviewed-by: Laszlo

[Qemu-devel] [PATCH v9 02/10] Add c++ keywords to QAPI helper script

2013-07-31 Thread Tomoki Sekiyama
Add c++ keywords to avoid errors in compiling with c++ compiler. This also renames class member of PciDeviceInfo to q_class. Signed-off-by: Tomoki Sekiyama Reviewed-by: Laszlo Ersek Reviewed-by: Michael Roth --- hmp.c |2 +- hw/pci/pci.c|2 +- scripts/qapi.py | 12 +

Re: [Qemu-devel] [PATCH] spapr-pci: rework MSI/MSIX

2013-07-31 Thread Alexey Kardashevskiy
On 08/01/2013 04:02 AM, Anthony Liguori wrote: > Alexey Kardashevskiy writes: > >> On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAS >> hypercalls which return global IRQ numbers to a guest so it only >> operates with those and never touches MSIMessage. >> >> Therefore MSIMessage

[Qemu-devel] [PATCH v9 00/10] qemu-ga: fsfreeze on Windows using VSS

2013-07-31 Thread Tomoki Sekiyama
Hi, This is v9 of patch series to add fsfreeze for Windows qemu-guest-agent. changes from v8: - Add hEventTimeout to improve timeout error message (patch 07, see below) - Build qga-vss.tlb if configure'd --with-win-sdk (patch 05, 07) - Use "qga-vss-dll-obj-$(CONFIG_QGA_VSS)" in Makefile.objs (

[Qemu-devel] [PATCH v9 05/10] qemu-ga: Add configure options to specify path to Windows/VSS SDK

2013-07-31 Thread Tomoki Sekiyama
To enable VSS support in qemu-ga for Windows, header files included in VSS SDK are required. The VSS support is enabled by the configure option like below: ./configure --with-vss-sdk="/path/to/VSS SDK" If the path is omitted, it tries to search the headers from default paths and VSS support is e

Re: [Qemu-devel] Using virtio-mmio

2013-07-31 Thread Richard W.M. Jones
On Wed, Jul 31, 2013 at 11:01:11PM +0100, Peter Maydell wrote: > On 31 July 2013 22:56, Richard W.M. Jones wrote: > > It's quite exciting the virtio-mmio made it into qemu. Are extra > > guest kernel components needed too? (I'm using 3.9.9-302.fc19.armv7hl > > but could try a later kernel) > > I

[Qemu-devel] [PATCH v9 10/10] QMP/qemu-ga-client: Make timeout longer for guest-fsfreeze-freeze command

2013-07-31 Thread Tomoki Sekiyama
guest-fsfreeze-freeze command can take longer than 3 seconds when heavy disk I/O is running. To avoid unexpected timeout, this changes the timeout to 60 seconds (timeout of pre-commit phase of VSS). Signed-off-by: Tomoki Sekiyama Reviewed-by: Paolo Bonzini Reviewed-by: Laszlo Ersek Reviewed-by:

[Qemu-devel] [PATCH v9 01/10] configure: Support configuring C++ compiler

2013-07-31 Thread Tomoki Sekiyama
Add configuration for C++ compiler in configure and Makefiles. The C++ compiler is choosed as following: - ${CXX}, if it is specified. - ${cross_prefix}g++, if ${cross_prefix} is specified. - Otherwise, c++ is used. Currently, usage of C++ language is only for access to Windows VSS using COM+ s

[Qemu-devel] [PATCH v9 06/10] error: Add error_set_win32 and error_setg_win32

2013-07-31 Thread Tomoki Sekiyama
These functions help maintaining homogeneous formatting of error messages with Windows error code and description (generated by g_win32_error_message()). Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- include/qapi/error.h | 13 + util/error.c | 35 +

[Qemu-devel] Using virtio-mmio

2013-07-31 Thread Richard W.M. Jones
It's quite exciting the virtio-mmio made it into qemu. Are extra guest kernel components needed too? (I'm using 3.9.9-302.fc19.armv7hl but could try a later kernel) Anyway, I tried to get it to work, but can't quite work out the qemu command line. So far I have: $ ~/d/qemu/arm-softmmu/qemu-sys

[Qemu-devel] [PULL for-1.6 0/2] PReP patch queue 2013-07-31

2013-07-31 Thread Andreas Färber
Hello, Please pull the PowerPC Reference Platform (PReP) queue into qemu.git master. The following changes since commit 1197cbb9eda1dc82e2fa1815ca62bc3de158353e: qdev: Use clz in print_size (2013-07-31 07:54:21 -0500) are available in the git repository at: git://github.com/afaerber/qemu-c

[Qemu-devel] [PULL for-1.6 0/1] QOM CPUState patch queue 2013-07-31

2013-07-31 Thread Andreas Färber
Hello Anthony, This is my current QOM CPU patch queue for 1.6. Please pull. Thanks, Andreas Cc: Anthony Liguori The following changes since commit 1197cbb9eda1dc82e2fa1815ca62bc3de158353e: qdev: Use clz in print_size (2013-07-31 07:54:21 -0500) are available in the git repository at: gi

[Qemu-devel] [PULL 1/1] cpu: Fix VMSTATE_CPU() semantics

2013-07-31 Thread Andreas Färber
Commit 1a1562f5ea3da17d45d3829e35b5f49da9ec2db5 prepared a VMSTATE_CPU() macro for device-style VMStateDescription registration, but missed to adapt cpu_exec_init(), so that the "cpu_common" VMStateDescription was still registered for AlphaCPU (fe31e7374299c0c6172ce618b29bf2fecbd881c7) and OpenRISC

[Qemu-devel] [Bug 1174654] Re: qemu-system-x86_64 takes 100% CPU after host machine resumed from suspend to ram

2013-07-31 Thread Richard Jones
** Description changed: I have Windows XP SP3 inside qemu VM. All works fine in 12.10. But after upgraiding to 13.04 i have to restart the VM each time i resuming my host machine, because qemu process starts to take CPU cycles and OS inside VM is very slow and sluggish. However it's still

Re: [Qemu-devel] Using virtio-mmio

2013-07-31 Thread Peter Maydell
On 31 July 2013 22:56, Richard W.M. Jones wrote: > It's quite exciting the virtio-mmio made it into qemu. Are extra > guest kernel components needed too? (I'm using 3.9.9-302.fc19.armv7hl > but could try a later kernel) I think you're OK there, the support's been in the kernel for much longer th

[Qemu-devel] [PATCH v3 6/7] xen_disk: simplify blk_disconnect with refcnt

2013-07-31 Thread Fam Zheng
We call bdrv_attach_dev when initializing whether or not bs is created locally, so call bdrv_detach_dev and let the refcnt handle the lifecycle. Signed-off-by: Fam Zheng --- hw/block/xen_disk.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/block/xen_disk.c b/

Re: [Qemu-devel] QCOW2 cryptography and secure key handling

2013-07-31 Thread Laszlo Ersek
On 07/31/13 17:27, Benoît Canet wrote: >> For example, current qcow2 encryption is vulnerable to a watermarking >> attack. >> http://en.wikipedia.org/wiki/Disk_encryption_theory#Cipher-block_chaining_.28CBC.29 > > void qcow2_encrypt_sectors(BDRVQcowState *s, int64_t sector_num, >

[Qemu-devel] [PATCH v5 1/2] e1000: add interrupt mitigation support

2013-07-31 Thread Vincenzo Maffione
This patch partially implements the e1000 interrupt mitigation mechanisms. Using a single QEMUTimer, it emulates the ITR register (which is the newer mitigation register, recommended by Intel) and approximately emulates RADV and TADV registers. TIDV and RDTR register functionalities are not emulate

[Qemu-devel] [PATCH v3 for 1.6 3/8] exec: Reduce ifdeffery around -mem-path

2013-07-31 Thread Markus Armbruster
Instead of spreading its ifdeffery everywhere, confine it to qemu_ram_alloc_from_ptr(). Everywhere else, simply test block->fd, which is non-negative exactly when block uses -mem-path. Signed-off-by: Markus Armbruster --- exec.c | 37 ++--- includ

[Qemu-devel] [PULL 2/2] i82378: Cleanup implementation

2013-07-31 Thread Andreas Färber
From: Hervé Poussineau - i82378 only exists on PCI bus; do not split implementation in 2 structs - remove BARs, which are not specified in datasheet - replace custom isa_mmio implementation by PCI bus IO region usage - use QOM casts when required Signed-off-by: Hervé Poussineau [AF: Style- and

[Qemu-devel] [PATCH v3] block/iscsi.c: Fix printf format error.

2013-07-31 Thread Richard W.M. Jones
From: "Richard W.M. Jones" The error on armv7hl was: block/iscsi.c: In function ‘is_request_lun_aligned’: block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Werror=format=] iscsilun->block_size, sector_num

Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-31 Thread Peter Maydell
On 31 July 2013 20:52, Andreas Färber wrote: > Hi, > > Am 17.07.2013 08:37, schrieb Alexey Kardashevskiy: >> +perror("iFailed to create in-kernel XICS\n"); > > "Failed to ..."? Perhaps #ifdef __APPLE__ perror("iFailed ..."); #else perror("Failed ..."); #endif :-) -- PMM

Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-31 Thread Andreas Färber
Hi, Am 17.07.2013 08:37, schrieb Alexey Kardashevskiy: > From: David Gibson > > Recent (host) kernels support emulating the PAPR defined "XICS" interrupt > controller system within KVM. This patch allows qemu to initialize and > configure the in-kernel XICS, and keep its state in sync with qemu

Re: [Qemu-devel] [PATCH v2 0/8] Guest memory allocation fixes & cleanup

2013-07-31 Thread Andreas Färber
Am 31.07.2013 14:33, schrieb Laszlo Ersek: > On 07/31/13 10:50, Markus Armbruster wrote: >> Markus Armbruster writes: >> >>> Ping? >> >> Has been ignored for six weeks, and now it no longer applies. Rebased >> version coming. >> >> *Sigh* > > Why haven't you been made a maintainer yet? You could

Re: [Qemu-devel] [PATCH v2] block/iscsi.c: Fix printf format error.

2013-07-31 Thread Andreas Färber
Am 31.07.2013 21:41, schrieb Richard W.M. Jones: > From: "Richard W.M. Jones" > > The error on armv7hl was: > > block/iscsi.c: In function ‘is_request_lun_aligned’: > block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long > int’, but argument 3 has type ‘int64_t’ [-Werror=form

[Qemu-devel] [PATCH v2] block/iscsi.c: Fix printf format error.

2013-07-31 Thread Richard W.M. Jones
From: "Richard W.M. Jones" The error on armv7hl was: block/iscsi.c: In function ‘is_request_lun_aligned’: block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Werror=format=] iscsilun->block_size, sector_num

Re: [Qemu-devel] [PATCH] block/iscsi.c: Fix printf format error.

2013-07-31 Thread Stefan Weil
Am 31.07.2013 21:08, schrieb Richard W.M. Jones: > From: "Richard W.M. Jones" > > The error on armv7hl was: > > block/iscsi.c: In function ‘is_request_lun_aligned’: > block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long > int’, but argument 3 has type ‘int64_t’ [-Werror=format

Re: [Qemu-devel] [PATCH 2/2] KVM: s390: add floating irq controller

2013-07-31 Thread Jens Freimann
On Wed, Jul 31, 2013 at 11:08 AM, Cornelia Huck wrote: > On Mon, 29 Jul 2013 15:59:53 +0200 > Jens Freimann wrote: > > > This patch adds a floating irq controller as a kvm_device. > > It will be necesary for migration of floating interrupts as well > > as for hardening the reset code by allowing

Re: [Qemu-devel] [PATCH 3/4] xics: rework initialization

2013-07-31 Thread Andreas Färber
Am 17.07.2013 08:37, schrieb Alexey Kardashevskiy: > Currently RTAS and hypercalls are registered in the XICS class init > function. The upcoming XICS-KVM will inherit from XICS but will use > another API to register RTAS tokens with KVM so registration has > to move from the class init function (c

[Qemu-devel] [PATCH] block/iscsi.c: Fix printf format error.

2013-07-31 Thread Richard W.M. Jones
From: "Richard W.M. Jones" The error on armv7hl was: block/iscsi.c: In function ‘is_request_lun_aligned’: block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Werror=format=] iscsilun->block_size, sector_num

Re: [Qemu-devel] QCOW2 cryptography and secure key handling

2013-07-31 Thread Laszlo Ersek
On 07/31/13 19:52, Laszlo Ersek wrote: > You'll end up with two identical sectors in the encrypted image. Apologies for following up on my own message... If you want to store an arbitrary N bit long bit-string (a watermark) that is visible in the encrypted image, then you need: - a good guess at

Re: [Qemu-devel] [PATCH 2/2] i82378: cleanup implementation

2013-07-31 Thread Hervé Poussineau
Andreas Färber a écrit : Am 23.07.2013 23:16, schrieb Hervé Poussineau: diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index de71d81..f2045de 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c [...] -static const VMStateDescription vmstate_pci_i82378 = { -.name = "pci-i82378", +static cons

Re: [Qemu-devel] [PATCH 2/2] i82378: cleanup implementation

2013-07-31 Thread Andreas Färber
Am 23.07.2013 23:16, schrieb Hervé Poussineau: > diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c > index de71d81..f2045de 100644 > --- a/hw/isa/i82378.c > +++ b/hw/isa/i82378.c [...] > -static const VMStateDescription vmstate_pci_i82378 = { > -.name = "pci-i82378", > +static const VMStateDescrip

Re: [Qemu-devel] [PATCH 2/2] LICENSE: clarify

2013-07-31 Thread Anthony Liguori
On Wed, Jul 31, 2013 at 1:19 AM, Paolo Bonzini wrote: > 1) The GPL says that "if the Program does not specify a version number > of this License, you may choose any version ever published by the Free > Software Foundation". This is not true, QEMU includes parts that are > v2-only. > > 2) Provide

Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-31 Thread Anthony Liguori
Alexey Kardashevskiy writes: > From: David Gibson > > Recent (host) kernels support emulating the PAPR defined "XICS" interrupt > controller system within KVM. This patch allows qemu to initialize and > configure the in-kernel XICS, and keep its state in sync with qemu's XICS > state as necessa

Re: [Qemu-devel] [PATCH] spapr-pci: rework MSI/MSIX

2013-07-31 Thread Anthony Liguori
Alexey Kardashevskiy writes: > On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAS > hypercalls which return global IRQ numbers to a guest so it only > operates with those and never touches MSIMessage. > > Therefore MSIMessage handling is completely hidden in QEMU. > > Previously ev

  1   2   >