Re: [Qemu-devel] [PATCH RFC v7 7/7] qemu-iotests-s390x-fix-test-130

2015-05-04 Thread tu bo
Hi Kevin: On 04/28/2015 04:23 PM, Kevin Wolf wrote: Am 28.04.2015 um 04:59 hat tu bo geschrieben: Hi Kevin: On 04/27/2015 07:34 PM, Kevin Wolf wrote: Am 27.04.2015 um 13:24 hat Max Reitz geschrieben: On 27.04.2015 09:15, tu bo wrote: Hi Max: On

Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection

2015-05-04 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 04/02/2015 11:29 AM, Markus Armbruster wrote: * Implicit type definitions are made explicit, and given auto-generated names. These names start with ':' so they don't clash with the user's names. Example: a simple union implicitly defines an

Re: [Qemu-devel] [PATCH v7 25/39] qapi: Require valid names

2015-05-04 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 04/29/2015 07:06 AM, Eric Blake wrote: Previous commits demonstrated that the generator overlooked various bad naming situations: - types, commands, and events need a valid name - enum members must be valid names, when combined with prefix - union and

Re: [Qemu-devel] [PATCH v7 36/39] qapi: Drop support for inline nested types

2015-05-04 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 04/29/2015 07:06 AM, Eric Blake wrote: A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument (see previous commit messages for more details why); but existing use of inline

Re: [Qemu-devel] [PATCH] hw/sd: Don't pass BlockBackend to sd_reset()

2015-05-04 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: The only valid BlockBackend to pass to sd_reset() is the one for the SD card, which is sd-blk. Drop the second argument from this function in favour of having it just use sd-blk. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- A

Re: [Qemu-devel] driver enhancement for Intel IGD passthrough

2015-05-04 Thread Tian, Kevin
From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Tuesday, April 21, 2015 2:13 AM On Thu, 2015-04-16 at 17:24 +, Tian, Kevin wrote: ping... From: Tian, Kevin Sent: Friday, April 10, 2015 10:33 AM Hi, We are working on Linux/Windows graphics driver

Re: [Qemu-devel] Patch for 64 bit mingw compilation

2015-05-04 Thread Joseph Hindin
Hi The changes appear to be necessary. I was building Windows QEMU GA on Fedora 21, MINGW cross-compiler v. 4.9.2, build 20141030, Fedora MinGW 4.9.2-1.fc21 and before the changes, linking failed. Below is the building log for qga-vss.dll before the changes: - $ make

Re: [Qemu-devel] [PATCH 4/4] qemu-ga: Building Windows MSI installation with configure/Makefile

2015-05-04 Thread Paolo Bonzini
On 26/04/2015 09:04, Yossi Hindin wrote: +ifdef QEMU_GA_MSI_WITH_VSS +${QEMU_GA_MSI}: qga/vss-win32/qga-vss.dll qemu-ga.exe Shouldn't the qemu-ga.exe dependency be unconditional? +endif + +${QEMU_GA_MSI}: config-host.mak + +${QEMU_GA_MSI}: qga/installer/qemu-ga.wxs + $(call

Re: [Qemu-devel] [PATCH 3/4] qemu-ga: Introduce Windows MSI script

2015-05-04 Thread Paolo Bonzini
On 26/04/2015 09:04, Yossi Hindin wrote: + ?ifndef env.QEMU_GA_VERSION ? +?error Environemtn variable QEMU_GA_VERSION undefined? + ?endif? + Environment Ironically, msitools was started exactly to build an installer with qemu-ga (the idea was to do it with raw tables, that was a few

Re: [Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-05-04 Thread Igor Mammedov
On Wed, 29 Apr 2015 12:42:21 -0400 Stefan Berger stef...@linux.vnet.ibm.com wrote: On 04/29/2015 05:06 AM, Igor Mammedov wrote: On Wed, 22 Apr 2015 14:18:55 -0400 Stefan Berger stef...@linux.vnet.ibm.com wrote: On 04/22/2015 03:00 AM, Igor Mammedov wrote: On Thu, 16 Apr 2015 10:05:35

Re: [Qemu-devel] [PATCH v5 13/20] hw/acpi/aml-build: Add ToUUID macro

2015-05-04 Thread Igor Mammedov
On Wed, 29 Apr 2015 21:41:39 +0800 Shannon Zhao shannon.z...@linaro.org wrote: On 2015/4/28 17:48, Shannon Zhao wrote: On 2015/4/28 17:35, Igor Mammedov wrote: On Tue, 28 Apr 2015 16:52:19 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: On 2015/4/28 16:15, Igor Mammedov wrote:

Re: [Qemu-devel] [PATCH v1 1/1] hw/ptimer: Do not artificially limit timers when using icount

2015-05-04 Thread Paolo Bonzini
On 04/05/2015 05:18, Edgar E. Iglesias wrote: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- hw/core/ptimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index

Re: [Qemu-devel] [RFC PATCH 05/15] spapr_pci: add PHB unrealize

2015-05-04 Thread Paolo Bonzini
On 01/05/2015 03:18, Michael Roth wrote: Sorry, I mixed up memory regions with memory region alias. Memory region aliases do a memory_region_ref() on the original MR, similar to memory_region_add_subregion(), so that's what ends up creating the reference to the owner/PHB. So I think I do

Re: [Qemu-devel] [PATCH v5 13/20] hw/acpi/aml-build: Add ToUUID macro

2015-05-04 Thread Shannon Zhao
On 2015/5/4 17:22, Igor Mammedov wrote: On Wed, 29 Apr 2015 21:41:39 +0800 Shannon Zhao shannon.z...@linaro.org wrote: On 2015/4/28 17:48, Shannon Zhao wrote: On 2015/4/28 17:35, Igor Mammedov wrote: On Tue, 28 Apr 2015 16:52:19 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: On

Re: [Qemu-devel] [PATCH 2/2] spice-char: notify the server when chardev is writable

2015-05-04 Thread Amit Shah
Hi Gerd, On (Mon) 27 Oct 2014 [12:57:57], Gerd Hoffmann wrote: On Mo, 2014-10-27 at 12:45 +0100, Marc-André Lureau wrote: Hi On Mon, Oct 27, 2014 at 9:08 AM, Gerd Hoffmann kra...@redhat.com wrote: +static void spice_chr_accept_input(struct CharDriverState *chr)

Re: [Qemu-devel] [RFC PATCH 02/15] qdev: store DeviceState's canonical path to use when unparenting

2015-05-04 Thread Paolo Bonzini
On 02/05/2015 00:54, Michael Roth wrote: What about unparenting children devices in the device's unrealize callback? It sucks that you have to do it manually, but using stale canonical paths isn't the nicest thing either. That does seems to do the trick. It felt wrong when I first

Re: [Qemu-devel] [PATCH v2 3/3] TPM2 ACPI table support

2015-05-04 Thread Igor Mammedov
On Thu, 30 Apr 2015 22:44:08 -0400 Stefan Berger stef...@linux.vnet.ibm.com wrote: Add a TPM2 ACPI table if a TPM 2 is used in the backend. Rename tpm_find() to tpm_get_version() and have this function return the version of the TPM found, TPMVersion_Unspec if no TPM is found. Use the

Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/index

2015-05-04 Thread Igor Mammedov
On Thu, 30 Apr 2015 16:19:07 -0300 Eduardo Habkost ehabk...@redhat.com wrote: This will provide a predictable path for the CPU objects, and a more powerful alternative for the query-cpus QMP command, as now every QOM property on CPU objects can be easily queried. provided the way cpu_index is

Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2015-05-04 Thread Denis V. Lunev
On 01/04/15 13:18, Michael S. Tsirkin wrote: On Wed, Apr 01, 2015 at 12:51:42PM +0300, James Bottomley wrote: On Wed, 2015-04-01 at 11:50 +0200, Michael S. Tsirkin wrote: On Wed, Apr 01, 2015 at 12:44:28PM +0300, James Bottomley wrote: On Fri, 2015-02-27 at 09:57 +0300, Denis V. Lunev wrote:

Re: [Qemu-devel] [RFC 5/5] arm: Simplify cycle counter

2015-05-04 Thread Paolo Bonzini
On 01/05/2015 00:02, Peter Maydell wrote: On 30 April 2015 at 22:33, Christopher Covington christopher.coving...@linaro.org wrote: On Apr 30, 2015 2:28 PM, Peter Maydell peter.mayd...@linaro.org wrote: Are you really really sure the _raw function is the correct one? Nowhere else in the

Re: [Qemu-devel] [PATCH v5 06/20] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-05-04 Thread Igor Mammedov
On Wed, 15 Apr 2015 21:24:55 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org DSDT consists of the usual common table header plus a definition block in AML encoding which describes all devices in the platform. After initializing DSDT with

Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/index

2015-05-04 Thread Paolo Bonzini
On 04/05/2015 11:47, Igor Mammedov wrote: On Thu, 30 Apr 2015 16:19:07 -0300 Eduardo Habkost ehabk...@redhat.com wrote: This will provide a predictable path for the CPU objects, and a more powerful alternative for the query-cpus QMP command, as now every QOM property on CPU objects can

[Qemu-devel] .gitignore contains .c and .h ?

2015-05-04 Thread Guillaume Le Louët
Hello. The .gitignore in the master branch contains the following lines : /qapi-types.[ch] /qapi-visit.[ch] /qapi-event.[ch] Why is it so ? Are they generated automatically each time I compile the project ? I am modifying qapi-types.h and qapi-types.c , am I doing wrong ? regards, Guillaume

Re: [Qemu-devel] [PATCH v5 08/20] hw/arm/virt-acpi-build: Generate MADT table

2015-05-04 Thread Igor Mammedov
On Wed, 15 Apr 2015 21:24:57 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org MADT describes GIC enabled ARM platforms. The GICC and GICD subtables are used to define the GIC regions. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com

Re: [Qemu-devel] [PATCH v5 13/20] hw/acpi/aml-build: Add ToUUID macro

2015-05-04 Thread Igor Mammedov
On Mon, 04 May 2015 17:30:20 +0800 Shannon Zhao shannon.z...@linaro.org wrote: On 2015/5/4 17:22, Igor Mammedov wrote: On Wed, 29 Apr 2015 21:41:39 +0800 Shannon Zhao shannon.z...@linaro.org wrote: On 2015/4/28 17:48, Shannon Zhao wrote: On 2015/4/28 17:35, Igor Mammedov

Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-04 Thread Kevin Wolf
Am 01.05.2015 um 16:23 hat Stefan Hajnoczi geschrieben: On Thu, Apr 30, 2015 at 01:11:40PM +0300, Alberto Garcia wrote: Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables) { BDRVQcowState *s = bs-opaque; Qcow2Cache *c; -int i; c =

Re: [Qemu-devel] .gitignore contains .c and .h ?

2015-05-04 Thread Thomas Huth
On Mon, 04 May 2015 09:47:11 +0200 Guillaume Le Louët guillaume.lelo...@gmail.com wrote: Hello. The .gitignore in the master branch contains the following lines : /qapi-types.[ch] /qapi-visit.[ch] /qapi-event.[ch] Why is it so ? Are they generated automatically each time I compile the

Re: [Qemu-devel] [PATCH 1/1] vl.c: Since the help says that 'disk_image' is a raw hard disk image, pass format=raw

2015-05-04 Thread Kevin Wolf
Am 01.05.2015 um 01:28 hat Don Slutz geschrieben: On 04/30/15 16:15, Kevin Wolf wrote: Am 30.04.2015 um 21:15 hat Eric Blake geschrieben: [adding qemu-block] On 04/30/2015 12:23 PM, Don Slutz wrote: ~/qemu/out/master/x86_64-softmmu/qemu-system-x86_64 -h | head QEMU emulator version

Re: [Qemu-devel] [PATCH v5 06/20] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-05-04 Thread Shannon Zhao
On 2015/5/4 17:58, Igor Mammedov wrote: On Wed, 15 Apr 2015 21:24:55 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org DSDT consists of the usual common table header plus a definition block in AML encoding which describes all devices in the

Re: [Qemu-devel] Comparison of virtual disks?

2015-05-04 Thread Max Reitz
On 03.05.2015 10:16, Erik Rull wrote: Hi all, is there a comparison chart of the different disk formats supported by QEMU? Especially throughput, latencies and robustness against unexpected power loss on the host would be interesting. Thanks a lot. Best regards, Erik Hi Erik, I'm

Re: [Qemu-devel] [PATCH v5 08/20] hw/arm/virt-acpi-build: Generate MADT table

2015-05-04 Thread Shannon Zhao
On 2015/5/4 18:21, Igor Mammedov wrote: On Wed, 15 Apr 2015 21:24:57 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org MADT describes GIC enabled ARM platforms. The GICC and GICD subtables are used to define the GIC regions. Signed-off-by:

[Qemu-devel] [Bug 1450891] Re: VM will not resume on GlusterFS

2015-05-04 Thread Kevin Wolf
We can't just reopen files, we don't know what state they are in. Any data that has been written to the image between the last flush and the point where gluster made the fd invalid may be there or may be missing. If any data is missing, we can't continue the guest or you'll get data corruption.

Re: [Qemu-devel] .gitignore contains .c and .h ?

2015-05-04 Thread Guillaume Le Louët
You're right, I noticed that compiling with make was removing my modifications. I ended up modifying the qapi-schema.json . May I advise to move the generated .c and .h files into a generated/ folder ? Thank you Thomas. Le 04/05/2015 13:01, Thomas Huth a écrit : On Mon, 04 May 2015

Re: [Qemu-devel] .gitignore contains .c and .h ?

2015-05-04 Thread Peter Maydell
On 4 May 2015 at 12:37, Guillaume Le Louët guillaume.lelo...@gmail.com wrote: You're right, I noticed that compiling with make was removing my modifications. I ended up modifying the qapi-schema.json . May I advise to move the generated .c and .h files into a generated/ folder ? If you want

Re: [Qemu-devel] [Qemu-block] [PATCH v3 3/9] libqos: Add migration helpers

2015-05-04 Thread Kevin Wolf
Am 30.04.2015 um 20:07 hat John Snow geschrieben: libqos.c: -set_context for addressing which commands go where -migrate performs the actual migration malloc.c: - Structure of the allocator is adjusted slightly with a second-tier malloc to make swapping around the

[Qemu-devel] [PATCH] coverity: fix address_space_rw model

2015-05-04 Thread Paolo Bonzini
If the is_write argument is true, address_space_rw writes to memory and thus reads from the buffer. The opposite holds if is_write is false. Fix the model. Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- scripts/coverity-model.c | 6 +++--- 1 file

[Qemu-devel] [PATCH v6 1/6] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2015-05-04 Thread Quan Xu
Signed-off-by: Quan Xu quan...@intel.com --Changes in v6: -Remove stray insertion. --- configure| 14 ++ hmp.c| 2 ++ qapi-schema.json | 16 ++-- qemu-options.hx | 13 +++-- tpm.c| 7 ++- 5 files changed, 47 insertions(+), 5

[Qemu-devel] [PATCH v6 0/6] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part)

2015-05-04 Thread Quan Xu
*INTRODUCTION* The goal of virtual Trusted Platform Module (vTPM) is to provide a TPM functionality to virtual machines (Fedora, Ubuntu, Redhat, Windows .etc). This allows programs to interact with a TPM in a virtual machine the same way they interact with a TPM on the physical system. Each

[Qemu-devel] [PATCH v6 4/6] Qemu-Xen-vTPM: Move tpm_passthrough_is_selftest() into tpm_util.c

2015-05-04 Thread Quan Xu
and rename it to tpm_util_is_selftest(). Signed-off-by: Quan Xu quan...@intel.com --Changes in v6: -Remove the redundant copy right. -Reduce the includes to its minimum. --- hw/tpm/Makefile.objs | 2 +- hw/tpm/tpm_passthrough.c | 13 + hw/tpm/tpm_util.c

[Qemu-devel] [PATCH v6 5/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-05-04 Thread Quan Xu
This Patch provides the glue for the TPM_TIS(Qemu frontend) to Xen stubdom vTPM domain that provides the actual TPM functionality. It sends data and TPM commends with xen_vtpm_frontend. It is similar as another two vTPM backens: *vTPM passthrough backen Since QEMU 1.5. *vTPM libtpms-based

[Qemu-devel] [PATCH v6 2/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-04 Thread Quan Xu
This patch adds infrastructure for xen front drivers living in qemu, so drivers don't need to implement common stuff on their own. It's mostly xenbus management stuff: some functions to access XenStore, setting up XenStore watches, callbacks on device discovery and state changes, and handle event

[Qemu-devel] [PATCH v6 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-04 Thread Quan Xu
This patch adds infrastructure for xen front drivers living in qemu, so drivers don't need to implement common stuff on their own. It's mostly xenbus management stuff: some functions to access XenStore, setting up XenStore watches, callbacks on device discovery and state changes, and handle event

[Qemu-devel] [PATCH v6 6/6] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()

2015-05-04 Thread Quan Xu
make sure QEMU machine class is initialized and QEMU has registered Xen stubdom vTPM driver when call tpm_init() Signed-off-by: Quan Xu quan...@intel.com Reviewed-by: Stefan Berger stef...@linux.vnet.ibm.com --- vl.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff

Re: [Qemu-devel] Comparison of virtual disks?

2015-05-04 Thread Paolo Bonzini
On 04/05/2015 13:14, Max Reitz wrote: I'm sorry, but I don't know whether such a chart exists (the closest thing I know is http://en.wikipedia.org/wiki/Category:Disk_images - which is not very close...). However, the general assumption we as developers are working with is that if the user's

Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/9] ahci: enable migration

2015-05-04 Thread Kevin Wolf
Am 30.04.2015 um 20:07 hat John Snow geschrieben: The day we all feared is here, and I am proposing we allow the migration of the AHCI device tentatively for the 2.4 development window. There are some more NCQ migration tests are needed, but I felt that it was important to get migration

[Qemu-devel] [RFC v2 0/4] VFIO Platform device featuring IRQ forwarding

2015-05-04 Thread Eric Auger
This series adds IRQ forwarding support in the VFIO platform device. The VFIO platform device uses the KVM-VFIO device to enable IRQ forwarding. Dependency List: - QEMU KVM platform device passthrough and its dependencies see https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg04379.html

[Qemu-devel] [RFC v2 3/4] kvm: add kvm_vfio_get_device_irq

2015-05-04 Thread Eric Auger
Since the introduction of the qemu_irq/gsi hash table in kvm, the gsi information is stored in kvm. New functions are introduced to allocate/populate a kvm_vfio_dev_irq struct pointer from a qemu_irq object and free it. Signed-off-by: Eric Auger eric.au...@linaro.org --- include/sysemu/kvm.h |

[Qemu-devel] [RFC v2 4/4] hw/vfio/platform: add forwarded irq support

2015-05-04 Thread Eric Auger
Tests whether the forwarded IRQ modality is available. In the positive device IRQs are forwarded. This control is achieved with KVM-VFIO device. with such a modality injection still is handled through irqfds. However end of interrupt is not trapped anymore. As soon as the guest completes its

[Qemu-devel] [RFC v2 1/4] linux-headers: Update KVM header for KVM-VFIO FORWARD/UNFORWARD

2015-05-04 Thread Eric Auger
Integrate updated KVM-VFIO API related to forwarded IRQ Update the kvm header according to the header found in http://git.linaro.org/people/eric.auger/linux.git branch 4.1-rc1_forward Signed-off-by: Eric Auger eric.au...@linaro.org --- linux-headers/linux/kvm.h | 12 1 file

[Qemu-devel] [RFC v2 2/4] hw/vfio/common: vfio_kvm_device_fd moved in the common header

2015-05-04 Thread Eric Auger
the device is now used in platform for forwarded IRQ setup Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/common.c | 2 +- include/hw/vfio/vfio-common.h | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index

Re: [Qemu-devel] [PATCH v6 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-04 Thread Xu, Quan
I find out the subject is wrong in v5/v6. Just update the subject as below. Subject: [PATCH v6 3/6] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver This drvier transfers any request/repond between TPM xenstubdoms driver and Xen vTPM stubdom, and facilitates communications between Xen

Re: [Qemu-devel] [PATCH v5 06/20] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-05-04 Thread Igor Mammedov
On Mon, 04 May 2015 19:11:39 +0800 Shannon Zhao shannon.z...@linaro.org wrote: On 2015/5/4 17:58, Igor Mammedov wrote: On Wed, 15 Apr 2015 21:24:55 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org DSDT consists of the usual common

Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/index

2015-05-04 Thread Igor Mammedov
On Mon, 04 May 2015 11:59:52 +0200 Paolo Bonzini pbonz...@redhat.com wrote: On 04/05/2015 11:47, Igor Mammedov wrote: On Thu, 30 Apr 2015 16:19:07 -0300 Eduardo Habkost ehabk...@redhat.com wrote: This will provide a predictable path for the CPU objects, and a more powerful

Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/index

2015-05-04 Thread Paolo Bonzini
On 04/05/2015 15:16, Igor Mammedov wrote: Can we use the APIC id then? Perhaps wrapped with a CPUState-level method get_stable_processor_id()? We have CPUClass-get_arch_id() which results in APIC id for target-i386. But I'd rather see an arbitrary DEVICE-id as index/name, that way when

Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/index

2015-05-04 Thread Eduardo Habkost
On Mon, May 04, 2015 at 03:16:16PM +0200, Igor Mammedov wrote: On Mon, 04 May 2015 11:59:52 +0200 Paolo Bonzini pbonz...@redhat.com wrote: On 04/05/2015 11:47, Igor Mammedov wrote: On Thu, 30 Apr 2015 16:19:07 -0300 Eduardo Habkost ehabk...@redhat.com wrote: This will

Re: [Qemu-devel] [PATCH 1/1] vl.c: Since the help says that 'disk_image' is a raw hard disk image, pass format=raw

2015-05-04 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 01.05.2015 um 01:28 hat Don Slutz geschrieben: [...] So do you want a more complex patch that allows the format to be specified? Only for 'disk_image'? Include -hd* ? I'm afraid that there is no nice way to improve the plain 'disk_image' case.

[Qemu-devel] [PATCH 1/2] block: minimal bounce buffer alignment

2015-05-04 Thread Denis V. Lunev
The patch introduces new concept: minimal memory alignment for bounce buffers. Original so called optimal value is actually minimal required value for aligment. It should be used for validation that the IOVec is properly aligned and bounce buffer is not required. Though, from the performance

[Qemu-devel] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-04 Thread Denis V. Lunev
The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); iperforms 5% better if buf is aligned to 4096 bytes rather then to 512 bytes. I have used the following program to test #define _GNU_SOURCE

[Qemu-devel] [PATCH 2/2] block: align bounce buffers to page

2015-05-04 Thread Denis V. Lunev
The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); performs 5% better if buf is aligned to 4096 bytes. The difference is quite reliable. On the other hand we do not want at the moment to enforce

Re: [Qemu-devel] [PATCH] coverity: fix address_space_rw model

2015-05-04 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: If the is_write argument is true, address_space_rw writes to memory and thus reads from the buffer. The opposite holds if is_write is false. Fix the model. Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com

Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/index

2015-05-04 Thread Eduardo Habkost
On Mon, May 04, 2015 at 03:19:32PM +0200, Paolo Bonzini wrote: On 04/05/2015 15:16, Igor Mammedov wrote: Can we use the APIC id then? Perhaps wrapped with a CPUState-level method get_stable_processor_id()? We have CPUClass-get_arch_id() which results in APIC id for target-i386.

Re: [Qemu-devel] [PATCH 1/1] vl.c: Since the help says that 'disk_image' is a raw hard disk image, pass format=raw

2015-05-04 Thread Kevin Wolf
Am 04.05.2015 um 15:39 hat Markus Armbruster geschrieben: Kevin Wolf kw...@redhat.com writes: Am 01.05.2015 um 01:28 hat Don Slutz geschrieben: [...] So do you want a more complex patch that allows the format to be specified? Only for 'disk_image'? Include -hd* ? I'm afraid

Re: [Qemu-devel] [PATCH] ps2 keyboard:fix can't use ps2 keyboard if typing many times After leaving grub and before finishing linux kernel ps2 driver initialization

2015-05-04 Thread Eric Blake
On 05/03/2015 10:32 AM, penghao...@sina.com wrote: Poor subject line. Please try to keep subjects under 65 characters in length (see 'git shortlog -30' for good examples). Maybe: keyboard: handle ps2 typing buffer overrun Starting a linux guest with ps2 keyboard ,if you type many times

Re: [Qemu-devel] [RFC PATCH v3 05/24] spapr: Reorganize CPU dt generation code

2015-05-04 Thread David Gibson
On Mon, Apr 27, 2015 at 11:06:07AM +0530, Bharata B Rao wrote: On Sun, Apr 26, 2015 at 05:17:48PM +0530, Bharata B Rao wrote: On Fri, Apr 24, 2015 at 12:17:27PM +0530, Bharata B Rao wrote: Reorganize CPU device tree generation code so that it be reused from hotplug path. CPU dt entries

Re: [Qemu-devel] [RFC PATCH v3 02/24] spapr: Add DRC dt entries for CPUs

2015-05-04 Thread David Gibson
On Fri, Apr 24, 2015 at 12:17:24PM +0530, Bharata B Rao wrote: Advertise CPU DR-capability to the guest via device tree. Signed-off-by: Bharata B Rao bhar...@linux.vnet.ibm.com Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com [spapr_drc_reset implementation] ---

Re: [Qemu-devel] [RFC PATCH v3 05/24] spapr: Reorganize CPU dt generation code

2015-05-04 Thread David Gibson
On Fri, Apr 24, 2015 at 12:17:27PM +0530, Bharata B Rao wrote: Reorganize CPU device tree generation code so that it be reused from hotplug path. CPU dt entries are now generated from spapr_finalize_fdt() instead of spapr_create_fdt_skel(). Note: This is how the split-up looks like now:

[Qemu-devel] [PATCH v8 04/40] qapi: Fix generation of 'size' builtin type

2015-05-04 Thread Eric Blake
We were missing the 'size' builtin type (which means that QAPI using [ 'size' ] would fail to compile). Signed-off-by: Eric Blake ebl...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- scripts/qapi.py | 1 + tests/qapi-schema/qapi-schema-test.json | 3 ++-

[Qemu-devel] [PATCH v8 03/40] qapi: Simplify builtin type handling

2015-05-04 Thread Eric Blake
There was some redundancy between builtin_types[] and builtin_type_qtypes{}. Merge them into one. Signed-off-by: Eric Blake ebl...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- scripts/qapi-types.py | 10 +- scripts/qapi-visit.py | 6 +++--- scripts/qapi.py | 8

[Qemu-devel] [PATCH v8 15/40] qapi: Document new 'alternate' meta-type

2015-05-04 Thread Eric Blake
The next patch will quit special-casing 'union':'Foo', 'discriminator':{} and instead use 'alternate':'Foo'. Separating docs from implementation makes it easier to focus on wording without holding up code. In particular, making alternate a separate type makes for a nice type hierarchy:

[Qemu-devel] [PATCH v8 11/40] qapi: Tighten checking of unions

2015-05-04 Thread Eric Blake
Previous commits demonstrated that the generator had several flaws with less-than-perfect unions: - a simple union that listed the same branch twice (or two variant names that map to the same C enumerator, including the implicit MAX sentinel) ended up generating invalid C code - an anonymous union

[Qemu-devel] [PATCH v8 05/40] qapi: Require ASCII in schema

2015-05-04 Thread Eric Blake
Python 2 and Python 3 have a wild history of whether strings default to ascii or unicode, where Python 3 requires checking isinstance(foo, basestr) to cover all strings, but where that code is not portable to Python 2. It's simpler to just state that we don't care about Unicode strings, and to

[Qemu-devel] [PATCH v8 07/40] qapi: Better error messages for bad enums

2015-05-04 Thread Eric Blake
The previous commit demonstrated that the generator had several flaws with less-than-perfect enums: - an enum that listed the same string twice (or two variant strings that map to the same C enumerator) ended up generating an invalid C enum - because the generator adds a _MAX terminator to each

[Qemu-devel] [PATCH v8 31/40] qapi: Forbid 'type' in schema

2015-05-04 Thread Eric Blake
Referring to type as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. Finish up the conversion to using struct in qapi schema by removing the hack in the generator that allowed 'type'.

[Qemu-devel] [PATCH v8 10/40] qapi: Forbid base without discriminator in unions

2015-05-04 Thread Eric Blake
None of the existing QMP or QGA interfaces uses a union with a base type but no discriminator; it is easier to avoid this in the generator to save room for other future extensions more likely to be useful. An earlier commit added a union-base-no-discriminator test to ensure that we eventually

[Qemu-devel] [PATCH v8 09/40] qapi: Clean up test coverage of simple unions

2015-05-04 Thread Eric Blake
The tests of UserDefNativeListUnion serve to validate code generation of simple unions without a base type, except that it did not have full coverage in the strict test. The next commits will remove tests and support for simple unions with a base type, so there is no real loss at repurposing that

[Qemu-devel] [PATCH v8 27/40] qapi: More rigorous checking for type safety bypass

2015-05-04 Thread Eric Blake
Now that we have a way to validate every type, we can also be stricter about enforcing that callers that want to bypass type safety in generated code. Prior to this patch, it didn't matter what value was associated with the key 'gen', but it looked odd that 'gen':'yes' could result in bypassing

[Qemu-devel] [PATCH v8 28/40] qapi: Prefer 'struct' over 'type' in generator

2015-05-04 Thread Eric Blake
Referring to type as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. The confusion is only made worse by the fact that the generator mostly already refers to struct even when dealing with

[Qemu-devel] [PATCH v8 21/40] qapi: Allow true, false and null in schema json

2015-05-04 Thread Eric Blake
From: Fam Zheng f...@redhat.com In the near term, we will use it for a sensible-looking 'gen':false inside command declarations, instead of the current ugly 'gen':'no'. In the long term, it will allow conversion from shorthand with defaults mentioned only in side-band documentation:

[Qemu-devel] [PATCH v8 36/40] qapi: Drop support for inline nested types

2015-05-04 Thread Eric Blake
A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument (see previous commit messages for more details why); but existing use of inline nested structs conflicts with that goal. Now that all commands have been changed to avoid

[Qemu-devel] [PATCH v8 14/40] qapi: Rename anonymous union type in test

2015-05-04 Thread Eric Blake
Reduce churn in the future patch that replaces anonymous unions with a new metatype 'alternate' by changing 'AnonUnion' to 'Alternate'. Signed-off-by: Eric Blake ebl...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- tests/qapi-schema/qapi-schema-test.json | 2 +-

[Qemu-devel] [PATCH v8 29/40] qapi: Document 'struct' metatype

2015-05-04 Thread Eric Blake
Referring to type as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. Now that the generator accepts 'struct' as a synonym for 'type', update all documentation to use saner wording.

[Qemu-devel] [PATCH v8 13/40] qapi: Segregate anonymous unions into alternates in generator

2015-05-04 Thread Eric Blake
Special-casing 'discriminator == {}' for handling anonymous unions is getting awkward; since this particular type is not always a dictionary on the wire, it is easier to treat it as a completely different class of type, alternate, so that if a type is listed in the union_types array, we know it is

[Qemu-devel] [PATCH v8 25/40] qapi: Require valid names

2015-05-04 Thread Eric Blake
Previous commits demonstrated that the generator overlooked various bad naming situations: - types, commands, and events need a valid name - enum members must be valid names, when combined with prefix - union and alternate branches cannot be marked optional Valid upstream names match

[Qemu-devel] [PATCH v8 17/40] qapi: Add some expr tests

2015-05-04 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal well with expressions that aren't up to par. Later patches will improve the expected results as the generator is made stricter. Only a few of the the added tests actually behave sanely at rejecting obvious problems or demonstrating success. Note

[Qemu-devel] [PATCH v8 12/40] qapi: Prepare for catching more semantic parse errors

2015-05-04 Thread Eric Blake
This patch widens the scope of a try block (with the attending reindentation required by Python) in preparation for a future patch adding more instances of QAPIExprError inside the block. It's easier to separate indentation from semantic changes, so this patch has no real behavior change.

[Qemu-devel] [PATCH v8 39/40] qapi: Support (subset of) \u escapes in strings

2015-05-04 Thread Eric Blake
The handling of \ inside QAPI strings was less than ideal, and really only worked JSON's \/, \\, \, and our extension of \' (an obvious extension, when you realize we use '' instead of for strings). For other things, like '\n', it resulted in a literal 'n' instead of a newline. Of course, at

[Qemu-devel] [PATCH v8 19/40] qapi: Add tests of redefined expressions

2015-05-04 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal very well with redefined expressions. At the parse level, they are silently accepted; and while the testsuite just stops at parsing, I've further tested that many of them cause generator crashes or invalid C code if they were appended to

[Qemu-devel] [PATCH v8 26/40] qapi: Whitelist commands that don't return dictionary

2015-05-04 Thread Eric Blake
...or an array of dictionaries. Although we have to cater to existing commands, returning a non-dictionary means the command is not extensible (no new name/value pairs can be added if more information must be returned in parallel). By making the whitelist explicit, any new command that falls

[Qemu-devel] [PATCH v8 16/40] qapi: Use 'alternate' to replace anonymous union

2015-05-04 Thread Eric Blake
Previous patches have led up to the point where I create the new meta-type 'alternate':'Foo'. See the previous patches for documentation; I intentionally split as much work into earlier patches to minimize the size of this patch, but a lot of it is churn due to testsuite fallout after updating to

Re: [Qemu-devel] [RFC PATCH v3 08/24] ppc: Prepare CPU socket/core abstraction

2015-05-04 Thread Thomas Huth
On Fri, 24 Apr 2015 12:17:30 +0530 Bharata B Rao bhar...@linux.vnet.ibm.com wrote: Signed-off-by: Bharata B Rao bhar...@linux.vnet.ibm.com Signed-off-by: Andreas Färber afaer...@suse.de Not sure if QEMU is fully following the kernel Sob-process, but if that's the case, I think your Sob should

[Qemu-devel] [PATCH v8 18/40] qapi: Better error messages for bad expressions

2015-05-04 Thread Eric Blake
The previous commit demonstrated that the generator overlooked some fairly basic broken expressions: - missing metataype - metatype key has a non-string value - unknown key in relation to the metatype - conflicting metatype (this patch treats the second metatype as an unknown key of the first key

[Qemu-devel] [PATCH v8 32/40] qapi: Merge UserDefTwo and UserDefNested in tests

2015-05-04 Thread Eric Blake
In the testsuite, UserDefTwo and UserDefNested were identical structs other than the member names. Reduce code duplication by having just one type, and choose names that also favor reuse. This will also make it easier for a later patch to get rid of inline nested types in QAPI. When touching

[Qemu-devel] [PATCH v8 20/40] qapi: Better error messages for duplicated expressions

2015-05-04 Thread Eric Blake
The previous commit demonstrated that the generator overlooked duplicate expressions: - a complex type or command reusing a built-in type name - redeclaration of a type name, whether by the same or different metatype - redeclaration of a command or event - collision of a type with implicit 'Kind'

[Qemu-devel] [PATCH v8 22/40] qapi: Unify type bypass and add tests

2015-05-04 Thread Eric Blake
For a few QMP commands, we are forced to pass an arbitrary type without tracking it properly in QAPI. Among the existing clients, this unnamed type was spelled 'dict', 'visitor', and '**'; this patch standardizes on '**', matching the documentation changes earlier in the series. Meanwhile, for

[Qemu-devel] [PATCH v8 30/40] qapi: Use 'struct' instead of 'type' in schema

2015-05-04 Thread Eric Blake
Referring to type as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. Do the bulk of the conversion to struct in qapi schema, with a fairly mechanical: for f in `find -name '*.json'; do sed -i

[Qemu-devel] [PATCH v8 35/40] qapi: Drop inline nested structs in query-pci

2015-05-04 Thread Eric Blake
A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument (see previous commit message for more details why); but existing use of inline nested structs conflicts with that goal. This patch fixes one of only two commands relying

[Qemu-devel] [PATCH v8 34/40] qapi: Drop inline nested struct in query-version

2015-05-04 Thread Eric Blake
A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument (see previous commit message for more details why); but existing use of inline nested structs conflicts with that goal. This patch fixes one of only two commands relying

[Qemu-devel] [PATCH v8 01/40] qapi: Add copyright declaration on docs

2015-05-04 Thread Eric Blake
While our top-level COPYING with its GPLv2+ license applies to any documentation file that omits explicit instructions, these days it's better to be a good example of calling out our intentions. Correct use of GPL requires the use of a copyright statement, so I'm adding notice to two QAPI

[Qemu-devel] [PATCH v8 40/40] qapi: Check for member name conflicts with a base class

2015-05-04 Thread Eric Blake
Our type inheritance for both 'struct' and for flat 'union' merges key/value pairs from the base class with those from the type in question. Although the C code currently boxes things so that there is a distinction between which member is referred to, the QMP wire format does not allow passing a

[Qemu-devel] [PATCH v8 24/40] qapi: More rigourous checking of types

2015-05-04 Thread Eric Blake
Now that we know every expression is valid with regards to its keys, we can add further tests that those keys refer to valid types. With this patch, all uses of a type (the 'data': of command, type, union, alternate, and event; the 'returns': of command; the 'base': of type and union) must

  1   2   3   >