[Qemu-devel] Does the event idx mechanism in virtio work in the correct way?

2014-10-14 Thread Bin Wu
Hi, The event idx in virtio is an effective way to reduce the number of interrupts and exits of the guest. When the guest puts an request into the virtio ring, it doesn't exit immediately to inform the backend. Instead, the guest checks the "avail" event idx to determine the notification. For

[Qemu-devel] [PULL 40/47] qdev: Drop legacy hotplug fields/methods

2014-10-14 Thread Andreas Färber
From: Igor Mammedov It removes not needed anymore BusState::allow_hotplug field and DeviceClass::unplug callback. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- hw/core/qdev.c | 16 +++- include/hw/qdev-core.h | 5 + 2 files

[Qemu-devel] [PULL 41/47] qdev: HotplugHandler: Add support for unplugging BUS-less devices

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Signed-off-by: Andreas Färber --- hw/core/qdev.c | 61 -- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 3e58dd0..7685e07 100644 --- a

[Qemu-devel] [PULL 47/47] qdev: Drop legacy_name from qdev properties

2014-10-14 Thread Andreas Färber
From: Gonglei The legacy_name is useless now, better help information is provided by description field of property. Cc: Markus Armbruster Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- hw/core/qdev-properties-system.c | 4

[Qemu-devel] [PULL 46/47] qmp: Print descriptions of object properties

2014-10-14 Thread Andreas Färber
From: Gonglei Add a new "description" field to DevicePropertyInfo. The descriptions can serve as documentation in the code, and they can be used to provide better help. For example: $./qemu-system-x86_64 -device virtio-blk-pci,? Before this patch: virtio-blk-pci.iothread=link virtio-blk-pci.x-

[Qemu-devel] [PULL 38/47] usb: Convert usb-ccid to hotplug handler API

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Signed-off-by: Andreas Färber --- hw/usb/dev-smartcard-reader.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index d37ed02..78ce681 100644 --- a/hw/usb/d

[Qemu-devel] [PULL 43/47] qdev: Add description field in PropertyInfo struct

2014-10-14 Thread Andreas Färber
From: Gonglei The descriptions can serve as documentation in the code, and they can be used to provide better help. Cc: Markus Armbruster Signed-off-by: Gonglei Signed-off-by: Paolo Bonzini Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- hw/cor

[Qemu-devel] [PULL 35/47] usb-bot: Mark device as non hotpluggable

2014-10-14 Thread Andreas Färber
From: Igor Mammedov usb-bot creates SCSI bus and immediately makes it non hotpluggable which was making not possible to hotplug usb-bot since QEMU would abort at bus_add_child(scsi-hd) time when usb-bot is realized. Mark usb-bot as not hotpluggable so that attempt to hotplug it would error out e

[Qemu-devel] [PULL 45/47] qdev: Set the object property's description to the qdev property's.

2014-10-14 Thread Andreas Färber
From: Gonglei Set all static qdev properties' descriptions to object property's description. Cc: Markus Armbruster Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- hw/core/qdev.c | 5 + 1 file changed, 5 insertions(+)

[Qemu-devel] [PULL 31/47] scsi: Set SCSI BUS itself as default HotplugHandler

2014-10-14 Thread Andreas Färber
From: Igor Mammedov That would allow to handle SCSI device unplug on HBAs without dedicated hot(un)plug handlers and avoid making such HBAs explicitly hotpluggable. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- hw/scsi/scsi-bus.c | 8 +++- 1 fi

[Qemu-devel] [PULL 42/47] qdev: device_del: Search for to be unplugged device in 'peripheral' container

2014-10-14 Thread Andreas Färber
From: Igor Mammedov device_add puts every device with 'id' inside of 'peripheral' container using id's value as the last component name. Use it by replacing recursive search on sysbus with path lookup in 'peripheral' container, which could handle both BUS and BUS-less device cases. Signed-off-by

[Qemu-devel] [PULL 37/47] usb-storage: Drop not needed "allow_hotplug = 0"

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Drop useless hack that disables hotplug on bus, after backend storage was added to it, by setting "allow_hotplug = 0". Even if bus is hotpluggable, it won't be possible to add another SCSI device to bus since its realize will fail early with error "no free target" in scsi_qdev

[Qemu-devel] [PULL 29/47] s390x: Convert s390-virtio to hotplug handler API

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Beside of conversion, patch drops present unplug handling, effectively disabling hot-unplug of s390-virtio devices. Signed-off-by: Igor Mammedov Reviewed-by: Cornelia Huck Signed-off-by: Andreas Färber --- hw/s390x/s390-virtio-bus.c | 10 +- 1 file changed, 5 inse

[Qemu-devel] [PULL 39/47] usb: Convert usb devices to hotplug handler API

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Signed-off-by: Andreas Färber --- hw/usb/bus.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index da1eba9..986b2d8 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -24,10 +24,12 @@ stati

[Qemu-devel] [PULL 36/47] usb-bot: Drop not needed "allow_hotplug = 0"

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Drop useless hack that disables hotplug on bus by setting "allow_hotplug = 0". Even if bus is hotpluggable, It won't be possible to add another SCSI device to bus since its realization will fail early with error "no free target" in scsi_qdev_realize() method. Signed-off-by: I

[Qemu-devel] [PULL 30/47] s390x: Convert virtio-ccw to hotplug handler API

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- hw/s390x/virtio-ccw.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-cc

[Qemu-devel] [PULL 33/47] scsi: Convert virtio-scsi HBA to hotplug handler API

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- hw/scsi/virtio-scsi.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/

[Qemu-devel] [PULL 27/47] virtio-mmio: Drop useless bus->allow_hotplug = 0

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Bus by default is not hotpluggable. virtio-mmio-bus and its parent types do not set allow_hotplug anywhere explicitly, so remove not needed field access and wrapper along with it. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signe

Re: [Qemu-devel] [PATCH v6 30/32] target-arm: make c13 cp regs banked (FCSEIDR, ...)

2014-10-14 Thread Edgar E. Iglesias
On Fri, Oct 10, 2014 at 11:03:41AM -0500, Greg Bellows wrote: > From: Fabian Aggeler > > When EL3 is running in AArch32 (or ARMv7 with Security Extensions) > FCSEIDR, CONTEXTIDR, TPIDRURW, TPIDRURO and TPIDRPRW have a secure > and a non-secure instance. > > Signed-off-by: Fabian Aggeler > Signe

[Qemu-devel] [PULL 32/47] scsi: Convert pvscsi HBA to hotplug handler API

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- hw/scsi/vmw_pvscsi.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 5734d19..d3a92fb

[Qemu-devel] [PULL 23/47] qdev: Drop hotplug check from bus_add_child()

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Check is too restrictive and does not allow to add children to just created bus during hotplug when the bus is part of composite device. Removing check from bus_add_child() doesn't affect devices creatable with device_add/del commands since they have a similar builtin check a

[Qemu-devel] [PULL 24/47] target-i386: ICC bus: Drop BusState::allow_hotplug

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Since bus_add_child() no longer cares if BUS is hotpluggable or not, there is no need in setting allow_hotplug field. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- hw/cpu/icc_bus.c | 8 1 file changed, 8 deletions(-) d

[Qemu-devel] [PULL 12/47] tests: usb: Move uhci port test code to libqos/usb.c

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Move code necessary for testing uhci port into library so it could be used by other USB tests. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- tests/Makefile| 3 ++- tests/libqos/usb.c| 37

[Qemu-devel] [PULL 26/47] virtio-serial: Convert to hotplug-handler API

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- hw/char/virtio-serial-bus.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw

[Qemu-devel] [PULL 44/47] qom: Add description field in ObjectProperty struct

2014-10-14 Thread Andreas Färber
From: Gonglei The descriptions can serve as documentation in the code, and they can be used to provide better help. Copy property descriptions when copying alias properties. Cc: Markus Armbruster Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by

[Qemu-devel] [PULL 20/47] qdev: HotplugHandler: Provide unplug callback

2014-10-14 Thread Andreas Färber
From: Igor Mammedov It is to be called for actual device removal and will allow to separate request and removal handling phases of x86-CPU devices and also it's a handler to be called for synchronously removable devices. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: An

[Qemu-devel] [PULL 22/47] qdev: Add wrapper to set BUS as HotplugHandler

2014-10-14 Thread Andreas Färber
From: Igor Mammedov To be used for conversion of SCSI and USB devices, and would allow to make every HBA/USB host switch to HotplugHandler API without touching each controller explicitly. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- hw/core/qdev.c

[Qemu-devel] [PULL 16/47] tests: usb: usb-uas hotplug test

2014-10-14 Thread Andreas Färber
From: Igor Mammedov checks that it's possible to hotplug usb-uas HBA and then if it's possible to hot(un)plug scsi-disk to it. Thest basically covers hot(un)plug on dummy HBAs without means of hot(un)plug notification of the guest. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed

[Qemu-devel] [PULL 28/47] s390x: Drop not used allow_hotplug in event-facility

2014-10-14 Thread Andreas Färber
From: Igor Mammedov s390-sclp-event-facility creates s390-sclp-events-bus and immediately sets its allow_hotplug field to 0, which is NOP since it's already 0 by default. Also since BUS is not hotpluggable, it's not possible to call SCLP_EVENT{ DeviceClass::unplug } callback from qdev_unplug() m

[Qemu-devel] [PULL 14/47] tests: usb: Generic usb device hotplug

2014-10-14 Thread Andreas Färber
From: Igor Mammedov use usb-tablet as a hotplugged usb device. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- tests/Makefile| 4 ++-- tests/libqos/usb.c| 34 ++ tests/libqos/usb.h| 3 +++

[Qemu-devel] [PULL 17/47] Access BusState::allow_hotplug using wraper qbus_is_hotpluggable()

2014-10-14 Thread Andreas Färber
From: Igor Mammedov It would allow to transparently switch detection whether Bus is hotpluggable from allow_hotplug field to hotplug_handler link and to drop allow_hotplug field once all users are converted to hotplug handler API. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-

[Qemu-devel] [PULL 34/47] scsi: Cleanup not used anymore SCSIBusInfo{hotplug, hot_unplug} fields

2014-10-14 Thread Andreas Färber
From: Igor Mammedov SCSI subsytem was converted to hotplug handler API and doesn't use SCSIBusInfo{hotplug, hot_unplug} fields and related callbacks anymore. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- hw/scsi/scsi-bus.c | 16

[Qemu-devel] [PULL 13/47] tests: usb: add port test to uhci unit test

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- tests/Makefile| 2 +- tests/usb-hcd-uhci-test.c | 18 -- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile i

[Qemu-devel] [PULL 19/47] qdev: HotplugHandler: Rename unplug callback to unplug_request

2014-10-14 Thread Andreas Färber
From: Igor Mammedov 'HotplugHandler.unplug' callback is currently used as async call to issue unplug request for device that implements it. Renaming 'unplug' callback to 'unplug_request' should help to avoid confusion about what callback does and would allow to introduce 'unplug' callback that wo

[Qemu-devel] [PULL 11/47] tests: virtio-blk: Check if hot-plug/unplug works

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- tests/virtio-blk-test.c | 49 ++--- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/tests/

[Qemu-devel] [PULL 25/47] virtio-pci: Drop BusState::allow_hotplug

2014-10-14 Thread Andreas Färber
From: Igor Mammedov virtio-pci-bus is an internal object of composite virtio-pci device and it doesn't participate in -device/device_add hotplug flow, and since it's not required by bus_add_child() that BUS must be hotpluggable to be able to add child at runtime, it's possible to drop not needed

[Qemu-devel] [PULL 21/47] qdev: Add simple/generic unplug callback for HotplugHandler

2014-10-14 Thread Andreas Färber
From: Igor Mammedov It will be used in shallow conversion from legacy hotplug mechanism and eventually replace all the uses of old mechanism DeviceClass::unplug = qdev_simple_unplug_cb() Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- hw/core/qdev.c

[Qemu-devel] [PULL 04/47] qom: Add error handler for object_property_print()

2014-10-14 Thread Andreas Färber
From: Gonglei Avoid the caller of object_property_print() leaking string argument's memory, such as qdev_print_props() when encounter errors. Reviewed-by: Paolo Bonzini Signed-off-by: Gonglei Signed-off-by: Andreas Färber --- qom/object.c | 12 ++-- 1 file changed, 10 insertions(+),

[Qemu-devel] [PULL 15/47] tests: usb: usb-storage hotplug test

2014-10-14 Thread Andreas Färber
From: Igor Mammedov usb-storage is different from usual usb devices in that it uses a child SCSI bus for underlying storage. This commit verifies that the SCSI bus is hotpluggable, as hotplug operation wouldn't succeed without it. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-

[Qemu-devel] [PULL 18/47] qdev: do not allow to instantiate non hotpluggable device with device_add

2014-10-14 Thread Andreas Färber
From: Igor Mammedov It will allow explicitly mark device as not hotpluggable and avoid its creation with following error at realize time and destroying it afterwards anyway. Instead of it will error out even before instance of device is created. Signed-off-by: Igor Mammedov Reviewed-by: Paolo B

[Qemu-devel] [PULL 05/47] qom: Add error handler for object alias property

2014-10-14 Thread Andreas Färber
From: Gonglei object_property_add_alias() is called at some places at present. And its parameter errp may not NULL, such as object_property_add_alias(obj, "iothread", OBJECT(&dev->vdev),"iothread", &error_abort); This patch add error handler for security. Cc: Stefa

[Qemu-devel] [PULL 06/47] tests: virtio-scsi: Check if hot-plug/unplug works

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- tests/virtio-scsi-test.c | 29 + 1 file changed, 29 insertions(+) diff --git a/tests/virtio-scsi-test.c b/tests/virtio-sc

[Qemu-devel] [PULL 03/47] qdev: gpio: Register GPIO outputs as QOM links

2014-10-14 Thread Andreas Färber
From: Peter Crosthwaite Within the object that contains the GPIO output. This allows for connecting GPIO outputs via setting of a Link property. Also clear the link value to zero. This catch-alls the case where a device improperly inits a gpio_out (malloc instead of malloc0). Reviewed-by: Alexa

[Qemu-devel] [PULL 08/47] libqos: Add qpci_plug_device_test() and qpci_unplug_acpi_device_test()

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Functions will be used for testing hot(un)plug of PCI devices. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- tests/libqos/pci-pc.c | 49 + tests/li

[Qemu-devel] [PULL 09/47] tests: virtio-rng: Check if hot-plug/unplug works

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- tests/Makefile | 2 +- tests/virtio-rng-test.c | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/Makefil

[Qemu-devel] [PULL 10/47] tests: virtio-net: Check if hot-plug/unplug works

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- tests/Makefile | 2 +- tests/virtio-net-test.c | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/Makefil

[Qemu-devel] [PULL 00/47] QOM devices patch queue 2014-10-15

2014-10-14 Thread Andreas Färber
Hello Peter, This is my QOM (devices) patch queue. Please pull. Regards, Andreas Cc: Peter Maydell The following changes since commit b1d28ec6a7dbdaadda39d29322f0de694aeb0b74: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20141010' into staging (2014-10-10 14:55:29 +0100) are av

[Qemu-devel] [PULL 02/47] qdev: gpio: Register GPIO inputs as child objects

2014-10-14 Thread Andreas Färber
From: Peter Crosthwaite To the device that contains them. This will allow for referencing a GPIO input from it's canonical path (exciting for dynamic machine generation!) Reviewed-by: Alexander Graf Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- hw/core/qdev.c | 9 +++

[Qemu-devel] [PULL 01/47] qdev: gpio: Don't allow name share between I and O

2014-10-14 Thread Andreas Färber
From: Peter Crosthwaite Only allow a GPIO name to be one or the other. Inputs and outputs are functionally different and should be in different namespaces. Prepares support for the QOMification of IRQs as Links or Child objects. The alternative is to munge names .e.g. with "-in" or "-out" suffix

[Qemu-devel] [PULL 07/47] tests: virtio-serial: Check if hot-plug/unplug works

2014-10-14 Thread Andreas Färber
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- tests/virtio-serial-test.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tests/virtio-serial-test.c b/tests/virtio-

Re: [Qemu-devel] [Bug?]When close VM the hugepage not freed

2014-10-14 Thread Linhaifeng
On 2014/10/14 20:08, Daniel P. Berrange wrote: > On Tue, Oct 14, 2014 at 08:02:38PM +0800, Linhaifeng wrote: >> Hi,all >> >> I was trying to use hugepage with VM and found that the hugepage not freed >> when close VM. >> >> >> 1.Before start VM the /proc/meminfo is: >> AnonHugePages:124928 k

Re: [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory

2014-10-14 Thread Yijun Zhu
On 2014/10/14 20:40, Paolo Bonzini wrote: > Il 14/10/2014 08:04, Yijun Zhu ha scritto: >> I think all of the other ARM boards should be changed. If changes in virt is >> ok, >> I will make the patch again including the modification of other ARM boards. > > Don't worry, it's not your fault. :) I

Re: [Qemu-devel] [EXTERNAL] Re: how to dynamically add a block device using qmp?

2014-10-14 Thread Chiang, Ken
Thanks! That did it! -Original Message- From: Benoît Canet [mailto:benoit.ca...@irqsave.net] Sent: Tuesday, October 14, 2014 12:20 PM To: Chiang, Ken Cc: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [EXTERNAL] Re: how to dynamically add a block device using qmp? The Monday 13 Oct 2

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-14 Thread Chen Gang
On 10/15/2014 03:58 AM, Michael Tokarev wrote: > On 11.10.2014 23:25, Peter Maydell wrote: >> On 11 October 2014 15:13, Chen Gang wrote: >> >> MJT: please don't put this in -trivial, it will clash with >> the update to libvixl 1.6 currently on the list. > > Actually I'd not put that to anywhere a

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-14 Thread Michael Tokarev
On 11.10.2014 23:25, Peter Maydell wrote: On 11 October 2014 15:13, Chen Gang wrote: MJT: please don't put this in -trivial, it will clash with the update to libvixl 1.6 currently on the list. Actually I'd not put that to anywhere anyway. Because to me, *especially* in a case like this when

Re: [Qemu-devel] [EXTERNAL] Re: how to dynamically add a block device using qmp?

2014-10-14 Thread Benoît Canet
The Monday 13 Oct 2014 à 14:08:18 (-0700), Ken Chiang wrote : > I also tried to add a virt io device to the frontend but still no disc in the > VM. Am I missing anything else? > > > {"QMP": {"version": {"qemu": {"micro": 0, "minor": 0, "major": 2}, "package": > " (Debian 2.0.0+dfsg-2ubuntu1.2)

Re: [Qemu-devel] [PATCH v3 1/2] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2014-10-14 Thread Jun Li
Please ignore this patch, I have submit v4. Thx. On Mon, 10/13 13:04, Jun Li wrote: > This patch is the realization of new function qcow2_shrink_l1_and_l2_table. > This function will shrink/discard l1 and l2 table when do qcow2 shrinking. > > Signed-off-by: Jun Li > --- > Compared to v2, v3 fixe

Re: [Qemu-devel] [PATCH v3 2/2] qcow2: add update refcount table realization for update_refcount

2014-10-14 Thread Jun Li
Please ignore this patch, I have submit v4. thx. On Mon, 10/13 13:04, Jun Li wrote: > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. At the same time, put this > cluster to s->free_cluster_index. > > Signed-off-by: Ju

Re: [Qemu-devel] [PATCH v3 0/2] qcow2: Patch for shrinking qcow2 disk image

2014-10-14 Thread Jun Li
Please ignore this patch, I have submit a new version. On Mon, 10/13 13:04, Jun Li wrote: > This is the third version for qcow2 shrinking. In this version, fixed host > cluster leak when shrinking a disk image. Such as: > Step 1, > # /opt/qemu-git-arm/bin/qemu-img info /home/lijun/Work/tmp/shrink

[Qemu-devel] [PATCH v4 2/2] qcow2: add update refcount table realization for update_refcount

2014-10-14 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. At the same time, put this cluster to s->free_cluster_index. Signed-off-by: Jun Li --- v4: Do not change anything for this commit id. v3: Add handle self-describing ref

[Qemu-devel] [PATCH v4 0/2] qcow2: Patch for shrinking qcow2 disk image

2014-10-14 Thread Jun Li
v4: Add deal with COW clusters in l2 table. When using COW, some of (l2_entry >> s->cluster_bits) will larger than s->refcount_table_size, so need to discard this l2_entry. v3: Fixed host cluster leak. A simple testing: Step 1, # /opt/qemu-git-arm/bin/qemu-img info /home/lijun/Work/tmp/shrin

[Qemu-devel] [PATCH v4 1/2] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2014-10-14 Thread Jun Li
This patch is the realization of new function qcow2_shrink_l1_and_l2_table. This function will shrink/discard l1 and l2 table when do qcow2 shrinking. Signed-off-by: Jun Li --- v4: Add deal with COW clusters in l2 table. When using COW, some of (l2_entry >> s->cluster_bits) will larger than s->

Re: [Qemu-devel] [PATCH v3 0/5] Add TriCore ABS, ABSB, B, BIT, BO instructions

2014-10-14 Thread Bastian Koppelmann
Peter, how do I go on from here? Do you apply the patches or do I send a pull-request? Thanks, Bastian On 10/13/2014 05:26 PM, Bastian Koppelmann wrote: Hi guys, here is the next round of TriCore patches. The first patch addresses a clang issue mentioned by Peter Maydell and some bugfixes. A

[Qemu-devel] [PATCH v2] virtio-pci: fix migration for pci bus master

2014-10-14 Thread Michael S. Tsirkin
Current support for bus master (clearing OK bit) together with the need to support guests which do not enable PCI bus mastering, leads to extra state in VIRTIO_PCI_FLAG_BUS_MASTER_BUG bit, which isn't robust in case of cross-version migration for the case when guests use the device before setting D

Re: [Qemu-devel] [Bug?]When close VM the hugepage not freed

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 01:08:15PM +0100, Daniel P. Berrange wrote: > On Tue, Oct 14, 2014 at 08:02:38PM +0800, Linhaifeng wrote: > > Hi,all > > > > I was trying to use hugepage with VM and found that the hugepage not freed > > when close VM. > > > > > > 1.Before start VM the /proc/meminfo is:

Re: [Qemu-devel] [PATCH v2 3/9] target-mips: distinguish between data load and instruction fetch

2014-10-14 Thread Yongbok Kim
Reviewed-by: Yongbok Kim On 08/07/2014 08:57, Leon Alrae wrote: Signed-off-by: Leon Alrae --- target-mips/helper.c | 21 ++--- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index 8a997e4..9871273 100644 --- a/t

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
This patch introduces the -seed command line option and the QEMU_RAND_SEED environment variable for setting the random seed, which is used for the AT_RANDOM ELF aux entry. Signed-off-by: Magnus Reftel Reviewed-by: Eric Blake --- linux-user/elfload.c | 1 - linux-user/main.c| 19 +++

[Qemu-devel] [PATCH v5] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
linux-user uses the rand function for generating the value of the AT_RANDOM elf aux vector entry, and explicitly seeds the random number generator with the current time. This makes it impossible to reproduce runs that use the AT_RANDOM bytes. This patch adds a command line option and a matching en

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Eric Blake
On 10/14/2014 03:50 AM, Magnus Reftel wrote: > This patch introduces the -seed command line option and the > QEMU_RAND_SEED environment variable for setting the random seed, which > is used for the AT_RANDOM ELF aux entry. > > Signed-off-by: Magnus Reftel > --- > linux-user/elfload.c | 1 - > l

Re: [Qemu-devel] [PATCH v2 1/2] Add PCI bus listener interface

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 12:44:06PM +, Paul Durrant wrote: > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: 14 October 2014 12:27 > > To: Paul Durrant > > Cc: qemu-devel@nongnu.org; xen-de...@lists.xenproject.org; Paolo > > Bonzini; Andreas Faerber;

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:59:56PM +0800, ChenLiang wrote: > On 2014/10/14 20:27, Michael S. Tsirkin wrote: > > > On Tue, Oct 14, 2014 at 08:15:10PM +0800, ChenLiang wrote: > >> On 2014/10/14 19:48, Michael S. Tsirkin wrote: > >> > >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:27:25PM +0800, ChenLiang wrote: > On 2014/10/14 20:28, Michael S. Tsirkin wrote: > > > On Tue, Oct 14, 2014 at 08:19:56PM +0800, ChenLiang wrote: > >> On 2014/10/14 19:58, Michael S. Tsirkin wrote: > >> > >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >

Re: [Qemu-devel] [PATCH] target-arm: A64: remove redundant store

2014-10-14 Thread Laurent Desnogues
On Tue, Oct 14, 2014 at 3:08 PM, Alex Bennée wrote: > There is not much point storing the same value twice in a row. > > Reported-by: Laurent Desnogues > Signed-off-by: Alex Bennée Reviewed-by: Laurent Desnogues Thanks, Laurent > --- > target-arm/translate-a64.c | 1 - > 1 file changed, 1

Re: [Qemu-devel] [PATCH v2 1/9] target-mips: add KScratch registers

2014-10-14 Thread Yongbok Kim
Not related code changes are included. See the comment below. Other than, Reviewed-by: Yongbok Kim Regards, Yongbok On 08/07/2014 08:57, Leon Alrae wrote: KScratch Registers (CP0 Register 31, Selects 2 to 7) The KScratch registers are read/write registers available for scratch pad storage b

Re: [Qemu-devel] [PATCH RESEND] Support vhd type VHD_DIFFERENCING

2014-10-14 Thread Xiaodong Gong
>Adjusting coding style can be made into a separate patch in vpc.c file. >Such as using '{}' at if conditional statement. I'll revert this. >Please use g_malloc0() instead of malloc and memset(,0,). This api is great, I'll use it. >A bug, right? yes, really a bug, thx a lot. >in your patch, if

[Qemu-devel] [PATCH] target-arm: A64: remove redundant store

2014-10-14 Thread Alex Bennée
There is not much point storing the same value twice in a row. Reported-by: Laurent Desnogues Signed-off-by: Alex Bennée --- target-arm/translate-a64.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index 35ae3ea..337f4d4 100644 --- a/

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 20:27, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 08:15:10PM +0800, ChenLiang wrote: >> On 2014/10/14 19:48, Michael S. Tsirkin wrote: >> >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: We find overlap when the size of pci bar is bigger then 16MB, it over

Re: [Qemu-devel] virtio: make check regression with glib2 < 2.28

2014-10-14 Thread Peter Maydell
On 14 October 2014 14:29, Igor Mammedov wrote: > commit 70556264 "libqos: use microseconds instead of iterations for > virtio timeout" regressed 'make check' when qemu is build with > glib2 version less than 2.28 > > causing following error: > #make check > ... > LINK tests/virtio-blk-test > Un

Re: [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory

2014-10-14 Thread Peter Maydell
On 14 October 2014 14:39, Paolo Bonzini wrote: > Il 14/10/2014 07:42, Peter Maydell ha scritto: >> That's only in the NUMA code path though, isn't it? >> I was looking at the non-numa codepath, which is what >> all the boards I care about are going to be taking :-) > > The non-NUMA path will alloc

Re: [Qemu-devel] Migration of AArch64 VM

2014-10-14 Thread Alex Bennée
Yash Nandkeolyar writes: > Hi, > > We are trying to migrate an AArch64 VM using Qemu version 2.1(latest). I > tried with Live and Offline migration. However, same error is observed in > both cases: > > qemu-system-aarch64: Unknown migration flags: 0 > > qemu: warning: error while loading state s

Re: [Qemu-devel] [PATCH v2 1/2] Add PCI bus listener interface

2014-10-14 Thread Paul Durrant
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: 14 October 2014 12:27 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; xen-de...@lists.xenproject.org; Paolo > Bonzini; Andreas Faerber; Thomas Huth; Peter Crosthwaite; Christian > Borntraeger > Subject: Re: [PA

Re: [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory

2014-10-14 Thread Paolo Bonzini
Il 14/10/2014 08:04, Yijun Zhu ha scritto: > I think all of the other ARM boards should be changed. If changes in virt is > ok, > I will make the patch again including the modification of other ARM boards. Don't worry, it's not your fault. :) I introduced the bug, and if you prefer I will rebase

Re: [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory

2014-10-14 Thread Paolo Bonzini
Il 14/10/2014 07:42, Peter Maydell ha scritto: > On 14 October 2014 07:10, Paolo Bonzini wrote: >> Il 14/10/2014 06:54, Peter Maydell ha scritto: >>> Why is this patch only changing this board? What's special >>> about virt that means we don't want to also make this >>> change for the other ARM bo

Re: [Qemu-devel] [PATCH v2 1/2] block/raw-posix: Fix disk corruption in try_fiemap

2014-10-14 Thread Kevin Wolf
Am 26.09.2014 um 01:14 hat Tony Breeds geschrieben: > Using fiemap without FIEMAP_FLAG_SYNC is a known corrupter. > > Add the FIEMAP_FLAG_SYNC flag to the FS_IOC_FIEMAP ioctl. This has > the downside of significantly reducing performance. > > Reported-By: Michael Steffens > Signed-off-by: Tony

[Qemu-devel] virtio: make check regression with glib2 < 2.28

2014-10-14 Thread Igor Mammedov
commit 70556264 "libqos: use microseconds instead of iterations for virtio timeout" regressed 'make check' when qemu is build with glib2 version less than 2.28 causing following error: #make check ... LINK tests/virtio-blk-test Undefined symbols for architecture x86_64: "_g_get_monotonic_tim

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 20:28, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 08:19:56PM +0800, ChenLiang wrote: >> On 2014/10/14 19:58, Michael S. Tsirkin wrote: >> >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: We find overlap when the size of pci bar is bigger then 16MB, it over

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:23:08PM +0800, Gonglei wrote: > On 2014/10/14 20:15, chenliang (T) wrote: > > > On 2014/10/14 19:48, Michael S. Tsirkin wrote: > > > >> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >>> We find overlap when the size of pci bar is bigger then 16MB, it over

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:19:56PM +0800, ChenLiang wrote: > On 2014/10/14 19:58, Michael S. Tsirkin wrote: > > > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps > >> with private > >> memslot in the kmod. B

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:15:10PM +0800, ChenLiang wrote: > On 2014/10/14 19:48, Michael S. Tsirkin wrote: > > > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps > >> with private > >> memslot in the kmod. B

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Gonglei
On 2014/10/14 20:15, chenliang (T) wrote: > On 2014/10/14 19:48, Michael S. Tsirkin wrote: > >> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >>> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >>> with private >>> memslot in the kmod. By the way, the new k

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:58, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. But I >> think if the si

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:58, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. But I >> think if the si

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:48, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. But I >> think if the si

Re: [Qemu-devel] [Bug?]When close VM the hugepage not freed

2014-10-14 Thread Daniel P. Berrange
On Tue, Oct 14, 2014 at 08:02:38PM +0800, Linhaifeng wrote: > Hi,all > > I was trying to use hugepage with VM and found that the hugepage not freed > when close VM. > > > 1.Before start VM the /proc/meminfo is: > AnonHugePages:124928 kB > HugePages_Total:4096 > HugePages_Free: 3072

[Qemu-devel] [Bug?]When close VM the hugepage not freed

2014-10-14 Thread Linhaifeng
Hi,all I was trying to use hugepage with VM and found that the hugepage not freed when close VM. 1.Before start VM the /proc/meminfo is: AnonHugePages:124928 kB HugePages_Total:4096 HugePages_Free: 3072 HugePages_Rsvd:0 HugePages_Surp:0 Hugepagesize: 2048 kB 2

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > We find overlap when the size of pci bar is bigger then 16MB, it overlaps > with private > memslot in the kmod. By the way, the new kmod skip private memslot. But I > think if the size > of pci bar is enough big, it also overlaps with

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > We find overlap when the size of pci bar is bigger then 16MB, it overlaps > with private > memslot in the kmod. By the way, the new kmod skip private memslot. But I > think if the size > of pci bar is enough big, it also overlaps with

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
We find overlap when the size of pci bar is bigger then 16MB, it overlaps with private memslot in the kmod. By the way, the new kmod skip private memslot. But I think if the size of pci bar is enough big, it also overlaps with other memslots. the root cause is: pci_default_write_config will do

Re: [Qemu-devel] [PATCH v4 14/21] target-mips: add AUI, LSA and PCREL instruction families

2014-10-14 Thread Leon Alrae
Hi Yongbok, On 13/10/2014 14:37, Yongbok Kim wrote: >> +OPC_PCREL= (0x3B << 26), >> +}; >> + >> +/* PC-relative address computation / loads */ >> +#define MASK_OPC_PCREL_TOP2BITS(op) (MASK_OP_MAJOR(op) | (op & (3 << >> 19))) >> +#define MASK_OPC_PCREL_TOP5BITS(op) (MASK_OP_MAJOR(op) | (

Re: [Qemu-devel] [PATCH v2 1/2] Add PCI bus listener interface

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 10:08:06AM +, Paul Durrant wrote: > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: 14 October 2014 10:54 > > To: Paul Durrant > > Cc: qemu-devel@nongnu.org; xen-de...@lists.xenproject.org; Paolo > > Bonzini; Andreas Faerber;

  1   2   >