On Tue, May 5, 2015 at 10:43 AM, Richard Henderson wrote:
> On 05/05/2015 10:19 AM, Peter Maydell wrote:
>> On 5 May 2015 at 05:45, Peter Crosthwaite wrote:
>>> Add the ARM specific disassembly flags setup, so ARM can be correctly
>>> disassembled from the monitor.
>>>
>>> Signed-off-by: Peter Cr
On Wed, 6 May 2015 10:10:15 +0530
Bharata B Rao wrote:
> On Mon, May 04, 2015 at 05:15:04PM +0200, Thomas Huth wrote:
> > On Fri, 24 Apr 2015 12:17:30 +0530
> > Bharata B Rao wrote:
> >
> > > Signed-off-by: Bharata B Rao
> > > Signed-off-by: Andreas Färber
> >
> > Not sure if QEMU is fully f
Dear All,
Please ignore the previous void message. For unknown reason the reply
systematically ignores the content of the message? Retrying breaking the
history... Content was:
I am looking for "Tested-by" for this series and related Machvirt
dynamic sysbus device instantiation. Did anyone try th
On Tue, May 05, 2015 at 05:20:04PM +1000, David Gibson wrote:
> On Fri, Apr 24, 2015 at 12:17:39PM +0530, Bharata B Rao wrote:
> > From: Gu Zheng
> >
> > In order to deal well with the kvm vcpus (which can not be removed without
> > any
> > protection), we do not close KVM vcpu fd, just record a
On Wed, 6 May 2015 09:58:09 +0530
Bharata B Rao wrote:
> On Mon, May 04, 2015 at 06:10:59PM +0200, Thomas Huth wrote:
> > On Fri, 24 Apr 2015 12:17:28 +0530
> > Bharata B Rao wrote:
> >
> > > Factor out bits of sPAPR specific CPU initialization code into
> > > a separate routine so that it can
John Snow writes:
> Instead of letting printf and friends do this for us
> one byte at a time, fill a buffer ourselves and then
> send the entire buffer in one go.
>
> This gives a moderate speed improvement over the old
> method.
Out of curiosity: how much of the improvement is due to doing our
On Tue, May 05, 2015 at 04:59:51PM +1000, David Gibson wrote:
> On Fri, Apr 24, 2015 at 12:17:34PM +0530, Bharata B Rao wrote:
> > Support CPU hotplug via device-add command. Set up device tree
> > entries for the hotplugged CPU core and use the exising EPOW event
> > infrastructure to send CPU hot
Thomas Huth writes:
> On Tue, 5 May 2015 14:23:56 +0530
> Nikunj A Dadhania wrote:
>
>> Each hardware instance has a platform unique location code. The OF
>> device tree that describes a part of a hardware entity must include
>> the “ibm,loc-code” property with a value that represents the loca
> -Original Message-
> From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com]
> Sent: Tuesday, May 05, 2015 11:24 PM
> To: Stefan Hajnoczi
> Cc: Paolo Bonzini; Wen Congyang; Fam Zheng; Kevin Wolf; Lai Jiangshan; qemu
> block; Jiang, Yunhong; Dong, Eddie; qemu devel; Max Reitz; Gonglei;
David Gibson writes:
> On Tue, May 05, 2015 at 02:23:55PM +0530, Nikunj A Dadhania wrote:
>> From: Michael Roth
>>
>> We need to set the proper drc_index values in ibm,my-drc-index
>> fields in order to allow a PCI device that was present at
>> boot-time to be unplugged.
>>
>> Previously SLOF
Thomas Huth writes:
> On Tue, 5 May 2015 14:23:54 +0530
> Nikunj A Dadhania wrote:
>
>> All the PCI enumeration and device node creation was off-loaded to
>> SLOF. With PCI hotplug support, code needed to be added to add device
>> node. This creates multiple copy of the code one in SLOF and oth
Thomas Huth writes:
> On Tue, 5 May 2015 14:23:52 +0530
> Nikunj A Dadhania wrote:
>
>> The properties reg/assigned-resources need to encode 64-bit memory
>> address space as part of phys.hi dword.
>>
>> 00 if configuration space
>> 01 if IO region,
>> 10 if 32-bit MEM region
>> 11 if
On Tue, May 05, 2015 at 05:22:52PM +1000, David Gibson wrote:
> On Fri, Apr 24, 2015 at 12:17:40PM +0530, Bharata B Rao wrote:
> > When supporting CPU hot removal by parking the vCPU fd and reusing
> > it during hotplug again, there can be cases where we try to reenable
> > KVM_CAP_IRQ_XICS CAP for
Just wanted to note that for the i386 target, Windows XP as a guest fails to
boot. When it safe mode, loading always stops at
Windows\System32\Drivers\Mup.sys. The guest boots in QEMU 2.2.0, so this seems
to indicate a bug with the May 5th or earlier patch set.
Thomas Huth writes:
> On Tue, 5 May 2015 14:23:51 +0530
> Nikunj A Dadhania wrote:
>
>> Signed-off-by: Nikunj A Dadhania
>> ---
>> hw/ppc/spapr_pci.c | 11 ---
>> 1 file changed, 11 deletions(-)
>>
>> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
>> index 2e7590c..4df3a33 1006
On Mon, May 04, 2015 at 05:53:23PM +0200, Thomas Huth wrote:
> On Fri, 24 Apr 2015 12:17:34 +0530
> Bharata B Rao wrote:
>
> > Support CPU hotplug via device-add command. Set up device tree
> > entries for the hotplugged CPU core and use the exising EPOW event
> > infrastructure to send CPU hotpl
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/041| 66 ++-
tests/qemu-iotests/iotests.py | 28 ++
2 files changed, 43 insertions(+), 51 deletions(-)
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index 59a8f73..3d46e
Using this function would always be wrong because a dirty bitmap must
have a specific owner that consumes the dirty bits and calls
bdrv_reset_dirty_bitmap().
Remove the unused function to avoid future misuse.
Reviewed-by: Eric Blake
Signed-off-by: Fam Zheng
---
block.c | 12 -
Unsetting dirty globally with discard is not very correct. The discard may zero
out sectors (depending on can_write_zeroes_with_unmap), we should replicate
this change to destinition side to make sure that the guest sees the same data.
Calling bdrv_reset_dirty also troubles mirror job because the
Only poll the specific type of event we are interested in, to avoid
stealing events that should be consumed by someone else.
Suggested-by: John Snow
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/iotests.py | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/tests/qemu
This checks that the discard on mirror source that effectively zeroes
data is also reflected by the data of target.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/131 | 59 ++
tests/qemu-iotests/131.out | 5
tests/qemu-iotests/group | 1 +
v2: Fix typo and add Eric's rev-by in patch 3.
Add patch 1 to discard target in mirror job. (Paolo)
Add patch 6 to improve iotests.wait_ready. (John)
This fixes the mirror assert failure reported by wangxiaolong:
https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg04458.html
The dir
If guest discards a source cluster during mirror, we would want to
discard target side as well.
Signed-off-by: Fam Zheng
---
block/mirror.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index 58f391a..37a5b61 100644
--- a/block/
On Tue, May 05, 2015 at 04:49:08PM +1000, David Gibson wrote:
> On Fri, Apr 24, 2015 at 12:17:32PM +0530, Bharata B Rao wrote:
> > Keep cpu_model field in MachineState uptodate so that it can be used
> > from the CPU hotplug path.
> >
> > Signed-off-by: Bharata B Rao
> > Reviewed-by: David Gibson
On Mon, May 04, 2015 at 05:15:04PM +0200, Thomas Huth wrote:
> On Fri, 24 Apr 2015 12:17:30 +0530
> Bharata B Rao wrote:
>
> > Signed-off-by: Bharata B Rao
> > Signed-off-by: Andreas Färber
>
> Not sure if QEMU is fully following the kernel Sob-process, but if
> that's the case, I think your S
On Tue, May 05, 2015 at 11:47:30AM +1000, David Gibson wrote:
> On Fri, Apr 24, 2015 at 12:17:29PM +0530, Bharata B Rao wrote:
> > From: Andreas Färber
> >
> > Signed-off-by: Andreas Färber
> > Signed-off-by: Bharata B Rao
>
> So, how to organize this generically is still under discussion. Fo
On Mon, May 04, 2015 at 06:10:59PM +0200, Thomas Huth wrote:
> On Fri, 24 Apr 2015 12:17:28 +0530
> Bharata B Rao wrote:
>
> > Factor out bits of sPAPR specific CPU initialization code into
> > a separate routine so that it can be called from CPU hotplug
> > path too.
> >
> > Signed-off-by: Bhar
On Thu, Apr 30, 2015 at 10:37:21PM -0500, Michael Roth wrote:
> Quoting David Gibson (2015-04-30 20:29:23)
> > Michael,
> >
> > I was just looking at some of the logging stuff in qemu-ga, and it
> > seems to be doing something very odd with the "domain".
> >
> > static void ga_log(const gchar *do
On Wed, 05/06 02:26, Dong, Eddie wrote:
>
>
> > -Original Message-
> > From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com]
> > Sent: Tuesday, May 05, 2015 11:24 PM
> > To: Stefan Hajnoczi
> > Cc: Paolo Bonzini; Wen Congyang; Fam Zheng; Kevin Wolf; Lai Jiangshan; qemu
> > block; Jian
> -Original Message-
> From: Eric Blake [mailto:ebl...@redhat.com]
> Sent: Tuesday, May 05, 2015 10:29 PM
> To: Xu, Quan; stefano.stabell...@eu.citrix.com; stef...@linux.vnet.ibm.com
> Cc: qemu-devel@nongnu.org; wei.l...@citrix.com; dgde...@tycho.nsa.gov;
> xen-de...@lists.xen.org
> Subje
On Tue, 05/05 18:17, John Snow wrote:
>
>
> On 05/05/2015 08:46 AM, Fam Zheng wrote:
> > Signed-off-by: Fam Zheng
> > ---
> > tests/qemu-iotests/041| 66
> > ++-
> > tests/qemu-iotests/iotests.py | 28 ++
> > 2 files changed, 43 i
On Tue, 05/05 15:06, Paolo Bonzini wrote:
>
>
> On 05/05/2015 14:46, Fam Zheng wrote:
> > Unsetting dirty globally with discard is not very correct. The discard may
> > zero
> > out sectors (depending on can_write_zeroes_with_unmap), we should replicate
> > this change to destinition side to mak
On 04/08/2015 02:37 PM, Emilio G. Cota wrote:
> The callers have just looked up the page descriptor, so there's no
> point in searching again for it.
>
> Signed-off-by: Emilio G. Cota
> ---
> translate-all.c | 11 +++
> 1 file changed, 3 insertions(+), 8 deletions(-)
Reviewed-by: Richar
On 04/14/2015 06:45 PM, Alexander Graf wrote:
> The store conditional instruction wants to store when the condition
> is fulfilled, so we should branch out when it's not true.
>
> The code today branches out when the condition is true, clearly
> reversing the logic. Fix it up by negating the condi
On 05/05/2015 07:22 PM, Eric Blake wrote:
> On 05/05/2015 04:22 PM, John Snow wrote:
>> qtest currently has a static buffer of size 1024 that if we
>> overflow, ignores the additional data silently which leads to
>> hangs or stream failures.
>>
>> Use glib's string facilities to allow arbitrari
From: "Emilio G. Cota"
This brings down the size of the struct from 56 to 32 bytes on 64-bit,
and to 20 bytes on 32-bit. This leads to memory savings:
Before:
$ find . -name 'tcg.o' | xargs size
textdata bss dec hex filename
41131 29800 88 71019 1156b ./aarch64-so
Only one tcg related patch since the 2.3 freeze.
r~
The following changes since commit 874e9aeeeb74c5459639a93439a502d262847e68:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-20150505-1' into
staging (2015-05-05 14:06:12 +0100)
are available in the git repository
On 05/05/2015 04:22 PM, John Snow wrote:
> qtest currently has a static buffer of size 1024 that if we
> overflow, ignores the additional data silently which leads
> to hangs or stream failures.
>
> Use glib's string facilities to allow arbitrarily long data,
> but split this off into a new functi
Public bug reported:
Hello guys,
There seems to be a bug in qemu-img with 2.3.0 that wasn't there in
2.2.1 qemu convert will always fail converting. See the output
below:
Started by upstream project "Create windows image" build number 73
originally caused by:
Started by user anonymo
On 04/30/2015 02:07 PM, John Snow wrote:
> The day we all feared is here, and I am proposing we allow the migration
> of the AHCI device tentatively for the 2.4 development window.
>
> There are some more NCQ migration tests are needed, but I felt that it was
> important to get migration enabled
For larger pieces of data that won't need to be debugged and
viewing the hex nibbles is unlikely to be useful, we can encode
data using base64 instead of encoding each byte as %02x, which
leads to some space savings and faster reads/writes.
For now, the default is left as hex nibbles in memwrite()
Where it makes sense, use the new faster primitives.
For generally small reads/writes such as for the PRDT
and FIS packets, stick with the more wasteful but
easier to debug memread/memwrite.
For ahci-test;
With this patch:
real0m3.675s
user0m2.582s
sys 0m1.718s
Without this /series/:
Instead of letting printf and friends do this for us
one byte at a time, fill a buffer ourselves and then
send the entire buffer in one go.
This gives a moderate speed improvement over the old
method.
Signed-off-by: John Snow
---
qtest.c | 20
tests/libqtest.c | 17
Previously, memset was just a frontend to write() and only
stupidly sent the pattern many times across the wire.
Let's not discuss who stupidly wrote it like that in the first place.
(Hint: It was me.)
Signed-off-by: John Snow
---
qtest.c | 20
tests/libqtest.c |
Adds new qtest protocol commands for base64 reads and writes,
as well as a proper command for memset instead of faking it
via write.
This improves the ahci-test performance on my machine from about
14 seconds to about ~3.5.
v3:
- Including a memset optimization.
v2:
- Resend as non-RFC.
==
For
qtest currently has a static buffer of size 1024 that if we
overflow, ignores the additional data silently which leads
to hangs or stream failures.
Use glib's string facilities to allow arbitrarily long data,
but split this off into a new function, qtest_sendf.
Static data can still be sent using
On 05/05/2015 08:46 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/041| 66
> ++-
> tests/qemu-iotests/iotests.py | 28 ++
> 2 files changed, 43 insertions(+), 51 deletions(-)
>
> diff --git a/tests/qe
On 05/05/2015 06:46 AM, Fam Zheng wrote:
> Using this function woule always be wrong because a dirty bitmap must
s/woule/would/
> have a specific owner that consumes the dirty bits and calls
> bdrv_reset_dirty_bitmap().
>
> Remove the unused function to avoid future misuse.
>
> Signed-off-by: F
Yes, this is a known issue which I can reproduce using a Solaris
installation. I still have a few outstanding bugs on my list to do
before I can start looking into this one, but I will keep this bug up to
date as/when I can start work on it - apologies for not being able to be
more specific than th
On Tue, 05 May 2015 11:34:02 -0400
John Snow wrote:
>
>
> On 05/05/2015 08:52 AM, Luiz Capitulino wrote:
> > I lost track of it. Is v4 a new posting?
>
> Yup. Latest with fixes. Eric re-reviewed it all and Kashyap (and I)
> tested it.
OK, I'm queuing it for my next pass over my qmp-patches m
On 01/05/15 16:24, Yongbok Kim wrote:
> MIPS SIMD Architecture vector loads and stores require misalignment support.
> MSA Memory access should work as an atomic operation. Therefore, it has to
> check validity of all the addresses for the operation.
As far as I can tell mips_cpu_do_unaligned_acce
On Mon, Apr 27, 2015 at 04:53:29PM +0200, Michael Mueller wrote:
[...]
> diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
> index 4d75ff0..94fede5 100644
> --- a/target-s390x/kvm.c
> +++ b/target-s390x/kvm.c
> @@ -276,12 +276,59 @@ static int cpu_model_set(KVMState *s, uint64_t attr,
> void *a
FWIW:
While trying to restore (apply) a snapshot on a Windows VM (ie: qemu-img
snapshot -a snapshotname windows.qcow2 where the image file is 150gb in
size,) I got the above error:
qemu-img: /build/buildd/qemu-2.0.0+dfsg/block/qcow2-refcount.c:467:
update_refcount_discard: Assertion `d->bytes + l
On 05/05/2015 10:19 AM, Peter Maydell wrote:
> On 5 May 2015 at 05:45, Peter Crosthwaite wrote:
>> Add the ARM specific disassembly flags setup, so ARM can be correctly
>> disassembled from the monitor.
>>
>> Signed-off-by: Peter Crosthwaite
>> ---
>> monitor.c | 11 +++
>> 1 file change
On 05/04/2015 10:50 PM, Kevin O'Connor wrote:
On Mon, May 04, 2015 at 11:41:54PM +0200, Igor Mammedov wrote:
It's not really split implementation, it's installing an additional
table which is purely SeaBIOS specific since QEMU doesn't care about
PPID data at all nor does it need to do so.
If bo
Hi,
Is my first email to that list ;)
I can reproduce this bug with v2.2 and v2.3. I'm not sure about the results
after testing with v2.1 (doesn't show errors but seems to be still broken).
% qemu-img convert -f raw -O vmdk -o subformat=streamOptimized
100GB_inputfile.img outputfile0.vmdk
(no
Signed-off-by: Bastian Koppelmann
---
target-tricore/op_helper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
index 011f09f..1c23aeb 100644
--- a/target-tricore/op_helper.c
+++ b/target-tricore/op_helper.c
@@ -2458,6 +2458,7 @@ void h
The lower part of the combined offset was sign extended and could lead to
wrong results.
Signed-off-by: Bastian Koppelmann
---
target-tricore/tricore-opcodes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-tricore/tricore-opcodes.h b/target-tricore/tricore-opcodes.h
Hi,
here is a round of bugfixes for the TriCore, which are mostly one liner.
Cheers,
Bastian
Bastian Koppelmann (5):
target-tricore: Fix LOOP using wrong register for compare
target-tricore: fix SLR_LD_W and SLR_LD_W_POSTINC insn being a 2 byte
memory access insted of 4
target-tricore:
On Tue, May 05, 2015 at 06:12:16PM +0200, Michael Mueller wrote:
> On Tue, 5 May 2015 10:55:47 -0300
> Eduardo Habkost wrote:
>
> > On Mon, Apr 27, 2015 at 04:53:15PM +0200, Michael Mueller wrote:
> > > This patch introduces the function cpu_desc_avail() which returns by
> > > default true if not
Signed-off-by: Bastian Koppelmann
---
target-tricore/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-tricore/translate.c b/target-tricore/translate.c
index 54a48cd..d2cd640 100644
--- a/target-tricore/translate.c
+++ b/target-tricore/translate.c
@@ -3440,7 +
Signed-off-by: Bastian Koppelmann
---
target-tricore/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target-tricore/translate.c b/target-tricore/translate.c
index d2cd640..663b2a0 100644
--- a/target-tricore/translate.c
+++ b/target-tricore/translate.c
@@ -3745
Signed-off-by: Bastian Koppelmann
---
target-tricore/op_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
index 9907e07..011f09f 100644
--- a/target-tricore/op_helper.c
+++ b/target-tricore/op_helper.c
@@ -2581,7 +
On 05/04/2015 09:45 PM, Peter Crosthwaite wrote:
> -explicit QEMUDisassembler(FILE *stream) : stream_(stream) { }
> +explicit QEMUDisassembler() { }
The explicit is no longer helpful, and I'd still initialize stream_ to null.
r~
On 5 May 2015 at 05:45, Peter Crosthwaite wrote:
> Add the ARM specific disassembly flags setup, so ARM can be correctly
> disassembled from the monitor.
>
> Signed-off-by: Peter Crosthwaite
> ---
> monitor.c | 11 +++
> 1 file changed, 11 insertions(+)
>
> diff --git a/monitor.c b/monit
On 05/04/2015 09:44 PM, Peter Crosthwaite wrote:
> Alpha looks easier, but I have
> no test case (can anyone link me a random elf or kernel? Doesn't need
> to do anything meaningful other than enter execution of instructions).
If all you need is some executed instructions, the included bios image
From: 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
From: 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
From: 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
From: 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 newli
From: 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 pr
From: 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 no
From: 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 wit
From: Eric Blake
...or an array of dictionaries. Although we have to cater to
existing commands, returning a non-dictionary means the command
is not extensible (no new name/value pairs can be added if more
information must be returned in parallel). By making the
whitelist explicit, any new comm
On Tue, May 5, 2015 at 7:38 AM, Claudio Fontana
wrote:
> Hello Peter,
>
> On 05.05.2015 06:45, Peter Crosthwaite wrote:
>> As it is more fully featured. It has multi-endian, thumb and AArch64
>> support whereas the existing monitor disas support only has vanilla
>> AA32 support.
>>
>> E.G. Running
From: Eric Blake
Now that we no longer have nested structs to visit, the use of
prefix strings is no longer required. Remove the code that is
no longer reachable.
Signed-off-by: Eric Blake
Reviewed-by: Markus Armbruster
Signed-off-by: Markus Armbruster
---
scripts/qapi-visit.py | 49 +++
From: 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
From: 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 demonstratin
From: 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
Signed-of
From: 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
From: 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 wo
From: Eric Blake
Previous commits demonstrated that the generator had several
flaws with less-than-perfect unions:
- a simple union that listed the same branch twice (or two variant
names that map to the same C enumerator, including the implicit
MAX sentinel) ended up generating invalid C code
-
From: Eric Blake
Now that we have a way to validate every type, we can also be
stricter about enforcing that callers that want to bypass
type safety in generated code. Prior to this patch, it didn't
matter what value was associated with the key 'gen', but it
looked odd that 'gen':'yes' could res
From: 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.
From: 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
From: Eric Blake
Demonstrate that the qapi generator doesn't deal very well with
redefined expressions. At the parse level, they are silently
accepted; and while the testsuite just stops at parsing, I've
further tested that many of them cause generator crashes or
invalid C code if they were appe
From: 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
From: 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
From: Eric Blake
For a few QMP commands, we are forced to pass an arbitrary type
without tracking it properly in QAPI. Among the existing clients,
this unnamed type was spelled 'dict', 'visitor', and '**'; this
patch standardizes on '**', matching the documentation changes
earlier in the series.
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
From: 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 fallo
ng tests
that expose weaknesses in the old parser, then beefing up the
generator to catch the problem during the initial parse rather
than choking with an obscure python message or even causing a C
compilation failure.
The following changes since commit 874e9aeeeb74c5459639a93439a502d262847e68:
From: 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-g
From: Eric Blake
The next patch will quit special-casing "'union':'Foo',
'discriminator':{}" and instead use "'alternate':'Foo'".
Separating docs from implementation makes it easier to focus
on wording without holding up code. In particular, making
alternate a separate type makes for a nice typ
From: Eric Blake
Demonstrate that the qapi generator doesn't deal well with enums
that aren't up to par. Later patches will update the expected
results as the generator is made stricter.
Signed-off-by: Eric Blake
Reviewed-by: Markus Armbruster
Signed-off-by: Markus Armbruster
---
tests/Makef
From: Eric Blake
Special-casing 'discriminator == {}' for handling anonymous unions
is getting awkward; since this particular type is not always a
dictionary on the wire, it is easier to treat it as a completely
different class of type, "alternate", so that if a type is listed
in the union_types
From: 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
From: Eric Blake
Reduce churn in the future patch that replaces anonymous unions
with a new metatype 'alternate' by changing 'AnonUnion' to
'Alternate'.
Signed-off-by: Eric Blake
Reviewed-by: Markus Armbruster
Signed-off-by: Markus Armbruster
---
tests/qapi-schema/qapi-schema-test.json | 2
From: Eric Blake
None of the existing QMP or QGA interfaces uses a union with a
base type but no discriminator; it is easier to avoid this in the
generator to save room for other future extensions more likely to
be useful. An earlier commit added a union-base-no-discriminator
test to ensure that
1 - 100 of 354 matches
Mail list logo