[Qemu-devel] [PATCH v3 14/19] dev-hid: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei --- hw/usb/dev-hid.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c i

[Qemu-devel] [PATCH v3 19/19] usb-bus: remove "init" from USBDeviceClass struct

2014-09-18 Thread arei.gonglei
From: Gonglei All usb-bus devices are realized by realize(), remove init callback function from USBDeviceClass struct. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/bus.c | 2 -- include/hw/usb.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bu

[Qemu-devel] [PATCH v3 13/19] usb-ccid: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-smartcard-reader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 470e69f..d37ed02 100644 --- a/hw/usb/dev-smartcard-read

[Qemu-devel] [PATCH v3 17/19] usb-redir: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of qerror_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/redirect.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/usb/redirect.c b/h

[Qemu-devel] [PATCH v3 16/19] usb-audio: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-audio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 7b9957b..67deffe 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -628,7 +628

[Qemu-devel] [PATCH v3 04/19] libusb: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/host-libusb.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/usb/host-libus

[Qemu-devel] [PATCH v3 01/19] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread arei.gonglei
From: Gonglei When scsi_bus_legacy_add_drive() return NULL, meanwhile err will be not NULL, which will casue memory leak and missing error message. Cc: Markus Armbruster Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-storage.c | 2 ++ 1 file changed, 2 insertions(+) diff -

[Qemu-devel] [PATCH v3 15/19] dev-wacom: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-wacom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 1b73fd0..844eafa 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -335,14 +33

[Qemu-devel] [PATCH v3 03/19] usb-net: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei meanwhile, qerror_report_err() is a transitional interface to help with converting existing HMP commands to QMP. It should not be used elsewhere. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-network.c | 9 - 1 file changed, 4 insertions(+), 5 deletion

[Qemu-devel] [PATCH v3 10/19] dev-uas: using error_report instead of fprintf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-uas.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index a97a02f..04fc515 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -13,6 +13,7 @@

[Qemu-devel] [PATCH v3 09/19] dev-uas: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-uas.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 9832385..a97a02f 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -892,7 +892,7 @@ sta

[Qemu-devel] [PATCH v3 06/19] usb-hub: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-hub.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-

[Qemu-devel] [PATCH v3 07/19] dev-storage: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-storage.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/usb/dev-s

[Qemu-devel] [PATCH v3 02/19] usb-bus: convert USBDeviceClass init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Add "realize/unrealize" in USBDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Note: this patch still keep "init" in USBDeviceClass, and call kclass->init in usb_device_realize(), avoid breaking g

[Qemu-devel] [PATCH v3 11/19] dev-bluetooth: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-bluetooth.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index a76e581..390d475 100644 --- a/hw/usb/dev-bluetooth.c +++ b/hw/usb/dev-bluet

[Qemu-devel] [PATCH v3 08/19] dev-storage: usring error_report instead of fprintf/printf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-storage.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 182dd5a..a5e9d4a 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storag

[Qemu-devel] [PATCH v3 05/19] libusb: using error_report instead of fprintf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/host-libusb.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index dfb1750..45b74e5 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c

[Qemu-devel] [PATCH v3 00/19] usb: convert device init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei DeviceClass->init is the old interface, let's convert usb devices to the new realize API. In this way, all the implementations now use error_setg instead of qerror_report/error_report for reporting error. Note: Next, I will post a incremental patch series fixing usb-serial issue

Re: [Qemu-devel] [PATCH 0/2] pflash (UEFI varstore) migration shortcut for libvirt

2014-09-18 Thread Alexey Kardashevskiy
On 08/25/2014 08:33 PM, Paolo Bonzini wrote: > Il 23/08/2014 12:19, Laszlo Ersek ha scritto: >> Libvirt is growing support for x86_64 OVMF guests: >> >> http://www.redhat.com/archives/libvir-list/2014-August/msg01045.html >> >> An important feature of such guests is the persistent store for >> non-

[Qemu-devel] [PATCH v6 0/2] dump: let dump_error return error reason to caller

2014-09-18 Thread zhanghailiang
Hi, In original code, Function dump_error ignores its second parameter which contains error reason, it is better to return the error message to the caller. Here we use error_setg to return the error info to caller. And at the same time, we turn functions like write_elf64_note() to void, Because

[Qemu-devel] [PATCH v6 2/2] dump: Don't return error code when return an Error object

2014-09-18 Thread zhanghailiang
Functions shouldn't return an error code and an Error object at the same time. Turn all these functions that returning Error object to void. We also judge if a function success or fail by reference to the local_err. Signed-off-by: zhanghailiang --- dump.c | 313 +++---

[Qemu-devel] [PATCH v6 1/2] dump: let dump_error return error info to caller

2014-09-18 Thread zhanghailiang
The second parameter of dump_error is unused, but one purpose of using this function is to report the error info. Use error_set to return the error info to the caller. Signed-off-by: zhanghailiang --- dump.c | 165 - 1 file changed

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-18 Thread Gonglei (Arei)
> From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Friday, September 19, 2014 2:06 PM > To: Gonglei (Arei) > Subject: Re: [PATCH v2 00/19] usb: convert device init to realize > > On Do, 2014-09-18 at 20:47 +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > DeviceClass->init is

Re: [Qemu-devel] [PATCH v2] qemu-char: Do not disconnect when there's data for reading

2014-09-18 Thread Markus Armbruster
Zifei Tong writes: > Hi Markus, > > On Thu, Sep 18, 2014 at 8:11 PM, Markus Armbruster wrote: >> Zifei Tong writes: >> >>> After commit 812c1057f6175ac9a9829fa2920a2b5783814193 (Handle G_IO_HUP >>> in tcp_chr_read for tcp chardev), connections are disconnected when in >>> G_IO_HUP condition. >>

Re: [Qemu-devel] [PATCH] ohci: Convert fprint/DPRINTF/print to traces

2014-09-18 Thread Gerd Hoffmann
On Fr, 2014-09-19 at 13:57 +1000, Alexey Kardashevskiy wrote: > On 09/12/2014 06:55 PM, Alexey Kardashevskiy wrote: > > This converts many kinds of debug prints to traces. > > > > This implements packets logging to avoid unnecessary calculations if > > usb_ohci_td_pkt_short/usb_ohci_td_pkt_long is

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-18 Thread Gerd Hoffmann
On Do, 2014-09-18 at 20:47 +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > DeviceClass->init is the old interface, let's convert usb > devices to the new realize API. In this way, all the > implementations now use error_setg instead of > qerror_report/error_report for reporting error.

Re: [Qemu-devel] [PATCH v2 15/19] dev-wacom: convert init to realize

2014-09-18 Thread Gonglei (Arei)
Hi, > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Friday, September 19, 2014 2:02 PM > Subject: Re: [PATCH v2 15/19] dev-wacom: convert init to realize > > > > static const VMStateDescription vmstate_usb_wacom = { > > @@ -357,7 +356,7 @@ static void usb_wacom_class_init(ObjectClass *

Re: [Qemu-devel] [PATCH v2 15/19] dev-wacom: convert init to realize

2014-09-18 Thread Gerd Hoffmann
> static const VMStateDescription vmstate_usb_wacom = { > @@ -357,7 +356,7 @@ static void usb_wacom_class_init(ObjectClass *klass, void > *data) > > uc->product_desc = "QEMU PenPartner Tablet"; > uc->usb_desc = &desc_wacom; > -uc->init = usb_wacom_initfn; > +

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-18 Thread Fam Zheng
On Tue, 09/02 12:06, Amit Shah wrote: > On (Mon) 01 Sep 2014 [20:52:46], Zhang Haoyu wrote: > > >>> Hi, all > > >>> > > >>> I start a VM with virtio-serial (default ports number: 31), and found > > >>> that virtio-blk performance degradation happened, about 25%, this > > >>> problem can be repro

[Qemu-devel] [Patch v2 8/8] netduino2: Add the Netduino 2 Machine

2014-09-18 Thread Alistair Francis
This patch adds the Netduino 2 Machine. This is a Cortex-M3 based machine. Information can be found at: http://www.netduino.com/netduino2/specs.htm Signed-off-by: Alistair Francis --- Changes from RFC: - Remove CPU passthrough hw/arm/Makefile.objs | 1 + hw/arm/netduino2.c | 54 +++

[Qemu-devel] [Patch v2 6/8] target_arm: Change the reset values based on the ELF entry

2014-09-18 Thread Alistair Francis
The Netduino 2 machine won't run unless the reset_pc is based on the ELF entry point. Signed-off-by: Alistair Francis Signed-off-by: Peter Crosthwaite --- V2: - Malloc straight away, thanks to Peter C hw/arm/armv7m.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(

[Qemu-devel] [Patch v2 7/8] stm32f205: Add the stm32f205 SoC

2014-09-18 Thread Alistair Francis
This patch adds the stm32f205 SoC. This will be used by the Netduino 2 to create a machine. Signed-off-by: Alistair Francis --- Changes from RFC: - Small changes thanks to Peter C - Split the config settings to device level default-configs/arm-softmmu.mak | 1 + hw/arm/Makefile.objs

[Qemu-devel] [Patch v2 4/8] target_arm: Remove memory region init from armv7m_init

2014-09-18 Thread Alistair Francis
This patch moves the memory region init code from the armv7m_init function to the stellaris_init function Signed-off-by: Alistair Francis --- V2: - Change the memory region names to match the machine hw/arm/armv7m.c| 15 +-- hw/arm/stellaris.c | 23 +++ 2 fi

Re: [Qemu-devel] [PATCH v2] qemu-char: Do not disconnect when there's data for reading

2014-09-18 Thread Zifei Tong
Hi Markus, On Thu, Sep 18, 2014 at 8:11 PM, Markus Armbruster wrote: > Zifei Tong writes: > >> After commit 812c1057f6175ac9a9829fa2920a2b5783814193 (Handle G_IO_HUP >> in tcp_chr_read for tcp chardev), connections are disconnected when in >> G_IO_HUP condition. >> >> However, it's possible that

[Qemu-devel] [Patch v2 2/8] stm32f205_USART: Add the stm32f205 USART Controller

2014-09-18 Thread Alistair Francis
This patch adds the stm32f205 USART controller (UART also uses the same controller). Signed-off-by: Alistair Francis --- V2: - Drop charecters if the device is not enabled - Thanks to Peter C Changes from RFC: - Small changes thanks to Peter C - USART now implements QEMU blocking functions

[Qemu-devel] [Patch v2 3/8] stm32f205_SYSCFG: Add the stm32f205 SYSCFG

2014-09-18 Thread Alistair Francis
This patch adds the stm32f205 System Configuration Controller. This is used to configure what memory is mapped at address 0 (although that is not supported) as well as configure how the EXTI interrupts work (also not supported at the moment). This device is not required for basic examples, but mor

[Qemu-devel] [Patch v2 5/8] target_arm: Parameterise the irq lines for armv7m_init

2014-09-18 Thread Alistair Francis
This patch allows the board to specifiy the number of NVIC interrupt lines when using armv7m_init. Signed-off-by: Alistair Francis --- hw/arm/armv7m.c | 7 --- hw/arm/stellaris.c | 4 +++- include/hw/arm/arm.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/a

[Qemu-devel] [Patch v2 1/8] stm32f205_timer: Add the stm32f205 Timer

2014-09-18 Thread Alistair Francis
This patch adds the stm32f205 timers: TIM2, TIM3, TIM4 and TIM5 to QEMU. Signed-off-by: Alistair Francis --- PUBLIC V2: - Reorder the Makefile config - Fix up the debug printing - Correct the timer event trigger Changes from RFC: - Small changes to functionality and style. Thanks to Peter C

[Qemu-devel] [Patch v2 0/8] Netduino 2 Machine Model

2014-09-18 Thread Alistair Francis
This patch series adds the Netduino 2 Machine to QEMU Information on the board is avalible at: http://www.netduino.com/netduino2/specs.htm The git tree can be found at: https://github.com/alistair23/qemu/tree/netduino2.2 This is based on my original patch series to add the Netduino Plus 2 Machin

Re: [Qemu-devel] [PATCH 0/2] Handle interferences between multiple children drivers and stream and commit

2014-09-18 Thread Jeff Cody
On Mon, Sep 15, 2014 at 04:21:18PM +0200, Benoît Canet wrote: > We do not want to try to stream or commit with a base argument through > a multiple children driver. > > Handle this case. > > Benoît Canet (2): > block: Introduce a BlockDriver field to flag drivers supporting > multiple child

[Qemu-devel] [PATCH v2 1/2] Revert "vfio: Make BARs native endian"

2014-09-18 Thread Alexey Kardashevskiy
This reverts commit c40708176a6b52b73bec14796b7c71b882ceb102. The resulting code wrongly assumed target and host endianness are the same which is not always the case for PPC64. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * simplified commit log (thanks to Greg Kurz) --- hw/misc/vfio.c

Re: [Qemu-devel] [PATCH] ohci: Convert fprint/DPRINTF/print to traces

2014-09-18 Thread Alexey Kardashevskiy
On 09/12/2014 06:55 PM, Alexey Kardashevskiy wrote: > This converts many kinds of debug prints to traces. > > This implements packets logging to avoid unnecessary calculations if > usb_ohci_td_pkt_short/usb_ohci_td_pkt_long is not enabled. > > This makes OHCI errors (such as "DMA error") invisibl

[Qemu-devel] [PATCH v2 0/2] vfio: Another try to fix ROM BAR endianness

2014-09-18 Thread Alexey Kardashevskiy
I did some tests on LE/BE guest/host combinations and came up with these 2 patches. Please comment. Thanks. Changes: v2: * tested TCG * updated commit logs Alexey Kardashevskiy (1): Revert "vfio: Make BARs native endian" Nikunj A Dadhania (1): vfio: make rom read endian sensitive hw/misc

[Qemu-devel] [PATCH v2 2/2] vfio: make rom read endian sensitive

2014-09-18 Thread Alexey Kardashevskiy
From: Nikunj A Dadhania All memory regions used by VFIO are LITTLE_ENDIAN and they already take care of endiannes when accessing real device BARs except ROM - it was broken on BE hosts. This fixes endiannes for ROM BARs the same way as it is done for other BARs. This has been tested on PPC64 BE

Re: [Qemu-devel] [PATCH v2] pc-dimm/numa: Fix stat of memory size in node when hotplug memory

2014-09-18 Thread zhanghailiang
On 2014/9/19 9:43, Chen, Fan wrote: On Thu, 2014-09-18 at 20:07 +0800, zhanghailiang wrote: When do memory hotplug, if there is numa node, we should add the memory size to the corresponding node memory size. For now, it mainly affects the result of hmp command "info numa". Signed-off-by: zhang

[Qemu-devel] [PATCH v1] vl: Fix possible freed memory accessing

2014-09-18 Thread zhanghailiang
The logic of pcmcia_socket_unregister is wrong, which will cause a freed memory accessing Signed-off-by: zhanghailiang --- Hi, The function pcmcia_socket_unregister seemes to be unused, Should it be removed? Thanks. --- vl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH v2] qga: Rewrite code where using readdir_r

2014-09-18 Thread zhanghailiang
If readdir_r fails, error_setg_errno will reference the freed pointer *dirpath*. Moreover, readdir_r may cause a buffer overflow, using readdir instead. Signed-off-by: zhanghailiang --- v2: - Switch readdir_r to readdir (Comment of Eric Blake) --- qga/commands-posix.c | 27 +++-

Re: [Qemu-devel] [question] virtio-net-device and multi-queue option

2014-09-18 Thread Gonglei (Arei)
> From: Eric Auger [mailto:eric.au...@linaro.org] > Sent: Friday, September 19, 2014 10:23 AM > To: Gonglei (Arei); qemu list; Michael S. Tsirkin > Subject: Re: [Qemu-devel] [question] virtio-net-device and multi-queue option > > On 09/19/2014 03:42 AM, Gonglei (Arei) wrote: > >> Subject: [Qemu-de

Re: [Qemu-devel] [question] virtio-net-device and multi-queue option

2014-09-18 Thread Eric Auger
On 09/19/2014 03:42 AM, Gonglei (Arei) wrote: >> Subject: [Qemu-devel] [question] virtio-net-device and multi-queue option >> >> Hi, >> >> >> I am currently doing some benchmarks using virtio-net-device using >> virtio-mmio (non PCI) with qemu_system_arm with KVM. Purpose is to >> compare with devi

Re: [Qemu-devel] [Patch v1 2/8] stm32f205_USART: Add the stm32f205 USART Controller

2014-09-18 Thread Alistair Francis
On Tue, Sep 16, 2014 at 1:11 AM, Peter Crosthwaite wrote: > On Sun, Sep 14, 2014 at 6:18 PM, Alistair Francis > wrote: >> This patch adds the stm32f205 USART controller >> (UART also uses the same controller). >> >> Signed-off-by: Alistair Francis >> --- >> Changes from RFC: >> - Small changes

Re: [Qemu-devel] [Patch v1 1/8] stm32f205_timer: Add the stm32f205 Timer

2014-09-18 Thread Alistair Francis
On Tue, Sep 16, 2014 at 1:01 AM, Peter Crosthwaite wrote: > On Sun, Sep 14, 2014 at 6:18 PM, Alistair Francis > wrote: >> This patch adds the stm32f205 timers: TIM2, TIM3, TIM4 and TIM5 >> to QEMU. >> >> Signed-off-by: Alistair Francis >> --- >> Changes from RFC: >> - Small changes to function

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-18 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Friday, September 19, 2014 2:42 AM > Subject: Re: [PATCH v2 00/19] usb: convert device init to realize > > Il 18/09/2014 19:15, Markus Armbruster ha scritto: > > > > Thanks for doing this work. If you can

Re: [Qemu-devel] [PATCH v2] pc-dimm/numa: Fix stat of memory size in node when hotplug memory

2014-09-18 Thread Chen, Fan
On Thu, 2014-09-18 at 20:07 +0800, zhanghailiang wrote: > When do memory hotplug, if there is numa node, we should add > the memory size to the corresponding node memory size. > > For now, it mainly affects the result of hmp command "info numa". > > Signed-off-by: zhanghailiang > --- > v2: > -

Re: [Qemu-devel] [question] virtio-net-device and multi-queue option

2014-09-18 Thread Gonglei (Arei)
> Subject: [Qemu-devel] [question] virtio-net-device and multi-queue option > > Hi, > > > I am currently doing some benchmarks using virtio-net-device using > virtio-mmio (non PCI) with qemu_system_arm with KVM. Purpose is to > compare with device passthrough performance. > > I heard about the

[Qemu-devel] [PATCH] linux-user: Enable epoll_pwait syscall for ARM

2014-09-18 Thread Peter Maydell
We have support for the epoll_pwait syscall, but it wasn't enabled for ARM guests because we hadn't defined the syscall number; correct this deficiency. Reported-by: Dave Flogeras Signed-off-by: Peter Maydell --- linux-user/arm/syscall_nr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH v5 2/2] dump: Don't return error code when return an Error object

2014-09-18 Thread zhanghailiang
On 2014/9/17 0:24, Markus Armbruster wrote: zhanghailiang writes: Functions shouldn't return an error code and an Error object at the same time. Turn all these functions that returning Error object to void. We also judge if a function success or fail by reference to the *errp. Signed-off-by:

Re: [Qemu-devel] [PATCH v6 00/16] KVM platform device passthrough

2014-09-18 Thread Eric Auger
On 09/16/2014 11:23 PM, Alex Williamson wrote: > On Tue, 2014-09-16 at 14:51 -0600, Alex Williamson wrote: >> On Tue, 2014-09-16 at 00:01 +0200, Eric Auger wrote: >>> On 09/12/2014 01:05 AM, Christoffer Dall wrote: On Thu, Sep 11, 2014 at 04:51:14PM -0600, Alex Williamson wrote: > On Thu,

[Qemu-devel] [PATCH 01/15] qtest/ahci: Add AHCIState structure

2014-09-18 Thread John Snow
Introduce a state structure that can be used to conveniently bookmark key values of the AHCI Device instead of re-polling it all the time. This structure also helps ease of cleanup. Signed-off-by: John Snow --- tests/ahci-test.c | 283 ++ 1 fil

[Qemu-devel] [question] virtio-net-device and multi-queue option

2014-09-18 Thread Eric Auger
Hi, I am currently doing some benchmarks using virtio-net-device using virtio-mmio (non PCI) with qemu_system_arm with KVM. Purpose is to compare with device passthrough performance. I heard about the availability of a multi-queue option that greatly improves the performance but I currently fail

[Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-09-18 Thread John Snow
The original version of the AHCI test base which is now staged for being merged, processes the ahci_identify test in a monolithic fashion. In authoring new tests, it became necessary and obvious as to how the operation of this device should be factored out to ease the writing of new AHCI tests. T

[Qemu-devel] [PATCH 14/15] qtest/ahci: Add human-readable command names

2014-09-18 Thread John Snow
Instead of using direct hex values, use SATA command mnemonics. Signed-off-by: John Snow --- tests/ahci-test.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 63fc309..e3091b9 100644 --- a/tests/ahci-test.c +++ b/tests/ahc

[Qemu-devel] [PATCH 11/15] qtest/ahci: Add cmd response sanity check helpers

2014-09-18 Thread John Snow
Adds a few helpers to help sanity-check the response of the AHCI device after a command. d2h_check_sanity inspects the D2H Register FIS, pio_check_sanity inspects the PIO Setup FIS, and cmd_check_sanity inspects the command header. Signed-off-by: John Snow --- tests/ahci-test.c | 123 ++

[Qemu-devel] [PATCH 08/15] qtest/ahci: Add issue_command helper

2014-09-18 Thread John Snow
issue_command is a small routine that informs the AHCI device that we have finalized our command and we'd wish for the device to begin processing it. issue_command polls the AHCI device waiting for the device to finish, in order to achieve a synchronous effect. Signed-off-by: John Snow --- test

[Qemu-devel] [PATCH 09/15] qtest/ahci: Add port_check_interrupts helper

2014-09-18 Thread John Snow
A helper that compares a given port's current interrupts and checks them against a supplied list of expected interrupt bits, and throws an error if they do not match. The helper then resets the requested interrupts on this port, and asserts that the interrupt register is now empty. Signed-off-by:

[Qemu-devel] [PATCH 07/15] qtest/ahci: Add port_check_error helper

2014-09-18 Thread John Snow
port_check-error checks a given port's error registers and asserts that everything from the port-level view is still OK. Signed-off-by: John Snow --- tests/ahci-test.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/tests/ahci-test.c b/tests/ah

[Qemu-devel] [PATCH 13/15] qtest/ahci: Add a macro bootup routine

2014-09-18 Thread John Snow
Add a routine that can be used to engage the AHCI device at a not-granular level so that bringing up the functionality of the HBA is easy in future tests that are not concerned with testing the bring-up process. Signed-off-by: John Snow --- tests/ahci-test.c | 19 --- 1 file chan

[Qemu-devel] [PATCH 15/15] qtest/ahci: Don't use a magic constant for buffer size

2014-09-18 Thread John Snow
Fix to correct the use of "512" as a magic constant and define it as the buffer size for the operation instead. Signed-off-by: John Snow --- tests/ahci-test.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index e3091b9..9d16

[Qemu-devel] [PATCH 10/15] qtest/ahci: Add port_check_nonbusy helper

2014-09-18 Thread John Snow
A simple helper that asserts a given port is not busy processing any commands via the TFD, Command Issue and SACT registers. Signed-off-by: John Snow --- tests/ahci-test.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 315e6e9

[Qemu-devel] [PATCH 06/15] qtest/ahci: Add link_cmd_slot helper

2014-09-18 Thread John Snow
link_cmd_slot creates the command header, by setting a pointer to the command table as well as adjusting other metadata, like DMA direction and PRDT length. It effectively links a command, via its table, to the indicated command slot. Signed-off-by: John Snow --- tests/ahci-test.c | 72

[Qemu-devel] [PATCH 03/15] qtest/ahci: Add port_clear helper

2014-09-18 Thread John Snow
Add a helper that assists in clearing out potentially old error and FIS information from an AHCI port's data structures. This ensures we always start with a blank slate for interrupt and FIS receipt information. Signed-off-by: John Snow --- tests/ahci-test.c | 26 ++ 1 fi

[Qemu-devel] [PATCH 12/15] qtest/ahci: Enforce zero-leaks for guest mem usage

2014-09-18 Thread John Snow
The purpose of this patch is to aid in debugging the new malloc-pc interface for guest memory, by enabling the enforcing of no guest memory blocks in use at exit time. Signed-off-by: John Snow --- tests/ahci-test.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-

[Qemu-devel] [PATCH 04/15] qtest/ahci: Add command header helpers

2014-09-18 Thread John Snow
Add command_header_set, command_header_get, command_destroy and cmd_pick to help quickly manage the command header information in the AHCI device. command_header_set and get will store or retrieve an AHCI command header, respectively. cmd_pick chooses the first available but least recently used c

[Qemu-devel] [PATCH 02/15] qtest/ahci: Add port_select helper

2014-09-18 Thread John Snow
This helper identifies which port of the AHCI HBA has a device we may run tests on. Signed-off-by: John Snow --- tests/ahci-test.c | 46 +- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index d845

[Qemu-devel] [PATCH 05/15] qtest/ahci: Add build cmd table helper

2014-09-18 Thread John Snow
build_cmd_table is a helper routine to build the command table, which consists of the Command FIS and the Physical Region Descriptor Table. Signed-off-by: John Snow --- tests/ahci-test.c | 113 +++--- 1 file changed, 74 insertions(+), 39 deletions(

Re: [Qemu-devel] [RFC] vfio: migration to trace points

2014-09-18 Thread Eric Auger
Hi, For those who would like to try that patch and are not familiar with trace points, here are some very basic instructions to start with. - in your qemu configure command line, add --enable-trace-backends=stderr This enables the stderr trace backend. - create a events.txt file where you lau

Re: [Qemu-devel] [PATCH] tests: avoid running duplicate qom-tests

2014-09-18 Thread Peter Maydell
On 18 September 2014 15:59, Michael Roth wrote: > Since 3687d532 we've been unconditionally adding qom-test to our qtests > for every arch. However, some archs inherit their tests from Makefile > variables for other archs, such as i386/x86_64, > microblaze/microblazeel, and xtensa/xtensaeb. Since

[Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-09-18 Thread Andrew Jones
Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. Signed-off-by: Andrew Jones --- hw/misc/ivshmem.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --g

Re: [Qemu-devel] [PATCH] ivshmem: use error_report

2014-09-18 Thread Andrew Jones
On Thu, Sep 18, 2014 at 04:46:55PM -0600, Eric Blake wrote: > On 09/18/2014 04:39 PM, Andrew Jones wrote: > > Replace all the fprintf(stderr, ...) calls with error_report. > > > > Signed-off-by: Andrew Jones > > --- > > hw/misc/ivshmem.c | 27 +-- > > 1 file changed, 13 i

[Qemu-devel] [PATCH] tests: avoid running duplicate qom-tests

2014-09-18 Thread Michael Roth
Since 3687d532 we've been unconditionally adding qom-test to our qtests for every arch. However, some archs inherit their tests from Makefile variables for other archs, such as i386/x86_64, microblaze/microblazeel, and xtensa/xtensaeb. Since these are evaluated in a lazy manner, we ultimately end u

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-18 Thread Peter Lieven
Am 18.09.2014 um 16:17 schrieb Paolo Bonzini : > Il 18/09/2014 16:16, Peter Lieven ha scritto: >>> As you can see from the multiwrite_merge trace the merging has never been stopped because of the max_transfer_length. The question is, why are the I/O requests not coming in as

Re: [Qemu-devel] [PATCH 4/4] block: avoid creating oversized writes in multiwrite_merge

2014-09-18 Thread Peter Lieven
Am 18.09.2014 um 16:13 schrieb Paolo Bonzini : > Il 05/09/2014 18:51, Peter Lieven ha scritto: >> Signed-off-by: Peter Lieven >> --- >> block.c |5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/block.c b/block.c >> index fa4c34b..db3f842 100644 >> --- a/block.c >> +++ b/block.c

Re: [Qemu-devel] [PATCH] ivshmem: use error_report

2014-09-18 Thread Eric Blake
On 09/18/2014 04:39 PM, Andrew Jones wrote: > Replace all the fprintf(stderr, ...) calls with error_report. > > Signed-off-by: Andrew Jones > --- > hw/misc/ivshmem.c | 27 +-- > 1 file changed, 13 insertions(+), 14 deletions(-) > > diff --git a/hw/misc/ivshmem.c b/hw/mis

[Qemu-devel] [PATCH] ivshmem: use error_report

2014-09-18 Thread Andrew Jones
Replace all the fprintf(stderr, ...) calls with error_report. Signed-off-by: Andrew Jones --- hw/misc/ivshmem.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index bf585b7691998..d285df7d65a9f 100644 --- a/

Re: [Qemu-devel] [PULL v3 00/15] pci, pc, virtio, misc bugfixes

2014-09-18 Thread Peter Maydell
On 18 September 2014 11:54, Michael S. Tsirkin wrote: > The following changes since commit 4c24f4004089a308c5de8ed720cf6bd1746aedd8: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20140912' into staging (2014-09-12 > 15:12:26 +0100) > > are available in the git repos

Re: [Qemu-devel] [PATCH 08/14] ppc: introduce gen_op_mfcr/gen_op_mtcr

2014-09-18 Thread Richard Henderson
On 09/15/2014 08:03 AM, Paolo Bonzini wrote: > +static inline void gen_op_mfcr(TCGv_i32 dest, int first_cr, int shift) > +{ > +tcg_gen_shli_i32(dest, cpu_crf[first_cr >> 2], shift); > +} > + > +static inline void gen_op_mtcr(int first_cr, TCGv_i32 src, int shift) > +{ > +if (shift) { > +

[Qemu-devel] [PATCH] disas/arm: Remove redefinition of ATTRIBUTE_UNUSED

2014-09-18 Thread Tobias Klauser
ATTRIBUTE_UNUSED is already defined in disas/bfd.h, which is included. Thus, there is no need to redefine it. Signed-off-by: Tobias Klauser --- disas/arm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/disas/arm.c b/disas/arm.c index 76e97a8..6f63406 100644 --- a/disas/arm.c +++ b/disas/arm

Re: [Qemu-devel] [PATCH 06/14] ppc: introduce helpers for mfocrf/mtocrf

2014-09-18 Thread Richard Henderson
On 09/15/2014 08:03 AM, Paolo Bonzini wrote: > @@ -4173,24 +4173,7 @@ static void gen_mfcr(DisasContext *ctx) > cpu_gpr[rD(ctx->opcode)], crn * 4); > } > } else { > -TCGv_i32 t0 = tcg_temp_new_i32(); > -tcg_gen_mov_i32(t0, cpu_crf[0]); > -

Re: [Qemu-devel] [PATCH v2 00/14] TCG ppc speedups

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > Patches 1-3 speed up softmmu emulation by avoiding TLB flushes on changes > to IR/DR. > > Patches 4-14 speed up emulation in general by rewriting the handling of > condition registers. > > Paolo Bonzini (14): > ppc: do not look at the MMU index to d

[Qemu-devel] [PATCH v3 2/4] qapi: dealloc visitor, implement visit_start_union

2014-09-18 Thread Michael Roth
If the .data field of a QAPI Union is NULL, we don't need to free any of the union fields. Make use of the new visit_start_union interface to access this information and instruct the generated code to not visit these fields when this occurs. Cc: qemu-sta...@nongnu.org Reported-by: Fam Zheng Sugg

[Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test missing "driver" key for blockdev-add

2014-09-18 Thread Michael Roth
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Cc: qemu-sta...@nongnu.org Signed-off-by: Michael Roth --- tests/qemu-iotests/087 | 17 + tests/qemu-iotests/087.out | 13 + 2 files changed, 30 insertions(+) diff --git a/tests/qemu-iotests/087

[Qemu-devel] [PATCH v3 3/4] tests: add QMP input visitor test for unions with no discriminator

2014-09-18 Thread Michael Roth
This is more of an exercise of the dealloc visitor, where it may erroneously use an uninitialized discriminator field as indication that union fields corresponding to that discriminator field/type are present, which can lead to attempts to free random chunks of heap memory. Cc: qemu-sta...@nongnu.

[Qemu-devel] [PATCH v3 0/4] qapi: fix crash in dealloc visitor for union types

2014-09-18 Thread Michael Roth
This series introduces visit_start_union and visit_end_union as a way of allowing visitors to trigger generated code to bail out on visiting union fields if the visitor implementation deems doing so to be unsafe. See patch 1 for the circumstances that cause the segfault in the dealloc visitor. Th

[Qemu-devel] [PATCH v3 1/4] qapi: add visit_start_union and visit_end_union

2014-09-18 Thread Michael Roth
In some cases an input visitor might bail out on filling out a struct for various reasons, such as missing fields when running in strict mode. In the case of a QAPI Union type, this may lead to cases where the .kind field which encodes the union type is uninitialized. Subsequently, other visitors,

Re: [Qemu-devel] [PATCH 13/14] ppc: inline ppc_set_crf when clearer

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > Do not go through the loop when we're setting the four CR fields to > separate constants or conditions. This is clearer than putting together > 4-bit value and passing it. I guess "clearer" is in the eye of the beholder :) In general, replacing

Re: [Qemu-devel] [PATCH 11/14] ppc: store CR registers in 32 1-bit registers

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > This makes comparisons much smaller and faster. The speedup is > approximately 10% on user-mode emulation on x86 host, 3-4% on PPC. > > Note that CRF_* constants are flipped to match PowerPC's big > bit-endianness. Previously, the CR register was eff

Re: [Qemu-devel] [PATCH v2 3/4] tests: add QMP input visitor test for unions with no discriminator

2014-09-18 Thread Michael Roth
Quoting Eric Blake (2014-09-17 17:33:36) > On 09/17/2014 03:32 PM, Michael Roth wrote: > > This more of an exercise of the dealloc visitor, where it may > > s/This more/This is more/ > > > erroneously use an uninitialized discriminator field as indication > > that union fields corresponding to th

Re: [Qemu-devel] [PATCH] Fix cross compilation (nm command)

2014-09-18 Thread Peter Maydell
On 18 September 2014 12:55, Stefan Weil wrote: > Commit c261d774fb9093d00e0938a19f502fb220f62718 added one more binutils > tool: nm also needs a cross prefix. > > Signed-off-by: Stefan Weil Heh, completely missed that when reviewing the original patch. Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH 10/14] ppc: use movcond for isel

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > v1->v2: fixed TCG debugging failures > > target-ppc/translate.c | 26 +- > 1 file changed, 13 insertions(+), 13 deletions(-) > > diff --git a/target-ppc/translate.c b/target-ppc/tran

[Qemu-devel] [PATCH] Fix cross compilation (nm command)

2014-09-18 Thread Stefan Weil
Commit c261d774fb9093d00e0938a19f502fb220f62718 added one more binutils tool: nm also needs a cross prefix. Signed-off-by: Stefan Weil --- configure |2 ++ rules.mak |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 1a9daa5..5eb95a3 100755 -

Re: [Qemu-devel] [PATCH 09/14] ppc: introduce ppc_get_crf and ppc_set_crf

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > These two functions will group together four CR bits into a single > value, once we change the representation of condition registers. > > Signed-off-by: Paolo Bonzini > --- > linux-user/main.c| 2 +- > target-ppc/cpu.h | 10 +

  1   2   3   4   >