[Qemu-devel] [PATCH v7 29/39] qapi: Document 'struct' metatype

2015-04-29 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. Signed-off-

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

2015-04-29 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 t

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

2015-04-29 Thread Eric Blake
From: Fam Zheng 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: 'data':{'*flag':'bool', '*s

[Qemu-devel] [PATCH v7 17/39] qapi: Add some expr tests

2015-04-29 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 th

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

2015-04-29 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 v

[Qemu-devel] [PATCH v7 33/39] qapi: Drop tests for inline nested structs

2015-04-29 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; but existing use of inline nested structs conflicts with that goal. More precisely, a definition in the QAPI schema associates a name with a set of properties: Example

[Qemu-devel] [PATCH v7 23/39] qapi: Add some type check tests

2015-04-29 Thread Eric Blake
Demonstrate that the qapi generator silently parses confusing types, which may cause other errors later on. Later patches will update the expected results as the generator is made stricter. Most of the new tests focus on blatant errors. But returns-whitelist is a case where we have historically a

[Qemu-devel] [PATCH v7 31/39] qapi: Forbid 'type' in schema

2015-04-29 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'. Signed

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

2015-04-29 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 i

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

2015-04-29 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 [a-zA-Z][a-zA

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

2015-04-29 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' e

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

2015-04-29 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 o

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

2015-04-29 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 o

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

2015-04-29 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 -

[Qemu-devel] [PATCH v7 37/39] qapi: Tweak doc references to QMP when QGA is also meant

2015-04-29 Thread Eric Blake
We have more than one qapi schema in use by more than one protocol. Add a new term 'Client JSON Protocol' for use throughout the document, to avoid confusion on whether something refers only to QMP and not QGA. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster --- v7: rebase to earlier

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

2015-04-29 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 v7 28/39] qapi: Prefer 'struct' over 'type' in generator

2015-04-29 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 expr[

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

2015-04-29 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 k

[Qemu-devel] [PATCH v7 24/39] qapi: More rigourous checking of types

2015-04-29 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 resolve

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

2015-04-29 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 Reviewed-by: Markus Armbruster --- scripts/qapi.py | 1 + tests/qapi-schema/qapi-schema-test.json | 3 ++- tests/qapi-schema/qapi-schema-test

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

2015-04-29 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 code

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

2015-04-29 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 v7 05/39] qapi: Require ASCII in schema

2015-04-29 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 jus

[Qemu-devel] [PATCH v7 08/39] qapi: Add some union tests

2015-04-29 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal well with unions that aren't up to par. Later patches will update the expected reseults as the generator is made stricter. A few tests work as planned, but most show poor or missing error messages. Of particular note, qapi-code-gen.txt documents 'b

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

2015-04-29 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 enu

[Qemu-devel] [PATCH v7 01/39] qapi: Add copyright declaration on docs

2015-04-29 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 document

[Qemu-devel] PCI on ARM virt machine - status ?

2015-04-29 Thread Pavel Fedin
Hello! I would like to ask, what is the status of http://www.spinics.net/lists/kvm-arm/msg14466.html and http://www.spinics.net/lists/kvm-arm/msg14284.html ? I do not see this committed, but i would like to say that i have tested this, and together with kernel and libvirt patches developed by me

[Qemu-devel] [PATCH] usb: fix usb-net segfault

2015-04-29 Thread Michal Kazior
The dev->config pointer isn't set until guest system initializes usb devices (via usb_desc_set_config). However qemu networking can go through some motions prior to that, e.g.: #0 is_rndis (s=0x57261970) at hw/usb/dev-network.c:653 #1 0x5585f723 in usbnet_can_receive (nc=0x5641

[Qemu-devel] [PATCH v7 00/39] drop qapi nested structs

2015-04-29 Thread Eric Blake
We want to eventually allow qapi defaults, by making: 'data':{'*flag':'bool'} as shorthand for something like: 'data':{'flag':{'type':'bool', 'optional':true}} so that the default can be specified: 'data':{'flag':{'type':'bool', 'optional':true, 'default':true}} This series does not quite get u

Re: [Qemu-devel] [PATCH v2 06/10] linux-headers: update

2015-04-29 Thread Eric Auger
On 04/27/2015 10:55 AM, Cornelia Huck wrote: > This updates linux-headers against master 4.1-rc1 (commit > b787f68c36d49bb1d9236f403813641efa74a031). > > Signed-off-by: Cornelia Huck > --- > include/standard-headers/linux/virtio_balloon.h | 28 +++- > include/standard-headers/linux/virtio_blk.h

[Qemu-devel] [PATCH 1/3] hw/acpi: acpi_pm1_cnt_init(): take "disable_s3" and "disable_s4"

2015-04-29 Thread Laszlo Ersek
This patch only modifies the function prototype and updates all chipset code that calls acpi_pm1_cnt_init() to pass in their own disable_s3 and disable_s4 settings. vt82c686 is assumed to be fixed "S3 and S4 enabled". RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696 Cc: Amit Shah Cc: "Mi

Re: [Qemu-devel] [PATCH 0/3] provide "etc/system-states" on Q35 too

2015-04-29 Thread Paolo Bonzini
On 29/04/2015 15:20, Laszlo Ersek wrote: > S3 support in OVMF says hi. > > RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696 > Cc: Amit Shah > Cc: "Michael S. Tsirkin" > Cc: Paolo Bonzini > Cc: Richard Henderson > Cc: Eduardo Habkost > Cc: Aurelien Jarno > Cc: Leon Alrae > > Than

[Qemu-devel] [PATCH 2/3] hw/acpi: move "etc/system-states" fw_cfg file from PIIX4 to core

2015-04-29 Thread Laszlo Ersek
The acpi_pm1_cnt_init() core function is responsible for setting up the register block that will ultimately react to S3 and S4 requests (see acpi_pm1_cnt_write()). It makes sense to advertise this configuration to the guest firmware via an easy to parse fw_cfg file (ACPI is too complex for firmware

[Qemu-devel] [PATCH 0/3] provide "etc/system-states" on Q35 too

2015-04-29 Thread Laszlo Ersek
S3 support in OVMF says hi. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696 Cc: Amit Shah Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Aurelien Jarno Cc: Leon Alrae Thanks Laszlo Laszlo Ersek (3): hw/acpi: acpi_pm1_cnt_init(): take "

Re: [Qemu-devel] [PATCH v5 19/20] hw/arm/virt-acpi-build: Add PCIe controller in ACPI DSDT table

2015-04-29 Thread Shannon Zhao
On 2015/4/29 16:47, Igor Mammedov wrote: On Wed, 29 Apr 2015 11:12:04 +0800 Shannon Zhao wrote: On 2015/4/28 23:54, Michael S. Tsirkin wrote: On Tue, Apr 28, 2015 at 05:13:10PM +0200, Igor Mammedov wrote: Here I need to set the value of buffer to 1 or 0, we could createbitfield, but if we

Re: [Qemu-devel] [Consult] About SPRs information

2015-04-29 Thread Chen Gang
On 4/29/15 05:43, Peter Maydell wrote: > On 28 April 2015 at 22:32, Chen Gang wrote: >> The related information for cmpexch instruction: >> >> Description >> >> Compare the 8-byte contents of the CmpValue SPR with the 8-byte >> value in memory at the address held in the first source regi

Re: [Qemu-devel] [PATCH 3/3] hw/acpi: piix4_pm_init(): take fw_cfg object no more

2015-04-29 Thread Laszlo Ersek
On 04/29/15 15:20, Laszlo Ersek wrote: > This PIIX4 init function has no more reason to receive a pointer to the > FwCfg object. Remove the parameter from the prototype, and update callers. > > As a result, the pc_init1() function no longer needs to save the return > value of pc_memory_init() and

[Qemu-devel] [PATCH 3/3] hw/acpi: piix4_pm_init(): take fw_cfg object no more

2015-04-29 Thread Laszlo Ersek
This PIIX4 init function has no more reason to receive a pointer to the FwCfg object. Remove the parameter from the prototype, and update callers. As a result, the pc_init1() function no longer needs to save the return value of pc_memory_init() and xen_load_linux(), which makes it more similar to

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

2015-04-29 Thread Shannon Zhao
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 wrote: On 2015/4/28 16:15, Igor Mammedov wrote: btw: whole thing might be simpler if an intermediate conversion is avoided, just pack buffer as in spec byte by

Re: [Qemu-devel] [PATCH v5 19/20] hw/arm/virt-acpi-build: Add PCIe controller in ACPI DSDT table

2015-04-29 Thread Igor Mammedov
On Wed, 29 Apr 2015 21:37:11 +0800 Shannon Zhao wrote: > > > On 2015/4/29 16:47, Igor Mammedov wrote: > > On Wed, 29 Apr 2015 11:12:04 +0800 > > Shannon Zhao wrote: > > > >> On 2015/4/28 23:54, Michael S. Tsirkin wrote: > >>> On Tue, Apr 28, 2015 at 05:13:10PM +0200, Igor Mammedov wrote: > >>>

[Qemu-devel] [PATCH 1/5] MAINTAINERS: make virtio-blk Stefan Hajnoczi's responsibility

2015-04-29 Thread Stefan Hajnoczi
Cc: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index b5ab755..0c14de1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -704,10 +704,13 @@ F: tests/virtio-9p-test.c T: git git://github.c

[Qemu-devel] [PATCH 0/5] MAINTAINERS: split block layer

2015-04-29 Thread Stefan Hajnoczi
Kevin and I have been maintaining the block layer together. We take weekly turns reviewing/merging patches. The volume of traffic is so high that we struggle to give timely code reviews. This series adjusts MAINTAINERS to reflect how we are splitting up the block layer. Once this series is merg

[Qemu-devel] [PATCH 2/5] MAINTAINERS: split out image formats

2015-04-29 Thread Stefan Hajnoczi
Block driver submaintainers has proven to be a good model. Kevin and Stefan are splitting up the unclaimed block drivers so each has a dedicated maintainer. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 77 + 1 file changed, 77 inse

[Qemu-devel] [PATCH 5/5] MAINTAINERS: make block layer core Kevin Wolf's responsibility

2015-04-29 Thread Stefan Hajnoczi
Kevin is now sole maintainer of the core block layer, including BlockDriverState graphs and monitor commands. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 65a5cc5..25fd2b5 100644 --- a/MAINTA

[Qemu-devel] [PATCH 3/5] MAINTAINERS: make block I/O path Stefan Hajnoczi's responsibility

2015-04-29 Thread Stefan Hajnoczi
The block I/O path includes the asynchronous I/O machinery and read/write/flush/discard processing. It somewhat arbitrarily also includes block migration, which I've found myself reviewing patches for over the years. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 13 ++--- 1 file chan

[Qemu-devel] [PATCH 4/5] MAINTAINERS: make image fuzzer Stefan Hajnoczi's responsibility

2015-04-29 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9e1413e..65a5cc5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -779,7 +779,6 @@ F: block/ F: hw/block/ F: qemu-img* F: qemu-io* -F: tests/ima

Re: [Qemu-devel] [PATCH 4/7] target-mips: add MTHC0 and MFHC0 instructions

2015-04-29 Thread Leon Alrae
On 28/04/2015 16:52, James Hogan wrote: >> diff --git a/disas/mips.c b/disas/mips.c >> index 1afe0c5..c236495 100644 >> --- a/disas/mips.c >> +++ b/disas/mips.c >> @@ -2238,6 +2238,8 @@ const struct mips_opcode mips_builtin_opcodes[] = >> {"ceil.l.s", "D,S", 0x460a, 0x003f, WR_D|RD_S|FP_S|

Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends

2015-04-29 Thread Cornelia Huck
On Wed, 29 Apr 2015 12:32:04 +0200 "Michael S. Tsirkin" wrote: > On Wed, Apr 29, 2015 at 10:52:15AM +0200, Cornelia Huck wrote: > > And (surprise, surprise) virtio-blk now works - but it also works when > > I back out the atomic.h change again. No barrier problems :) > > > > Good news is that w

Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends

2015-04-29 Thread Christian Borntraeger
Am 29.04.2015 um 12:32 schrieb Michael S. Tsirkin: > On Wed, Apr 29, 2015 at 10:52:15AM +0200, Cornelia Huck wrote: >> On Wed, 29 Apr 2015 10:17:55 +0200 >> Christian Borntraeger wrote: >> >>> Am 28.04.2015 um 20:32 schrieb Michael S. Tsirkin: On Tue, Apr 28, 2015 at 08:14:44PM +0200, Michael

Re: [Qemu-devel] [PATCH v2 06/10] linux-headers: update

2015-04-29 Thread Cornelia Huck
On Wed, 29 Apr 2015 15:07:11 +0200 Eric Auger wrote: > On 04/27/2015 10:55 AM, Cornelia Huck wrote: > > This updates linux-headers against master 4.1-rc1 (commit > > b787f68c36d49bb1d9236f403813641efa74a031). > > > > Signed-off-by: Cornelia Huck > > --- > > include/standard-headers/linux/virti

[Qemu-devel] [PATCH v14 00/10] KVM platform device passthrough

2015-04-29 Thread Eric Auger
This series aims at enabling KVM platform device passthrough. On kernel side, the vfio platform driver is needed, available from 4.1-rc1 onwards. This series now only relies on the following QEMU series, for dynamic instantiation of the VFIO platform device from qemu command line: [1] [PATCH v12

[Qemu-devel] [PATCH v14 01/10] linux-headers: update headers according to 4.1-rc1

2015-04-29 Thread Eric Auger
This updates linux-headers against master 4.1-rc1 (commit b787f68c36d49bb1d9236f403813641efa74a031). This includes, among other things, VFIO platform driver and irqfd/arm. Signed-off-by: Eric Auger --- v13 -> v14: - update to precise 4.1-rc1, precise the commit and change the title v12 -> v13:

[Qemu-devel] [PATCH v14 02/10] hw/vfio/platform: vfio-platform skeleton

2015-04-29 Thread Eric Auger
Minimal VFIO platform implementation supporting register space user mapping but not IRQ assignment. Signed-off-by: Kim Phillips Signed-off-by: Eric Auger --- v13 -> v14: - fix ENAMETOOLONG error path sign v12 -> v13: - check device name does not contain any / - handle case where readlink fully

[Qemu-devel] [PATCH v14 08/10] intc: arm_gic_kvm: set the qemu_irq/gsi mapping

2015-04-29 Thread Eric Auger
The arm_gic_kvm now calls kvm_irqchip_set_qemuirq_gsi to build the hash table storing qemu_irq/gsi mappings. From that point on irqfd can be setup directly from the qemu_irq using kvm_irqchip_add_irqfd_notifier. Signed-off-by: Eric Auger --- v2 -> v3: - kvm_irqchip_add_qemuirq_irqfd_notifier re

[Qemu-devel] [PATCH v14 07/10] kvm-all.c: add qemu_irq/gsi hash table and utility routines

2015-04-29 Thread Eric Auger
VFIO platform device needs to setup irqfd but it does not know the gsi corresponding to the device qemu_irq. This series proposes to store a hash table in kvm_state using the qemu_irq as key and the gsi as a value. kvm_irqchip_set_qemuirq_gsi allows to insert such a pair. The interrupt controller

[Qemu-devel] [PATCH v14 05/10] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-04-29 Thread Eric Auger
This patch allows the instantiation of the vfio-calxeda-xgmac device from the QEMU command line (-device vfio-calxeda-xgmac,host=""). A specialized device tree node is created for the guest, containing compat, dma-coherent, reg and interrupts properties. Signed-off-by: Eric Auger --- v12 -> v13

[Qemu-devel] [PATCH v14 09/10] sysbus: add irq_routing_notifier

2015-04-29 Thread Eric Auger
Add a new connect_irq_notifier notifier in the SysBusDeviceClass. This notifier, if populated, is called after sysbus_connect_irq. This mechanism is used to setup VFIO signaling once VFIO platform devices get attached to their platform bus, on a machine init done notifier. Signed-off-by: Eric Aug

[Qemu-devel] [PATCH v14 04/10] hw/vfio/platform: calxeda xgmac device

2015-04-29 Thread Eric Auger
The platform device class has become abstract. This patch introduces a calxeda xgmac device that derives from it. Signed-off-by: Eric Auger Reviewed-by: Alex Bennee --- v10 -> v11: - add Alex Reviewed-by - move virt modifications in a separate patch v8 -> v9: - renamed calxeda_xgmac.c into calx

[Qemu-devel] [PATCH v14 06/10] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix

2015-04-29 Thread Eric Auger
Anticipating for the introduction of new add/remove functions taking a qemu_irq parameter, let's rename existing ones with a gsi suffix. Signed-off-by: Eric Auger --- hw/s390x/virtio-ccw.c | 8 hw/vfio/pci.c | 6 +++--- hw/virtio/virtio-pci.c | 4 ++-- include/sysemu/kvm.h |

[Qemu-devel] [PATCH v14 10/10] hw/vfio/platform: add irqfd support

2015-04-29 Thread Eric Auger
This patch aims at optimizing IRQ handling using irqfd framework. Instead of handling the eventfds on user-side they are handled on kernel side using - the KVM irqfd framework, - the VFIO driver virqfd framework. the virtual IRQ completion is trapped at interrupt controller This removes the need

Re: [Qemu-devel] [PATCH 0/8] net/dp8393x improvements

2015-04-29 Thread Leon Alrae
Hi Hervé, On 25/03/2015 14:13, Leon Alrae wrote: > On 05/03/2015 22:13, Hervé Poussineau wrote: >> Hi, >> >> This patchset improves dp8393x network card emulation to current QEMU >> standards, >> mostly decouples it from MIPS rc4030 chipset emulation, and add PROM and >> load/save >> functionali

Re: [Qemu-devel] [PATCH 2/6] watchdog: Add watchdog device diag288 to the sysbus

2015-04-29 Thread Cornelia Huck
On Wed, 29 Apr 2015 14:43:56 +0200 Markus Armbruster wrote: > Cornelia Huck writes: > > > From: Xu Wang > > > > A new sysbus device for diag288 watchdog, it monitors the kvm guest > > status, and take corresponding actions when it detects that the guest > > is not responding. > > > > Signed-of

[Qemu-devel] [PATCH v14 03/10] hw/vfio/platform: add irq assignment

2015-04-29 Thread Eric Auger
This patch adds the code requested to assign interrupts to a guest. The interrupts are mediated through user handled eventfds only. Signed-off-by: Eric Auger --- v13 -> v14: - remove virtualID field in header v12 -> v13: - start user-side eventfd handling at realize time - remove start_irq_fn

Re: [Qemu-devel] [PATCH v3 0/4] scripts: qmp-shell: add transaction support

2015-04-29 Thread Kashyap Chamarthy
On Tue, Apr 28, 2015 at 06:17:32PM +0200, Kashyap Chamarthy wrote: [. . .] > > Seems like a regression from your v2. > > > > It fails here, even for a non-transaction command, with your patch series > > applied: > > > > (QEMU) blockdev-snapshot-internal-sync device=drive-ide0-0-0 > > name=sn

[Qemu-devel] [PATCH V4 0/4] fw-cfg: cleanup and user-provided command line blobs

2015-04-29 Thread Gabriel L. Somlo
These patches are what's left over from before the pre-2.3 code freeze, after the documentation patch was applied independently: 1/4: (clean-up) disallow guest-side data writes to fw_cfg 2/4 & 3/4: (clean-up) prevent selector and file name conflicts on insert 4/4(feature)

[Qemu-devel] [PATCH V4 4/4] fw_cfg: insert fw_cfg file blobs via qemu cmdline

2015-04-29 Thread Gabriel L. Somlo
Allow user supplied files to be inserted into the fw_cfg device before starting the guest. Since fw_cfg_add_file() already disallows duplicate fw_cfg file names, qemu will exit with an error message if the user supplies multiple blobs with the same fw_cfg file name, or if a blob name collides with

[Qemu-devel] [PATCH V4 2/4] fw_cfg: prevent selector key conflict

2015-04-29 Thread Gabriel L. Somlo
Enforce a single assignment of data for each distinct selector key. Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek --- hw/nvram/fw_cfg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index ed70798..227beaf 100644 --- a/hw/nvram/fw_cfg.c +++ b/

[Qemu-devel] [PATCH V4 1/4] fw_cfg: remove support for guest-side data writes

2015-04-29 Thread Gabriel L. Somlo
>From this point forward, any guest-side writes to the fw_cfg data register will be treated as no-ops. This patch also removes the unused host-side API function fw_cfg_add_callback(), which allowed the registration of a callback to be executed each time the guest completed a full overwrite of a giv

[Qemu-devel] [PATCH V4 3/4] fw_cfg: prohibit insertion of duplicate fw_cfg file names

2015-04-29 Thread Gabriel L. Somlo
Exit with an error (instead of simply logging a trace event) whenever the same fw_cfg file name is added multiple times via one of the fw_cfg_add_file[_callback]() host-side API calls. Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek --- hw/nvram/fw_cfg.c | 11 ++- trace-events

[Qemu-devel] [PATCH 1/7] virtio-net: move qdev properties into virtio-net.c

2015-04-29 Thread Shannon Zhao
As only one place in virtio-net.c uses DEFINE_VIRTIO_NET_FEATURES, there is no need to expose it. Inline it into virtio-net.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/net/virtio-net.c| 42 +- include

[Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices

2015-04-29 Thread Shannon Zhao
The private qdev properties of virtio devices are only used by themselves. As Peter suggested and like what virtio-blk has done, we should move the private qdev properties into devices and don't expose them to avoid wrongly use. This patchset is based on following patchset which moves host feature

[Qemu-devel] [PATCH 5/7] virtio-serial-bus: move qdev properties into virtio-serial-bus.c

2015-04-29 Thread Shannon Zhao
As only one place in virtio-serial-bus.c uses DEFINE_VIRTIO_SERIAL_PROPERTIES, there is no need to expose it. Inline it into virtio-serial-bus.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/char/virtio-serial-bus.c | 3 ++- include/hw/virtio/virtio-

[Qemu-devel] [PATCH 2/7] virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES

2015-04-29 Thread Shannon Zhao
Remove unsed DEFINE_VIRTIO_NET_PROPERTIES in virtio-net.h and delete a space typo. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- include/hw/virtio/virtio-net.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/hw/virtio/virtio-net.h b/include/hw/vir

Re: [Qemu-devel] [PATCH v14 01/10] linux-headers: update headers according to 4.1-rc1

2015-04-29 Thread Cornelia Huck
On Wed, 29 Apr 2015 15:51:58 +0100 Eric Auger wrote: > This updates linux-headers against master 4.1-rc1 (commit > b787f68c36d49bb1d9236f403813641efa74a031). > > This includes, among other things, VFIO platform driver and > irqfd/arm. > > Signed-off-by: Eric Auger > > --- > v13 -> v14: > - up

[Qemu-devel] [PATCH 3/7] virtio-scsi: move qdev properties into virtio-scsi.c

2015-04-29 Thread Shannon Zhao
As only one place in virtio-scsi.c uses DEFINE_VIRTIO_SCSI_PROPERTIES and DEFINE_VIRTIO_SCSI_FEATURES, there is no need to expose them. Inline them into virtio-scsi.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/scsi/virtio-scsi.c | 13 +

[Qemu-devel] [PATCH 4/7] virtio-rng: move qdev properties into virtio-rng.c

2015-04-29 Thread Shannon Zhao
As only one place in virtio-rng.c uses DEFINE_VIRTIO_RNG_PROPERTIES, there is no need to expose it. Inline it into virtio-rng.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/virtio/virtio-rng.c | 8 +++- include/hw/virtio/virtio-rng.h | 10 ---

[Qemu-devel] [PATCH 6/7] virtio-9p-device: move qdev properties into virtio-9p-device.c

2015-04-29 Thread Shannon Zhao
As only one place in virtio-9p-device.c uses DEFINE_VIRTIO_9P_PROPERTIES, there is no need to expose it. Inline it into virtio-9p-device.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/9pfs/virtio-9p-device.c | 3 ++- hw/9pfs/virtio-9p.h| 4 2

[Qemu-devel] [PATCH 7/7] vhost-scsi: move qdev properties into vhost-scsi.c

2015-04-29 Thread Shannon Zhao
As only one place in vhost-scsi.c uses DEFINE_VHOST_SCSI_PROPERTIES, there is no need to expose it. Inline it into vhost-scsi.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/scsi/vhost-scsi.c | 9 - include/hw/virtio/vhost-scsi.h | 9

Re: [Qemu-devel] [PATCH v2 3/4] qapi: Correctly handle downstream extensions in more locations

2015-04-29 Thread Eric Blake
On 04/29/2015 05:29 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Now that c_var() handles '.' in downstream extension names, fix >> the generator to support such names as additional types, enums, >> members within an enum, branches of a union or alternate, and >> in arrays. >> >> -

Re: [Qemu-devel] [PATCH 2/7] target-mips: support Page Frame Number Extension field

2015-04-29 Thread Leon Alrae
> I think I wasn't expecting that because 32-bit kernels can run on MIPS64 > hardware using the same mfc0/mfhc0 instructions, so having a single > internal representation in QEMU seemed simpler & less fragile, since the > same source code needs to support both MIPS32 and MIPS64 anyway. In my opini

Re: [Qemu-devel] [PATCH v14 01/10] linux-headers: update headers according to 4.1-rc1

2015-04-29 Thread Eric Auger
On 04/29/2015 05:19 PM, Cornelia Huck wrote: > On Wed, 29 Apr 2015 15:51:58 +0100 > Eric Auger wrote: > >> This updates linux-headers against master 4.1-rc1 (commit >> b787f68c36d49bb1d9236f403813641efa74a031). >> >> This includes, among other things, VFIO platform driver and >> irqfd/arm. >> >>

Re: [Qemu-devel] [PATCH v2 4/4] qapi: Test name mangling of downstream extensions

2015-04-29 Thread Eric Blake
On 04/29/2015 05:32 AM, Markus Armbruster wrote: > Eric Blake writes: > >> So that we don't regress in supporting downstream extensions, make >> sure that our testsuite covers downstream naming choices in as many >> places as possible. >> >> +{ 'command': '__org.qemu_x-command', >> + 'data': {

Re: [Qemu-devel] [PATCH 0/3] provide "etc/system-states" on Q35 too

2015-04-29 Thread Amit Shah
On (Wed) 29 Apr 2015 [15:20:13], Laszlo Ersek wrote: > S3 support in OVMF says hi. Nice. Reviewed-by: Amit Shah Amit

[Qemu-devel] [PATCH 3/3] qemu-sockets: Report explicit error if unlink fails

2015-04-29 Thread Cole Robinson
It's possible via libvirt for a user to request an explicit socket path that qemu lacks permissions to unlink, but the error that's reported is from bind(2), 'Address already in use' bind(2) will fail if the unix socket path already exists, so we need to unlink first. But we should report the unli

[Qemu-devel] [PATCH 2/3] vnc: Tweak error when init fails

2015-04-29 Thread Cole Robinson
Before: qemu-system-x86_64: -display vnc=unix:/root/foo.sock: Failed to start VNC server on `(null)': Failed to bind socket to /root/foo.sock: Permission denied After: qemu-system-x86_64: -display vnc=unix:/root/foo.sock: Failed to start VNC server: Failed to bind socket to /root/foo.sock: Permi

[Qemu-devel] [PATCH 0/3] vnc: Fixes for unix socket error handling

2015-04-29 Thread Cole Robinson
Minor fixes for unix socket error handling, see patches for details Cole Robinson (3): vnc: Don't assert if opening unix socket fails vnc: Tweak error when init fails qemu-sockets: Report explicit error if unlink fails ui/vnc.c| 5 +++-- util/qemu-sockets.c | 6 +- 2 files

[Qemu-devel] [PATCH 1/3] vnc: Don't assert if opening unix socket fails

2015-04-29 Thread Cole Robinson
Reproducer: $ qemu-system-x86_64 -display vnc=unix:/root/i-cant-access-you.sock qemu-system-x86_64: iohandler.c:60: qemu_set_fd_handler2: Assertion `fd >= 0' failed. Aborted (core dumped) Signed-off-by: Cole Robinson --- ui/vnc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/vnc.c b

Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices

2015-04-29 Thread Paolo Bonzini
On 29/04/2015 17:24, Shannon Zhao wrote: > The private qdev properties of virtio devices are only used by > themselves. As Peter suggested and like what virtio-blk has done, we > should move the private qdev properties into devices and don't expose > them to avoid wrongly use. > > This patchset

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

2015-04-29 Thread Stefan Berger
On 04/29/2015 05:06 AM, Igor Mammedov wrote: On Wed, 22 Apr 2015 14:18:55 -0400 Stefan Berger wrote: On 04/22/2015 03:00 AM, Igor Mammedov wrote: On Thu, 16 Apr 2015 10:05:35 -0400 Stefan Berger wrote: On 04/16/2015 09:35 AM, Igor Mammedov wrote: On Wed, 15 Apr 2015 18:38:43 -0400 [...]

Re: [Qemu-devel] [PATCH 0/3] vnc: Fixes for unix socket error handling

2015-04-29 Thread Eric Blake
On 04/29/2015 10:37 AM, Cole Robinson wrote: > Minor fixes for unix socket error handling, see patches for details > > Cole Robinson (3): > vnc: Don't assert if opening unix socket fails > vnc: Tweak error when init fails > qemu-sockets: Report explicit error if unlink fails Reviewed-by: Er

[Qemu-devel] [PATCH v2] qemu-sockets: Report explicit error if unlink fails

2015-04-29 Thread Cole Robinson
Consider this case: $ ls -ld ~/root-owned/ drwx--x--x. 2 root root 4096 Apr 29 12:55 /home/crobinso/root-owned/ $ ls -l ~/root-owned/foo.sock -rwxrwxrwx. 1 crobinso crobinso 0 Apr 29 12:55 /home/crobinso/root-owned/foo.sock $ qemu-system-x86_64 -vnc unix:~/root-owned/foo.sock qemu-system-x86_64:

Re: [Qemu-devel] [PATCH v2] qemu-sockets: Report explicit error if unlink fails

2015-04-29 Thread Eric Blake
On 04/29/2015 11:03 AM, Cole Robinson wrote: > Consider this case: > > $ ls -ld ~/root-owned/ > drwx--x--x. 2 root root 4096 Apr 29 12:55 /home/crobinso/root-owned/ > $ ls -l ~/root-owned/foo.sock > -rwxrwxrwx. 1 crobinso crobinso 0 Apr 29 12:55 > /home/crobinso/root-owned/foo.sock > > $ qemu-sy

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

2015-04-29 Thread Peter Crosthwaite
On Wed, Mar 4, 2015 at 7:05 PM, wrote: > 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: Mich

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

2015-04-29 Thread Michael Tokarev
05.03.2015 06:05, arei.gong...@huawei.com wrote: > 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. Ac

Re: [Qemu-devel] [PATCH v6 00/47] Postcopy implementation

2015-04-29 Thread Dr. David Alan Gilbert
* Li, Liang Z (liang.z...@intel.com) wrote: > Hi David, > > I have tired your v6 postcopy patches and found it doesn't work. When I tried > to start the > postcopy in live migration, some errors were printed. I just did the > following things: > > On destination side, started the qemu like thi

Re: [Qemu-devel] [PATCH RFC v6 11/11] vfio: add bus reset notifier for host bus reset

2015-04-29 Thread Alex Williamson
On Wed, 2015-04-29 at 16:48 +0800, Chen Fan wrote: > add host secondary bus reset for vfio when AER occurs, if reset failed, > we should stop vm. > > Signed-off-by: Chen Fan > --- > hw/vfio/pci.c | 151 > +- > 1 file changed, 138 insertion

Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends

2015-04-29 Thread Michael S. Tsirkin
On Wed, Apr 29, 2015 at 04:33:44PM +0200, Cornelia Huck wrote: > On Wed, 29 Apr 2015 12:32:04 +0200 > "Michael S. Tsirkin" wrote: > > > On Wed, Apr 29, 2015 at 10:52:15AM +0200, Cornelia Huck wrote: > > > > And (surprise, surprise) virtio-blk now works - but it also works when > > > I back out t

Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends

2015-04-29 Thread Michael S. Tsirkin
On Wed, Apr 29, 2015 at 04:43:19PM +0200, Christian Borntraeger wrote: > Am 29.04.2015 um 12:32 schrieb Michael S. Tsirkin: > > On Wed, Apr 29, 2015 at 10:52:15AM +0200, Cornelia Huck wrote: > >> On Wed, 29 Apr 2015 10:17:55 +0200 > >> Christian Borntraeger wrote: > >> > >>> Am 28.04.2015 um 20:32

[Qemu-devel] [PATCH 2/2] hw/ppc/spapr: Use error_report() instead of hw_error()

2015-04-29 Thread Thomas Huth
hw_error() is designed for printing CPU-related error messages (e.g. it also prints a full CPU register dump). For error messages that are not directly related to CPU problems, a function like error_report() should be used instead. Signed-off-by: Thomas Huth --- hw/ppc/spapr.c | 12 ++--

[Qemu-devel] [PATCH 0/2] hw/ppc/spapr: Improve error printing

2015-04-29 Thread Thomas Huth
While loading alternate slof.bin images with the "-bios" option of qemu-softmmu-ppc64, I noticed that the error message is wrong when trying to load an non-existing file. Also, the error message is printed with hw_error() which results in a huge CPU register dump - something you don't expect when y

<    1   2   3   >