gen_sync_call()'s parameter indent is useless: gen_sync_call() uses it
only as optional argument for push_indent() and pop_indent(), their
default is four, and gen_sync_call()'s only caller passes four. Drop
the parameter.
gen_visitor_input_containers_decl()'s parameter obj is always
"QOBJECT(arg
We don't actually enforce our "other than downstream extensions [...],
all names should begin with a letter" rule. Add a FIXME.
We should reject names that differ only in '_' vs. '.' vs. '-',
because they're liable to clash in generated C. Add a FIXME.
Signed-off-by: Markus Armbruster
Reviewe
Commit 05dfb26 added eatspace stripping to mcgen(). Move it to
cgen(), just in case somebody gets tempted to use cgen() directly
instead of via mcgen().
cgen() indents blank lines. No such lines get generated right now,
but fix it anyway.
We use triple-quoted strings for program text, like this
The generated code passes mangled schema names to visit_type_enum()
and union's visit_start_struct(). Fix it to pass the names
unadulterated, like we do everywhere else.
Only qapi-schema-test.json actually has names where this makes a
difference: enum __org.qemu_x-Enum, flat union __org.qemu_x-Un
The struct generated for a flat union is weird: the members of its
base are at the end, except for the union tag, which is at the
beginning.
Example: qapi-schema-test.json has
{ 'struct': 'UserDefUnionBase',
'data': { 'string': 'str', 'enum1': 'EnumOne' } }
{ 'union': 'UserDefFlatU
A flat union's tag member gets renamed to 'kind' in the generated
code. Breaks when another member named 'kind' exists.
Example, adapted from qapi-schema-test.json:
{ 'struct': 'UserDefUnionBase',
'data': { 'kind': 'str', 'enum1': 'EnumOne' } }
We generate:
struct UserDefFlatUnio
The visit_type_implicit_FOO() are generated on demand, right before
their first use. Used by visit_type_STRUCT_fields() when STRUCT has
base FOO, and by visit_type_UNION() when flat UNION has member a FOO.
If the schema defines FOO after its first use as struct base or flat
union member, visit_ty
Test case added in commit 2fc0043, and messed up in commit 5223070.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
tests/qapi-schema/qapi-schema-test.json | 5 +++--
tests/qapi-schema/qapi-schema-test.out | 8
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git
When event FOO's 'data' is a struct with a base, we consider only the
struct's direct members, and ignore its base. The generated
qapi_event_send_foo() doesn't take arguments for base members.
No such events currently exist in the QMP schema.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric B
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
scripts/qapi-commands.py | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 3965ca8..6de5229 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qa
From: Eric Blake
Most functions that can return a pointer or set an Error ** value
are decent enough to guarantee a NULL return when reporting an error.
Not so with our generated qapi visitor functions. If the caller
is not careful to clean up partially-allocated objects on error,
then the calle
A command's 'data' must be a struct type, given either as a
dictionary, or as struct type name.
Existing test case data-int.json covers simple type 'int'. Add test
cases for type names referring to union and alternate types.
The latter is caught (good), but the former is not (bug).
Events have
Clean up white-space, brace placement, and superfluous #ifdef
QAPI_TYPES_BUILTIN_CLEANUP_DEF.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
docs/qapi-code-gen.txt | 12 -
scripts/qapi-commands.py | 1 +
scripts/qapi-event.py| 3 +--
scripts/qapi-types.py| 66 +
From: Eric Blake
Add a FIXME to remind us to fully audit whether removing the
'void *data' branch of each qapi union type can be done safely.
Signed-off-by: Eric Blake
Message-Id: <1438297637-26789-1-git-send-email-ebl...@redhat.com>
Signed-off-by: Markus Armbruster
---
scripts/qapi-types.py
Reproducer: with
{ 'command': 'user_def_cmd4', 'returns': { 'a': 'int' } }
added to qapi-schema-test.json, qapi-commands.py dies when it tries to
generate the command handler function
Traceback (most recent call last):
File "/work/armbru/qemu/scripts/qapi-commands.py", line 359, in
In generated command handlers, the assignment to retval dominates its
only use. Therefore, its initialization is useless. Drop it.
Suggested-by: Eric Blake
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
docs/qapi-code-gen.txt | 2 +-
scripts/qapi-commands.py | 8 ++--
2 f
A command's or event's 'data' must be a struct type, given either as a
dictionary, or as struct type name.
Commit dd883c6 tightened the checking there, but not enough: we still
accept 'union'. Fix to reject it.
We may want to support union types there, but we'll have to extend
qapi-commands.py a
Since every schema entity has 'data', the data- prefix conveys no
information. These tests actually exercise commands. Only commands
have arguments, so change the prefix to to args-.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
tests/Makefile
Multiple passes through mcgen() is prone to produce unwanted blank
lines, which we then combat by sprinkling .rstrip() on top. Just
don't do it.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
scripts/qapi-commands.py | 52 +++-
1 file c
gen_err_check() hard-codes 'local_err' instead of substituting the
argument. Currently harmless, since all callers pass either None or
'local_err'.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
scripts/qapi-commands.py | 13 +++--
1 file changed, 7 insertions(+), 6 delet
On Fri, Aug 28, 2015 at 12:00:58PM +0200, Markus Armbruster wrote:
> Eduardo Habkost writes:
>
> > On Thu, Aug 27, 2015 at 01:50:10PM +0300, Michael S. Tsirkin wrote:
> >> On Tue, Aug 25, 2015 at 05:21:16PM +0100, Daniel P. Berrange wrote:
> >> > On Mon, Aug 24, 2015 at 11:54:48AM +0200, Markus A
On Fri, Aug 14, 2015 at 10:52:00PM +0800, Xiao Guangrong wrote:
> NVDIMM reserves all the free range above 4G to do:
> - Persistent Memory (PMEM) mapping
> - implement NVDIMM ACPI device _DSM method
>
> Signed-off-by: Xiao Guangrong
[...]
> @@ -1302,6 +1303,7 @@ FWCfgState *pc_memory_init(Machine
This series connects the AHCI SATA device to the ZynqMP
machine. It requires a restructure of the AHCI file to
make the AHCI state struct visible. It also requires a
small change to the ahci_irq_lower() and ahci_irq_raise()
functions to avoid assuming that the AHCIState is a child
of AHCIPCIState.
The AHCIState struct can either have AHCIPCIState or SysbusAHCIState
as a parent. The ahci_irq_lower() and ahci_irq_raise() functions
assume that it is always AHCIPCIState, which is not always the
case, which causes a seg fault. Verify what the container of AHCIState
is before setting the PCIDevice
Pull the AHCI state structure out into the header. This allows
other containers to access the struct. This is required to add
the device to modern SoC containers.
Signed-off-by: Alistair Francis
Reviewed-by: Sai Pavan Boddu
Reviewed-by: Peter Crosthwaite
---
hw/ide/ahci.c | 13 -
Convert all of the non-realize error_propagate() calls into error_abort
calls as they shouldn't be user visible failure cases.
Signed-off-by: Alistair Francis
Reviewed-by: Peter Crosthwaite
---
hw/arm/xlnx-zynqmp.c | 14 ++
1 files changed, 2 insertions(+), 12 deletions(-)
diff
On Thu, Aug 27, 2015 at 12:30:41PM +0200, Peter Lieven wrote:
> If the file is readonly its not expected to grow so
> save the blocking call to nfs_fstat_async and use
> the value saved at connection time. Also important
> the monitor (and thus the main loop) will not hang
> if block device info is
Am 28.08.2015 um 13:56 schrieb Gerd Hoffmann:
> On Do, 2015-08-27 at 14:46 +0200, Peter Lieven wrote:
>> I have observed that depending on the contents and the encoding it happens
>> that sending data as RAW sometimes would take less space than the encoded
>> data.
>> This is especially the case f
Print the ID (if available) of each device when 'info usb' is used in the
monitor.
Signed-off-by: John Arbuckle
---
Added conditional code that only prints the ID if it is available.
hw/usb/bus.c | 14 +++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/usb/bus
On 24 August 2015 at 18:36, Sergey Fedorov wrote:
> Hi all,
>
> Seems there is a bug in ARM breakpoint emulation. I am not sure how to
> fix it and I would appreciate any suggestion. It is best illustrated by
> a simple test which sets up and enables an unlinked address match
> breakpoint but does
Cc: Paolo Bonzini
Cc: Gal Hammer
Cc: Igor Mammedov
Cc: "Michael S. Tsirkin"
Signed-off-by: Laszlo Ersek
---
Notes:
This is based on the super long private email discussion we had two
months ago, plus on the IRL discussion between Michael and myself @ the
KVM Forum 2015.
docs/spe
Quoting Bharata B Rao (2015-08-27 00:28:57)
> On Wed, Aug 26, 2015 at 09:17:09AM -0500, Michael Roth wrote:
> > Quoting Bharata B Rao (2015-08-25 23:04:11)
> > > If drmgr is used in the guest to hotplug a device before a device_add
> > > has been issued via the QEMU monitor, QEMU segfaults in
> >
On 08/26/2015 09:05 AM, Daniel P. Berrange wrote:
> Various VNC server I/O functions return 'long' and then
> also pass this to a method accepting 'int'. All these
> should be ssize_t to match the signature of read/write
> APIs and thus avoid potential for integer truncation /
> wraparound.
>
> Si
There is an error in functions aarch64_sync_32_to_64() and
aarch64_sync_64_to_32() with mapping of registers between AArch32 and AArch64.
The patch fixes it according to ARM ARM D1.20.1 (table D1-77).
Signed-off-by: Sergey Sorokin
---
target-arm/helper.c | 64 ++--
On 08/26/2015 05:34 PM, marcandre.lur...@redhat.com wrote:
> From: Marc-André Lureau
>
> Add a simple man page for the qemu agent.
>
> Signed-off-by: Marc-André Lureau
> Reviewed-by: Michael Roth
> ---
> Makefile | 14 +-
> qemu-doc.texi | 6 +++
> qemu-ga.texi | 136
> +
On 07/29/2015 02:45 AM, zhanghailiang wrote:
> We add helper function colo_supported() to indicate whether
> colo is supported or not, with which we use to control whether or not
> showing 'colo' string to users, they can use qmp command
> 'query-migrate-capabilities' or hmp command 'info migrate_c
On 07/29/2015 02:45 AM, zhanghailiang wrote:
> Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state
> after the first live migration successfully finished.
>
> Signed-off-by: zhanghailiang
> Signed-off-by: Li Zhijian
> Signed-off-by: Gonglei
> ---
> include/migration/colo.h |
On 07/29/2015 02:45 AM, zhanghailiang wrote:
> Guest will enter this state when paused to save/restore VM state
> under colo checkpoint.
>
> Cc: Eric Blake
> Cc: Markus Armbruster
> Signed-off-by: zhanghailiang
> Signed-off-by: Li Zhijian
> Signed-off-by: Gonglei
> Reviewed-by: Dr. David Alan
On 07/29/2015 02:45 AM, zhanghailiang wrote:
> We leave users to use whatever heartbeat solution they want, if the heartbeat
> is lost, or other errors they detect, they can use command
> 'colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations
> accordingly.
>
> For example,
> I
On 07/29/2015 02:45 AM, zhanghailiang wrote:
> If some errors happen during VM's COLO FT stage, it's import to notify the
> users
s/import/important/
> this event, Togehter with 'colo_lost_heartbeat', users can intervene in COLO's
s/this event,/of this event./
s/Togehter/Together/
> failover w
On 07/29/2015 02:45 AM, zhanghailiang wrote:
> The 'forward_nic' should be assigned with network name,
> for exmple, 'eth2'. It will be parameter of 'colo_script',
s/exmple/example/
> 'colo_script' should be assigned with an scirpt path.
s/scirpt/script/
>
> We parse these parameter in tap.
s
On 07/29/2015 02:45 AM, zhanghailiang wrote:
> With this command, we can control the period of checkpoint, if
> there is no comparison of net packets.
>
> Cc: Luiz Capitulino
> Cc: Eric Blake
> Cc: Markus Armbruster
> Signed-off-by: zhanghailiang
> Signed-off-by: Li Zhijian
> ---
> hmp-comma
On 08/27/2015 04:48 AM, marcandre.lur...@redhat.com wrote:
> From: Marc-André Lureau
>
> For consistency with the rest of the comment blocks.
>
> Signed-off-by: Marc-André Lureau
> ---
> qga/qapi-schema.json | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Eric Blake
Pull the AHCI state structure out into the header. This allows
other containers to access the struct. This is required to add
the device to modern SoC containers.
Signed-off-by: Alistair Francis
Reviewed-by: Sai Pavan Boddu
Reviewed-by: Peter Crosthwaite
---
hw/ide/ahci.c | 13 -
This series connects the AHCI SATA device to the ZynqMP
machine. It requires a restructure of the AHCI file to
make the AHCI state struct visible. It also requires a
small change to the ahci_irq_lower() and ahci_irq_raise()
functions to avoid assuming that the AHCIState is a child
of AHCIPCIState.
The AHCIState struct can either have AHCIPCIState or SysbusAHCIState
as a parent. The ahci_irq_lower() and ahci_irq_raise() functions
assume that it is always AHCIPCIState, which is not always the
case, which causes a seg fault. Verify what the container of AHCIState
is before setting the PCIDevice
Convert all of the non-realize error_propagate() calls into error_abort
calls as they shouldn't be user visible failure cases.
Signed-off-by: Alistair Francis
Reviewed-by: Peter Crosthwaite
---
hw/arm/xlnx-zynqmp.c | 14 ++
1 files changed, 2 insertions(+), 12 deletions(-)
diff
On 08/28/2015 09:23 AM, Andreas Färber wrote:
An otype argument is being inserted as next-to-last argument for the
function definitions. Same for the softmmu callsites. Only in the *-user
callsites the argument order is being changed with addr_reg and off_r
switching order? I don't see why that s
On 28/08/2015 01:47, Andreas Färber wrote:
> The argument order for the !CONFIG_SOFTMMU case was jumbled up since
> ffc6372851d8631a9f9fa56ec613b3244dc635b9 ("tcg/aarch64: use 32-bit
> offset for 32-bit user-mode emulation"), regressing from -rc2 to v2.4.0.
> Fix their order to avoid segfaults, e
On 28/08/2015 14:53, Markus Armbruster wrote:
> I believe this makes sense no matter what we do about device IDs (see
> thread "Should we auto-generate IDs?").
I haven't read that huge thread yet, but I think it gives the user too
much power. There are internal objects that are not supposed to
On 28/08/2015 16:53, Frederic Konrad wrote:
>> After this commit it looks like we have no users of spinlock_t
>> at all. It would be good to have a followup patch which deleted
>> include/exec/spinlock.h.
>
> Seems Paolo forget to pick up the following patch from the mttcg tree:
> "remove unused
On 28/08/2015 16:36, Peter Maydell wrote:
> With this patch, code-wise tcg_halt_cond and tcg_cpu_thread
> are used in pretty much parallel ways (first call into
> qemu_tcg_init_vcpu() sets them up, all the rest just copy
> them into the CPU struct). The only difference is that one
> of them a sta
On 28/08/2015 16:53, Peter Maydell wrote:
> sysemu.h is a bit of a huge grab-bag of stuff, so it seems
> a shame to put qemu_in_vcpu_thread() into it, given that
> (a) that function is only used by a couple of files and
> (b) the files that do want that function don't want most of
> what's in sys
On 28/08/2015 17:33, Peter Maydell wrote:
> Some overall documentation on what the mmap_lock is protecting
> (and thus when it needs to be taken) would be nice.
>
> Otherwise
> Reviewed-by: Peter Maydell
>
> I couldn't see where we take the mmap_lock when we call
> tb_gen_code() from tb_find_s
On 28/08/2015 17:40, Peter Maydell wrote:
> Don't we also need to use an atomic_rcu_read() for the load
> pd = *lp;
> (which is between hunk 1 and 2 in this patch) ?
Yes.
Paolo
101 - 155 of 155 matches
Mail list logo