>v10 --> v11
>change configure interface in virt machine configure parameters.
>
>v11 --> v12
>realize pvpanic as a pci device and use the mmio of pci device.
>
>Philippe Mathieu-Daudé (2):
>hw/misc/pvpanic: Build the pvpanic device in $(common-obj)
>hw/misc/pvpanic: Cosmetic renaming
>
>Peng Hao (
Now that the schema can be configured, it is crucial that all types
are configured the same. Make sure config-host.h is included, by
checking osdep.h inclusion. The build-sys tracks the dependency and
rebuilds the types if the configuration changed.
Signed-off-by: Marc-André Lureau
---
scripts/q
This is the second part of the "add #if pre-processor conditions to
generated code" series, adding schema member conditions (roughly
16-38/49).
Members can be exploded as dictionnary with 'type'/'if' keys:
{ 'struct': 'TestIfStruct', 'data':
{ 'foo': 'int',
'bar': { 'type': 'int', 'if': 'de
Introduce a new helper function to check if the given keys are known,
and if mandatory keys are present. The function will be reused in
other places in the following code changes.
Signed-off-by: Marc-André Lureau
---
scripts/qapi/common.py | 20 +---
1 file changed, 13 insertions
The C standard has the initial value at 0 and the subsequent values
incremented by 1. No need to set this explicitely.
This will prevent from artificial "gaps" when compiling out some enum
values and having unnecessarily large MAX values & enums arrays, or
simplifying iterating over valid enum val
This will allow to add and access more properties associated with enum
values/members, like the associated 'if' condition. We may want to
have a specialized type QAPISchemaEnumMember, for now this will do.
Modify gen_enum() and gen_enum_lookup() for the same reason.
Suggested-by: Markus Armbruste
Rename QAPISchemaEnumType.values and related variables to members.
Makes sense ever since commit 93bda4dd4 changed .values from list of
string to list of QAPISchemaMember. Obvious no-op.
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
---
scripts/qapi/common.py | 24
Desugar the enum NAME form to { 'name': NAME }. This will allow to add
new enum members, such as 'if' in the following patch.
Signed-off-by: Marc-André Lureau
---
scripts/qapi/common.py| 49 ---
tests/Makefile.include| 3 +-
tests/
Add condition to QAPIEvent enum members based on the event 'if'.
The generated code remains unconditional for now. Later patches
generate the conditionals (also there is no additional coverage of
this change in qapi-schema-test.out since the event_names enum is an
implicit type created by qapi/eve
Commit 93bda4dd461 changed the internal representation of enum type
members from str to QAPISchemaMember, but we still print only a
string. Has been good enough, as the name is the member's only
attribute of interest, but that's about to change. To prepare, print
them more like object type member
This will allow to get rid of short form handling in a following
patch.
Signed-off-by: Marc-André Lureau
Suggested-by: Markus Armbruster
---
scripts/qapi/common.py | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
index fd
QAPISchemaMember gains .ifcond for enum members: inherited classes,
such as QAPISchemaObjectTypeMember, will thus have an ifcond member
after this (those different types will also use the .ifcond to store
the condition and generate conditional code in the following patches).
The generated code rem
The generated code is for now *unconditional*. Later patches generate
the conditionals.
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
---
scripts/qapi/common.py | 14 +++---
docs/devel/qapi-code-gen.txt| 10 ++
tests/qapi-schema/qap
Wherever a struct/union/alternate/command/event member with NAME: TYPE
form is accepted, desugar it to a NAME: { 'type': TYPE } form.
This will allow to add new member details, such as 'if' in the
following patch to introduce conditionals, or 'default' for default
values etc.
Signed-off-by: Marc-
This makes it a bit clearer what is the intent of the dictionnary for
the check_type() function, since there was some confusion on a
previous iteration of this series.
Suggested-by: Markus Armbruster
Signed-off-by: Marc-André Lureau
---
scripts/qapi/common.py | 12 ++--
1 file changed,
Report the set of missing or unknown keys. And give a hint about the
accepted keys.
Signed-off-by: Marc-André Lureau
---
scripts/qapi/common.py | 23 +++
tests/qapi-schema/alternate-base.err| 1 +
tests/qapi-schema/double-type.err | 1 +
tests/qap
Add 'if' key to union members:
{ 'union': 'TestIfUnion', 'data':
'mem': { 'type': 'str', 'if': 'COND'} }
The generated code remains unconditional for now. Later patches
generate the conditionals.
Signed-off-by: Marc-André Lureau
---
scripts/qapi/common.py | 17 +---
The function only receives the dictionary form of enum expressions
now, so we can make it shorter.
Suggested-by: Markus Armbruster
Signed-off-by: Marc-André Lureau
---
scripts/qapi/common.py | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/scripts/qapi/common.py b
For completeness.
Signed-off-by: Marc-André Lureau
---
tests/qapi-schema/qapi-schema-test.json | 3 +++
tests/qapi-schema/qapi-schema-test.out | 6 ++
2 files changed, 9 insertions(+)
diff --git a/tests/qapi-schema/qapi-schema-test.json
b/tests/qapi-schema/qapi-schema-test.json
index d58c
Add 'if' key to alternate members:
{ 'alternate': 'TestIfAlternate', 'data':
{ 'alt': { 'type': 'TestStruct', 'if': 'COND' } } }
Generated code is not changed by this patch but with "qapi: add #if
conditions to generated code".
Signed-off-by: Marc-André Lureau
---
scripts/qapi/common.py
Now that member can be made conditional, let's make SPICE chardev
conditional:
* spiceport, spicevmc
Before and after the patch for !CONFIG_SPICE, the error is the
same ('spiceport' is not a valid char driver name).
Signed-off-by: Marc-André Lureau
---
qapi/char.json | 16
Wrap generated enum/struct members and code with #if/#endif, using the
.ifcond members added in the previous patches.
Some types generate both enum and struct members for example, so a
step-by-step is unnecessarily complicated to deal with (it would
easily generate invalid intermediary code).
Sig
Use a common function to generate the "If:..." line.
While at it, get rid of the existing \n\n (no idea why it was
there). Use a line-break in member description, this seems to look
slightly better in the plaintext version.
Signed-off-by: Marc-André Lureau
---
scripts/qapi/doc.py |
On Thu, Dec 6, 2018 at 10:14 PM Markus Armbruster wrote:
>
> Marc-André Lureau writes:
>
> > Signed-off-by: Marc-André Lureau
> > ---
> > docs/devel/qapi-code-gen.txt | 19 +++
> > 1 file changed, 19 insertions(+)
> >
> > diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qa
Signed-off-by: Marc-André Lureau
---
scripts/qapi/doc.py | 4 ++--
tests/qapi-schema/doc-good.json | 4 ++--
tests/qapi-schema/doc-good.out | 3 +++
tests/qapi-schema/doc-good.texi | 4 ++--
4 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/scripts/qapi/doc.py b/scripts/
Signed-off-by: Marc-André Lureau
---
scripts/qapi/doc.py | 4 ++--
tests/qapi-schema/doc-good.json | 3 ++-
tests/qapi-schema/doc-good.out | 1 +
tests/qapi-schema/doc-good.texi | 1 +
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/scripts/qapi/doc.py b/scripts/qapi/d
Add #if defined(CONFIG_REPLICATION) in generated code, and adjust the
code accordingly.
Made conditional:
* xen-set-replication, query-xen-replication-status,
xen-colo-do-checkpoint
Before the patch, we first register the commands unconditionally in
generated code (requires a stub), then c
Hi
On Thu, Dec 6, 2018 at 8:41 PM Markus Armbruster wrote:
>
> Marc-André Lureau writes:
>
> > Add 'if' key to alternate members:
> >
> > { 'alternate': 'TestIfAlternate', 'data':
> > { 'alt': { 'type': 'TestStruct', 'if': 'COND' } } }
> >
> > Generated code is not changed by this patch but wit
Hi
On Thu, Dec 6, 2018 at 8:37 PM Markus Armbruster wrote:
>
> In the subject, s/ on / to /.
>
> Marc-André Lureau writes:
>
> > Add 'if' key to union members:
> >
> > { 'union': 'TestIfUnion', 'data':
> > 'mem': { 'type': 'str', 'if': 'COND'} }
> >
> > Generated code is not changed by this p
Hi,
The cover letter title should be "qapi: add #if pre-processor
conditions to generated code (part 2)"
On Sat, Dec 8, 2018 at 3:16 PM Marc-André Lureau
wrote:
>
> This is the second part of the "add #if pre-processor conditions to
> generated code" series, adding schema member conditions (rou
Let's break the line before 'data'. While at it, improve a bit
indentation/spacing. (I removed some alignment which are not helping
much readability and become quickly inconsistent)
Suggested-by: Markus Armbruster
Signed-off-by: Marc-André Lureau
---
qapi/block-core.json | 13 ++--
qapi/char.j
Hi
On Wed, Dec 5, 2018 at 5:19 PM Markus Armbruster wrote:
>
> Marc-André Lureau writes:
>
> > The C standard has the initial value at 0 and the subsequent values
> > incremented by 1. No need to set this explicitely.
> >
> > This will prevent from artificial "gaps" when compiling out some enum
>
On Wed, Dec 5, 2018 at 10:41 PM Markus Armbruster wrote:
>
> Marc-André Lureau writes:
>
> > This makes it a bit clearer what is the intent of the dictionnary for
>
> dictionary
sigh, this must be a very common misspell (dictionnaire in french)
>
> > the check_type() function, since there was s
Hi
On Thu, Dec 6, 2018 at 9:42 PM Markus Armbruster wrote:
>
> Marc-André Lureau writes:
>
> > Wrap generated enum/struct members and code with #if/#endif, using the
>
> enum and struct members
ok
>
> > .ifcond members added in the previous patches.
> >
> > Some types generate both enum and str
Hi
On Wed, Dec 5, 2018 at 10:02 PM Markus Armbruster wrote:
>
> In subject, s/dictionnary/dictionary/
>
> Marc-André Lureau writes:
>
> > Desugar the enum NAME form to { 'name': NAME }. This will allow to add
> > new enum members, such as 'if' in the following patch.
> >
> > Signed-off-by: Marc-A
Hi
On Thu, Dec 6, 2018 at 7:56 PM Markus Armbruster wrote:
>
> Marc-André Lureau writes:
>
> > Wherever a struct/union/alternate/command/event member with NAME: TYPE
> > form is accepted, desugar it to a NAME: { 'type': TYPE } form.
> >
> > This will allow to add new member details, such as 'if'
> -Original Message-
> From: Anthony PERARD [mailto:anthony.per...@citrix.com]
> Sent: 07 December 2018 18:21
> To: Paul Durrant
> Cc: qemu-devel@nongnu.org; qemu-bl...@nongnu.org; xen-
> de...@lists.xenproject.org; Stefano Stabellini ;
> Kevin Wolf ; Max Reitz
> Subject: Re: [PATCH v2 14
Making a discriminator conditional doesn't make much sense. Instead,
the union could be made conditional.
Signed-off-by: Marc-André Lureau
---
scripts/qapi/common.py | 8
tests/Makefile.include | 1 +
.../flat-union-invalid-if-discrimi
For completeness.
Signed-off-by: Marc-André Lureau
---
tests/qapi-schema/qapi-schema-test.json | 3 +++
tests/qapi-schema/qapi-schema-test.out | 6 ++
2 files changed, 9 insertions(+)
diff --git a/tests/qapi-schema/qapi-schema-test.json
b/tests/qapi-schema/qapi-schema-test.json
index 6e9e
Hi all,
In our test, we configured VM with several pci-bridges and a virtio-net nic
been attached with bus 4,
After VM is startup, We ping this nic from host to judge if it is working
normally. Then, we hot add pci devices to this VM with bus 0.
We found the virtio-net NIC in bus 4 is not worki
Hi all,
On 12/7/18 4:59 PM, Peter Maydell wrote:
> Jaap: could you test whether this patch fixes the issue you
> were seeing, please?
I have applied the patch and started my test tool against it. It will need some
time as I have also seen cases where it only failed after 600 reboots.
My testtool
On Thu, Nov 29, 2018 at 23:45:18 +0300, Roman Bolshakov wrote:
> On Thu, Oct 25, 2018 at 01:20:57PM -0400, Emilio G. Cota wrote:
> > +
> > +lib%.so: %.o
> > + $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
>
> The rule should be a bit different for macOS:
> %.bundle: %.o
>$(CC) -bundle
42 matches
Mail list logo