[Qemu-devel] [RFC PATCH v4 3/8] arm_gic: Fix GIC pending behavior

2013-12-20 Thread Christoffer Dall
The existing implementation of the pending behavior in gic_set_irq, gic_acknowledge_irq, gic_complete_irq, and the distributor pending set/clear registers does not follow the semantics of the GICv2.0 specs, but may implement the 11MPCore support. Therefore, maintain the existing semantics for 11MP

[Qemu-devel] [RFC PATCH v4 2/8] hw: arm_gic: Introduce gic_set_priority function

2013-12-20 Thread Christoffer Dall
To make the code slightly cleaner to look at and make the save/restore code easier to understand, introduce this function to set the priority of interrupts. Reviewed-by: Peter Maydell Signed-off-by: Christoffer Dall --- hw/intc/arm_gic.c | 15 ++- hw/intc/gic_internal.h | 1 +

[Qemu-devel] [RFC PATCH v4 8/8] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-12-20 Thread Christoffer Dall
Save and restore the ARM KVM VGIC state from the kernel. We rely on QEMU to marshal the GICState data structure and therefore simply synchronize the kernel state with the QEMU emulated state in both directions. We take some care on the restore path to check the VGIC has been configured with enoug

[Qemu-devel] [RFC PATCH v4 7/8] arm_gic: Add GICC_APRn state to the GICState

2013-12-20 Thread Christoffer Dall
The GICC_APRn registers are not currently supported by the ARM GIC v2.0 emulation. This patch adds the missing state. Note that we also change the number of APRs to use a define GIC_NR_APRS based on the maximum number of preemption levels. This patch also adds RAZ/WI accessors for the four regis

[Qemu-devel] [RFC PATCH v4 1/8] arm_gic: Rename GIC_X_TRIGGER to GIC_X_EDGE_TRIGGER

2013-12-20 Thread Christoffer Dall
TRIGGER can really mean mean anything (e.g. was it triggered, is it level-triggered, is it edge-triggered, etc.). Rename to EDGE_TRIGGER to make the code comprehensible without looking up the data structure. Reviewed-by: Peter Maydell Signed-off-by: Christoffer Dall --- Changes [v3 -> v4]: - R

[Qemu-devel] [RFC PATCH v4 5/8] arm_gic: Support setting/getting binary point reg

2013-12-20 Thread Christoffer Dall
Add a binary_point field to the gic emulation structure and support setting/getting this register now when we have it. We don't actually support interrupt grouping yet, oh well. Reviewed-by: Peter Maydell Signed-off-by: Christoffer Dall --- Changes [v2 -> v3]: - Treat writes for GIC prior to v

[Qemu-devel] [RFC PATCH v4 6/8] vmstate: Add uint32 2D-array support

2013-12-20 Thread Christoffer Dall
Add support for saving VMState of 2D arrays of uint32 values. Reviewed-by: Peter Maydell Signed-off-by: Christoffer Dall --- include/migration/vmstate.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 9d09e60..c44e3b5 100

[Qemu-devel] [RFC PATCH v4 0/8] Support arm-gic-kvm save/restore

2013-12-20 Thread Christoffer Dall
Implement support to save/restore the ARM KVM VGIC state from the kernel. The basic appraoch is to transfer state from the in-kernel VGIC to the emulated arm-gic state representation and let the standard QEMU vmstate save/restore handle saving the arm-gic state. Restore works by reversing the pro

[Qemu-devel] [RFC PATCH v4 4/8] hw: arm_gic: Keep track of SGI sources

2013-12-20 Thread Christoffer Dall
Right now the arm gic emulation doesn't keep track of the source of an SGI (which apparently Linux guests don't use, or they're fine with assuming CPU 0 always). Add the necessary matrix on the GICState structure and maintain the data when setting and clearing the pending state of an IRQ. Note th

Re: [Qemu-devel] [PATCH] scsi-disk: add non-zero MAX UNMAP LBA COUNT to block limits VPD page

2013-12-20 Thread Bharata B Rao
On Fri, Dec 20, 2013 at 03:58:08PM +0100, Paolo Bonzini wrote: > Linux prefers WRITE SAME to UNMAP if the count is zero, and WRITE > SAME does not discard anything unless the device can guarantee that > the resulting block is zero. > > This fixes thin provisioning on glusterfs. I don't see discar

[Qemu-devel] [PATCH v3] piix: fix 32bit pci hole

2013-12-20 Thread Laszlo Ersek
From: Gerd Hoffmann Make the 32bit pci hole start at end of ram, so all possible address space is covered. Of course the firmware can use less than that. Leaving space unused is no problem, mapping pci bars outside the hole causes problems though. Signed-off-by: Gerd Hoffmann Forward ported t

[Qemu-devel] [PULL 2/2] target-openrisc: Use new qemu_ld/st opcodes

2013-12-20 Thread Jia Liu
From: Richard Henderson Cc: Jia Liu Signed-off-by: Richard Henderson Acked-by: Jia Liu Signed-off-by: Jia Liu --- target-openrisc/translate.c | 99 +++-- 1 file changed, 32 insertions(+), 67 deletions(-) diff --git a/target-openrisc/translate.c b/targ

[Qemu-devel] [PULL 1/2] openrisc: Fix spelling in comment (transaltion -> translation)

2013-12-20 Thread Jia Liu
From: Stefan Weil Fix typo in comment (transaltion -> translation). And I also removed two hyphens in the same comment. Signed-off-by: Stefan Weil Reviewed-by: Jia Liu Signed-off-by: Jia Liu --- target-openrisc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t

[Qemu-devel] [PULL 0/2] OpenRISC patch queue for 1.8

2013-12-20 Thread Jia Liu
Hi Anthony, This is my OpenRISC patch queue for 1.8, it have been well tested, please pull. Thanks to Richard Henderson, he made the LD/ST updated. Thanks to Stefan Weil, he fixed a typo. Regards, Jia The following changes since commit f8251db121c3f051b22a7536b97d160c30bcccd4: Merge remote

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Peter Maydell
On 20 December 2013 22:29, Peter Crosthwaite wrote: > On Sat, Dec 21, 2013 at 8:07 AM, Peter Maydell > wrote: >> On 20 December 2013 21:41, Peter Crosthwaite >> wrote: >>> So to clarify, would MIDR and friends be in this bucket? And does t >>> obsolete the old MIDR def such there is only one CP

Re: [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic

2013-12-20 Thread
OK. Thx Andreas! 在2013年12月20日 19:18, Andreas Färber写道: Am 19.12.2013 15:20, schrieb Paolo Bonzini: > Il 18/12/2013 19:03, Andreas Färber ha scritto: @@ -61,7 +69,6 @@ static void ioapic_common_realize(DeviceState *dev, Error **errp)  {      IOAPICCommonState *s = IOAPIC_COMMON(dev

[Qemu-devel] [PATCH] tcg-i386: Use MOVBE if available

2013-12-20 Thread Richard Henderson
As present on Atom and Haswell processors. Signed-off-by: Richard Henderson --- disas/i386.c | 8 ++-- tcg/i386/tcg-target.c | 127 ++ 2 files changed, 91 insertions(+), 44 deletions(-) Here's to "stress testing" a Haswell laptop before

[Qemu-devel] [PULL 1/2] block/iscsi: use a bh to schedule co reentrance

2013-12-20 Thread Paolo Bonzini
From: Peter Lieven this fixes a potential segfault and performance regression. If the coroutine is reentered directly in the iscsi_co_generic_cb iscsi_process_{read,write} are interrupted and reentered any time later. One the one hand this could happen after an iscsi_close where the iscsi contex

[Qemu-devel] [PULL 2/2] scsi-disk: add non-zero MAX UNMAP LBA COUNT to block limits VPD page

2013-12-20 Thread Paolo Bonzini
Linux prefers WRITE SAME to UNMAP if the count is zero, and WRITE SAME does not discard anything unless the device can guarantee that the resulting block is zero. This fixes thin provisioning on glusterfs. Reported-by: Bharata B Rao Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-disk.c | 14 +++

[Qemu-devel] [PULL 0/2] SCSI changes for 2013-12-20

2013-12-20 Thread Paolo Bonzini
Anthony, the following changes since commit e157b8fdd412d48eacfbb8c67d3d58780154faa3: Merge remote-tracking branch 'bonzini/virtio' into staging (2013-12-13 11:10:33 -0800) are available in the git repository at: git://github.com/bonzini/qemu.git scsi-next for you to fetch changes up to 9

[Qemu-devel] [PATCH v3 5/5] monitor: add object-add (QMP) and object_add (HMP) command

2013-12-20 Thread Paolo Bonzini
Add two commands that are the monitor counterparts of -object. The commands have the same Visitor-based implementation, but use different kinds of visitors so that the HMP command has a DWIM string-based syntax, while the QMP variant accepts a stricter JSON-based properties dictionary. Signed-off

[Qemu-devel] [PATCH v3 3/5] qom: catch errors in object_property_add_child

2013-12-20 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qom/object.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qom/object.c b/qom/object.c index fc19cf6..68fe07a 100644 --- a/qom/object.c +++ b/qom/object.c @@ -988,17 +988,22 @@ static void object_finalize_child_property(Object *obj,

[Qemu-devel] [PATCH v3 1/5] rng: initialize file descriptor to -1

2013-12-20 Thread Paolo Bonzini
The file descriptor is never initialized to -1, which makes rng-random close stdin if an object is created and immediately destroyed. If we change it to -1, we also need to protect qemu_set_fd_handler from receiving a bogus file descriptor. Signed-off-by: Paolo Bonzini --- backends/rng-random.c

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Peter Crosthwaite
On Sat, Dec 21, 2013 at 8:07 AM, Peter Maydell wrote: > On 20 December 2013 21:41, Peter Crosthwaite > wrote: >> On Sat, Dec 21, 2013 at 4:16 AM, Peter Maydell >> wrote: >>> On 20 December 2013 10:00, Peter Maydell wrote: I'll have a think about this, because there are some wrinkles relat

[Qemu-devel] [PATCH v3 0/5] Monitor commands for object-add/del

2013-12-20 Thread Paolo Bonzini
These allow hotplugging (and hot-unplugging without leaking an object) virtio-rng devices. They can also be used for memory hotplug. v1->v2: fix mistyped underscores in qapi-schema.json v2->v3: preserve bisectability by inverting patches 4 and 5, keep lines under 80 characters since it c

[Qemu-devel] [PATCH v3 4/5] monitor: add object-del (QMP) and object_del (HMP) command

2013-12-20 Thread Paolo Bonzini
These two commands invoke the "unparent" method of Object. Signed-off-by: Paolo Bonzini --- hmp-commands.hx | 14 ++ hmp.c| 9 + hmp.h| 1 + qapi-schema.json | 14 ++ qmp-commands.hx | 25 + qmp.c| 14

[Qemu-devel] [PATCH v3 2/5] qom: fix leak for objects created with -object

2013-12-20 Thread Paolo Bonzini
The object must be unref-ed when its variable goes out of scope. Signed-off-by: Paolo Bonzini --- vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 7511e70..45f9177 100644 --- a/vl.c +++ b/vl.c @@ -2809,12 +2809,13 @@ static int object_create(QemuOpts *

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Peter Maydell
On 20 December 2013 22:07, Peter Maydell wrote: > On 20 December 2013 21:41, Peter Crosthwaite > wrote: >> On Sat, Dec 21, 2013 at 4:16 AM, Peter Maydell >> wrote: >>> * for the few registers which aren't neatly arranged so the >>>crn/crm/opc1/opc2 line up, we just split up into a separate

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Peter Maydell
On 20 December 2013 21:41, Peter Crosthwaite wrote: > On Sat, Dec 21, 2013 at 4:16 AM, Peter Maydell > wrote: >> On 20 December 2013 10:00, Peter Maydell wrote: >>> I'll have a think about this, because there are some wrinkles relating >>> to reset that might be usefully solved this way. >> >>

[Qemu-devel] [PATCH v2] qom: fix inherited interfaces

2013-12-20 Thread Paolo Bonzini
The interface type rework had two bugs with interfaces that are inherited from a superclass. First of all, the implementation type name was wrong (for example it was subclass::superclass::interface rather than just subclass::interface). Second, interfaces not registering their type anymore means

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Peter Crosthwaite
On Sat, Dec 21, 2013 at 4:16 AM, Peter Maydell wrote: > On 20 December 2013 10:00, Peter Maydell wrote: >> I'll have a think about this, because there are some wrinkles relating >> to reset that might be usefully solved this way. > > So my conclusion here is that really this boils down to how we

Re: [Qemu-devel] [PATCH v2] Add DSDT node for AppleSMC

2013-12-20 Thread Igor Mammedov
ase make sure > > the patch passes checkpatch.pl. I spot at least one case of missing > > braces - and it'd be a shame if it gets rejected over that. > > OK, here's v2 complete with braces: > > $ qemu/scripts/checkpatch.pl qemu-applesmc-20131220-v2.patch > t

Re: [Qemu-devel] [PATCH] test: QOM interface casting

2013-12-20 Thread Peter Crosthwaite
On Sat, Dec 21, 2013 at 12:08 AM, Igor Mammedov wrote: > On Fri, 20 Dec 2013 14:58:07 +0100 > Andreas Färber wrote: > >> Am 20.12.2013 14:26, schrieb Igor Mammedov: >> > Add basic regression testing for QOM Interface usage. >> > >> > Signed-off-by: Igor Mammedov >> > --- >> > v2: >> > - Peter C

Re: [Qemu-devel] [PATCH] qom: fix inherited interfaces

2013-12-20 Thread Igor Mammedov
On Fri, 20 Dec 2013 16:55:44 +0100 Paolo Bonzini wrote: > The interface type rework had two bugs with interfaces that are inherited > from a superclass. First of all, the implementation type name was wrong > (for example it was subclass::superclass::interface rather than > just subclass::interfa

[Qemu-devel] [PATCH v2] test: QOM interface casting

2013-12-20 Thread Igor Mammedov
Add basic regression testing for QOM Interface usage. Test checks casting to interface type/class for following cases: - interface implementation in leaf class - interface implementation in intermediate (parent) class Signed-off-by: Igor Mammedov --- - Peter Crosthwaite * s/Parent/parent

[Qemu-devel] [PATCH v2] Add DSDT node for AppleSMC

2013-12-20 Thread Gabriel L. Somlo
gets rejected over that. OK, here's v2 complete with braces: $ qemu/scripts/checkpatch.pl qemu-applesmc-20131220-v2.patch total: 0 errors, 0 warnings, 86 lines checked qemu-applesmc-20131220-v2.patch has no obvious style problems and is ready for submission. Thanks, Gabriel hw/mis

[Qemu-devel] [PATCH] doc: Mention chardev:id in available devices for -serial

2013-12-20 Thread Ingo van Lil
It is possible to pre-define a character device with the -chardev option and reference its id as serial device. The man page does not mention this feature. Use case: Use stdio as serial, but do not terminate VM on Ctrl-C -chardev stdio,id=mystdio,signal=off -serial chardev:mystdio Signe

Re: [Qemu-devel] [V4 PATCH 02/22] softfloat: Add float32_to_uint64()

2013-12-20 Thread Tom Musta
On 12/19/2013 3:31 PM, Peter Maydell wrote: > On 18 December 2013 20:19, Tom Musta wrote: >> This patch adds the float32_to_uint64() routine, which converts a >> 32-bit floating point number to an unsigned 64 bit number. >> >> This contribution can be licensed under either the softfloat-2a or -2b

Re: [Qemu-devel] [Qemu-ppc] [V4 PATCH 01/22] softfloat: Fix float64_to_uint64

2013-12-20 Thread Tom Musta
On 12/19/2013 4:11 PM, Peter Maydell wrote: > On 18 December 2013 20:19, Tom Musta wrote: >> The comment preceding the float64_to_uint64 routine suggests that >> the implementation is broken. And this is, indeed, the case. >> >> This patch properly implements the conversion of a 64-bit floating >

Re: [Qemu-devel] [PATCH v7 04/24] qapi: extend qdict_flatten() for QLists

2013-12-20 Thread Eric Blake
On 12/20/2013 11:28 AM, Max Reitz wrote: > Reversing qdict_array_split(), qdict_flatten() should flatten QLists as > well by interpreting them as QDicts where every entry's key is its > index. > > This allows bringing QDicts with QLists from QMP commands to the same > form as they would be given a

Re: [Qemu-devel] [PATCH v7 22/24] tests: Add test for qdict_flatten()

2013-12-20 Thread Eric Blake
On 12/20/2013 11:28 AM, Max Reitz wrote: > Add a test case for qdict_flatten() in tests/check-qdict.c. This test > case covers the flattening of subordinate QLists as well. > > Signed-off-by: Max Reitz > --- > tests/check-qdict.c | 76 > + > 1

Re: [Qemu-devel] [PATCH v7 21/24] tests: Add test for qdict_array_split()

2013-12-20 Thread Eric Blake
On 12/20/2013 11:28 AM, Max Reitz wrote: > Add a test case for qdict_array_split() in tests/check-qdict.c. > > Signed-off-by: Max Reitz > --- > tests/check-qdict.c | 80 > + > 1 file changed, 80 insertions(+) Reviewed-by: Eric Blake -- Eri

[Qemu-devel] [Bug 1042388] Re: qemu: Unsupported syscall: 257 (timer_create)

2013-12-20 Thread Erik de Castro Lopo
I just tried it here on my system using: - QEMU compiled from git HEAD. - ghc 7.6.3-6 from Debian and I was able to start compiling GHC from git. I didn't let it run to completion because I only have my laptop available at the moment. I suggest you try debugging some more and maybe try b

[Qemu-devel] [PATCH v7 01/24] blkdebug: Use errp for read_config()

2013-12-20 Thread Max Reitz
Use an Error variable in the read_config() function. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake --- block/blkdebug.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index ebc5f13..2eb2e8b 100644 --

[Qemu-devel] [PATCH v7 03/24] qdict: Add qdict_array_split()

2013-12-20 Thread Max Reitz
This function splits a QDict consisting of entries prefixed by incrementally enumerated indices into a QList of QDicts. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 37 ++

[Qemu-devel] [PATCH 2/2] net: Fix lan9118 buffer length handling

2013-12-20 Thread Roy Franz
The 9118 ethernet controller supports transmission of multi-buffer packets with arbitrary byte alignment of the start and end bytes. All writes to the packet fifo are 32 bits, so the controller discards bytes at the beginning and end of each buffer based on the 'Data start offset' and 'Buffer size

[Qemu-devel] [PATCH v7 16/24] blkverify: Allow command-line configuration

2013-12-20 Thread Max Reitz
Introduce the "test" and "raw" options for specifying images. Signed-off-by: Max Reitz --- block/blkverify.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index e15ac4c..dc14290 100644 --- a/block/blkverify.c

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Christoffer Dall
On Fri, Dec 20, 2013 at 04:43:23PM +, Peter Maydell wrote: > On 17 December 2013 15:12, Peter Maydell wrote: > > +MISMATCH_CHECK(CP_REG_ARM64_SYSREG_OP0_MASK, KVM_REG_ARM64_SYSREG_OP0_MASK) > > +MISMATCH_CHECK(CP_REG_ARM64_SYSREG_OP0_SHIFT, > > KVM_REG_ARM64_SYREG_OP0_SHIFT) > > +MISMATCH_CHE

[Qemu-devel] [PULL 01/01] seccomp: exit if seccomp_init() fails

2013-12-20 Thread Eduardo Otubo
From: Corey Bryant This fixes a bug where we weren't exiting if seccomp_init() failed. Signed-off-by: Corey Bryant Acked-by: Eduardo Otubo Acked-by: Paul Moore --- qemu-seccomp.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index cf

[Qemu-devel] [PULL 00/01] seccomp: exit if seccomp_init() fails

2013-12-20 Thread Eduardo Otubo
The following changes since commit 2a13f991123fa16841e6d94b02a9cc2c76d91725: seccomp: exit if seccomp_init() fails (2013-12-20 16:38:29 -0200) are available in the git repository at: git://github.com/otubo/qemu.git seccomp Corey Bryant (1): seccomp: exit if seccomp_init() fails qemu-secc

[Qemu-devel] [PATCH regression] virtio: add back call to virtio_bus_device_unplugged

2013-12-20 Thread Paolo Bonzini
This got lost in a rebase. Reported-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 144b9ca..a001e66 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1172,6 +1

[Qemu-devel] [PATCH v7 21/24] tests: Add test for qdict_array_split()

2013-12-20 Thread Max Reitz
Add a test case for qdict_array_split() in tests/check-qdict.c. Signed-off-by: Max Reitz --- tests/check-qdict.c | 80 + 1 file changed, 80 insertions(+) diff --git a/tests/check-qdict.c b/tests/check-qdict.c index dc5f05a..3e402cf 100644 ---

[Qemu-devel] [PATCH v7 24/24] iotests: Test file format nesting

2013-12-20 Thread Max Reitz
Add a test for nested image formats. Signed-off-by: Max Reitz --- tests/qemu-iotests/072 | 69 ++ tests/qemu-iotests/072.out | 21 ++ tests/qemu-iotests/group | 1 + 3 files changed, 91 insertions(+) create mode 100755 tests/qemu-io

[Qemu-devel] on vacation until January 10th

2013-12-20 Thread Paolo Bonzini
I'll be on vacation for the next 3 weeks, with particularly little time for reading email in the first 2. Marcelo Tosatti will be maintaining the kvm.git, kvm-unit-tests.git and qemu-kvm.git trees in my absence. Thanks Marcelo! I'll handle the kernel MPX patches when I'm back. I haven't applied

[Qemu-devel] [PATCH v7 23/24] iotests: Test new blkdebug/blkverify interface

2013-12-20 Thread Max Reitz
Add a test for the new blkdebug/blkverify interface. This test is not written in Python, although it uses QMP. This is because it invokes the qemu-io HMP command, which outputs errors to stderr instead of returning them through QMP. Filtering and testing that output is easier in a shell script tha

[Qemu-devel] [PATCH v7 20/24] qemu-io: Make filename optional

2013-12-20 Thread Max Reitz
Giving a filename is actually not essential, since it can be specified through the options as well - on the contrary: Sometimes a filename must not be given. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- qemu-io.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH v7 18/24] qapi: Add "errno" to the list of polluted words

2013-12-20 Thread Max Reitz
Using "errno" directly as an identifier results in various syntax errors; therefore it should be added to the list of polluted words. Signed-off-by: Max Reitz --- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 750e9fb..

[Qemu-devel] [PATCH v7 19/24] qapi: QMP interface for blkdebug and blkverify

2013-12-20 Thread Max Reitz
Add structures to support blkdebug and blkverify in blockdev-add. Signed-off-by: Max Reitz --- qapi-schema.json | 113 +-- 1 file changed, 109 insertions(+), 4 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index b9b051c..71f1ef

[Qemu-devel] [PATCH v7 22/24] tests: Add test for qdict_flatten()

2013-12-20 Thread Max Reitz
Add a test case for qdict_flatten() in tests/check-qdict.c. This test case covers the flattening of subordinate QLists as well. Signed-off-by: Max Reitz --- tests/check-qdict.c | 76 + 1 file changed, 76 insertions(+) diff --git a/tests/check-

[Qemu-devel] [PATCH v7 17/24] blkverify: Don't require protocol filename

2013-12-20 Thread Max Reitz
If the filename is not prefixed by "blkverify:" in blkverify_parse_filename(), the blkverify driver was not selected through that protocol prefix, but by an explicit command line (or QMP) option (like driver=blkverify). If blkverify_parse_filename() has been called, a filename has been given. If i

[Qemu-devel] [PATCH v7 15/24] blkdebug: Allow command-line file configuration

2013-12-20 Thread Max Reitz
Introduce the "image" option as an alternative to specifying the image through the filename. Signed-off-by: Max Reitz --- block/blkdebug.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index 21a4931..c8f8d56 100644 --- a/bloc

[Qemu-devel] [PATCH v7 08/24] block: Allow reference for bdrv_file_open()

2013-12-20 Thread Max Reitz
Allow specifying a reference to an existing block device (by name) for bdrv_file_open() instead of a filename and/or options. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block.c | 25 ++--- block/blkdebug.c | 2 +- block/blkverify.c | 2 +-

[Qemu-devel] [PATCH v7 05/24] qemu-option: Add qemu_config_parse_qdict()

2013-12-20 Thread Max Reitz
This function basically parses command-line options given as a QDict replacing a config file. For instance, the QDict {"section.opt1": 42, "section.opt2": 23} corresponds to the config file: [section] opt1 = 42 opt2 = 23 It is possible to specify multiple sections and also multiple sections of t

[Qemu-devel] [PATCH v7 14/24] blockdev: Move "file" to legacy_opts

2013-12-20 Thread Max Reitz
Specifying the image filename through the "file" option is a legacy option and should not be supported by blockdev-add (in that case, giving a string for "file" references an existing block device). Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- blockdev.c | 19 ++- 1 file

[Qemu-devel] [PATCH v7 11/24] block: Add bdrv_open_image()

2013-12-20 Thread Max Reitz
Add a common function for opening images to be used for block drivers specified through BlockdevRefs in an option QDict. The difference from bdrv_file_open() is that this function may invoke bdrv_open() instead, allowing auto-detection of the driver to be used; and second, it automatically extracts

[Qemu-devel] [PATCH v7 12/24] block: Use bdrv_open_image() in bdrv_open()

2013-12-20 Thread Max Reitz
Using bdrv_open_image() instead of bdrv_file_open() directly in bdrv_open() is easier. Signed-off-by: Max Reitz --- block.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/block.c b/block.c index 76b6c25..9e4e85f 100644 --- a/block.c +++ b/block.c @@ -1128

[Qemu-devel] [PATCH v7 13/24] block: Allow recursive "file"s

2013-12-20 Thread Max Reitz
It should be possible to use a format as a driver for a file which in turn requires another file, i.e., nesting file formats. Allowing nested file formats results in e.g. qcow2 BlockDriverStates never being directly passed to bdrv_open_common() from bdrv_file_open(), but instead being handed throu

[Qemu-devel] [PATCH v7 10/24] block: Allow block devices without files

2013-12-20 Thread Max Reitz
blkdebug and blkverify will, in order to retain compatibility, not support the field "file" implicitly through bdrv_open(). In order to be able to use those drivers without giving a filename anyway, it is necessary to be able to have block devices without files implicitly opened by bdrv_open(). Thi

[Qemu-devel] [PATCH v7 04/24] qapi: extend qdict_flatten() for QLists

2013-12-20 Thread Max Reitz
Reversing qdict_array_split(), qdict_flatten() should flatten QLists as well by interpreting them as QDicts where every entry's key is its index. This allows bringing QDicts with QLists from QMP commands to the same form as they would be given as command-line options, thereby allowing them to be p

Re: [Qemu-devel] [PATCH] acpi unit-test: Create temporary disk file under /tmp

2013-12-20 Thread Marcel Apfelbaum
On Fri, 2013-12-20 at 12:36 +0400, Michael Tokarev wrote: > 20.12.2013 11:05, Fam Zheng wrote: > > As other tests, the image file is created in /tmp other than current > > dir. Thus there will not be an unignored file under tests for intree > > build. > > > > Signed-off-by: Fam Zheng > > --- > >

[Qemu-devel] [PATCH v7 09/24] block: Pass reference to bdrv_file_open()

2013-12-20 Thread Max Reitz
With that now being possible, bdrv_open() should try to extract a block device reference from the options and pass it to bdrv_file_open(). Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH v7 00/24] blkdebug/blkverify: Allow QMP configuration

2013-12-20 Thread Max Reitz
Currently, the configuration of blkdebug and blkverify is done through the "filename" alone. There is now way of manually choosing blkdebug or blkverify as a driver and using a normal image filename. In the case of blkdebug, the filename starts with the protocol prefix, follows up with the name of

[Qemu-devel] [PATCH v7 02/24] blkdebug: Don't require sophisticated filename

2013-12-20 Thread Max Reitz
If the filename is not prefixed by "blkdebug:" in blkdebug_parse_filename(), the blkdebug driver was not selected through that protocol prefix, but by an explicit command line option (file.driver=blkdebug or something similar). Contrary to the current reaction, this is not a problem at all; we just

[Qemu-devel] [PATCH v7 07/24] blkdebug: Use command-line in read_config()

2013-12-20 Thread Max Reitz
Use qemu_config_parse_qdict() to parse the command-line options in addition to the config file. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block/blkdebug.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index ac

[Qemu-devel] [PATCH v7 06/24] blkdebug: Always call read_config()

2013-12-20 Thread Max Reitz
Move the check whether there actually is a config file into the read_config() function. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake --- block/blkdebug.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/block

[Qemu-devel] [PATCH 0/2] net: Fix lan9118 multi-buffer transmit

2013-12-20 Thread Roy Franz
This patchset fixes some bugs in the lan9118 emulation that were found while debugging UEFI network support on the emulated VExpress platform. The 9118 ethernet controller supports transmission of multi-buffer packets with arbitrary byte alignment of the start and end bytes of each buffer. All

[Qemu-devel] [PATCH 1/2] net: Fix lan9118 TX "CMD A" handling

2013-12-20 Thread Roy Franz
The 9118 ethernet controller supports transmission of multi-buffer packets with arbitrary byte alignment of the start and end bytes. All writes to the packet fifo are 32 bits, so the controller discards bytes at the beginning and end of each buffer based on the 'Data start offset' and 'Buffer size

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Peter Maydell
On 20 December 2013 10:00, Peter Maydell wrote: > I'll have a think about this, because there are some wrinkles relating > to reset that might be usefully solved this way. So my conclusion here is that really this boils down to how we want to deal with sysregs for AArch64 capable CPUs in general.

Re: [Qemu-devel] [PATCH v2 2/2] full introspection support for QMP

2013-12-20 Thread Paolo Bonzini
Il 20/12/2013 12:57, Amos Kong ha scritto: > { 'type': 'DataObjectBase', > 'data': { '*name': 'str', 'type': 'str' } } > { 'union': 'DataObjectMemberType', > 'discriminator': {}, > 'data': { 'reference': 'str', > 'undefined': 'DataObject', > 'extend': 'DataObject' } }

[Qemu-devel] [Bug 1262081] Re: qemu-system-sparc in qemu 1.7.0 fails to boot with Sun ROM

2013-12-20 Thread Mark Cave-Ayland
** Attachment added: "Updated QEMU,tcx.bin FCode ROM for QEMU 1.7+" https://bugs.launchpad.net/qemu/+bug/1262081/+attachment/390/+files/QEMU%2Ctcx.bin -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/

[Qemu-devel] [Bug 1262081] Re: qemu-system-sparc in qemu 1.7.0 fails to boot with Sun ROM

2013-12-20 Thread Mark Cave-Ayland
Hi Peter, Thanks for the bug report - it was caused by the FCode ROM containing some Forth that depended upon some specific OpenBIOS variables that weren't present in OBP. If you replace the QEMU,tcx.bin from QEMU 1.7 with the one attached to this bug report then you should be able to boot your V

Re: [Qemu-devel] [PATCH] softfloat: Fix factor 2 error for scalbn on denormal inputs

2013-12-20 Thread Peter Maydell
On 20 December 2013 17:34, Richard Henderson wrote: > On 12/19/2013 01:57 PM, Peter Maydell wrote: >> If the input to float*_scalbn() is denormal then it represents >> a number 0.[mantissabits] * 2^(1-exponentbias) (and the actual >> exponent field is all zeroes). This means that when we convert >

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Peter Maydell
On 20 December 2013 04:24, Peter Crosthwaite wrote: > On Thu, Dec 19, 2013 at 7:11 PM, Peter Maydell > wrote: >> On 19 December 2013 06:01, Peter Crosthwaite >> wrote: >>> On Wed, Dec 18, 2013 at 1:12 AM, Peter Maydell >>> wrote: +*key = ENCODE_AA64_CP_REG(r2->cp, r->

Re: [Qemu-devel] [PATCH] softfloat: Fix factor 2 error for scalbn on denormal inputs

2013-12-20 Thread Richard Henderson
On 12/19/2013 01:57 PM, Peter Maydell wrote: > If the input to float*_scalbn() is denormal then it represents > a number 0.[mantissabits] * 2^(1-exponentbias) (and the actual > exponent field is all zeroes). This means that when we convert > it to our unpacked encoding the unpacked exponent must be

Re: [Qemu-devel] [PATCH v6 04/22] qapi: extend qdict_flatten() for QLists

2013-12-20 Thread Max Reitz
On 20.12.2013 18:19, Max Reitz wrote: On 20.12.2013 10:46, Stefan Hajnoczi wrote: On Thu, Dec 19, 2013 at 08:47:05PM +0100, Max Reitz wrote: Reversing qdict_array_split(), qdict_flatten() should flatten QLists as well by interpreting them as QDicts where every entry's key is its index. This al

Re: [Qemu-devel] [PATCH v6 04/22] qapi: extend qdict_flatten() for QLists

2013-12-20 Thread Max Reitz
On 20.12.2013 10:46, Stefan Hajnoczi wrote: On Thu, Dec 19, 2013 at 08:47:05PM +0100, Max Reitz wrote: Reversing qdict_array_split(), qdict_flatten() should flatten QLists as well by interpreting them as QDicts where every entry's key is its index. This allows bringing QDicts with QLists from Q

Re: [Qemu-devel] [PATCH 02/21] target-arm: A64: add support for ld/st unsigned imm

2013-12-20 Thread Peter Maydell
On 20 December 2013 16:57, Richard Henderson wrote: > On 12/20/2013 08:52 AM, Peter Maydell wrote: >> Were you planning to review patches 12 ("Remove >> ARMCPU/CPUARMState from cpregs APIs used by decoder") >> and 19 ("Widen exclusive-access support struct fields >> to 64 bits") ? I think those ar

[Qemu-devel] KVM call agenda for 2013-12-24

2013-12-20 Thread Juan Quintela
Hi First of all, poll told to move the call earlier. 9:00 EST (15:00 CET or 6:00 Pacific) Are we having a call on the 24th? Do we have any topics? Are enough people not on vacation? Happy Christmas Thanks, Juan.

Re: [Qemu-devel] [PATCH 02/21] target-arm: A64: add support for ld/st unsigned imm

2013-12-20 Thread Richard Henderson
On 12/20/2013 08:52 AM, Peter Maydell wrote: > Were you planning to review patches 12 ("Remove > ARMCPU/CPUARMState from cpregs APIs used by decoder") > and 19 ("Widen exclusive-access support struct fields > to 64 bits") ? I think those are the only two patches in > this set which I don't either h

Re: [Qemu-devel] [PATCH 02/21] target-arm: A64: add support for ld/st unsigned imm

2013-12-20 Thread Peter Maydell
On 20 December 2013 16:44, Richard Henderson wrote: > On 12/20/2013 08:29 AM, Peter Maydell wrote: >> On 20 December 2013 16:26, Richard Henderson wrote: >>> On 12/20/2013 08:08 AM, Peter Maydell wrote: > In particular, opc = 2 && size = 2 should be unallocated. This is LDRSW (immed

Re: [Qemu-devel] [PATCH 02/21] target-arm: A64: add support for ld/st unsigned imm

2013-12-20 Thread Richard Henderson
On 12/20/2013 08:29 AM, Peter Maydell wrote: > On 20 December 2013 16:26, Richard Henderson wrote: >> On 12/20/2013 08:08 AM, Peter Maydell wrote: In particular, opc = 2 && size = 2 should be unallocated. >>> >>> This is LDRSW (immediate), not unallocated, isn't it? >>> >>> I agree the decode

Re: [Qemu-devel] [PATCH 11/21] target-arm: Update generic cpreg code for AArch64

2013-12-20 Thread Peter Maydell
On 17 December 2013 15:12, Peter Maydell wrote: > +MISMATCH_CHECK(CP_REG_ARM64_SYSREG_OP0_MASK, KVM_REG_ARM64_SYSREG_OP0_MASK) > +MISMATCH_CHECK(CP_REG_ARM64_SYSREG_OP0_SHIFT, KVM_REG_ARM64_SYREG_OP0_SHIFT) > +MISMATCH_CHECK(CP_REG_ARM64_SYSREG_OP1_MASK, KVM_REG_ARM64_SYSREG_OP1_MASK) > +MISMATCH_

Re: [Qemu-devel] [PATCH] Add DSDT node for AppleSMC

2013-12-20 Thread Alexander Graf
On 20.12.2013, at 16:54, Gabriel L. Somlo wrote: > AppleSMC (-device isa-applesmc) is required to boot OS X guests. > OS X expects a SMC node to be present in the ACPI DSDT. This patch > adds a SMC node to the DSDT, and dynamically patches the return value > of SMC._STA to either 0x0B if the chi

[Qemu-devel] [PULL 1/2] vl: add missing transition debug->finish_migrate

2013-12-20 Thread Luiz Capitulino
From: Paolo Bonzini This fixes an abort if you invoke the "migrate" command while the guest is being debugged. Cc: qemu-sta...@nongnu.org Cc: lcapitul...@redhat.com Signed-off-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vl.c b/

[Qemu-devel] [PULL 2/2] qemu-monitor: HMP cpu-add wrapper

2013-12-20 Thread Luiz Capitulino
From: "Jason J. Herne" Add HMP cpu-add wrapper to allow cpu hot plugging via monitor. Signed-off-by: Jason J. Herne Reviewed-By: Igor Mammedov Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 13 + hmp.c | 10 ++ hmp.h | 1 + 3 files changed, 24 i

[Qemu-devel] [PULL 0/2] QMP queue

2013-12-20 Thread Luiz Capitulino
I've dropped the two series which need to be respun. As the fix I have from Paolo is pending for a long time, I figure it's better to send what I have in the queue now. The following changes since commit f8251db121c3f051b22a7536b97d160c30bcccd4: Merge remote-tracking branch 'agraf/tags/signed-p

[Qemu-devel] [PULL 00/18] Block patches

2013-12-20 Thread Stefan Hajnoczi
Happy holidays to all! I'll be back on January 2nd. Kevin is also away so there will be no block pull request next Friday. If there is anything urgent, please contact me at stefa...@gmail.com. The following changes since commit f8251db121c3f051b22a7536b97d160c30bcccd4: Merge remote-tracking

Re: [Qemu-devel] [PATCH 02/21] target-arm: A64: add support for ld/st unsigned imm

2013-12-20 Thread Peter Maydell
On 20 December 2013 16:26, Richard Henderson wrote: > On 12/20/2013 08:08 AM, Peter Maydell wrote: >>> In particular, opc = 2 && size = 2 should be unallocated. >> >> This is LDRSW (immediate), not unallocated, isn't it? >> >> I agree the decode logic isn't laid out the same as the ARM ARM, >> but

Re: [Qemu-devel] [PATCHv2] block: add native support for NFS

2013-12-20 Thread Stefan Hajnoczi
On Fri, Dec 20, 2013 at 4:57 PM, Peter Lieven wrote: > On 20.12.2013 16:54, Stefan Hajnoczi wrote: >> >> On Fri, Dec 20, 2013 at 4:49 PM, Peter Lieven wrote: >>> >>> On 20.12.2013 16:30, Stefan Hajnoczi wrote: On Fri, Dec 20, 2013 at 3:43 PM, Peter Lieven wrote: > > On 20.12.20

Re: [Qemu-devel] [PATCH 02/21] target-arm: A64: add support for ld/st unsigned imm

2013-12-20 Thread Richard Henderson
On 12/20/2013 08:08 AM, Peter Maydell wrote: >> In particular, opc = 2 && size = 2 should be unallocated. > > This is LDRSW (immediate), not unallocated, isn't it? > > I agree the decode logic isn't laid out the same as the ARM ARM, > but I'm pretty sure it's correct. Oops, typo: opc=3 && size=2

  1   2   3   >