Eric Blake writes:
> On 04/02/2015 11:29 AM, Markus Armbruster wrote:
>
>>
>> * Implicit type definitions are made explicit, and given
>> auto-generated names. These names start with ':' so they don't
>> clash with the user's names.
>>
>> Example: a simple union implicitly defines an enu
Eric Blake writes:
> On 04/29/2015 07:06 AM, Eric Blake wrote:
>> Previous commits demonstrated that the generator overlooked various
>> bad naming situations:
>> - types, commands, and events need a valid name
>> - enum members must be valid names, when combined with prefix
>> - union and altern
Eric Blake writes:
> On 04/29/2015 07:06 AM, Eric Blake wrote:
>> A future patch will be using a 'name':{dictionary} entry in the
>> QAPI schema to specify a default value for an optional argument
>> (see previous commit messages for more details why); but existing
>> use of inline nested structs
Peter Maydell writes:
> The only valid BlockBackend to pass to sd_reset() is the one for
> the SD card, which is sd->blk. Drop the second argument from this
> function in favour of having it just use sd->blk.
>
> Signed-off-by: Peter Maydell
> ---
> A minor cleanup that was lurking in the omap3
> From: Alex Williamson [mailto:alex.william...@redhat.com]
> Sent: Tuesday, April 21, 2015 2:13 AM
> On Thu, 2015-04-16 at 17:24 +, Tian, Kevin wrote:
> > ping...
> >
> > > From: Tian, Kevin
> > > Sent: Friday, April 10, 2015 10:33 AM
> > >
> > > Hi,
> > >
> > > We are working on Linux/Windows
Hi
The changes appear to be necessary. I was building Windows QEMU GA on
Fedora 21, MINGW cross-compiler v. 4.9.2, build 20141030, Fedora MinGW
4.9.2-1.fc21 and before the changes, linking failed.
Below is the building log for qga-vss.dll before the changes:
-
$ make qga/vss-win32/qga-vss.
On 26/04/2015 09:04, Yossi Hindin wrote:
> +ifdef QEMU_GA_MSI_WITH_VSS
> +${QEMU_GA_MSI}: qga/vss-win32/qga-vss.dll qemu-ga.exe
Shouldn't the qemu-ga.exe dependency be unconditional?
> +endif
> +
> +${QEMU_GA_MSI}: config-host.mak
> +
> +${QEMU_GA_MSI}: qga/installer/qemu-ga.wxs
> + $(call
On 26/04/2015 09:04, Yossi Hindin wrote:
> +
> +
> +
> +
"Environment"
Ironically, msitools was started exactly to build an installer with
qemu-ga (the idea was to do it with raw tables, that was a few months
before Marc-Andre wrote wixl). It only took 2.5 years...
Paolo
On Wed, 29 Apr 2015 12:42:21 -0400
Stefan Berger wrote:
> On 04/29/2015 05:06 AM, Igor Mammedov wrote:
> > On Wed, 22 Apr 2015 14:18:55 -0400
> > Stefan Berger wrote:
> >
> >> On 04/22/2015 03:00 AM, Igor Mammedov wrote:
> >>> On Thu, 16 Apr 2015 10:05:35 -0400
> >>> Stefan Berger wrote:
> >>>
On Wed, 29 Apr 2015 21:41:39 +0800
Shannon Zhao wrote:
>
>
> On 2015/4/28 17:48, Shannon Zhao wrote:
> > On 2015/4/28 17:35, Igor Mammedov wrote:
> >> On Tue, 28 Apr 2015 16:52:19 +0800
> >> Shannon Zhao wrote:
> >>
> >>> On 2015/4/28 16:15, Igor Mammedov wrote:
> >> btw:
> whole
On 04/05/2015 05:18, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias"
>
> Signed-off-by: Edgar E. Iglesias
> ---
> hw/core/ptimer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
> index 2abad1f..8437bd6 100644
> --- a/hw/core
On 01/05/2015 03:18, Michael Roth wrote:
> Sorry, I mixed up memory regions with memory region alias. Memory region
> aliases do a memory_region_ref() on the original MR, similar to
> memory_region_add_subregion(), so that's what ends up creating the
> reference to the owner/PHB.
>
> So I think
On 2015/5/4 17:22, Igor Mammedov wrote:
> On Wed, 29 Apr 2015 21:41:39 +0800
> Shannon Zhao wrote:
>
>>
>>
>> On 2015/4/28 17:48, Shannon Zhao wrote:
>>> On 2015/4/28 17:35, Igor Mammedov wrote:
On Tue, 28 Apr 2015 16:52:19 +0800
Shannon Zhao wrote:
> On 2015/4/28 16:15, Igo
Hi Gerd,
On (Mon) 27 Oct 2014 [12:57:57], Gerd Hoffmann wrote:
> On Mo, 2014-10-27 at 12:45 +0100, Marc-André Lureau wrote:
> > Hi
> >
> >
> > On Mon, Oct 27, 2014 at 9:08 AM, Gerd Hoffmann
> > wrote:
> > > +static void spice_chr_accept_input(struct CharDriverState
> > *chr)
> >
On 02/05/2015 00:54, Michael Roth wrote:
>> >
>> > What about unparenting children devices in the device's unrealize
>> > callback? It sucks that you have to do it manually, but using stale
>> > canonical paths isn't the nicest thing either.
> That does seems to do the trick. It felt wrong when
On Thu, 30 Apr 2015 22:44:08 -0400
Stefan Berger wrote:
> Add a TPM2 ACPI table if a TPM 2 is used in the backend.
>
> Rename tpm_find() to tpm_get_version() and have this function
> return the version of the TPM found, TPMVersion_Unspec if
> no TPM is found. Use the version number to build vers
On Thu, 30 Apr 2015 16:19:07 -0300
Eduardo Habkost wrote:
> This will provide a predictable path for the CPU objects, and a more
> powerful alternative for the query-cpus QMP command, as now every QOM
> property on CPU objects can be easily queried.
provided the way cpu_index is generated, path w
On 01/04/15 13:18, Michael S. Tsirkin wrote:
On Wed, Apr 01, 2015 at 12:51:42PM +0300, James Bottomley wrote:
On Wed, 2015-04-01 at 11:50 +0200, Michael S. Tsirkin wrote:
On Wed, Apr 01, 2015 at 12:44:28PM +0300, James Bottomley wrote:
On Fri, 2015-02-27 at 09:57 +0300, Denis V. Lunev wrote:
On 01/05/2015 00:02, Peter Maydell wrote:
> On 30 April 2015 at 22:33, Christopher Covington
> wrote:
>> On Apr 30, 2015 2:28 PM, "Peter Maydell" wrote:
>>> Are you really really sure the _raw function is the correct one?
>>> Nowhere else in the codebase calls it except the other wrappers
>>> i
On Wed, 15 Apr 2015 21:24:55 +0800
Shannon Zhao wrote:
> From: Shannon Zhao
>
> DSDT consists of the usual common table header plus a definition
> block in AML encoding which describes all devices in the platform.
>
> After initializing DSDT with header information the namespace is
> created w
On 04/05/2015 11:47, Igor Mammedov wrote:
> On Thu, 30 Apr 2015 16:19:07 -0300
> Eduardo Habkost wrote:
>
> > This will provide a predictable path for the CPU objects, and a more
> > powerful alternative for the query-cpus QMP command, as now every QOM
> > property on CPU objects can be easily
Hello.
The .gitignore in the master branch contains the following lines :
/qapi-types.[ch]
/qapi-visit.[ch]
/qapi-event.[ch]
Why is it so ? Are they generated automatically each time I compile the
project ?
I am modifying qapi-types.h and qapi-types.c , am I doing wrong ?
regards, Guillaume
On Wed, 15 Apr 2015 21:24:57 +0800
Shannon Zhao wrote:
> From: Shannon Zhao
>
> MADT describes GIC enabled ARM platforms. The GICC and GICD
> subtables are used to define the GIC regions.
>
> Signed-off-by: Shannon Zhao
> Signed-off-by: Shannon Zhao
> Reviewed-by: Alex Bennée
> ---
> hw/ar
On Mon, 04 May 2015 17:30:20 +0800
Shannon Zhao wrote:
>
>
> On 2015/5/4 17:22, Igor Mammedov wrote:
> > On Wed, 29 Apr 2015 21:41:39 +0800
> > Shannon Zhao wrote:
> >
> >>
> >>
> >> On 2015/4/28 17:48, Shannon Zhao wrote:
> >>> On 2015/4/28 17:35, Igor Mammedov wrote:
> On Tue, 28 Apr 2
Am 01.05.2015 um 16:23 hat Stefan Hajnoczi geschrieben:
> On Thu, Apr 30, 2015 at 01:11:40PM +0300, Alberto Garcia wrote:
> > Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables)
> > {
> > BDRVQcowState *s = bs->opaque;
> > Qcow2Cache *c;
> > -int i;
> >
> > c
On Mon, 04 May 2015 09:47:11 +0200
Guillaume Le Louët wrote:
> Hello.
>
> The .gitignore in the master branch contains the following lines :
> /qapi-types.[ch]
> /qapi-visit.[ch]
> /qapi-event.[ch]
>
> Why is it so ? Are they generated automatically each time I compile the
> project ?
> I am m
Am 01.05.2015 um 01:28 hat Don Slutz geschrieben:
> On 04/30/15 16:15, Kevin Wolf wrote:
> > Am 30.04.2015 um 21:15 hat Eric Blake geschrieben:
> >> [adding qemu-block]
> >>
> >> On 04/30/2015 12:23 PM, Don Slutz wrote:
> >>> ~/qemu/out/master/x86_64-softmmu/qemu-system-x86_64 -h | head
> >>> QEM
On 2015/5/4 17:58, Igor Mammedov wrote:
> On Wed, 15 Apr 2015 21:24:55 +0800
> Shannon Zhao wrote:
>
>> From: Shannon Zhao
>>
>> DSDT consists of the usual common table header plus a definition
>> block in AML encoding which describes all devices in the platform.
>>
>> After initializing DSDT
On 03.05.2015 10:16, Erik Rull wrote:
Hi all,
is there a comparison chart of the different disk formats supported by
QEMU? Especially throughput, latencies and robustness against
unexpected power loss on the host would be interesting.
Thanks a lot.
Best regards,
Erik
Hi Erik,
I'm sorry,
On 2015/5/4 18:21, Igor Mammedov wrote:
> On Wed, 15 Apr 2015 21:24:57 +0800
> Shannon Zhao wrote:
>
>> From: Shannon Zhao
>>
>> MADT describes GIC enabled ARM platforms. The GICC and GICD
>> subtables are used to define the GIC regions.
>>
>> Signed-off-by: Shannon Zhao
>> Signed-off-by: Sha
We can't just reopen files, we don't know what state they are in. Any
data that has been written to the image between the last flush and the
point where gluster made the fd invalid may be there or may be missing.
If any data is missing, we can't continue the guest or you'll get data
corruption.
Th
You're right, I noticed that compiling with make was removing my
modifications.
I ended up modifying the qapi-schema.json .
May I advise to move the generated .c and .h files into a generated/
folder ?
Thank you Thomas.
Le 04/05/2015 13:01, Thomas Huth a écrit :
On Mon, 04 May 2015 09:47:11
On 4 May 2015 at 12:37, Guillaume Le Louët wrote:
> You're right, I noticed that compiling with make was removing my
> modifications.
> I ended up modifying the qapi-schema.json .
>
> May I advise to move the generated .c and .h files into a generated/ folder
> ?
If you want to keep generated fil
Am 30.04.2015 um 20:07 hat John Snow geschrieben:
> libqos.c:
> -set_context for addressing which commands go where
> -migrate performs the actual migration
>
> malloc.c:
> - Structure of the allocator is adjusted slightly with
> a second-tier malloc to make swapping around the a
If the is_write argument is true, address_space_rw writes to memory
and thus reads from the buffer. The opposite holds if is_write is
false. Fix the model.
Cc: Markus Armbruster
Signed-off-by: Paolo Bonzini
---
scripts/coverity-model.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(
Signed-off-by: Quan Xu
--Changes in v6:
-Remove stray insertion.
---
configure| 14 ++
hmp.c| 2 ++
qapi-schema.json | 16 ++--
qemu-options.hx | 13 +++--
tpm.c| 7 ++-
5 files changed, 47 insertions(+), 5 deletions(-)
dif
*INTRODUCTION*
The goal of virtual Trusted Platform Module (vTPM) is to provide a TPM
functionality to virtual machines (Fedora, Ubuntu, Redhat, Windows .etc). This
allows programs to interact with a TPM in a virtual machine the same way they
interact with a TPM on the physical system. Each virt
and rename it to tpm_util_is_selftest().
Signed-off-by: Quan Xu
--Changes in v6:
-Remove the redundant copy right.
-Reduce the includes to its minimum.
---
hw/tpm/Makefile.objs | 2 +-
hw/tpm/tpm_passthrough.c | 13 +
hw/tpm/tpm_util.c| 39
This Patch provides the glue for the TPM_TIS(Qemu frontend) to Xen
stubdom vTPM domain that provides the actual TPM functionality. It
sends data and TPM commends with xen_vtpm_frontend. It is similar as
another two vTPM backens:
*vTPM passthrough backen Since QEMU 1.5.
*vTPM libtpms-based backe
This patch adds infrastructure for xen front drivers living in qemu,
so drivers don't need to implement common stuff on their own. It's
mostly xenbus management stuff: some functions to access XenStore,
setting up XenStore watches, callbacks on device discovery and state
changes, and handle event
This patch adds infrastructure for xen front drivers living in qemu,
so drivers don't need to implement common stuff on their own. It's
mostly xenbus management stuff: some functions to access XenStore,
setting up XenStore watches, callbacks on device discovery and state
changes, and handle event
make sure QEMU machine class is initialized and QEMU has registered
Xen stubdom vTPM driver when call tpm_init()
Signed-off-by: Quan Xu
Reviewed-by: Stefan Berger
---
vl.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/vl.c b/vl.c
index 74c2681..7bc87f1 1
On 04/05/2015 13:14, Max Reitz wrote:
> I'm sorry, but I don't know whether such a chart exists (the closest
> thing I know is http://en.wikipedia.org/wiki/Category:Disk_images -
> which is not very close...). However, the general assumption we as
> developers are working with is that if the user
Am 30.04.2015 um 20:07 hat John Snow geschrieben:
> The day we all feared is here, and I am proposing we allow the migration
> of the AHCI device tentatively for the 2.4 development window.
>
> There are some more NCQ migration tests are needed, but I felt that it was
> important to get migration
This series adds IRQ forwarding support in the VFIO platform device.
The VFIO platform device uses the KVM-VFIO device to enable IRQ forwarding.
Dependency List:
- QEMU KVM platform device passthrough and its dependencies
see https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg04379.html
-
Since the introduction of the qemu_irq/gsi hash table in kvm,
the gsi information is stored in kvm. New functions are introduced
to allocate/populate a kvm_vfio_dev_irq struct pointer from a
qemu_irq object and free it.
Signed-off-by: Eric Auger
---
include/sysemu/kvm.h | 5 +
kvm-all.c
Tests whether the forwarded IRQ modality is available.
In the positive device IRQs are forwarded. This control is
achieved with KVM-VFIO device. with such a modality injection
still is handled through irqfds. However end of interrupt is
not trapped anymore. As soon as the guest completes its virtua
Integrate updated KVM-VFIO API related to forwarded IRQ
Update the kvm header according to the header found in
http://git.linaro.org/people/eric.auger/linux.git
branch 4.1-rc1_forward
Signed-off-by: Eric Auger
---
linux-headers/linux/kvm.h | 12
1 file changed, 12 insertions(+)
di
the device is now used in platform for forwarded IRQ setup
Signed-off-by: Eric Auger
---
hw/vfio/common.c | 2 +-
include/hw/vfio/vfio-common.h | 4
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index b012620..18ad67c 100644
-
I find out the subject is wrong in v5/v6. Just update the subject as below.
Subject: [PATCH v6 3/6] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend
driver
This drvier transfers any request/repond between TPM xenstubdoms
driver and Xen vTPM stubdom, and facilitates communications between
Xen v
On Mon, 04 May 2015 19:11:39 +0800
Shannon Zhao wrote:
>
>
> On 2015/5/4 17:58, Igor Mammedov wrote:
> > On Wed, 15 Apr 2015 21:24:55 +0800
> > Shannon Zhao wrote:
> >
> >> From: Shannon Zhao
> >>
> >> DSDT consists of the usual common table header plus a definition
> >> block in AML encodin
On Mon, 04 May 2015 11:59:52 +0200
Paolo Bonzini wrote:
>
>
> On 04/05/2015 11:47, Igor Mammedov wrote:
> > On Thu, 30 Apr 2015 16:19:07 -0300
> > Eduardo Habkost wrote:
> >
> > > This will provide a predictable path for the CPU objects, and a
> > > more powerful alternative for the query-cpu
On 04/05/2015 15:16, Igor Mammedov wrote:
>> > Can we use the APIC id then? Perhaps wrapped with a CPUState-level
>> > method get_stable_processor_id()?
> We have CPUClass->get_arch_id() which results in APIC id for
> target-i386.
> But I'd rather see an arbitrary DEVICE->id as index/name, that
On Mon, May 04, 2015 at 03:16:16PM +0200, Igor Mammedov wrote:
> On Mon, 04 May 2015 11:59:52 +0200
> Paolo Bonzini wrote:
>
> >
> >
> > On 04/05/2015 11:47, Igor Mammedov wrote:
> > > On Thu, 30 Apr 2015 16:19:07 -0300
> > > Eduardo Habkost wrote:
> > >
> > > > This will provide a predictabl
Kevin Wolf writes:
> Am 01.05.2015 um 01:28 hat Don Slutz geschrieben:
[...]
>> So do you want a more complex patch that allows the format to be
>> specified?
>>
>> Only for 'disk_image'?
>>
>> Include -hd* ?
>
> I'm afraid that there is no nice way to improve the plain 'disk_image'
> case. You
The patch introduces new concept: minimal memory alignment for bounce
buffers. Original so called "optimal" value is actually minimal required
value for aligment. It should be used for validation that the IOVec
is properly aligned and bounce buffer is not required.
Though, from the performance poi
The following sequence
int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644);
for (i = 0; i < 10; i++)
write(fd, buf, 4096);
iperforms 5% better if buf is aligned to 4096 bytes rather then to
512 bytes.
I have used the following program to test
#define _GNU_SOURCE
#inc
The following sequence
int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644);
for (i = 0; i < 10; i++)
write(fd, buf, 4096);
performs 5% better if buf is aligned to 4096 bytes.
The difference is quite reliable.
On the other hand we do not want at the moment to enforce
Paolo Bonzini writes:
> If the is_write argument is true, address_space_rw writes to memory
> and thus reads from the buffer. The opposite holds if is_write is
> false. Fix the model.
>
> Cc: Markus Armbruster
> Signed-off-by: Paolo Bonzini
> ---
> scripts/coverity-model.c | 6 +++---
> 1 fi
On Mon, May 04, 2015 at 03:19:32PM +0200, Paolo Bonzini wrote:
>
>
> On 04/05/2015 15:16, Igor Mammedov wrote:
> >> > Can we use the APIC id then? Perhaps wrapped with a CPUState-level
> >> > method get_stable_processor_id()?
> > We have CPUClass->get_arch_id() which results in APIC id for
> > t
Am 04.05.2015 um 15:39 hat Markus Armbruster geschrieben:
> Kevin Wolf writes:
>
> > Am 01.05.2015 um 01:28 hat Don Slutz geschrieben:
> [...]
> >> So do you want a more complex patch that allows the format to be
> >> specified?
> >>
> >> Only for 'disk_image'?
> >>
> >> Include -hd* ?
> >
> >
On 05/03/2015 10:32 AM, penghao...@sina.com wrote:
Poor subject line. Please try to keep subjects under 65 characters in
length (see 'git shortlog -30' for good examples). Maybe:
keyboard: handle ps2 typing buffer overrun
> Starting a linux guest with ps2 keyboard ,if you type many times duri
On Mon, Apr 27, 2015 at 11:06:07AM +0530, Bharata B Rao wrote:
> On Sun, Apr 26, 2015 at 05:17:48PM +0530, Bharata B Rao wrote:
> > On Fri, Apr 24, 2015 at 12:17:27PM +0530, Bharata B Rao wrote:
> > > Reorganize CPU device tree generation code so that it be reused from
> > > hotplug path. CPU dt en
On Fri, Apr 24, 2015 at 12:17:24PM +0530, Bharata B Rao wrote:
> Advertise CPU DR-capability to the guest via device tree.
>
> Signed-off-by: Bharata B Rao
> Signed-off-by: Michael Roth
>[spapr_drc_reset implementation]
> ---
> hw/ppc/spapr.c | 29 +
>
On Fri, Apr 24, 2015 at 12:17:27PM +0530, Bharata B Rao wrote:
> Reorganize CPU device tree generation code so that it be reused from
> hotplug path. CPU dt entries are now generated from spapr_finalize_fdt()
> instead of spapr_create_fdt_skel().
>
> Note: This is how the split-up looks like now:
We were missing the 'size' builtin type (which means that QAPI using
[ 'size' ] would fail to compile).
Signed-off-by: Eric Blake
Reviewed-by: Markus Armbruster
---
scripts/qapi.py | 1 +
tests/qapi-schema/qapi-schema-test.json | 3 ++-
tests/qapi-schema/qapi-schema-test
There was some redundancy between builtin_types[] and
builtin_type_qtypes{}. Merge them into one.
Signed-off-by: Eric Blake
Reviewed-by: Markus Armbruster
---
scripts/qapi-types.py | 10 +-
scripts/qapi-visit.py | 6 +++---
scripts/qapi.py | 8 +---
3 files changed, 9 inser
The next patch will quit special-casing "'union':'Foo',
'discriminator':{}" and instead use "'alternate':'Foo'".
Separating docs from implementation makes it easier to focus
on wording without holding up code. In particular, making
alternate a separate type makes for a nice type hierarchy:
Previous commits demonstrated that the generator had several
flaws with less-than-perfect unions:
- a simple union that listed the same branch twice (or two variant
names that map to the same C enumerator, including the implicit
MAX sentinel) ended up generating invalid C code
- an anonymous union
Python 2 and Python 3 have a wild history of whether strings
default to ascii or unicode, where Python 3 requires checking
isinstance(foo, basestr) to cover all strings, but where that
code is not portable to Python 2. It's simpler to just state
that we don't care about Unicode strings, and to jus
The previous commit demonstrated that the generator had several
flaws with less-than-perfect enums:
- an enum that listed the same string twice (or two variant
strings that map to the same C enumerator) ended up generating
an invalid C enum
- because the generator adds a _MAX terminator to each enu
Referring to "type" as both a meta-type (built-in, enum, union,
alternate, or struct) and a specific type (the name that the
schema uses for declaring structs) is confusing. Finish up the
conversion to using "struct" in qapi schema by removing the hack
in the generator that allowed 'type'.
Signed
None of the existing QMP or QGA interfaces uses a union with a
base type but no discriminator; it is easier to avoid this in the
generator to save room for other future extensions more likely to
be useful. An earlier commit added a union-base-no-discriminator
test to ensure that we eventually give
The tests of UserDefNativeListUnion serve to validate code
generation of simple unions without a base type, except that it
did not have full coverage in the strict test. The next commits
will remove tests and support for simple unions with a base type,
so there is no real loss at repurposing that
Now that we have a way to validate every type, we can also be
stricter about enforcing that callers that want to bypass
type safety in generated code. Prior to this patch, it didn't
matter what value was associated with the key 'gen', but it
looked odd that 'gen':'yes' could result in bypassing th
Referring to "type" as both a meta-type (built-in, enum, union,
alternate, or struct) and a specific type (the name that the
schema uses for declaring structs) is confusing. The confusion
is only made worse by the fact that the generator mostly already
refers to struct even when dealing with expr[
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
A future patch will be using a 'name':{dictionary} entry in the
QAPI schema to specify a default value for an optional argument
(see previous commit messages for more details why); but existing
use of inline nested structs conflicts with that goal. Now that
all commands have been changed to avoid i
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
---
tests/qapi-schema/qapi-schema-test.json | 2 +-
tests/qapi-schema/qapi-schema-test.out | 4 ++--
Referring to "type" as both a meta-type (built-in, enum, union,
alternate, or struct) and a specific type (the name that the
schema uses for declaring structs) is confusing. Now that the
generator accepts 'struct' as a synonym for 'type', update all
documentation to use saner wording.
Signed-off-
Special-casing 'discriminator == {}' for handling anonymous unions
is getting awkward; since this particular type is not always a
dictionary on the wire, it is easier to treat it as a completely
different class of type, "alternate", so that if a type is listed
in the union_types array, we know it i
Previous commits demonstrated that the generator overlooked various
bad naming situations:
- types, commands, and events need a valid name
- enum members must be valid names, when combined with prefix
- union and alternate branches cannot be marked optional
Valid upstream names match [a-zA-Z][a-zA
Demonstrate that the qapi generator doesn't deal well with
expressions that aren't up to par. Later patches will improve
the expected results as the generator is made stricter. Only
a few of the the added tests actually behave sanely at
rejecting obvious problems or demonstrating success.
Note th
This patch widens the scope of a try block (with the attending
reindentation required by Python) in preparation for a future
patch adding more instances of QAPIExprError inside the block.
It's easier to separate indentation from semantic changes, so
this patch has no real behavior change.
Signed-o
The handling of \ inside QAPI strings was less than ideal, and
really only worked JSON's \/, \\, \", and our extension of \'
(an obvious extension, when you realize we use '' instead of ""
for strings). For other things, like '\n', it resulted in a
literal 'n' instead of a newline.
Of course, at
Demonstrate that the qapi generator doesn't deal very well with
redefined expressions. At the parse level, they are silently
accepted; and while the testsuite just stops at parsing, I've
further tested that many of them cause generator crashes or
invalid C code if they were appended to qapi-schema
...or an array of dictionaries. Although we have to cater to
existing commands, returning a non-dictionary means the command
is not extensible (no new name/value pairs can be added if more
information must be returned in parallel). By making the
whitelist explicit, any new command that falls foul
Previous patches have led up to the point where I create the
new meta-type "'alternate':'Foo'". See the previous patches
for documentation; I intentionally split as much work into
earlier patches to minimize the size of this patch, but a lot
of it is churn due to testsuite fallout after updating t
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 Sob should be below the one of Andreas in
case you're the last person who touc
The previous commit demonstrated that the generator overlooked some
fairly basic broken expressions:
- missing metataype
- metatype key has a non-string value
- unknown key in relation to the metatype
- conflicting metatype (this patch treats the second metatype as an
unknown key of the first key v
In the testsuite, UserDefTwo and UserDefNested were identical
structs other than the member names. Reduce code duplication by
having just one type, and choose names that also favor reuse.
This will also make it easier for a later patch to get rid of
inline nested types in QAPI. When touching code
The previous commit demonstrated that the generator overlooked
duplicate expressions:
- a complex type or command reusing a built-in type name
- redeclaration of a type name, whether by the same or different
metatype
- redeclaration of a command or event
- collision of a type with implicit 'Kind' e
For a few QMP commands, we are forced to pass an arbitrary type
without tracking it properly in QAPI. Among the existing clients,
this unnamed type was spelled 'dict', 'visitor', and '**'; this
patch standardizes on '**', matching the documentation changes
earlier in the series.
Meanwhile, for th
Referring to "type" as both a meta-type (built-in, enum, union,
alternate, or struct) and a specific type (the name that the
schema uses for declaring structs) is confusing. Do the bulk of
the conversion to "struct" in qapi schema, with a fairly
mechanical:
for f in `find -name '*.json'; do sed -
A future patch will be using a 'name':{dictionary} entry in the
QAPI schema to specify a default value for an optional argument
(see previous commit message for more details why); but existing
use of inline nested structs conflicts with that goal. This patch
fixes one of only two commands relying o
A future patch will be using a 'name':{dictionary} entry in the
QAPI schema to specify a default value for an optional argument
(see previous commit message for more details why); but existing
use of inline nested structs conflicts with that goal. This patch
fixes one of only two commands relying o
While our top-level COPYING with its GPLv2+ license applies to
any documentation file that omits explicit instructions, these
days it's better to be a good example of calling out our
intentions. Correct use of GPL requires the use of a copyright
statement, so I'm adding notice to two QAPI document
Our type inheritance for both 'struct' and for flat 'union' merges
key/value pairs from the base class with those from the type in
question. Although the C code currently boxes things so that there
is a distinction between which member is referred to, the QMP wire
format does not allow passing a k
Now that we know every expression is valid with regards to
its keys, we can add further tests that those keys refer to
valid types. With this patch, all uses of a type (the 'data':
of command, type, union, alternate, and event; the 'returns':
of command; the 'base': of type and union) must resolve
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
---
v7: tweak comments in enum-max-member test
---
tests/Makefile
1 - 100 of 213 matches
Mail list logo