[Qemu-devel] [PATCH RFC 2/4] check if we have space left for hotplugged memory

2014-06-13 Thread Hu Tao
If pc-dimm is specified on qemu command line, but only with -m size (aka not -m size,maxmem,slots) then qemu will core dump. This patch fixes the problem. Signed-off-by: Hu Tao --- hw/mem/pc-dimm.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/mem/pc-dimm.c b/hw/m

[Qemu-devel] [PATCH RFC 4/4] memory-backend-file: error out if failed to allocate memory

2014-06-13 Thread Hu Tao
If user adds a memory-backend-file object using object_add command, specifying a non-existing directory for property mem-path, qemu will core dump with message: /nonexistingdir: No such file or directory Bad ram offset f000 Aborted (core dumped) This patch fixes this problem. S

[Qemu-devel] [PATCH RFC 1/4] get rid of signed range

2014-06-13 Thread Hu Tao
Signed-off-by: Hu Tao --- include/qemu/range.h | 144 - qapi/string-input-visitor.c| 116 +- qapi/string-output-visitor.c | 97 + tests/test-string-input-visitor.c | 4 +- tests

[Qemu-devel] [PATCH RFC 3/4] exec: don't exit unconditionally if failed to allocate memory

2014-06-13 Thread Hu Tao
return -1 instead. Now user can add objects memory-backend-ram on-the-fly, fail it if cannot allocate memory rather than quit qemu. Signed-off-by: Hu Tao --- backends/hostmem-ram.c | 3 +++ exec.c | 6 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backends

[Qemu-devel] [PATCH RFC 0/4] fixes for pci tree

2014-06-13 Thread Hu Tao
Michael, This is fixes for your pci tree. patch 1 remove signed range as requested. There are 3 problems in current pci tree, as follows: 1. pc-dimm specified on command line but only -m size (aka not -m size,maxmem,slots) ./x86_64-softmmu/qemu-system-x86_64 -hda /home/data/libvirt-images/f18

Re: [Qemu-devel] [RFC v2 00/39] Convert PC machine-types to QOM classes

2014-06-13 Thread Eduardo Habkost
On Fri, Jun 13, 2014 at 04:43:39PM -0300, Eduardo Habkost wrote: > Now with lots of cleanup, so you can see how the end result will look like > after > the conversion. > > My goal is that _all_ PC machine-types should be declared using only a > class_init + TypeInfo pair, and nothing else. The on

Re: [Qemu-devel] [PATCH v7 3/4] s390x: Migrate to new NMI interface

2014-06-13 Thread Alexey Kardashevskiy
On 06/13/2014 04:00 PM, Cornelia Huck wrote: > On Fri, 13 Jun 2014 13:36:58 +1000 > Alexey Kardashevskiy wrote: > >> This implements an NMI interface for s390 and s390-ccw machines. >> >> This removes #ifdef s390 branch in qmp_inject_nmi so new s390's >> nmi_monitor_handler() callback is going to

Re: [Qemu-devel] [PATCH v9 4/4] qemu-iotests: Add TestRepairQuorum to 041 to test drive-mirror node-name mode.

2014-06-13 Thread Max Reitz
On 11.06.2014 15:24, Benoît Canet wrote: The to-replace-node-name is designed to allow repairing of broken Quorum file. "a broken Quorum file" or "broken Quorum files". This patch introduce a new class TestRepairQuorum testing that the feature *introduces works. Some further work will be

Re: [Qemu-devel] [PATCH v9 3/4] block: Add replaces argument to drive-mirror

2014-06-13 Thread Max Reitz
On 11.06.2014 15:24, Benoît Canet wrote: drive-mirror will bdrv_swap the new BDS named node-name with the one pointed by replaces when the mirroring is finished. Signed-off-by: Benoit Canet --- block.c | 17 ++ block/mirror.c| 60

Re: [Qemu-devel] [PATCH 3/3] target-arm/translate-a64.c: Fix dead ?: in handle_simd_shift_fpint_conv()

2014-06-13 Thread Peter Crosthwaite
On Sun, Jun 8, 2014 at 6:11 AM, Peter Maydell wrote: > In handle_simd_shift_fpint_conv(), the combination of is_double == true, > is_scalar == false and is_q == false is an unallocated encoding; the > 'both parts false' case of the nested ?: expression for calculating > maxpass is therefore unreac

Re: [Qemu-devel] [PATCH 2/3] target-arm/translate-a64.c: Remove dead ?: in disas_simd_3same_int()

2014-06-13 Thread Peter Crosthwaite
On Sun, Jun 8, 2014 at 6:11 AM, Peter Maydell wrote: > In disas_simd_3same_int(), none of the instructions permit is_q > to be false with size == 3 (this would be a vector operation with > a one-element vector, and the instruction set encodes those as > scalar operations). Replace the always-true

Re: [Qemu-devel] [PATCH 1/3] target-arm: Add ULL suffix to calculation of page size

2014-06-13 Thread Peter Crosthwaite
On Sun, Jun 8, 2014 at 6:11 AM, Peter Maydell wrote: > The maximum block size for AArch64 address translation is 2GB. This means > that we need a ULL suffix on our shift to avoid shifting into the sign > bit of a signed 32 bit integer. > > Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwa

Re: [Qemu-devel] [PATCH] hw/block/pflash_cfi01: Report correct size info for parallel configs

2014-06-13 Thread Peter Crosthwaite
On Wed, Jun 11, 2014 at 12:03 AM, Peter Maydell wrote: > If the flash device is configured with a device-width which is > not equal to the bank-width, indicating that it is actually several > narrow flash devices in parallel, the CFI table should report the > number of blocks and the size of a sin

Re: [Qemu-devel] [PATCH v9 2/4] block: Add node-name argument to drive-mirror

2014-06-13 Thread Max Reitz
On 11.06.2014 15:24, Benoît Canet wrote: This new argument can be used to specify the node-name of the new mirrored BDS. Signed-off-by: Benoit Canet --- blockdev.c | 11 +-- hmp.c| 1 + qapi/block-core.json | 4 qmp-commands.hx | 3 +++ 4 fil

Re: [Qemu-devel] [PATCH] hw/arm/vexpress: Forbid specifying flash contents in two ways at once

2014-06-13 Thread Peter Crosthwaite
On Wed, Jun 11, 2014 at 3:03 AM, Peter Maydell wrote: > Detect attempts by the user to specify the contents fo the first flash "for" or "of" > device via both -bios and -drive if=pflash... simultaneously and > print a helpful error message. > > Signed-off-by: Peter Maydell Otherwise: Reviewed

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm/virt: Provide PL031 RTC

2014-06-13 Thread Peter Crosthwaite
On Thu, Jun 12, 2014 at 2:01 AM, Claudio Fontana wrote: > On 10.06.2014 19:06, Peter Maydell wrote: >> UEFI mandates that the platform must include an RTC, so provide >> one in 'virt', using the PL031. >> >> Signed-off-by: Peter Maydell >> --- >> hw/arm/virt.c | 30 ++

Re: [Qemu-devel] [PATCH v9 1/4] quorum: Add the rewrite-corrupted parameter to quorum

2014-06-13 Thread Max Reitz
On 11.06.2014 15:24, Benoît Canet wrote: On read operations when this parameter is set and some replicas are corrupted while quorum can be reached quorum will proceed to rewrite the correct version of the data to fix the corrupted replicas. This will shine with SSD where the FTL will remap the s

Re: [Qemu-devel] [PATCH v3 30/32] target-arm: make PAR banked

2014-06-13 Thread Greg Bellows
On 10 June 2014 18:55, Fabian Aggeler wrote: > When EL3 is running in Aarch32 (or ARMv7 with Security Extensions) > PAR has a secure and a non-secure instance. > > Signed-off-by: Fabian Aggeler > --- > target-arm/cpu.h| 10 +- > target-arm/helper.c | 25 ++--- >

Re: [Qemu-devel] [PATCH v3 31/32] target-arm: make VBAR banked

2014-06-13 Thread Greg Bellows
On 10 June 2014 18:55, Fabian Aggeler wrote: > When EL3 is running in Aarch32 (or ARMv7 with Security Extensions) > VBAR has a secure and a non-secure instance, which are mapped to > VBAR_EL1 and VBAR_EL3. > > Signed-off-by: Fabian Aggeler > --- > target-arm/cpu.h| 12 +++- > ta

[Qemu-devel] [PATCH 1/3] nbd: Drop nbd_can_read()

2014-06-13 Thread Max Reitz
There is no variant of aio_set_fd_handler() like qemu_set_fd_handler2(), so we cannot give a can_read() callback function. Instead, unregister the nbd_read() function whenever we cannot read and re-register it as soon as we can read again. All this is hidden behind the functions nbd_set_handlers()

[Qemu-devel] [PATCH 3/3] nbd: Follow the BDS' AIO context

2014-06-13 Thread Max Reitz
Keep the NBD server always in the same AIO context as the exported BDS by calling bdrv_add_aio_context_notifier() and implementing the required callbacks. Signed-off-by: Max Reitz --- nbd.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/nbd.c b/nbd.c index c

[Qemu-devel] [PATCH 0/3] nbd: Adapt for dataplane

2014-06-13 Thread Max Reitz
For the NBD server to work with dataplane, it needs to correctly access the exported BDS. It makes the most sense to run both in the same AioContext, therefore this series implements methods for tracking a BDS's AioContext and makes NBD make use of this for keeping the clients connected to that BDS

[Qemu-devel] [PATCH 2/3] block: Add AIO context notifiers

2014-06-13 Thread Max Reitz
If a long-running operation on a BDS wants to always remain in the same AIO context, it somehow needs to keep track of the BDS changing its context. This adds a function for registering callbacks on a BDS which are called whenever the BDS is attached or detached from an AIO context. Signed-off-by:

Re: [Qemu-devel] [PATCH v3 28/32] target-arm: make DFSR banked

2014-06-13 Thread Greg Bellows
I just wanted to point out that the change from array-notation to hard-code numbers in the names undoes Edgar's EL2/EL3 changes. I prefer this way over the array notation. On 10 June 2014 18:55, Fabian Aggeler wrote: > When EL3 is running in Aarch32 (or ARMv7 with Security Extensions) > DFSR h

Re: [Qemu-devel] [PATCH V6 17/29] qapi event: convert WATCHDOG

2014-06-13 Thread Eric Blake
On 06/13/2014 03:47 PM, Eric Blake wrote: > On 06/05/2014 06:22 AM, Wenchao Xia wrote: >> Signed-off-by: Wenchao Xia >> --- >> docs/qmp/qmp-events.txt | 19 --- >> hw/watchdog/watchdog.c | 23 +++ >> monitor.c |2 +- >> qapi-event.json

Re: [Qemu-devel] [PATCH V6 17/29] qapi event: convert WATCHDOG

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > docs/qmp/qmp-events.txt | 19 --- > hw/watchdog/watchdog.c | 23 +++ > monitor.c |2 +- > qapi-event.json | 15 +++ > qapi-schema.json

Re: [Qemu-devel] [PATCH V6 03/29] qapi script: add event support

2014-06-13 Thread Eric Blake
On 06/05/2014 06:21 AM, Wenchao Xia wrote: > qapi-event.py will parse the schema and generate qapi-event.c, then > the API in qapi-event.c can be used to handle event in qemu code. > All API have prefix "qapi_event". > As promised, a revisit of the generator code now that I've looked at more of i

Re: [Qemu-devel] [PATCH V6 16/29] qapi event: convert RTC_CHANGE

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > This patch also eliminates build time warning caused by no caller > of monitor_qapi_event_throttle(). Again, my suggestion on 6/29 could avoid that warning; if you use that workaround, don't clean it until 29/29, but you can drop this paragraph of this

[Qemu-devel] [RFC v2 04/39] piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13

2014-06-13 Thread Eduardo Habkost
The VGA and vmware-svga rombar compat properties were added by commit 281a26b15b4adcecb8604216738975abd754bea8, but only to pc-0.13 and pc-0.12. This breaks the PC_COMPAT_* nesting pattern we currently follow. The new variables will now be inherited by pc-0.11 and older, but pc-0.11 and pc-0.10 al

[Qemu-devel] [RFC v2 28/39] piix: Introduce struct PCI440FXMachineClass

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index f87509c..da54c26 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -376,6 +376,20 @@ static void pc_xen_h

[Qemu-devel] [RFC v2 11/39] piix: Eliminate pc_i440fx_machine_options()

2014-06-13 Thread Eduardo Habkost
Instead of calling it on every i440fx class_init function, just register a common parent class for all i440fx machine-types. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 55 +-- 1 file changed, 29 insertions(+), 26 deletions(-) diff

[Qemu-devel] [RFC v2 37/39] pc: Make pc_cpus_init() static

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 2 +- include/hw/i386/pc.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 9b7854d..2836b5f 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1017,7 +1017,7 @@ void pc_hot_add_cpu(const

[Qemu-devel] [RFC v2 33/39] pc: Move {ram, pci, rom}_memory variables to PCMachineState

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c| 19 --- hw/i386/pc_q35.c | 21 + include/hw/i386/pc.h | 3 +++ 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 1761f11..8954df3 100644 --

[Qemu-devel] [RFC v2 24/39] pc: Move gigabyte_align to PCMachineClass

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c| 9 ++--- hw/i386/pc_q35.c | 9 ++--- include/hw/i386/pc.h | 5 + 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 874c342..5c6304b 100644 --- a/h

[Qemu-devel] [RFC v2 38/39] pc: Make pc_cpus_init() use PCMachineState

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2836b5f..1c30754 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1019,10 +1019,12 @@ void pc_hot_add_cpu(const int64_t id, Error **errp)

[Qemu-devel] [RFC v2 12/39] q35: Eliminate pc_q35_machine_options()

2014-06-13 Thread Eduardo Habkost
Instead of calling it on every q35 class_init function, just register a common parent class for all q35 machine-types. Signed-off-by: Eduardo Habkost --- hw/i386/pc_q35.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/i386/pc_q35.c b/h

[Qemu-devel] [RFC v2 18/39] q35: Use PCMachineClass.pci_enabled field

2014-06-13 Thread Eduardo Habkost
Little step towards making the q35 and piix init functions converge, to eliminate duplication. Signed-off-by: Eduardo Habkost --- hw/i386/pc_q35.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index e3da35c..8c0fe64 100644 --- a/hw/i3

[Qemu-devel] [RFC v2 17/39] pc: Move pci_enabled parameter to PCMachineClass

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c| 11 +++ include/hw/i386/pc.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 6594f36..25ad776 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -71,10 +71,1

[Qemu-devel] [RFC v2 00/39] Convert PC machine-types to QOM classes

2014-06-13 Thread Eduardo Habkost
Now with lots of cleanup, so you can see how the end result will look like after the conversion. My goal is that _all_ PC machine-types should be declared using only a class_init + TypeInfo pair, and nothing else. The only thing I couldn't eliminate yet were the pc_compat_*() functions, because we

[Qemu-devel] [RFC v2 20/39] pc: Move smbios_legacy_mode to PCMachineClass

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c| 7 --- hw/i386/pc_q35.c | 7 --- include/hw/i386/pc.h | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index a1f285d..422656e 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i3

Re: [Qemu-devel] [PATCH V6 15/29] qapi event: convert WAKEUP

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > docs/qmp/qmp-events.txt | 12 > qapi-event.json |9 + > vl.c|2 +- > 3 files changed, 10 insertions(+), 13 deletions(-) > > +## > +# @WAKEUP > +# > +# Emitt

[Qemu-devel] [RFC v2 32/39] pc: Rename pc_machine variable to pcms

2014-06-13 Thread Eduardo Habkost
"pcms" being the initials of "PCMachineState". The variable will be used a lot, so it's better to make it short. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 6 +++--- hw/i386/pc_q35.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386

[Qemu-devel] [RFC v2 01/39] q35: Use PC_Q35_COMPAT_1_4 on pc-q35-1.4 compat_props

2014-06-13 Thread Eduardo Habkost
pc-q35-1.4 was incorrectly using PC_COMPAT_1_4 instead of PC_Q35_COMPAT_1_4. The only side-effect was that the hpet compat property (inherited from PC_Q35_COMPAT_1_7) was missing. Without this patch, pc-q35-1.4 incorrectly initializes hpet-intcap to 0xff0104 (behavior introduced in QEMU 2.0, by c

Re: [Qemu-devel] [PATCH V6 14/29] qapi event: convert SUSPEND_DISK

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > docs/qmp/qmp-events.txt | 14 -- > hw/acpi/core.c |4 ++-- > qapi-event.json | 12 > 3 files changed, 14 insertions(+), 16 deletions(-) > > +++ b/qapi-event.json > @

[Qemu-devel] qemu-img convert from raw to vmdk does not work in vmware esxi

2014-06-13 Thread Milos Vyletel
Hi, I've tried to convert my VM image from raw format to vmdk to create OVF/OVA archive so that we can deploy our OS on other hypervisors. the problem was that no matter how I've converted to vmdk vmware ESXi (tried 4.1 and 5.5) complained that it was: "Not a supported disk format (sparse VMDK too

Re: [Qemu-devel] [PATCH V6 13/29] qapi event: convert SUSPEND

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > docs/qmp/qmp-events.txt | 12 > qapi-event.json | 10 ++ > vl.c|2 +- > 3 files changed, 11 insertions(+), 13 deletions(-) > > +## > +# @SUSPEND > +# > +# Emi

[Qemu-devel] [RFC v2 02/39] piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14

2014-06-13 Thread Eduardo Habkost
Those properties were introduced by commit 3827cdb1c3aa17a792d1658161195b9d7173c26b. They were not duplicated into pc-0.13 and older because 0.14 was the first QEMU version supporting qxl. The only problem is that this breaks the PC_COMPAT_* nesting pattern we currently use. So, move the propertie

[Qemu-devel] [RFC v2 09/39] pc: Eliminate pc_common_machine_options()

2014-06-13 Thread Eduardo Habkost
The TYPE_PC_MACHINE parent class can initialize the common options for all PC machines. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c| 2 -- include/hw/i386/pc.h | 6 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i38

Re: [Qemu-devel] [PATCH V6 12/29] qapi event: convert RESUME

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > docs/qmp/qmp-events.txt | 12 > qapi-event.json |9 + > vl.c|2 +- > 3 files changed, 10 insertions(+), 13 deletions(-) > > +## > +# @RESUME > +# > +# Emitt

Re: [Qemu-devel] [PATCH V6 11/29] qapi event: convert STOP

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > cpus.c |5 +++-- > docs/qmp/qmp-events.txt | 12 > qapi-event.json |9 + > 3 files changed, 12 insertions(+), 14 deletions(-) > > @@ -530,7 +531,7 @@ static in

[Qemu-devel] [RFC v2 07/39] machine: Make compat_props a linked list

2014-06-13 Thread Eduardo Habkost
This will make it easier to write reusable class_init code which adds properties to MachineClass.compat_props. Signed-off-by: Eduardo Habkost --- hw/core/machine.c| 15 +++ hw/core/qdev-properties.c| 9 + hw/i386/pc.c | 4 +++- include/hw/boa

[Qemu-devel] [RFC v2 19/39] pc: Move kvmclock_enabled to PCMachineClass

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c| 12 +++- include/hw/i386/pc.h | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 10e8d10..4d2e4bf 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1

Re: [Qemu-devel] [PATCH v3 20/32] target-arm: arrayfying fieldoffset for banking

2014-06-13 Thread Greg Bellows
On 10 June 2014 18:55, Fabian Aggeler wrote: > Prepare ARMCPRegInfo to support specifying two fieldoffsets per > register definition. This will allow us to keep one register > definition for banked registers (different offsets for secure/ > non-secure world). > > Signed-off-by: Fabian Aggeler >

[Qemu-devel] [RFC v2 21/39] pc: Move smbios_defaults to PCMachineClass

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c| 12 ++-- hw/i386/pc_q35.c | 7 +++ include/hw/i386/pc.h | 1 + 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 4d2e4bf..820532a 100644 --- a/

[Qemu-devel] [RFC v2 15/39] piix: Make all *machine_options() functions call the previous one

2014-06-13 Thread Eduardo Habkost
This adds a little more boilerplate code, but makes all *machine_options() and *class_init() functions follow exactly the same nesting pattern, making it much easier to eliminate *machine_options() later. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 10 ++ 1 file changed, 10 in

Re: [Qemu-devel] [PATCH V6 08/29] qapi event: convert SHUTDOWN

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > This patch also eliminates build time warning caused by > QAPI_EVENT_MAX = 0. I still don't know why I wasn't seeing a warning for that, but agree this cleans it up (or whichever event gets converted first, as there aren't really any dependency restrict

Re: [Qemu-devel] [PATCH V6 09/29] qapi event: convert POWERDOWN

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > There is no existing comments for POWERDOWN in doc/qmp/qmp-events.txt, > so no change on it like other conversion patch. Oddly enough, POWERDOWN _is_ documented in docs/qmp/qmp-spec.txt, but that reference doesn't need updating with this conversion. >

[Qemu-devel] [RFC v2 39/39] machine: Eliminate QEMUMachine.compat_props

2014-06-13 Thread Eduardo Habkost
The only user of QEMUMachine.compat_props was the PC code, that was already converted to QOM. We don't need that field anymore. Signed-off-by: Eduardo Habkost --- include/hw/boards.h | 1 - vl.c| 3 --- 2 files changed, 4 deletions(-) diff --git a/include/hw/boards.h b/include/h

[Qemu-devel] [RFC v2 29/39] pc: Create common machine init function

2014-06-13 Thread Eduardo Habkost
This allows us to eliminate all the trivial pc_init_*() functions which just call a compat function followed by pc_init1(), and slowly move duplicate code from piix and q35 init functions into common PC code. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 12 hw/i386/pc_piix.

[Qemu-devel] [RFC v2 27/39] piix: Eliminate pc_init_pci()

2014-06-13 Thread Eduardo Habkost
Now pc_init1() can be called directly. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 20ac637..f87509c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_pi

[Qemu-devel] [RFC v2 34/39] pc: Move duplicate Xen init code to pc_machine_init()

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 7 +++ hw/i386/pc_piix.c | 5 - hw/i386/pc_q35.c | 5 - 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 800d3a3..fe9937c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1611,10 +

[Qemu-devel] [RFC v2 35/39] pc: Move icc_bridge variable to PCMachineState

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c| 9 - hw/i386/pc_q35.c | 9 - include/hw/i386/pc.h | 1 + 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index aecc3af..74168c8 100644 --- a/hw/i386/pc_piix.c +++ b/

[Qemu-devel] [RFC v2 26/39] pc: Move option_rom_has_mr/rom_file_has_mr to MachineClass

2014-06-13 Thread Eduardo Habkost
This way, these settings can be simply set on the class_init function, instead of requiring a separate machine init function just to set global variables. Signed-off-by: Eduardo Habkost --- hw/core/loader.c| 12 +++- hw/core/machine.c | 2 ++ hw/i386/pc_piix.c | 4 ++-- hw/i386

[Qemu-devel] [RFC v2 23/39] pc: Move has_pci_info to PCMachineClass

2014-06-13 Thread Eduardo Habkost
Interestingly, no existing code sets has_pci_info=true at all. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c| 6 +- hw/i386/pc_q35.c | 4 +--- include/hw/i386/pc.h | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index

[Qemu-devel] [RFC v2 25/39] pc: Move has_reserved_memory to PCMachineClass

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c| 6 ++ hw/i386/pc_q35.c | 6 ++ include/hw/i386/pc.h | 1 + 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5c6304b..f1fc901 100644 --- a/hw/i386/pc.c

[Qemu-devel] [RFC v2 31/39] piix: Move compat/init functions closer to corresponding class_init

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 105 ++ 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3549edb..5fb1888 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@

[Qemu-devel] [RFC v2 14/39] pc: Eliminate *machine_options macros

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 4 +--- hw/i386/pc_q35.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 87108d4..05d1241 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -443,8 +443,6 @@ static

[Qemu-devel] [RFC v2 22/39] pc: Move has_acpi_build to PCMachineClass

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c| 10 +- hw/i386/pc_q35.c | 6 +++--- include/hw/i386/pc.h | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 820532a..874c342 100644 --- a/hw/i

[Qemu-devel] [RFC v2 30/39] pc: Eliminate empty or trivial compat functions

2014-06-13 Thread Eduardo Habkost
When all a compat function does is to call the previous compat function, we don't need to set compat_func, as the previous class_init function already set it. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 21 + hw/i386/pc_q35.c | 21 + 2 files ch

[Qemu-devel] [RFC v2 36/39] pc: Move duplicate icc-bridge and CPU initalization to pc_machine_init()

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 6 ++ hw/i386/pc_piix.c | 6 -- hw/i386/pc_q35.c | 5 - 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index fe9937c..9b7854d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1622,6 +1

[Qemu-devel] [RFC v2 16/39] pc: Eliminate all *_machine_options() functions

2014-06-13 Thread Eduardo Habkost
Finally eliminate all *_machine_options() functions, and make the class_init functions for older machine-types simply reuse the class_init functions from newer machine-types. To allow compat_props reuse, the the PC_COMPAT_* macros were changed to not nest within the older PC_COMPAT_* macros anymor

Re: [Qemu-devel] [PATCH V6 07/29] qapi: add new schema file qapi-event.json

2014-06-13 Thread Eric Blake
On 06/13/2014 01:25 PM, Eric Blake wrote: > On 06/05/2014 06:22 AM, Wenchao Xia wrote: >> Signed-off-by: Wenchao Xia >> --- >> Makefile | 12 >> qapi-schema.json |2 ++ >> 2 files changed, 10 insertions(+), 4 deletions(-) >> create mode 100644 qapi-event.json >> >> di

[Qemu-devel] [RFC v2 10/39] pc: Eliminate pc_default_machine_options()

2014-06-13 Thread Eduardo Habkost
The only PC machines that didn't call pc_default_machine_options() were isaps and xenfv. Both were already overwriting max_cpus, and only isapc was not overwriting hot_add_cpu. If we just make isapc set hot_add_cpu to NULL, we can move pc_default_machine_options() the PC common class_init. Signed-

[Qemu-devel] [RFC v2 08/39] pc: Register machine classes directly instead of using QEMUMachine

2014-06-13 Thread Eduardo Habkost
This is a (mostly) blind and mechanical conversion of the PC QEMUMachine definitions to corresponding class registration code. Having the PC code converted to pure QOM registration code will help us move PC-specific machine state that is currently held in static variables inside PC machine objects

[Qemu-devel] [RFC v2 06/39] vl.c: Use qdev_prop_register_global() for single globals

2014-06-13 Thread Eduardo Habkost
Instead of using an array when registeting a single global, simply call qdev_prop_register(). Signed-off-by: Eduardo Habkost --- vl.c | 39 +++ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/vl.c b/vl.c index 5e77a27..8d3d2a6 100644 --- a/vl.c

[Qemu-devel] [RFC v2 13/39] q35: Eliminate pc_q35_1_4_machine_options()

2014-06-13 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/pc_q35.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 5750239..0f1d28d 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -430,11 +430,6 @@ static TypeInfo pc_q35_machine_v1_5_ty

[Qemu-devel] [RFC v2 05/39] piix: Move pc-0.11 drive version compat props TO PC_COMPAT_0_11

2014-06-13 Thread Eduardo Habkost
The current code setting ide-drive.ver scsi-disk.ver on pc-0.1 breaks the PC_COMPAT_* nesting pattern we currently use. As those variables are overwritten in pc-0.10 too, they can be inherited by pc-0.10 with no side-effects at all. Signed-off-by: Eduardo Habkost Cc: Gerd Hoffmann --- hw/i386/

[Qemu-devel] [RFC v2 03/39] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13

2014-06-13 Thread Eduardo Habkost
The compat property was added by commit 9dbcca5aa13cb9ab40788ac4c56bc227d94ca920, and the pc-0.12 and older machine-types were not changed because virtio-9p-pci was introduced on QEMU 0.13 (commit 9f10751365b26b13b8a9b67e0e90536ae3d282df). The only problem is that this breaks the PC_COMPAT_* nestin

Re: [Qemu-devel] [PATCH] qapi: Add includes from qapi/ as dependencies

2014-06-13 Thread Eric Blake
On 06/07/2014 01:12 PM, Max Reitz wrote: > qapi-schema.json has been split into three smaller JSON files in qapi/. > Add them as dependencies for the code generation in the Makefile, so > changes to them will result in a rebuilt of all QAPI-dependent code. > > Signed-off-by: Max Reitz > --- > Ma

Re: [Qemu-devel] [PATCH V6 07/29] qapi: add new schema file qapi-event.json

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > Makefile | 12 > qapi-schema.json |2 ++ > 2 files changed, 10 insertions(+), 4 deletions(-) > create mode 100644 qapi-event.json > > diff --git a/Makefile b/Makefile > index 237657e..554f

[Qemu-devel] [Bug 685096] Re: USB Passthrough not working for Windows 7 guest

2014-06-13 Thread Michal Suchanek
Actually, in qemu 2.0.0 the file is packaged. However, it is packaged in the qemu package rather than qemu-system package so users are unlikely to have the file. ** Also affects: qemu (Debian) Importance: Undecided Status: New -- You received this bug notification because you are a mem

Re: [Qemu-devel] [PATCH V6 06/29] monitor: add an implemention as qapi event emit method

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: In the subject: s/as/of/ > Now monitor has been hooked on the new event mechanism, so the patches s/Now/The/ > later can convert event callers one by one. Most code are copied from s/the patches later/that later patches/ s/are/is/ > old monitor_prot

[Qemu-devel] [PATCH v5 07/10] block: add ability for block-stream to use node-name

2014-06-13 Thread Jeff Cody
This adds the ability for block-stream to use node-name arguments for base, to specify the backing image to stream from. Both 'base' and 'base-node-name' are optional, but mutually exclusive. Either can be specified, but not both together. Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- b

[Qemu-devel] [PATCH v5 10/10] block: add QAPI command to allow live backing file change

2014-06-13 Thread Jeff Cody
This allows a user to make a live change to the backing file recorded in an open image. The image file to modify can be specified 2 ways: 1) image filename 2) image node-name Note: this does not cause the backing file itself to be reopened; it merely changes the backing filename in the image fil

[Qemu-devel] [PATCH v5 05/10] block: Accept node-name arguments for block-commit

2014-06-13 Thread Jeff Cody
This modifies the block operation block-commit so that it will accept node-name arguments for either 'top' or 'base' BDS. The filename and node-name are mutually exclusive to each other; i.e.: "top" and "top-node-name" are mutually exclusive (enforced) "base" and "base-node-name" are mutua

[Qemu-devel] [PATCH v5 06/10] block: extend block-commit to accept a string for the backing file

2014-06-13 Thread Jeff Cody
On some image chains, QEMU may not always be able to resolve the filenames properly, when updating the backing file of an image after a block commit. For instance, certain relative pathnames may fail, or drives may have been specified originally by file descriptor (e.g. /dev/fd/???), or a relative

[Qemu-devel] [PATCH v5 08/10] block: add backing-file option to block-stream

2014-06-13 Thread Jeff Cody
On some image chains, QEMU may not always be able to resolve the filenames properly, when updating the backing file of an image after a block job. For instance, certain relative pathnames may fail, or drives may have been specified originally by file descriptor (e.g. /dev/fd/???), or a relative pr

[Qemu-devel] [PATCH v5 04/10] block: make 'top' argument to block-commit optional

2014-06-13 Thread Jeff Cody
Now that active layer block-commit is supported, the 'top' argument no longer needs to be mandatory. Change it to optional, with the default being the active layer in the device chain. Reviewed-by: Eric Blake Reviewed-by: Benoit Canet Signed-off-by: Jeff Cody --- blockdev.c | 5 +

[Qemu-devel] [PATCH v5 09/10] block: Add QMP documentation for block-stream

2014-06-13 Thread Jeff Cody
The QMP command 'block-stream' was missing QMP documentation. Add that documentation. Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- qmp-commands.hx | 58 + 1 file changed, 58 insertions(+) diff --git a/qmp-commands.hx b/qmp-comman

[Qemu-devel] [PATCH v5 02/10] block: add helper function to determine if a BDS is in a chain

2014-06-13 Thread Jeff Cody
This is a small helper function, to determine if 'base' is in the chain of BlockDriverState 'top'. It returns true if it is in the chain, and false otherwise. If either argument is NULL, it will also return false. Reviewed-by: Benoit Canet Reviewed-by: Eric Blake Signed-off-by: Jeff Cody ---

[Qemu-devel] [PATCH v5 01/10] block: Auto-generate node_names for each BDS entry

2014-06-13 Thread Jeff Cody
Currently, node_name is only filled in when done so explicitly by the user. If no node_name is specified, then the node name field is not populated. If node_names are automatically generated when not specified, that means that all block job operations can be done by reference to the unique node_n

[Qemu-devel] [PATCH v5 03/10] block: simplify bdrv_find_base() and bdrv_find_overlay()

2014-06-13 Thread Jeff Cody
This simplifies the function bdrv_find_overlay(). With this change, bdrv_find_base() is just a subset of usage of bdrv_find_overlay(), so this also takes advantage of that. Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- block.c | 45 ++--- 1 file c

[Qemu-devel] [PATCH v5 00/10] Modify block jobs to use node-names

2014-06-13 Thread Jeff Cody
Changes from v4->v5: * Rebased on master * Fixed commit log typos / stale paragraphs (Eric) * Fixed comment typo (Eric) * Added Eric's remaining R-b's Changes from v3->v4: * Rebased on master * Dropped overlay pointers, Eric's concerns are correct * Require "device" for all arguments, in light

[Qemu-devel] [PATCH] Fix new typos (found by codespell)

2014-06-13 Thread Stefan Weil
* accomodate -> accommodate * aquiring -> acquiring * beacuse -> because * loosing -> losing * prefering -> preferring * threshhold -> threshold Signed-off-by: Stefan Weil --- block/iscsi.c |2 +- hw/input/hid.c |2 +- target-arm/helper.c|

Re: [Qemu-devel] [PATCH v3 15/32] target-arm: add NSACR register

2014-06-13 Thread Greg Bellows
On 10 June 2014 18:54, Fabian Aggeler wrote: > Implements NSACR register with corresponding read/write functions > for ARMv7 and ARMv8. > > Signed-off-by: Sergey Fedorov > Signed-off-by: Fabian Aggeler > --- > target-arm/cpu.h| 6 + > target-arm/helper.c | 68 > +++

Re: [Qemu-devel] [PULL 0/1] usb-host: add range checks for usb-host parameters

2014-06-13 Thread Peter Maydell
t; Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20140611-1' into > staging (2014-06-12 09:51:41 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-usb-20140613-1 > > for you to fetch changes up to f3cda6e060c483d

[Qemu-devel] [Bug 685096] Re: USB Passthrough not working for Windows 7 guest

2014-06-13 Thread Serge Hallyn
Thanks Michal, so at sounds like at least that file should be distributed with the qemu package. I don't know the best place for that, or how cleanly we can integrate it to make it easiest on the end-user... -- You received this bug notification because you are a member of qemu- devel-ml, which

Re: [Qemu-devel] [PATCH V6 05/29] qapi: adjust existing defines

2014-06-13 Thread Eric Blake
On 06/05/2014 06:22 AM, Wenchao Xia wrote: > In order to let event defines use existing types later, instead of > redefine new ones, some old type defines for spice and vnc are changed, > and BlockErrorAction is moved from block.h to qapi schema. Note that > BlockErrorAction is not merged with Bloc

Re: [Qemu-devel] [PULL 0/1] inet_listen_opts: add error checking

2014-06-13 Thread Peter Maydell
0140611-1' into > staging (2014-06-12 09:51:41 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-trivial-20140613-1 > > for you to fetch changes up to 8bc891279604186562f59a4239e42dcb451c60d3: >

Re: [Qemu-devel] [PATCH]Fix two functions of the same name

2014-06-13 Thread Stefan Weil
Am 13.06.2014 13:49, schrieb Lb peace: > It is funny that we have two sigbus_handler in our QEMU.(exec.c & > cpus.c)Change one's name. > > Signed-off-by: Peace > --- > cpus.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > Technically it does not matter whether two functions

  1   2   3   >