Re: [Qemu-devel] [PATCH V3 10/14] virtio: introduce virtio_queue_get_index()

2015-03-04 Thread Fam Zheng
On Thu, 03/05 13:48, Jason Wang wrote: > This patch introduces a helper that can get the queue index of a > VirtQueue. This is useful when traversing the list of VirtQueues. > > Cc: Anthony Liguori > Cc: Michael S. Tsirkin > Signed-off-by: Jason Wang > --- > hw/virtio/virtio.c | 5

[Qemu-devel] [PATCH V3 07/14] virtio-mmio: switch to bus specific queue limit

2015-03-04 Thread Jason Wang
Cc: Anthony Liguori Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-mmio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index ad03218..7884fb7 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/vir

[Qemu-devel] [PATCH V3 14/14] virtio-pci: introduce auto_msix_bar_size property

2015-03-04 Thread Jason Wang
Currently we don't support more than 128 MSI-X vectors for a pci devices, trying to use vector=129 for a virtio-net-pci device may get: qemu-system-x86_64: -device virtio-net-pci,netdev=hn0,vectors=129: unable to init msix vectors to 129 This this because the MSI-X bar size were hard-coded as 409

[Qemu-devel] [PATCH V3 10/14] virtio: introduce virtio_queue_get_index()

2015-03-04 Thread Jason Wang
This patch introduces a helper that can get the queue index of a VirtQueue. This is useful when traversing the list of VirtQueues. Cc: Anthony Liguori Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 5 + include/hw/virtio/virtio.h | 1 + 2 files changed, 6

[Qemu-devel] [PATCH V3 08/14] virtio-pci: switch to use bus specific queue limit

2015-03-04 Thread Jason Wang
Instead of depending on a macro, switch to use a bus specific queue limit. Cc: Anthony Liguori Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 12 +++- include/hw/virtio/virtio.h | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH V3 06/14] virtio-serial-bus: switch to bus specific queue limit

2015-03-04 Thread Jason Wang
Cc: Amit Shah Signed-off-by: Jason Wang --- hw/char/virtio-serial-bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 37a6f44..f280e95 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus

[Qemu-devel] [PATCH V3 13/14] pci: remove hard-coded bar size in msix_init_exclusive_bar()

2015-03-04 Thread Jason Wang
This patch let msix_init_exclusive_bar() can accept bar_size parameter other than a hard-coded limit 4096. Then caller can specify a bar_size depends on msix entries and can use up to 2048 msix entries as PCI spec allows. To keep migration compatibility, 4096 is used for all callers and pba were st

[Qemu-devel] [PATCH V3 11/14] virtio-pci: speedup MSI-X masking and unmasking

2015-03-04 Thread Jason Wang
This patch tries to speed up the MSI-X masking and unmasking through the mapping between vector and queues. With this patch it will there's no need to go through all possible virtqueues, which may help to reduce the time spent when doing MSI-X masking/unmasking a single vector when more than hundre

[Qemu-devel] [PATCH V3 12/14] virtio-pci: increase the maximum number of virtqueues to 513

2015-03-04 Thread Jason Wang
This patch increases the maximum number of virtqueues for pci from 64 to 513. This will allow booting a virtio-net-pci device with 256 queue pairs. To keep migration compatibility, 64 was kept for legacy machine types. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Anthony Liguori Cc: Michael S.

[Qemu-devel] [PATCH V3 04/14] virtio-ccw: introduce ccw specific queue limit

2015-03-04 Thread Jason Wang
Instead of depending on marco, using a bus specific limit. Cc: Alexander Graf Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Richard Henderson Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-ccw.c | 7 +-- hw/s390x/virtio-ccw.c| 13 +++-- include/hw/s390x/s390_flic

[Qemu-devel] [PATCH V3 09/14] virtio: introduce vector to virtqueues mapping

2015-03-04 Thread Jason Wang
Currently we will try to traverse all virtqueues to find a subset that using a specific vector. This is sub optimal when we will support hundreds or even thousands of virtqueues. So this patch introduces a method which could be used by transport to get all virtqueues that using a same vector. This

[Qemu-devel] [PATCH V3 00/14] Support more virtio queues

2015-03-04 Thread Jason Wang
We current limit the max virtio queues to 64. This is not sufficient to support multiqueue deivces (e.g recent Linux support up to 256 tap queues). So this series try to let virtio to support more queues. No much works need to be done except: - Patch 1 add a check to validate the queues supported

[Qemu-devel] [PATCH V3 05/14] virtio-s390: switch to bus specific queue limit

2015-03-04 Thread Jason Wang
Instead of depending on marco, switch to use a bus specific queue limit. Left is AdapterRouters->gsi[], this could be done in the future if we want to increase s390's queue limit really. Cc: Alexander Graf Cc: Richard Henderson Cc: Christian Borntraeger Cc: Cornelia Huck Signed-off-by: Jason W

[Qemu-devel] [PATCH V3 03/14] virito: introduce bus specific queue limit

2015-03-04 Thread Jason Wang
This patch introduces a bus specific queue limitation. It will be useful for increasing the limit for one of the bus without disturbing other buses. Cc: Anthony Liguori Cc: Michael S. Tsirkin Cc: Alexander Graf Cc: Richard Henderson Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Paolo Bonzi

[Qemu-devel] [PATCH V3 02/14] virtio-net: fix the upper bound when trying to delete queues

2015-03-04 Thread Jason Wang
Virtqueue were indexed from zero, so don't delete virtqueue whose index is n->max_queues * 2 + 1. Cc: Anthony Liguori Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio

[Qemu-devel] [PATCH V3 01/14] virtio-net: validate backend queue numbers against bus limitation

2015-03-04 Thread Jason Wang
We don't validate the backend queue numbers against bus limitation, this will easily crash qemu if it exceeds the limitation. Fixing this by doing the validation and fail early. Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/net/vi

Re: [Qemu-devel] [PULL 3/7] qxl: refactor rounding up to a nearest power of 2

2015-03-04 Thread Dongsheng Song
On Wed, Mar 4, 2015 at 10:30 PM, Gerd Hoffmann wrote: > +/* round up to the nearest power of 2 (0 if overflow) */ > +uint64_t pow2ceil(uint64_t value) > +{ > +uint8_t nlz = clz64(value); > + > +if (is_power_of_2(value)) { > +return value; > +} > +if (!nlz) { > +ret

Re: [Qemu-devel] [PATCH target-arm v2 03/15] arm: Introduce Xilinx ZynqMP SoC

2015-03-04 Thread Alistair Francis
On Tue, Mar 3, 2015 at 10:28 AM, Peter Crosthwaite wrote: > With quad Cortex-A53 CPUs. > > Signed-off-by: Peter Crosthwaite > --- > changed since v1: > Add &error_abort to CPU child adder call. > > default-configs/aarch64-softmmu.mak | 2 +- > hw/arm/Makefile.objs| 1 + > hw/ar

[Qemu-devel] [PATCH] MAINTAINERS: Add jsnow as IDE maintainer

2015-03-04 Thread John Snow
It has been proposed that the block layer be split up into smaller, more manageable portions to help speed up the review and merging of block layer patches. As part of this process, I propose that I take over the IDE, ATA, ATAPI and FD devices. As we split out the block layer, we will begin using

[Qemu-devel] [PATCH v7 07/15] spapr_rtas: add ibm, configure-connector RTAS interface

2015-03-04 Thread Michael Roth
This interface is used to fetch an OF device-tree nodes that describes a newly-attached device to guest. It is called multiple times to walk the device-tree node and fetch individual properties into a 'workarea'/buffer provided by the guest. The device-tree is generated by QEMU and passed to an sP

[Qemu-devel] [PATCH v7 08/15] spapr_events: re-use EPOW event infrastructure for hotplug events

2015-03-04 Thread Michael Roth
From: Nathan Fontenot This extends the data structures currently used to report EPOW events to guests via the check-exception RTAS interfaces to also include event types for hotplug/unplug events. This is currently undocumented and being finalized for inclusion in PAPR specification, but we impl

[Qemu-devel] [PATCH v7 10/15] spapr_drc: add spapr_drc_populate_dt()

2015-03-04 Thread Michael Roth
This function handles generation of ibm,drc-* array device tree properties to describe DRC topology to guests. This will by used by the guest to direct RTAS calls to manage any dynamic resources we associate with a particular DR Connector as part of hotplug/unplug. Since general management of boot

[Qemu-devel] [PATCH v7 13/15] pci: make pci_bar useable outside pci.c

2015-03-04 Thread Michael Roth
We need to work with PCI BARs to generate OF properties during PCI hotplug for sPAPR guests. Signed-off-by: Michael Roth Reviewed-by: David Gibson Cc: m...@redhat.com --- hw/pci/pci.c | 2 +- include/hw/pci/pci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pc

[Qemu-devel] [PATCH v7 02/15] spapr_drc: initial implementation of sPAPRDRConnector device

2015-03-04 Thread Michael Roth
This device emulates a firmware abstraction used by pSeries guests to manage hotplug/dynamic-reconfiguration of host-bridges, PCI devices, memory, and CPUs. It is conceptually similar to an SHPC device, complete with LED indicators to identify individual slots to physical physical users and indicat

[Qemu-devel] [PATCH v7 06/15] spapr: add rtas_st_buffer_direct() helper

2015-03-04 Thread Michael Roth
This is similar to the existing rtas_st_buffer(), but for cases where the guest is not expecting a length-encoded byte array. Namely, for calls where a "work area" buffer is used to pass around arbitrary fields/data. Signed-off-by: Michael Roth Reviewed-by: David Gibson --- include/hw/ppc/spapr

[Qemu-devel] [PATCH v7 01/15] docs: add sPAPR hotplug/dynamic-reconfiguration documentation

2015-03-04 Thread Michael Roth
This adds a general overview of hotplug/dynamic-reconfiguration for sPAPR/pSeries guest. As specified in PAPR+ v2.7. Signed-off-by: Michael Roth Reviewed-by: David Gibson --- docs/specs/ppc-spapr-hotplug.txt | 287 +++ 1 file changed, 287 insertions(+) crea

[Qemu-devel] [PATCH v7 04/15] spapr_rtas: add set-indicator RTAS interface

2015-03-04 Thread Michael Roth
From: Mike Day This interface allows a guest to control various platform/device sensors. Initially, we only implement support necessary to control sensors that are required for hotplug: DR connector indicators/LEDs, resource allocation state, and resource isolation state. See docs/specs/ppc-spap

[Qemu-devel] [PATCH v7 03/15] spapr_rtas: add get/set-power-level RTAS interfaces

2015-03-04 Thread Michael Roth
From: Nathan Fontenot These interfaces manage the power domains that guest devices are assigned to and are used to power on/off devices. Currently we only utilize 1 power domain, the 'live-insertion' domain, which automates power management of plugged/unplugged devices, essentially making these c

[Qemu-devel] [PATCH v7 00/15] spapr: add support for pci hotplug

2015-03-04 Thread Michael Roth
These patches are based on ppc-next, and can also be obtained from: https://github.com/mdroth/qemu/commits/spapr-hotplug-pci-v7 The unsquashed patches/diffs from v6 are also available here: https://github.com/mdroth/qemu/commits/spapr-hotplug-pci v7: * rebased on ppc-next (2015-03-04) * tested/

[Qemu-devel] [PATCH v7 11/15] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge

2015-03-04 Thread Michael Roth
This option enables/disables PCI hotplug for a particular PHB. Also add machine compatibility code to disable it by default for machine types prior to pseries-2.3. Signed-off-by: Michael Roth Reviewed-by: David Gibson --- hw/ppc/spapr.c | 5 + hw/ppc/spapr_pci.c | 2 +

[Qemu-devel] [PATCH v7 12/15] spapr_pci: create DRConnectors for each PCI slot during PHB realize

2015-03-04 Thread Michael Roth
These will be used to support hotplug/unplug of PCI devices to the PCI bus associated with a particular PHB. We also set up device-tree properties in each PHBs initial FDT to describe the DRCs associated with them. This advertises to guests that each PHB is DR-capable device with physical hotplugg

[Qemu-devel] [PATCH 01/11] qapi: Add transaction support to block-dirty-bitmap operations

2015-03-04 Thread John Snow
This adds two qmp commands to transactions. block-dirty-bitmap-add allows you to create a bitmap simultaneously alongside a new full backup to accomplish a clean synchronization point. block-dirty-bitmap-clear allows you to reset a bitmap back to as-if it were new, which can also be used alongsid

[Qemu-devel] [PATCH v7 05/15] spapr_rtas: add get-sensor-state RTAS interface

2015-03-04 Thread Michael Roth
From: Mike Day This interface allows a guest to read various platform/device sensors. initially, we only implement support necessary to support hotplug: reading of the dr-entity-sense sensor, which communicates the state of a hotplugged resource/device to the guest (EMPTY/PRESENT/UNUSABLE). See

[Qemu-devel] [PATCH v7 15/15] spapr_pci: emit hotplug add/remove events during hotplug

2015-03-04 Thread Michael Roth
From: Tyrel Datwyler This uses extension of existing EPOW interrupt/event mechanism to notify userspace tools like librtas/drmgr to handle in-guest configuration/cleanup operations in response to device_add/device_del. Userspace tools that don't implement this extension will need to be run manua

[Qemu-devel] [PATCH v7 09/15] spapr_events: event-scan RTAS interface

2015-03-04 Thread Michael Roth
From: Tyrel Datwyler We don't actually rely on this interface to surface hotplug events, and instead rely on the similar-but-interrupt-driven check-exception RTAS interface used for EPOW events. However, the existence of this interface is needed to ensure guest kernels initialize the event-report

[Qemu-devel] [PATCH 02/11] iotests: add transactional incremental backup test

2015-03-04 Thread John Snow
Reviewed-by: Max Reitz Signed-off-by: John Snow --- tests/qemu-iotests/124 | 49 ++ tests/qemu-iotests/124.out | 4 ++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 1c07387.

[Qemu-devel] [PATCH v7 14/15] spapr_pci: enable basic hotplug operations

2015-03-04 Thread Michael Roth
This enables hotplug of PCI devices to a PHB. Upon hotplug we generate the OF-nodes required by PAPR specification and IEEE 1275-1994 "PCI Bus Binding to Open Firmware" for the device. We associate the corresponding FDT for these nodes with the DRC corresponding to the slot, which will be fetched

[Qemu-devel] [PATCH 11/11] iotests: 124 - transactional failure test

2015-03-04 Thread John Snow
Use a transaction to request an incremental backup across two drives. Coerce one of the jobs to fail, and then re-run the transaction. Verify that no bitmap data was lost due to the partial transaction failure. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 119 ++

[Qemu-devel] [PATCH 07/11] block: drive_backup transaction callback support

2015-03-04 Thread John Snow
This patch actually implements the transactional callback system for the drive_backup transaction. (1) We manually pick up a reference to the bitmap if present to allow its cleanup to be delayed until after all drive_backup jobs launched by the transaction have fully completed. (2) We cre

[Qemu-devel] [PATCH 06/11] qmp: Add an implementation wrapper for qmp_drive_backup

2015-03-04 Thread John Snow
We'd like to be able to specify the callback given to backup_start manually in the case of transactions, so split apart qmp_drive_backup into an implementation and a wrapper. Switch drive_backup_prepare to use the new wrapper, but don't overload the callback and closure yet. This is kind of gross

[Qemu-devel] [PATCH 08/11] iotests: add QMP event waiting queue

2015-03-04 Thread John Snow
A filter is added to allow callers to request very specific events to be pulled from the event queue, while leaving undesired events still in the stream. This allows to poll for completion data for multiple asynchronous events in any arbitrary order. Signed-off-by: John Snow --- tests/qemu-iote

[Qemu-devel] [PATCH 05/11] block: add delayed bitmap successor cleanup

2015-03-04 Thread John Snow
Allow bitmap successors to carry reference counts. We can in a later patch use this ability to clean up the dirty bitmap according to both the individual job's success and the success of all jobs in the transaction group. The code for cleaning up a bitmap is also moved from backup_run to backup_c

[Qemu-devel] [PATCH 09/11] iotests: test 124 - drive object refactoring

2015-03-04 Thread John Snow
The original test was not particularly good about keeping the relationships between bitmaps, drives, and images very explicit, so this patch adds an explicit 'drive' dict that is used to keep these relationships explicit. This is necessary in order to test two full backup chains simultaneously for

[Qemu-devel] [PATCH 04/11] block: add refcount to Job object

2015-03-04 Thread John Snow
If we want to get at the job after the life of the job, we'll need a refcount for this object. This may occur for example if we wish to inspect the actions taken by a particular job after a transactional group of jobs runs, and further actions are required. Signed-off-by: John Snow --- blockjob

[Qemu-devel] [PATCH 00/11] block: incremental backup transactions

2015-03-04 Thread John Snow
This series adds support for incremental backup primitives in QMP transactions. It requires my transactionless incremental backup series. Patch 1 adds basic support for add and clear transactions. Patch 2 tests this basic support. Patches 3-7 add support for error scenarios where only some increm

[Qemu-devel] [PATCH 03/11] block: add transactional callbacks feature

2015-03-04 Thread John Snow
The goal here is to add a new method to transactions that allows developers to specify a callback that will get invoked only once all jobs spawned by a transaction are completed, allowing developers the chance to perform actions conditionally pending complete success or complete failure. In order

[Qemu-devel] [PATCH 10/11] iotests: 124 - backup_prepare refactoring

2015-03-04 Thread John Snow
Allow tests to call just the backup preparation routine without invoking a backup. Useful for transactions where we want to prepare, but don't wish to issue the QMP command. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 17 - 1 file changed, 12 insertions(+), 5 deletions(

Re: [Qemu-devel] [PATCH v5 01/45] Start documenting how postcopy works.

2015-03-04 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:24PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Signed-off-by: Dr. David Alan Gilbert > --- > docs/migration.txt | 189 > + > 1 file changed, 189 insertions(+) > > diff --git

[Qemu-devel] [PATCH v2] microblaze: fix memory leak

2015-03-04 Thread arei.gonglei
From: Gonglei When not assign a -dtb argument, the variable dtb_filename storage returned from qemu_find_file(), which should be freed after use. Alternatively we define a local variable filename, with 'char *' type, free after use. Cc: Michael Tokarev Cc: Edgar E. Iglesias Signed-off-by: Gong

[Qemu-devel] [PATCH v2] arm: fix memory leak

2015-03-04 Thread arei.gonglei
From: Gonglei Cc: Michael Tokarev Cc: Peter Maydell Signed-off-by: Gonglei --- v2: Fix a complier error, remove `const' from the variable declaration. (mjt) --- hw/arm/digic_boards.c | 1 + hw/arm/highbank.c | 1 + hw/arm/vexpress.c | 3 ++- hw/arm/virt.c | 3 ++- 4 files c

Re: [Qemu-devel] [PATCH 2/2] virtio-pci: switch to modern accessors for 1.0

2015-03-04 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Wed, Mar 04, 2015 at 11:06:08AM +1030, Rusty Russell wrote: >> "Michael S. Tsirkin" writes: >> > virtio 1.0 config space is in LE format for all >> > devices, use modern wrappers when accessed through >> > the 1.0 BAR. >> >> Hmm, I'm not so sure about these patc

Re: [Qemu-devel] [PATCH V13 3/4] pc: add a Virtual Machine Generation ID device

2015-03-04 Thread David Gibson
On Tue, 3 Mar 2015 12:06:05 +0100 Igor Mammedov wrote: > On Tue, 3 Mar 2015 12:03:26 +1100 > David Gibson wrote: > > > On Mon, 2 Mar 2015 22:06:22 +0100 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Mar 02, 2015 at 06:05:43PM +0100, Igor Mammedov wrote: > > > > On Sun, 1 Mar 2015 16:09:33

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/9] arm: fix memory leak

2015-03-04 Thread Gonglei
On 2015/3/4 21:16, Michael Tokarev wrote: > 27.02.2015 10:50, arei.gong...@huawei.com wrote: > [] >> @@ -565,6 +565,7 @@ static void create_flash(const VirtBoardInfo *vbi) >> error_report("Could not load ROM image '%s'", bios_name); >> exit(1); >> } >> +g_

[Qemu-devel] [RFC PATCH] target-ppc: Register CPU class per family only when needed

2015-03-04 Thread Alexey Kardashevskiy
At the moment when running in KVM mode, QEMU registers "host" class to match the current CPU PVR value. It also registers another CPU class with a CPU family name os if we run QEMU on POWER7 machine, "host" and "POWER7" classes are created, this way we can always use "-cpu POWER7" on the actual POW

[Qemu-devel] [PATCH v2] block/null: Latency simulation by adding new option "latency_ns"

2015-03-04 Thread Fam Zheng
Aio context switch should just work because the requests will be drained, so the scheduled timer(s) on the old context will be freed. Signed-off-by: Fam Zheng --- v2: Check for negative value; add sleep in null-co://. [Kevin] --- block/null.c | 55 +++

Re: [Qemu-devel] [PATCH] 9pfs-local: simplify/optimize local_mapped_attr_path()

2015-03-04 Thread Fam Zheng
On Thu, 03/05 00:03, Michael Tokarev wrote: > +const char *name = basename((char*)path); checkpatch.pl complained this, s/char*/char */

Re: [Qemu-devel] [RFC PATCH 01/14] docs: block replication's description

2015-03-04 Thread Wen Congyang
On 03/05/2015 12:35 AM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: Paolo Bonzini >> Signed-off-by: Yang Hongyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei > > Hi, > >> --- >> docs/block-replic

Re: [Qemu-devel] [PATCH] vl: take iothread lock very early

2015-03-04 Thread Eric Blake
On 03/03/2015 10:32 AM, Paolo Bonzini wrote: > > > On 03/03/2015 18:19, Oliver Francke wrote: >> >> #0 __GI_exit (status=1) at exit.c:104 >> #1 0x5575cf15 in os_daemonize () at os-posix.c:227 >> #2 0x55773f2e in main (argc=50, argv=0x7fffe0d8, >> envp=0x7fffe270) at vl.

Re: [Qemu-devel] [PATCH v4 4/5] target-i386: Move APIC ID compatibility code to pc.c

2015-03-04 Thread Andreas Färber
Am 04.03.2015 um 03:13 schrieb Eduardo Habkost: > The APIC ID compatibility code is required only for PC, and now that > x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index() anymore, that > code can be moved to pc.c. > > Reviewed-by: Paolo Bonzini > Reviewed-by: Andreas Färber > Signed-off-

Re: [Qemu-devel] [PATCH v4 5/5] target-i386: Require APIC ID to be explicitly set before CPU realize

2015-03-04 Thread Andreas Färber
Am 04.03.2015 um 03:13 schrieb Eduardo Habkost: > On softmuu, instead of setting APIC ID automatically when creating a > X86CPU, require the property to be set before realizing the object > (which is already done by the CPU creation code on PC). > > Keep apic_id = 0 by default on *-user so it can

Re: [Qemu-devel] [PATCH] Revert "target-ppc: Create versionless CPU class per family if KVM"

2015-03-04 Thread Alexey Kardashevskiy
On 03/05/2015 01:55 AM, Andreas Färber wrote: Am 03.03.2015 um 23:14 schrieb Alexey Kardashevskiy: On 03/04/2015 07:43 AM, Alexander Graf wrote: On 03.03.15 01:42, Alexey Kardashevskiy wrote: On 03/03/2015 12:51 AM, Alexander Graf wrote: On 02.03.15 14:42, Andreas Färber wrote: Am 02.03.2015

Re: [Qemu-devel] [PATCH] target-ppc: Add versions to server CPU descriptions

2015-03-04 Thread Alexey Kardashevskiy
On 03/05/2015 01:14 AM, Andreas Färber wrote: Alex, Am 04.03.2015 um 13:28 schrieb Alexander Graf: On 04.03.15 02:31, Alexey Kardashevskiy wrote: 5b79b1c "target-ppc: Create versionless CPU class per family if KVM" added a dynamic CPU class registration with the name of the CPU family which QE

[Qemu-devel] [PULL 23/47] ui: Removed unused functions

2015-03-04 Thread Michael Tokarev
From: Thomas Huth Remove qemu_console_displaystate(), qemu_remove_kbd_event_handler(), qemu_different_endianness_pixelformat() and cpkey(), since they are completely unused. Signed-off-by: Thomas Huth Reviewed-by: Gerd Hoffmann Signed-off-by: Michael Tokarev --- include/ui/console.h | 3 ---

[Qemu-devel] [PULL 35/47] gitignore: Track common.env in iotests gitignore

2015-03-04 Thread Michael Tokarev
From: Cole Robinson Rather than track it in the toplevel gitignore Signed-off-by: Cole Robinson Signed-off-by: Michael Tokarev --- .gitignore| 1 - tests/qemu-iotests/.gitignore | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore ind

[Qemu-devel] [PULL 41/47] disas/microblaze: Fix warnings caused by missing 'static' attribute

2015-03-04 Thread Michael Tokarev
From: Stefan Weil Warnings from the Sparse static analysis tool: disas/microblaze.c:289:3: warning: symbol 'opcodes' was not declared. Should it be static? disas/microblaze.c:570:6: warning: symbol 'register_prefix' was not declared. Should it be static? disas/microblaze.c:571:6: warning: sym

[Qemu-devel] [PATCH] block/raw-posix: fix launching with failed disks

2015-03-04 Thread Stefan Hajnoczi
Since commit c25f53b06eba1575d5d0e92a0132455c97825b83 ("raw: Probe required direct I/O alignment") QEMU has failed to launch if image files produce I/O errors. Previously, QEMU would launch successfully and the guest would see the errors when attempting I/O. This is a regression and may prevent m

[Qemu-devel] [Bug 1428352] [NEW] SYSRET instruction incorrectly implemented

2015-03-04 Thread Bill Paul
Public bug reported: The Intel architecture manual states that when returning to user mode, the SYSRET instruction will re-load the stack selector (%ss) from the IA32_STAR model specific register using the following logic: SS.Selector <-- (IA32_STAR[63:48]+8) OR 3; (* RPL forced to 3 *) Another

Re: [Qemu-devel] [PATCH] vl: take iothread lock very early

2015-03-04 Thread Christian Borntraeger
Am 03.03.2015 um 18:32 schrieb Paolo Bonzini: > > > On 03/03/2015 18:19, Oliver Francke wrote: >> >> #0 __GI_exit (status=1) at exit.c:104 >> #1 0x5575cf15 in os_daemonize () at os-posix.c:227 >> #2 0x55773f2e in main (argc=50, argv=0x7fffe0d8, >> envp=0x7fffe270) at vl

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

2015-03-04 Thread Philipp Hahn
Hi, On 04.03.2015 15:18, Xiaodong Gong wrote: > @@ -157,6 +178,224 @@ static int vpc_probe(const uint8_t *buf, int buf_size, > const char *filename) .. > +static int vpc_decode_maxc_loc(BlockDriverState *bs, uint32_t data_length) ... > +cd = g_iconv_open("ASCII", "UTF8"); ... > +static int vp

Re: [Qemu-devel] [PATCH v2 04/37] hw/usb-storage: Check whether BB is inserted

2015-03-04 Thread Max Reitz
On 2015-03-04 at 09:02, Kevin Wolf wrote: Am 09.02.2015 um 18:11 hat Max Reitz geschrieben: Only call bdrv_key_required() on the BlockDriverState if the BlockBackend has an inserted medium. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- hw/usb/dev-storage.c | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH v2 03/37] hw/block/fdc: Implement tray status

2015-03-04 Thread Max Reitz
On 2015-03-04 at 09:00, Kevin Wolf wrote: Am 09.02.2015 um 18:11 hat Max Reitz geschrieben: The tray of an FDD is open iff there is no medium inserted (there are only two states for an FDD: "medium inserted" or "no medium inserted"). This results in the tray being reported as open if qemu has b

[Qemu-devel] [PULL 29/47] nbd: fix resource leak

2015-03-04 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Michael Tokarev --- block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nbd.c b/block/nbd.c index 697c021..6634a69 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -274,6 +274,7 @@ static int nbd_open(BlockDriverState *bs, QDic

[Qemu-devel] [PULL 38/47] vhost_net: Add missing 'static' attribute

2015-03-04 Thread Michael Tokarev
From: Stefan Weil This fixes a warning from smatch. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/net/vhost_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 4e3a061..ebfb6db 100644 --- a/hw/net/vhost_net

[Qemu-devel] [PULL 44/47] fix GCC 5.0.0 logical-not-parentheses warnings

2015-03-04 Thread Michael Tokarev
From: Radim Krčmář man gcc: Warn about logical not used on the left hand side operand of a comparison. This option does not warn if the RHS operand is of a boolean type. By preferring bool over int where sensible, but without modifying any depending code, make GCC happy in cases like this

[Qemu-devel] [PULL 34/47] microblaze: fix memory leak

2015-03-04 Thread Michael Tokarev
From: Gonglei When not assign a -dtb argument, the variable dtb_filename storage returned from qemu_find_file(), which should be freed after using. Signed-off-by: Gonglei Signed-off-by: Michael Tokarev --- hw/microblaze/boot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --g

[Qemu-devel] [PULL 24/47] ui/vnc: Remove vnc_stop_worker_thread()

2015-03-04 Thread Michael Tokarev
From: Thomas Huth This function is not used anymore, let's remove it. Signed-off-by: Thomas Huth Reviewed-by: Gerd Hoffmann Signed-off-by: Michael Tokarev --- ui/vnc-jobs.c | 13 - ui/vnc-jobs.h | 1 - 2 files changed, 14 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c

[Qemu-devel] [PULL 31/47] macio: fix possible memory leak

2015-03-04 Thread Michael Tokarev
From: Gonglei If ret = macio_initfn_ide() is less than 0, the timer_memory will leak the memory it points to. Signed-off-by: Gonglei Signed-off-by: Michael Tokarev --- hw/misc/macio/macio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/m

Re: [Qemu-devel] vmdk: improve streamOptimized vmdk support

2015-03-04 Thread Sunil Kumar
I don't have a qemu dev test environment if that's what you mean. But I will definitely be able to take a patch and test to see if the created streamOptimized VMDK gets accepted by the ESXi server that I have here. Thanks On Tuesday, March 3, 2015 12:54 AM, Fam Zheng wrote: On Tue, 03/03 09:

Re: [Qemu-devel] [PATCH v2 01/37] blockdev: Allow creation of BDS trees without BB

2015-03-04 Thread Max Reitz
On 2015-03-04 at 08:39, Kevin Wolf wrote: Am 09.02.2015 um 18:11 hat Max Reitz geschrieben: If the "id" field is missing from the options given to blockdev-add, just omit the BlockBackend and create the BlockDriverState tree alone. However, if "id" is missing, "node-name" must be specified; oth

[Qemu-devel] [PATCH] Fix bug in implementation of SYSRET instruction for x86-64

2015-03-04 Thread Bill Paul
Hi guys. I seem to have found a bug in the helper_systet() function in target-i386/seg_helper.c. I downloaded the Intel architecture manual from here: http://www.intel.com/content/www/us/en/processors/architectures-software- developer-manuals.html And it describes the behavior of SYSRET with reg

[Qemu-devel] Fix for bug in implementation of SYSRET instruction for x86-64

2015-03-04 Thread Bill Paul
(I tried sending this once earlier but it seems to have disappeared into the void. Apologies if it ends up showing up twice.) Hi guys. I seem to have found a bug in the helper_systet() function in target-i386/seg_helper.c. I downloaded the Intel architecture manual from here: http://www.intel.c

[Qemu-devel] 9pfs-proxy: -retval vs errno vs -1

2015-03-04 Thread Michael Tokarev
Another interesting tidbit is in hw/9pfs/virtio-9p-proxy.c. All filesystem methods use common v9fs_request() function, which returns -errno. So far so good. Now, *all* places which call this function, does this: retval = v9fs_request(...); if (retval < 0) { errno = -retval;

[Qemu-devel] 9pfs-local: the security models enum?

2015-03-04 Thread Michael Tokarev
I noticed that most file operations in hw/9pfs/virtio-9p-local.c are modelled like this: if (fs_ctx->export_flags & V9FS_SM_MAPPED) { /* MAPPED version */ } else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) { /* MAPPED_FILE version */ } else if ((fs_ctx->export_flags &

[Qemu-devel] 9pfs-local: open2() deletes existing data?

2015-03-04 Thread Michael Tokarev
I was looking at various interesting functions in hw/9pfs/virtio-9p-local.c and noticed local_open2() which basically tries to open a file in a filesystem, and if that is successful, it tries to set file credentials using a configured mechanism, and if that fails, it deletes the file. Now I wonder

Re: [Qemu-devel] [PATCH] advance minimum required GLib version to 2.22

2015-03-04 Thread Stefan Weil
Am 03.03.2015 um 16:28 schrieb Igor Mammedov: Signed-off-by: Igor Mammedov --- configure | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/configure b/configure index 7ba4bcb..db79e0a 100755 --- a/configure +++ b/configure @@ -2744,12 +2744,7 @@ fi ##

[Qemu-devel] [PATCH] 9pfs-local: simplify/optimize local_mapped_attr_path()

2015-03-04 Thread Michael Tokarev
Omit one unnecessary memory allocation for components of the path and create the resulting path directly given lengths of the components. This uses (char*) cast because basename() accepts a char* without const, for unknown reason. Maybe it is better to use strrchr(), but I'm not sure for various

Re: [Qemu-devel] [PATCH 2/3] migration: Fix some 32 bit compiler errors

2015-03-04 Thread Stefan Weil
Am 04.03.2015 um 13:44 schrieb Dr. David Alan Gilbert: * Stefan Weil (s...@weilnetz.de) wrote: The current code won't compile on 32 bit hosts because there are lots of type casts between pointers and 64 bit integers. Fix some of them. Signed-off-by: Stefan Weil Please route rdma stuff throug

[Qemu-devel] [PULL 22/47] vhost: Remove superfluous '\n' around error_report()

2015-03-04 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- hw/virtio/vhost-backend.c | 2 +- net/vhost-user.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c ind

[Qemu-devel] [PULL 18/47] vfio: Remove superfluous '\n' around error_report()

2015-03-04 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- hw/vfio/common.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index c5d1551..9289389 100644 --- a/hw/vfio/common.c +++ b

[Qemu-devel] [PULL 33/47] sysbus: fix memory leak

2015-03-04 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Michael Tokarev --- hw/core/sysbus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 84af593..b53c351 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -91,6 +91,8 @@ bool sysbus_has_irq(S

[Qemu-devel] [PULL 07/47] qemu-options: fix/document -incoming options

2015-03-04 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- qemu-options.hx | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index ee4b223..303d13c 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3195,12 +3195,30 @@ Set TB size. ETEXI

[Qemu-devel] [PULL 45/47] milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning

2015-03-04 Thread Michael Tokarev
From: Radim Krčmář man gcc: Warn if in a loop with constant number of iterations the compiler detects undefined behavior in some statement during one or more of the iterations. Milkymist pfpu has no jump instructions, so checking for MICROCODE_WORDS instructions should have kept us in boun

[Qemu-devel] [PULL 14/47] pl330.c: remove superfluous '\n' around error_setg

2015-03-04 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- hw/dma/pl330.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 16cf77e..5be3df5 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c

Re: [Qemu-devel] [PATCH 3/3] migration: Fix remaining 32 bit compiler errors

2015-03-04 Thread Stefan Weil
Please see my comments below. Am 04.03.2015 um 14:31 schrieb Dr. David Alan Gilbert: * Stefan Weil (s...@weilnetz.de) wrote: Fix type casts between pointers and 64 bit integers. Now 32 bit builds are possible again. Signed-off-by: Stefan Weil --- migration/rdma.c | 57

[Qemu-devel] [PULL 42/47] oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code

2015-03-04 Thread Michael Tokarev
From: Stefan Weil gcc reports this warning with -Wclobbered: util/oslib-posix.c: In function ‘os_mem_prealloc’: util/oslib-posix.c:374:49: error: argument ‘memory’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] Fix this and simplify the code by using an existing macro. Signed-

[Qemu-devel] [PULL 20/47] tpm: Remove superfluous '\n' around error_report()

2015-03-04 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- hw/tpm/tpm_passthrough.c | 12 ++-- tpm.c| 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough

Re: [Qemu-devel] [PATCH V14 1/3] docs: vm generation id device's description

2015-03-04 Thread Eric Blake
On 03/03/2015 09:18 AM, Igor Mammedov wrote: > From: Gal Hammer > > Signed-off-by: Gal Hammer > Signed-off-by: Igor Mammedov > --- > v2: > - ammend doc since no more MMIO occupied by vmgenid s/ammend/amend/ (but this isn't part of the commit message) >device and device became PCIDevice >

Re: [Qemu-devel] [PATCH V14 2/3] pc: add a Virtual Machine Generation ID device

2015-03-04 Thread Michael S. Tsirkin
On Wed, Mar 04, 2015 at 05:33:42PM +0100, Igor Mammedov wrote: > On Wed, 4 Mar 2015 16:31:39 +0100 > "Michael S. Tsirkin" wrote: > > > On Wed, Mar 04, 2015 at 04:14:44PM +0100, Igor Mammedov wrote: > > > On Wed, 4 Mar 2015 14:49:00 +0100 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Wed, M

Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none

2015-03-04 Thread Eduardo Habkost
On Tue, Mar 03, 2015 at 11:55:24AM +0100, Michael Mueller wrote: > On Mon, 02 Mar 2015 17:57:01 +0100 > Andreas Färber wrote: > > > Am 02.03.2015 um 17:43 schrieb Michael Mueller: > > > On Mon, 02 Mar 2015 14:57:21 +0100 > > > Andreas Färber wrote: > > > > > >>> int configure_accelerator(Machi

[Qemu-devel] [PULL 1/5] pc-dimm: add a function to calculate VM's current RAM size

2015-03-04 Thread Luiz Capitulino
From: zhanghailiang The global parameter 'ram_size' does not take into account the hotplugged memory. In some codes, we use 'ram_size' as current VM's real RAM size, which is not correct. Add function 'get_current_ram_size' to calculate VM's current RAM size, it will enumerate present memory de

  1   2   3   4   >