[Qemu-devel] [PATCH v3 3/7] fw_cfg: add fw_cfg_machine_reset function

2014-07-25 Thread arei.gonglei
From: Gonglei We must assure that the changed bootindex can take effect when guest is rebooted. So we introduce fw_cfg_machine_reset(), which change the fw_cfg file's bootindex data using the new global fw_boot_order list. Signed-off-by: Chenliang Signed-off-by: Gonglei --- hw/nvram/fw_cfg.c

[Qemu-devel] [PATCH v3 6/7] qemu-monitor: HMP set-bootindex wrapper

2014-07-25 Thread arei.gonglei
From: Gonglei Add HMP set-bootindex wrapper to allow setting devcie's bootindex via monitor. Signed-off-by: Gonglei Signed-off-by: Chenliang --- hmp-commands.hx | 15 +++ hmp.c | 13 + hmp.h | 1 + 3 files changed, 29 insertions(+) diff --git a/hm

[Qemu-devel] [PATCH v3 5/7] qmp: add set-bootindex command

2014-07-25 Thread arei.gonglei
From: Gonglei Adds "set-bootindex id=xx,bootindex=xx,suffix=xx" QMP command. Example QMP command: -> { "execute": "set-bootindex", "arguments": { "id": "ide0-0-1", "bootindex": 1, "suffix": "/disk@0"}} <- { "return": {} } Signed-off-by: Gonglei Signed-off-by: Chenliang --- qapi-schema.json

[Qemu-devel] [PATCH v3 7/7] spapr: fix possible memory leak

2014-07-25 Thread arei.gonglei
From: Gonglei get_boot_devices_list() will malloc memory, spapr_finalize_fdt doesn't free it. Signed-off-by: Chenliang Signed-off-by: Gonglei --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index d01978f..edff5ce 100644 --- a/hw/ppc/spapr

[Qemu-devel] [PATCH v3 2/7] bootindex: add del_boot_device_path function

2014-07-25 Thread arei.gonglei
From: Gonglei Introduce a del_boot_device_path() cleanup fw_cfg content when hot-unplugging devcie refer to bootindex. Signed-off-by: Gonglei Signed-off-by: Chenliang --- include/sysemu/sysemu.h | 1 + vl.c| 17 + 2 files changed, 18 insertions(+) diff --

[Qemu-devel] [PATCH v3 1/7] bootindex: add modify_boot_device_path function

2014-07-25 Thread arei.gonglei
From: Gonglei When we want to change one device's bootindex, we should lookup the device and change the bootindex. it is simply that remove it from the global boot list, then re-add it, sorted by new bootindex. If the new bootindex has already used by another device just throw an error. Signed-o

[Qemu-devel] [PATCH v3 0/7] modify boot order of guest, and take effect after rebooting

2014-07-25 Thread arei.gonglei
From: Gonglei Sometimes, we want to modify boot order of a guest, but no need to shutdown it. We can call dynamic changing bootindex of a guest, which can be assured taking effect just after the guest rebooting. For example, in P2V scene, we boot a guest and then attach a new system disk, for co

[Qemu-devel] [PATCH v3 4/7] bootindex: delete bootindex when device is removed

2014-07-25 Thread arei.gonglei
From: Gonglei Device should be removed from global boot list when it is hot-unplugged. Signed-off-by: Chenliang Signed-off-by: Gonglei --- hw/core/qdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index da1ba48..7bc12bc 100644 --- a/hw/core/qdev.c ++

Re: [Qemu-devel] [PATCH] virtio-scsi: fix object check failure

2014-07-25 Thread Ming Lei
On Sat, Jul 26, 2014 at 7:10 AM, Nicholas A. Bellinger wrote: > Hi Ming & Paolo, > > On Wed, 2014-06-18 at 23:11 +0800, Ming Lei wrote: >> On Wed, Jun 18, 2014 at 11:06 PM, Paolo Bonzini wrote: >> > Il 18/06/2014 17:02, Paolo Bonzini ha scritto: >> > >> >> Il 18/06/2014 16:18, Ming Lei ha scritto

Re: [Qemu-devel] [questions]_about_qemu_log

2014-07-25 Thread Zhang Haoyu
> Hi, all > > If I use qemu command directly to run vm, bypass libvirt, how to > configure qemu to assure that each vm has its own log file, like > vmname.log? > For example, VM: rhel7-net has its own log file, rhel7-net.log, > VM:rhel7-stor has its own log file, rhel7

Re: [Qemu-devel] [questions] about qemu log

2014-07-25 Thread Zhang Haoyu
Hi, all If I use qemu command directly to run vm, bypass libvirt, how to configure qemu to assure that each vm has its own log file, like vmname.log? For example, VM: rhel7-net has its own log file, rhel7-net.log, VM:rhel7-stor has its own log file, rhel7-stor.log. >>

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-25 Thread Gonglei (Arei)
Hi, Gerd > -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Friday, July 25, 2014 5:46 PM > > Hi, > > > +void modify_boot_device_path(int32_t bootindex, DeviceState *dev, > > + const char *suffix) > > +{ > > +FWBootEntry *node, *i

Re: [Qemu-devel] [PATCH v2 4/7] bootindex: delete bootindex when device is removed

2014-07-25 Thread Gonglei (Arei)
Hi, Gerd > -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Friday, July 25, 2014 5:52 PM > Subject: Re: [PATCH v2 4/7] bootindex: delete bootindex when device is > removed > > Hi, > > > +del_boot_device_path(dev); > > You can call this from device_finali

Re: [Qemu-devel] [PATCH] virtio-scsi: fix object check failure

2014-07-25 Thread Nicholas A. Bellinger
Hi Ming & Paolo, On Wed, 2014-06-18 at 23:11 +0800, Ming Lei wrote: > On Wed, Jun 18, 2014 at 11:06 PM, Paolo Bonzini wrote: > > Il 18/06/2014 17:02, Paolo Bonzini ha scritto: > > > >> Il 18/06/2014 16:18, Ming Lei ha scritto: > > > This should never be triggered by vhost-scsi. Perhaps

[Qemu-devel] [PATCH v2 4/7] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-07-25 Thread Marc Marí
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Signed-off-by: Marc Marí --- tests/libqos/malloc-pc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c index db1496c..2efd095 100644 --- a/tests/libqos/malloc-pc.c

[Qemu-devel] [PATCH v2 3/7] libqtest: add QTEST_LOG for debugging qtest testcases

2014-07-25 Thread Marc Marí
Signed-off-by: Paolo Bonzini Signed-off-by: Marc Marí --- tests/libqtest.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 98e8f4b..fbd600d 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -167,11 +167,12 @@ QTestState

[Qemu-devel] [PATCH v2 7/7] libqos: Added basic virtqueue support to virtio implementation

2014-07-25 Thread Marc Marí
Add status changing and feature negotiation. Add basic virtqueue support for adding and sending virtqueue requests. Add ISR checking. Signed-off-by: Marc Marí --- tests/libqos/virtio-pci.c | 91 +- tests/libqos/virtio-pci.h |7 ++ tests/libqos/virtio.c | 89 ++

[Qemu-devel] [PATCH v2 5/7] libqos: Change free function called in malloc

2014-07-25 Thread Marc Marí
Reviewed-by: Stefan Hajnoczi Signed-off-by: Marc Marí --- tests/libqos/malloc.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h index 46f6000..5565381 100644 --- a/tests/libqos/malloc.h +++ b/tests/libqos/malloc.h @@ -32,7 +32,

[Qemu-devel] [PATCH v2 1/7] tests: Functions bus_foreach and device_find from libqos virtio API

2014-07-25 Thread Marc Marí
Virtio header has been changed to compile and work with a real device. Functions bus_foreach and device_find have been implemented for PCI. Virtio-blk test case now opens a fake device. Signed-off-by: Marc Marí --- tests/Makefile|3 +- tests/libqos/virtio-pci.c | 75 +++

[Qemu-devel] [PATCH v2 2/7] tests: Add virtio device initialization

2014-07-25 Thread Marc Marí
Add functions to read and write virtio header fields. Add status bit setting in virtio-blk-device. Signed-off-by: Marc Marí --- tests/Makefile|2 +- tests/libqos/virtio-pci.c | 57 + tests/libqos/virtio-pci.h | 18 ++ te

[Qemu-devel] [PATCH v2 6/7] virtio-blk: Correct bug in support for flexible descriptor layout

2014-07-25 Thread Marc Marí
Without this correction, only a three descriptor layout is accepted, and requests with just two descriptors are not completed and no error message is displayed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Marc Marí --- hw/block/virtio-blk.c | 14 +++--- 1 file changed, 7 insertions(

[Qemu-devel] [PATCH v2 0/7] Virtio PCI libqos driver

2014-07-25 Thread Marc Marí
Add functions for virtio PCI libqos driver. Add more debugging tools. Solve bugs found while generating tests. Marc Marí (7): tests: Functions bus_foreach and device_find from libqos virtio API tests: Add virtio device initialization libqtest: add QTEST_LOG for debugging qtest testcases li

[Qemu-devel] [PATCH 1/8] block: Add status callback to bdrv_amend_options()

2014-07-25 Thread Max Reitz
Depending on the changed options and the image format, bdrv_amend_options() may take a significant amount of time. In these cases, a way to be informed about the operation's status is desirable. Since the operation is rather complex and may fundamentally change the image, implementing it as AIO or

[Qemu-devel] [PATCH 8/8] iotests: Expand test 061

2014-07-25 Thread Max Reitz
Add some tests for progress output and one test regarding the COPIED flag for shared zeroed clusters to 061. Signed-off-by: Max Reitz --- tests/qemu-iotests/061 | 41 + tests/qemu-iotests/061.out | 40 tests/qem

[Qemu-devel] [PATCH 6/8] block/qcow2: Simplify shared L2 handling in amend

2014-07-25 Thread Max Reitz
Currently, we have a bitmap for keeping track of which clusters have been created during the zero cluster expansion process. This was necessary because we need to properly increase the refcount for shared L2 tables. However, now we can simply take the L2 refcount and use it for the cluster allocat

[Qemu-devel] [PATCH 7/8] block/qcow2: Speed up zero cluster expansion

2014-07-25 Thread Max Reitz
Actually, we do not need to allocate a new data cluster for every zero cluster to be expanded: It is completely sufficient to rely on qcow2's COW part and instead create a single zero cluster and reuse it as much as possible. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 119 +

[Qemu-devel] [PATCH 3/8] qemu-img: Fix insignifcant memleak

2014-07-25 Thread Max Reitz
As soon as options is set in img_amend(), it needs to be freed before the function returns. This leak is rather insignifcant, as qemu-img will exit subsequently anyway, but there's no point in not fixing it. Signed-off-by: Max Reitz --- qemu-img.c | 4 +++- 1 file changed, 3 insertions(+), 1 del

[Qemu-devel] [PATCH 4/8] block/qcow2: Make get_refcount() global

2014-07-25 Thread Max Reitz
Reading the refcount of a cluster is an operation which can be useful in all of the qcow2 code, so make that function globally available. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 23 --- block/qcow2.h | 2 ++ 2 files changed, 14 insertions(+), 11 deleti

[Qemu-devel] [PATCH 5/8] block/qcow2: Implement status CB for amend

2014-07-25 Thread Max Reitz
The only really time-consuming operation potentially performed by qcow2_amend_options() is zero cluster expansion when downgrading qcow2 images from compat=1.1 to compat=0.10, so report status of that operation and that operation only through the status CB. For this, count the number of L2 zero en

[Qemu-devel] [PATCH 0/8] block/qcow2: Improve (?) zero cluster expansion

2014-07-25 Thread Max Reitz
The main purpose of this series is to add a progress report to qemu-img amend. This is achieved by adding a callback function to bdrv_amend_options() - the reasons for this choice are explained in patch 1. While adapting qcow2's expand_zero_clusters_in_l1() accordingly, I noticed a way to simplify

[Qemu-devel] [PATCH 2/8] qemu-img: Add progress output for amend

2014-07-25 Thread Max Reitz
Now that bdrv_amend_options() supports a status callback, use it to display a progress report. Signed-off-by: Max Reitz --- qemu-img.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 90d6b79..a06f425 100644 --- a/qemu-

Re: [Qemu-devel] [PATCH for-2.1 2/2] acpi: mark ACPI tables ROM blob as extend-able on migration

2014-07-25 Thread Laszlo Ersek
On 07/25/14 17:48, Igor Mammedov wrote: > It fixes migration failure for machine type pc-i440fx-1.7 from > QEMU 1.7/2.0 to QEMU 2.1 > > Migration fails due to ACPI tables size grows across 1.7-2.1 > versions. That causes ACPI tables ROM blob to change its size > differently for the same configurat

Re: [Qemu-devel] [PATCH for-2.1 1/2] migration: load smaller RAMBlock to a bigger one if permitted

2014-07-25 Thread Laszlo Ersek
On 07/25/14 17:48, Igor Mammedov wrote: > Add API to mark memory region as extend-able on migration, > to allow migration code to load smaller RAMBlock into > a bigger one on destination QEMU instance. > > This will allow to fix broken migration from QEMU 1.7/2.0 to > QEMU 2.1 due to ACPI tables

Re: [Qemu-devel] [PATCH for-2.1 2/2] acpi: mark ACPI tables ROM blob as extend-able on migration

2014-07-25 Thread Paolo Bonzini
Il 25/07/2014 17:48, Igor Mammedov ha scritto: > It fixes migration failure for machine type pc-i440fx-1.7 from > QEMU 1.7/2.0 to QEMU 2.1 > > Migration fails due to ACPI tables size grows across 1.7-2.1 > versions. That causes ACPI tables ROM blob to change its size > differently for the same con

Re: [Qemu-devel] [PATCH 2/7] tests: Add virtio device initialization

2014-07-25 Thread Marc Marí
El Fri, 25 Jul 2014 16:19:41 +0100 Stefan Hajnoczi escribió: > On Thu, Jul 24, 2014 at 08:31:00PM +0200, Marc Marí wrote: > > +static uint32_t qvirtio_pci_get_features(QVirtioDevice *d) > > +{ > > +QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; > > +return qpci_io_readl(dev->pdev, dev->add

Re: [Qemu-devel] [Intel-gfx] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-25 Thread Konrad Rzeszutek Wilk
On Thu, Jul 24, 2014 at 09:44:41AM +0800, Chen, Tiejun wrote: > On 2014/7/24 4:54, Konrad Rzeszutek Wilk wrote: > >On Sat, Jul 19, 2014 at 12:27:21AM +, Kay, Allen M wrote: > >>>For the MCH PCI registers that do need to be read - can you tell us which > >>>ones those are? > >> > >>In qemu/hw/x

[Qemu-devel] [Bug 1348719] Re: arm64: -smp 2 hangs qemu

2014-07-25 Thread Joel Schopp
** Changed in: qemu Assignee: (unassigned) => Joel Schopp (joel-schopp) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1348719 Title: arm64: -smp 2 hangs qemu Status in QEMU: New Bug descri

[Qemu-devel] [Bug 1348719] [NEW] arm64: -smp 2 hangs qemu

2014-07-25 Thread Joel Schopp
Public bug reported: It appears that smp is broken on qemu for arm64. I'm looking into the root cause but am curious if others can reproduce in their environments. Tested with commit f368c33d5ab09dd5656924185cd975b11838cd25 (July 22) from https://github.com/qemu/qemu.git [root@joelaarch64 ~]# /

Re: [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression

2014-07-25 Thread Peter Maydell
On 25 July 2014 13:38, Paolo Bonzini wrote: > The following changes since commit f368c33d5ab09dd5656924185cd975b11838cd25: > > Update version for v2.1.0-rc3 release (2014-07-22 18:17:03 +0100) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git tags/for-upstream >

Re: [Qemu-devel] [PATCH for-2.1 0/2] Fix migration failure due to ACPI tables size changes

2014-07-25 Thread Laszlo Ersek
On 07/25/14 17:48, Igor Mammedov wrote: > Changing the ACPI table size causes migration to break, and the memory > hotplug work opened our eyes on how horribly we were breaking things in > 2.0 already. > > To trigger issue start > QEMU-1.7 with -M pc-i440fx-1.7 -device pci-bridge,chassis_nr=1 >

Re: [Qemu-devel] [PATCH 7/7] libqos: Added basic virtqueue support to virtio implementation

2014-07-25 Thread Stefan Hajnoczi
On Thu, Jul 24, 2014 at 08:31:05PM +0200, Marc Marí wrote: > +static void qvirtio_pci_set_queue_address(QVirtioDevice *d, uint16_t addr) > +{ > +QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; > +qpci_io_writel(dev->pdev, dev->addr + QVIRTIO_QUEUE_ADDRESS, addr); > +} Why is addr uint16_t?

Re: [Qemu-devel] [PATCH] hw/arm/boot: Set PC correctly when loading AArch64 ELF files

2014-07-25 Thread Christopher Covington
On 07/25/2014 11:23 AM, Peter Maydell wrote: > The code in do_cpu_reset() correctly handled AArch64 CPUs > when running Linux kernels, but was missing code in the > branch of the if() that deals with loading ELF files. > Correctly jump to the ELF entry point on reset rather than > leaving the reset

Re: [Qemu-devel] [PATCH] [RFC] Add machine type pc-1.0-qemu-kvm for live migrate compatibility with qemu-kvm

2014-07-25 Thread Alex Bligh
ping: anyone got any views on this one? On 22 Jul 2014, at 19:43, Alex Bligh wrote: > Add a machine type pc-1.0-qemu-kvm for live migrate compatibility > with qemu-kvm version 1.0. > > Signed-off-by: Alex Bligh > --- > hw/acpi/piix4.c | 49 +++

Re: [Qemu-devel] [PULL for-2.1 0/3] Last minute patches

2014-07-25 Thread Peter Maydell
On 25 July 2014 15:22, Paolo Bonzini wrote: > Since Igor hasn't sent his patches, and I'm leaving the office, I pushed > this to > >git://github.com/bonzini/qemu.git tags/for-upstream-full > > I don't know about tests/acpi-test-data/pc. It makes sense that this > patch should modify something

[Qemu-devel] [PATCH for-2.1 1/2] migration: load smaller RAMBlock to a bigger one if permitted

2014-07-25 Thread Igor Mammedov
Add API to mark memory region as extend-able on migration, to allow migration code to load smaller RAMBlock into a bigger one on destination QEMU instance. This will allow to fix broken migration from QEMU 1.7/2.0 to QEMU 2.1 due to ACPI tables size changes across 1.7/2.0/2.1 versions by marking

[Qemu-devel] [PATCH for-2.1 2/2] acpi: mark ACPI tables ROM blob as extend-able on migration

2014-07-25 Thread Igor Mammedov
It fixes migration failure for machine type pc-i440fx-1.7 from QEMU 1.7/2.0 to QEMU 2.1 Migration fails due to ACPI tables size grows across 1.7-2.1 versions. That causes ACPI tables ROM blob to change its size differently for the same configurations on different QEMU versions. As result migration

[Qemu-devel] [PATCH for-2.1 0/2] Fix migration failure due to ACPI tables size changes

2014-07-25 Thread Igor Mammedov
Changing the ACPI table size causes migration to break, and the memory hotplug work opened our eyes on how horribly we were breaking things in 2.0 already. To trigger issue start QEMU-1.7 with -M pc-i440fx-1.7 -device pci-bridge,chassis_nr=1 and try to migrate to QEMU-2.1 or QEMU-2.0 as result

[Qemu-devel] [PATCH RFC v2 09/12] VMState test: update period of vmstate testing process

2014-07-25 Thread Sanidhya Kashyap
No particular change, except variable name. Since I am not modifying other variables, so I have not made the command generic. Signed-off-by: Sanidhya Kashyap --- qapi-schema.json | 12 qmp-commands.hx | 23 +++ savevm.c | 13 + 3 files change

[Qemu-devel] [PATCH RFC v2 12/12] VMState test: hmp interface for cancel mechanism

2014-07-25 Thread Sanidhya Kashyap
Signed-off-by: Sanidhya Kashyap --- hmp-commands.hx | 14 ++ hmp.c | 6 ++ hmp.h | 1 + 3 files changed, 21 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 6d15184..fe224fc 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1822,6 +182

[Qemu-devel] [PATCH RFC v2 08/12] VMState test: hmp interface for querying the vmstate testing process

2014-07-25 Thread Sanidhya Kashyap
Added a hmp interface for providing the information about the testing process. I have used the underscore as a separater on Eric's advice. But, I have found some of the commands having hyphen. Signed-off-by: Sanidhya Kashyap --- hmp-commands.hx | 2 ++ hmp.c | 14 ++ hmp.h

[Qemu-devel] [PATCH RFC v2 07/12] VMState test: qmp interface for querying the vmstate testing process

2014-07-25 Thread Sanidhya Kashyap
This patch provides the information about an already executing testing process. I have modified the qmp command to query-test-vmstates from test-vmstates-get-info. Signed-off-by: Sanidhya Kashyap --- qapi-schema.json | 34 ++ qmp-commands.hx | 25

[Qemu-devel] [PATCH RFC v2 11/12] VMState test: cancel mechanism for an already running vmstate testing process

2014-07-25 Thread Sanidhya Kashyap
Signed-off-by: Sanidhya Kashyap --- qapi-schema.json | 9 + qmp-commands.hx | 19 +++ savevm.c | 16 ++-- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index 13e922e..91f1672 100644 --- a/qapi-sche

[Qemu-devel] [PATCH RFC v2 06/12] VMState test: hmp interface for vmstate testing

2014-07-25 Thread Sanidhya Kashyap
I have added the hmp interface for vmstate testing. Currently, the patch does not support the qdev list, since I could not figure out how to the pass the VMStatesQdevDevices struct which can be parsed and used. Signed-off-by: Sanidhya Kashyap --- hmp-commands.hx | 15 +++ hmp.c

[Qemu-devel] [PATCH RFC v2 10/12] VMState test: hmp interface for period update

2014-07-25 Thread Sanidhya Kashyap
Signed-off-by: Sanidhya Kashyap --- hmp-commands.hx | 15 +++ hmp.c | 14 ++ hmp.h | 1 + 3 files changed, 30 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index c1dc6a2..6d15184 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -18

[Qemu-devel] [PATCH RFC v2 02/12] reset handler for qdevified devices

2014-07-25 Thread Sanidhya Kashyap
I have added a structure containing the list of qdevified devices which have been added to the SaveVMHandlers. Since, I was unable to find any particular struct containing the information about all the qdevified devices. So, I have created my own version, which is very very specific. I shall be gr

[Qemu-devel] [PATCH RFC v2 04/12] VMState test: hmp interface for showing qdevified devices

2014-07-25 Thread Sanidhya Kashyap
This patch provides the hmp interface for qdevified devices list. Signed-off-by: Sanidhya Kashyap --- hmp-commands.hx | 2 ++ hmp.c | 21 + hmp.h | 1 + monitor.c | 7 +++ 4 files changed, 31 insertions(+) diff --git a/hmp-commands.hx b/hmp-c

[Qemu-devel] [PATCH RFC v2 05/12] VMstate test: basic VMState testing mechanism

2014-07-25 Thread Sanidhya Kashyap
In this patch, I have made the following changes: * changed the DPRINT statement. * renamed the variables. * added noqdev variable which decides which option to use for resetting. * added devices option which can help in resetting one or many devices (only qdevified ones). * updated the documentat

[Qemu-devel] [PATCH RFC v2 03/12] VMState test: query command to extract the qdevified device names

2014-07-25 Thread Sanidhya Kashyap
I have provided a qmp interface for getting the list of qdevified devices that have been registered with SaveVMHandlers. Signed-off-by: Sanidhya Kashyap --- qapi-schema.json | 22 ++ qmp-commands.hx | 25 + savevm.c | 34 ++

[Qemu-devel] [PATCH RFC v2 01/12] QEMUSizedBuffer/QEMUFile

2014-07-25 Thread Sanidhya Kashyap
From: "Dr. David Alan Gilbert" Stefan Berger's to create a QEMUFile that goes to a memory buffer; from: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html Using the QEMUFile interface, this patch adds support functions for operating on in-memory sized buffers that can be written

[Qemu-devel] [PATCH RFC v2 00/12] VMState testing

2014-07-25 Thread Sanidhya Kashyap
Hi, The following patch introduce a mechanism to test the correctness of the vmstate's information. This is achieved by saving the device states' information to a memory buffer and then clearing the states, followed by loading the data from the saved memory buffer. v1 --> v2: * Added a list cont

Re: [Qemu-devel] [PATCH 4/7] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-07-25 Thread Stefan Hajnoczi
On Thu, Jul 24, 2014 at 08:31:02PM +0200, Marc Marí wrote: > Signed-off-by: Paolo Bonzini > Signed-off-by: Marc Marí > --- > tests/libqos/malloc-pc.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi pgpfJeOahV0Cb.pgp Description: PGP signature

Re: [Qemu-devel] [PATCH 3/7] libqtest: add QTEST_LOG for debugging qtest testcases

2014-07-25 Thread Stefan Hajnoczi
On Thu, Jul 24, 2014 at 08:31:01PM +0200, Marc Marí wrote: > @@ -397,10 +398,18 @@ QDict *qtest_qmpv(QTestState *s, const char *fmt, > va_list ap) > > /* No need to send anything for an empty QObject. */ > if (qobj) { > +size_t len; > +int log = getenv("QTEST_LOG") !=

[Qemu-devel] [PATCH] hw/arm/boot: Set PC correctly when loading AArch64 ELF files

2014-07-25 Thread Peter Maydell
The code in do_cpu_reset() correctly handled AArch64 CPUs when running Linux kernels, but was missing code in the branch of the if() that deals with loading ELF files. Correctly jump to the ELF entry point on reset rather than leaving the reset PC at zero. Reported-by: Christopher Covington Signe

Re: [Qemu-devel] [PATCH 5/7] libqos: Change free function called in malloc

2014-07-25 Thread Stefan Hajnoczi
On Thu, Jul 24, 2014 at 08:31:03PM +0200, Marc Marí wrote: > Signed-off-by: Marc Marí > --- > tests/libqos/malloc.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h > index 46f6000..5565381 100644 > --- a/tests/libqos/mallo

Re: [Qemu-devel] [PATCH 2/7] tests: Add virtio device initialization

2014-07-25 Thread Stefan Hajnoczi
On Thu, Jul 24, 2014 at 08:31:00PM +0200, Marc Marí wrote: > +static uint32_t qvirtio_pci_get_features(QVirtioDevice *d) > +{ > +QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; > +return qpci_io_readl(dev->pdev, dev->addr + QVIRTIO_DEVICE_FEATURES); > +} Unused? If it's unused, then it's u

Re: [Qemu-devel] AArch64 ELF File Loading

2014-07-25 Thread Peter Maydell
On 25 July 2014 16:05, Christopher Covington wrote: > I have local patches adding semihosting for AArch64. I hope eventually be able > to share them and other changes, but the approvals will likely take a while > longer. That would be good; there is demand from other quarters for semihosting supp

Re: [Qemu-devel] AArch64 ELF File Loading

2014-07-25 Thread Christopher Covington
Hi Peter, On 07/25/2014 10:41 AM, Peter Maydell wrote: > On 25 July 2014 15:35, Christopher Covington wrote: >> qemu-system-aarch64 -nodefaults -nographic -monitor none -M virt \ >> -cpu cortex-a57 -m 3G -semihosting -kernel hello >> >> qemu: fatal: Trying to execute code outside RAM or ROM at

Re: [Qemu-devel] [PATCH 1/7] tests: Functions bus_foreach and device_find from libqos virtio API

2014-07-25 Thread Stefan Hajnoczi
On Thu, Jul 24, 2014 at 08:30:59PM +0200, Marc Marí wrote: > +static QPCIBus *test_start(void) > +{ > +char cmdline[100]; > +char tmp_path[] = "/tmp/qtest.XX"; > +int fd, ret; > + > +/* Create a temporary raw image */ > +fd = mkstemp(tmp_path); > +g_assert_cmpint(fd, >=,

Re: [Qemu-devel] AArch64 ELF File Loading

2014-07-25 Thread Peter Maydell
On 25 July 2014 15:35, Christopher Covington wrote: > qemu-system-aarch64 -nodefaults -nographic -monitor none -M virt \ > -cpu cortex-a57 -m 3G -semihosting -kernel hello > > qemu: fatal: Trying to execute code outside RAM or ROM at 0x This means your code took an exception (an

Re: [Qemu-devel] AArch64 ELF File Loading

2014-07-25 Thread Christopher Covington
Hi Peter, On 07/25/2014 10:07 AM, Peter Maydell wrote: > On 25 July 2014 15:01, Christopher Covington wrote: >> Hi, >> >> I think the AArch64 port has a problem with a self-modifying code sequence >> that appears to run fine on other simulators, but I can't get QEMU to run the >> small bare metal

Re: [Qemu-devel] [PATCH V5 4/6] cpu_exec: Add sleeping algorithm

2014-07-25 Thread Sebastian Tanase
- Mail original - > De: "Paolo Bonzini" > À: "Sebastian Tanase" , qemu-devel@nongnu.org > Cc: aligu...@amazon.com, afaer...@suse.de, r...@twiddle.net, "peter maydell" > , > mich...@walle.cc, a...@alex.org.uk, stefa...@redhat.com, > lcapitul...@redhat.com, crobi...@redhat.com, > arm...@

Re: [Qemu-devel] [PULL for-2.1 0/3] Last minute patches

2014-07-25 Thread Paolo Bonzini
Il 25/07/2014 14:15, Paolo Bonzini ha scritto: > The following changes since commit f368c33d5ab09dd5656924185cd975b11838cd25: > > Update version for v2.1.0-rc3 release (2014-07-22 18:17:03 +0100) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git tags/for-upstr

Re: [Qemu-devel] AArch64 ELF File Loading

2014-07-25 Thread Peter Maydell
On 25 July 2014 15:01, Christopher Covington wrote: > Hi, > > I think the AArch64 port has a problem with a self-modifying code sequence > that appears to run fine on other simulators, but I can't get QEMU to run the > small bare metal test case I created to try to reproduce the issue. Any help >

[Qemu-devel] AArch64 ELF File Loading

2014-07-25 Thread Christopher Covington
Hi, I think the AArch64 port has a problem with a self-modifying code sequence that appears to run fine on other simulators, but I can't get QEMU to run the small bare metal test case I created to try to reproduce the issue. Any help would be appreciated. qemu-system-aarch64 -nodefaults -nographi

Re: [Qemu-devel] [questions] about qemu log

2014-07-25 Thread Andreas Färber
Am 25.07.2014 13:07, schrieb Zhang Haoyu: >>> Hi, all >>> >>> If I use qemu command directly to run vm, bypass libvirt, how to configure >>> qemu to assure that each vm has its own log file, like vmname.log? >>> For example, VM: rhel7-net has its own log file, rhel7-net.log, >>> VM:rhel7-stor has

[Qemu-devel] [PATCH v2 3/4] qemu-char: add -chardev exit-on-eof option

2014-07-25 Thread Stefan Hajnoczi
When QEMU is executed as part of a test case or from a script, it is usually desirable to exit if the parent process terminates. This ensures that "leaked" QEMU processes do not continue consuming resources after their parent has died. This patch adds the -chardev exit-on-eof option causing socke

[Qemu-devel] [PATCH v2 1/4] vl: add qemu_system_shutdown_force()

2014-07-25 Thread Stefan Hajnoczi
The QEMU --no-shutdown option prevents guests from shutting down. There are several cases where shutdown should be forced, even if --no-shutdown was given. This patch adds an API for forcing shutdown. This cleans up the code and hides the extern int no_shutdown variable which is currently being

[Qemu-devel] [PATCH v2 4/4] libqtest: use -chardev exit-on-eof to clean up QEMU

2014-07-25 Thread Stefan Hajnoczi
When the test case aborts it is important to terminate the QEMU process so it does not leak. This was implemented using a SIGABRT handler function in libqtest that sent SIGTERM to QEMU. The SIGABRT approach is messy because it requires a global signal handler but libqtest should support multiple

[Qemu-devel] [PATCH v2 0/4] libqtest: solve QEMU process cleanup problem

2014-07-25 Thread Stefan Hajnoczi
v2: * Added qemu_system_shutdown_force() API [Peter] Test cases are supposed to clean up even if they fail. Historically libqtest has leaked QEMU processes and files. This caused annoyances and buildbot failures so it was gradually fixed. The solution we have for terminating the QEMU process i

[Qemu-devel] [PATCH v2 2/4] libqemustub: add qemu_system_shutdown_force()

2014-07-25 Thread Stefan Hajnoczi
These sysemu functions will be needed by qemu-char.c, which is linked into tests/vhost-user-test without system emulation functionality. Signed-off-by: Stefan Hajnoczi --- stubs/Makefile.objs | 1 + stubs/shutdown.c| 5 + 2 files changed, 6 insertions(+) create mode 100644 stubs/shutdow

Re: [Qemu-devel] [PATCH 4/4] block/parallels: 2TB+ parallels images support

2014-07-25 Thread Denis V. Lunev
On 25/07/14 17:08, Jeff Cody wrote: On Fri, Jul 25, 2014 at 07:51:47AM +0400, Denis V. Lunev wrote: On 24/07/14 23:25, Jeff Cody wrote: On Tue, Jul 22, 2014 at 05:19:37PM +0400, Denis V. Lunev wrote: Parallels has released in the recent updates of Parallels Server 5/6 new addition to his image

Re: [Qemu-devel] [PATCH 4/4] block/parallels: 2TB+ parallels images support

2014-07-25 Thread Jeff Cody
On Fri, Jul 25, 2014 at 07:51:47AM +0400, Denis V. Lunev wrote: > On 24/07/14 23:25, Jeff Cody wrote: > >On Tue, Jul 22, 2014 at 05:19:37PM +0400, Denis V. Lunev wrote: > >>Parallels has released in the recent updates of Parallels Server 5/6 > >>new addition to his image format. Images with signatu

[Qemu-devel] [Bug 1307225] Re: Running a virtual machine on a Haswell system produces machine check events

2014-07-25 Thread cvbkf
attachment logfiles, dmidecode, system information ** Attachment added: "logfiles, dmidecode, system information" https://bugs.launchpad.net/qemu/+bug/1307225/+attachment/4162599/+files/logfiles-mce.txt -- You received this bug notification because you are a member of qemu- devel-ml, which i

Re: [Qemu-devel] [PATCH 3/4] block/parallels: split check for parallels format in parallels_open

2014-07-25 Thread Denis V. Lunev
On 24/07/14 22:50, Jeff Cody wrote: On Tue, Jul 22, 2014 at 05:19:36PM +0400, Denis V. Lunev wrote: and rework error path a bit. There is no difference at the moment, but the code will be definitely shorter when additional processing will be required for WithouFreSpacExt Signed-off-by: Denis V.

Re: [Qemu-devel] [PATCH 4/4] block/parallels: 2TB+ parallels images support

2014-07-25 Thread Denis V. Lunev
On 24/07/14 23:25, Jeff Cody wrote: On Tue, Jul 22, 2014 at 05:19:37PM +0400, Denis V. Lunev wrote: Parallels has released in the recent updates of Parallels Server 5/6 new addition to his image format. Images with signature WithouFreSpacExt have offsets in the catalog coded not as offsets in se

[Qemu-devel] [Bug 1307225] Re: Running a virtual machine on a Haswell system produces machine check events

2014-07-25 Thread cvbkf
I can confirm this. Using qemu-kvm for three virtual machines on Ubuntu 14.04 LTS using a Intel i7-4770 Haswell based server. dmesg: [63429.847437] mce: [Hardware Error]: Machine check events logged [65996.795630] mce: [Hardware Error]: Machine check events logged mcelog: Hardware event. This i

Re: [Qemu-devel] [PATCH 1/4] block/parallels: extend parallels format header with actual data values

2014-07-25 Thread Denis V. Lunev
On 24/07/14 22:34, Jeff Cody wrote: On Tue, Jul 22, 2014 at 05:19:34PM +0400, Denis V. Lunev wrote: Parallels image format has several additional fields inside: - nb_sectors is actually 64 bit wide. Upper 32bits are not used for images with signature "WithoutFreeSpace" and must be explicitely

[Qemu-devel] [PULL v2 1/1] qemu-char: ignore flow control if a PTY's slave is not connected

2014-07-25 Thread Paolo Bonzini
After commit f702e62 (serial: change retry logic to avoid concurrency, 2014-07-11), guest boot hangs if the backend is an unconnected PTY. The reason is that PTYs do not support G_IO_HUP, and serial_xmit is never called. To fix this, simply invoke serial_xmit immediately (via g_idle_source_new) w

[Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression

2014-07-25 Thread Paolo Bonzini
The following changes since commit f368c33d5ab09dd5656924185cd975b11838cd25: Update version for v2.1.0-rc3 release (2014-07-22 18:17:03 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 62c339c5272ce8fbe8ca52695

[Qemu-devel] [PULL 3/3] qemu-char: ignore flow control if a PTY's slave is not connected

2014-07-25 Thread Paolo Bonzini
After commit f702e62 (serial: change retry logic to avoid concurrency, 2014-07-11), guest boot hangs if the backend is an unconnected PTY. The reason is that PTYs do not support G_IO_HUP, and serial_xmit is never called. To fix this, simply invoke serial_xmit immediately (via g_idle_source_new) w

[Qemu-devel] [PULL 1/3] acpi-dsdt: procedurally generate _PRT

2014-07-25 Thread Paolo Bonzini
This replaces the _PRT constant with a method that computes it. The problem is that the DSDT+SSDT have grown from 2.0 to 2.1, enough to cross the 8k barrier (we align the ACPI tables to 4k before putting them in fw_cfg). This causes problems with migration and the pc-i440fx-2.0 machine type. The

[Qemu-devel] [PULL 2/3] pc: hack for migration compatibility from QEMU 2.0

2014-07-25 Thread Paolo Bonzini
Changing the ACPI table size causes migration to break, and the memory hotplug work opened our eyes on how horribly we were breaking things in 2.0 already. The ACPI table size is rounded to the next 4k, which one would think gives some headroom. In practice this is not the case, because the user

[Qemu-devel] [PULL for-2.1 0/3] Last minute patches

2014-07-25 Thread Paolo Bonzini
The following changes since commit f368c33d5ab09dd5656924185cd975b11838cd25: Update version for v2.1.0-rc3 release (2014-07-22 18:17:03 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to d975e28437377bc9a65fb5f4f

[Qemu-devel] [PATCH RFC 2/3] dataplane: fail notifier setting gracefully

2014-07-25 Thread Cornelia Huck
The dataplane code is currently doing a hard exit if it fails to set up either guest or host notifiers. In practice, this may mean that a guest suddenly dies after a dataplane device failed to come up (e.g., when a file descriptor limit is hit for tne nth device). Let's just try to unwind the setu

[Qemu-devel] [PATCH RFC 1/3] dataplane: print why starting failed

2014-07-25 Thread Cornelia Huck
Setting up guest or host notifiers may fail, but the user will have no idea why: Let's print the error returned by the callback. Acked-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- hw/block/dataplane/virtio-blk.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-)

[Qemu-devel] [PATCH RFC 3/3] dataplane: stop trying on notifier error

2014-07-25 Thread Cornelia Huck
If we fail to set up guest or host notifiers, there's no use trying again every time the guest kicks, so disable dataplane in that case. Acked-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- hw/block/dataplane/virtio-blk.c | 11 ++- 1 file changed, 10 insertions(+), 1 delet

[Qemu-devel] [PATCH RFC 0/3] dataplane: dataplane: more graceful error handling

2014-07-25 Thread Cornelia Huck
Currently, qemu will take a hard exit if it fails to set up guest or host notifiers, giving no real clue as to what went wrong (e.g., when out of file descriptors). This patchset tries to make this more manageable: Both by improving the error message and by gracefully falling back to non-dataplane

Re: [Qemu-devel] [PATCH] cpu-exec: make TBs generated codes unlinked when -singlestep

2014-07-25 Thread Laurent Desnogues
Hello, On Fri, Jul 25, 2014 at 6:37 AM, Jincheng Miao wrote: > '-singlestep' option will make TB contains only one instruction, > so that the qemu_log could output trace log when CPU_LOG_EXEC sets, > and it could help developers to debug control flow. > > But currently, in cpu_exec(), it doesn't

Re: [Qemu-devel] [PULL for-2.1 0/2] vnc: fix two vnc update issues.

2014-07-25 Thread Peter Maydell
gt; >> > In more detail: >> > [snip] >> >> Thanks for the clarification; these do seem worth putting in 2.1. >> I'll need to get you to respin with the missing signed-off-by >> that Andreas pointed out, though. > > Done: git://git.kraxel.org/qemu tags/pull-vnc-20140725-1 Applied, thanks. -- PMM

Re: [Qemu-devel] [questions] about qemu log

2014-07-25 Thread Zhang Haoyu
>> Hi, all >> >> If I use qemu command directly to run vm, bypass libvirt, how to configure >> qemu to assure that each vm has its own log file, like vmname.log? >> For example, VM: rhel7-net has its own log file, rhel7-net.log, >> VM:rhel7-stor has its own log file, rhel7-stor.log. > >-D /path/to

  1   2   >