On 02/07/2015 03:30, Paulo Alcantara wrote:
> No, the iTCO_wdt driver won't fail to start. It actually depends on
> whether RCBA BAR is set. However, ICH9 will just ignore whether
> NO_REBOOT is set or unset when SPKR pin is high.
This is the code I was referring to, in iTCO_wdt_start:
Am 02.07.2015 um 08:33 schrieb Fam Zheng:
> bdrv_flush() uses a loop like
>
> while (rwco.ret == NOT_DONE) {
> aio_poll(aio_context, true);
> }
>
> to wait for thread pool, which may not get notified about the scheduled
> BH right away, if there is no new event that wakes up a blo
From: Alexey Kardashevskiy
The changelog is:
> version: update to 20150429
> pci: Use QEMU created PCI device nodes
> usb: support 64-bit pci bars
> pci: Support 64-bit address translation
> pci: program correct bridge limit registers during probe
> scsi: handle report-luns failure
On 07/02/2015 02:17 PM, Michael S. Tsirkin wrote:
On Wed, Jul 01, 2015 at 10:50:16PM +0800, Xiao Guangrong wrote:
hw/acpi/aml-build.c | 32 +-
hw/i386/acpi-build.c|9 +-
hw/i386/acpi-dsdt.dsl |2 +-
hw/i386/pc.c| 11 +-
hw/mem/Makefile.ob
From: Gavin Shan
The PCI device MSIx table is cleaned out in hardware after EEH PE
reset. However, we still hold the stale MSIx entries in QEMU, which
should be cleared accordingly. Otherwise, we will run into another
(recursive) EEH error and the PCI devices contained in the PE have
to be offlin
From: Bharata B Rao
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:
Boot path
-
spapr_finalize_fdt
spapr_popu
From: Bharata B Rao
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
Signed-off-by: David Gibson
---
hw/ppc/mac_newworld.c | 10 +-
hw/ppc/mac_oldworld.c | 7 +++
hw/ppc/ppc44
bdrv_flush() uses a loop like
while (rwco.ret == NOT_DONE) {
aio_poll(aio_context, true);
}
to wait for thread pool, which may not get notified about the scheduled
BH right away, if there is no new event that wakes up a blocking
qemu_poll_ns(). In this case, it may even be a perma
There's a call to object_dynamic_cast() in spapr_vty which uses the type
name "spapr-vty" directly, instead of the usual idiom of using the #defined
TYPE_VIO_SPAPR_VTY_DEVICE. Fix it.
Signed-off-by: David Gibson
---
hw/char/spapr_vty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
The code for -machine pseries maintains a global sPAPREnvironment structure
which keeps track of general state information about the guest platform.
This predates the existence of the MachineState structure, but performs
basically the same function.
Now that we have the generic MachineState, fold
From: Nikunj A Dadhania
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 location
code for that hardware entity.
Populate ibm,loc-code.
1) PCI pass
From: Nikunj A Dadhania
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 other in
hotplug code. To unify this, the patch adds the pci device node
cr
From: Bharata B Rao
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 the vCPU for which it was already enabled.
Introduce a boolean member in ICPState to track this and don't
reenable t
From: Gavin Shan
When rebooting the guest, some PEs might be in frozen state. The
contained PCI devices won't work properly if their frozen states
aren't cleared in time. One case running into this situation would
be maximal EEH error times encountered in the guest.
The patch reenables the EEH f
If a guest passes the reg property of a valid VIO object that is not a VTY
to either H_GET_TERM_CHAR or H_PUT_TERM_CHAR, QEMU hits a dynamic cast
assertion and aborts.
PAPR+ says "Hypervisor checks the termno parameter for validity against the
Vterm IOA unit addresses assigned to the partition, el
From: Nikunj A Dadhania
* phb_index is not being used and if required can be obtained from sphb
* use helper to get drc_index in spapr_populate_pci_child_dt()
* Check if drc_index is zero
Suggested-by: Alexey Kardashevskiy
Signed-off-by: Nikunj A Dadhania
Signed-off-by: David Gibson
---
hw/p
From: Gavin Shan
There might have emulated PCI devices, together with VFIO PCI
devices under one PHB. The EEH capability shouldn't enabled
on emulated PCI devices.
The patch returns error when enabling EEH capability on emulated
PCI devices by RTAS call "ibm,set-eeh-option".
Signed-off-by: Gavi
From: Bharata B Rao
Add support for ibm,lrdr-capacity since this is needed by the guest
kernel to know about the possible hot-pluggable CPUs and Memory. With
this, pseries kernels will start reporting correct maxcpus in
/sys/devices/system/cpu/possible.
Also define the minimum hotpluggable memor
From: Greg Kurz
The tce_list variable is not a TCE but the address to a TCE: we shouldn't
clear permission bits as we do now. And this is dead code anyway since we
check tce_list is 4K aligned a few lines above.
This patch doesn't fix any bug, it is only code cleanup.
Suggested-by: Alexey Karda
From: Bharata B Rao
Add CPU_FOREACH_REVERSE that walks CPUs in reverse.
Needed for PowerPC CPU device tree reorganization.
Signed-off-by: Bharata B Rao
Reviewed-by: Andreas Färber
Signed-off-by: David Gibson
---
include/qom/cpu.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include
From: Bharata B Rao
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: Bharata B Rao
Signed-off-by: David Gibson
---
hw/ppc/spapr.c | 54 +-
1
From: Markus Armbruster
Since we now require GLib 2.22+ (commit f40685c), we don't have to
work around lack of g_hash_table_iter_init() & friends anymore.
This reverts commit f8833a37c0c6b22ddd57b45e48cfb0f97dbd5af4.
Signed-off-by: Markus Armbruster
Signed-off-by: David Gibson
---
hw/ppc/spa
From: Nikunj A Dadhania
Device node names should encode the unit address as hex, while the
code was encodind it as integers.
Also, use FDT_NAME_MAX macro for allocating and composing the name.
Signed-off-by: Nikunj A Dadhania
Reviewed-by: Thomas Huth
Signed-off-by: David Gibson
---
hw/ppc/s
From: Bharata B Rao
Use max_cpus instead of smp_cpus when intializating xics system. Also
report max_cpus in ibm,interrupt-server-ranges device tree property of
interrupt controller node.
Signed-off-by: Bharata B Rao
Signed-off-by: David Gibson
---
hw/ppc/spapr.c | 4 ++--
1 file changed, 2 i
From: Greg Kurz
The fact that these enums have matching values is pure coincidence. We
actually need to translate from the PAPR definition to the QEMU one.
This patch doesn't fix any bug, it is only code cleanup.
Suggested-by: Alexey Kardashevskiy
Signed-off-by: Greg Kurz
Signed-off-by: David
Hi Alex,
Here are my accumulated spapr related qemu updates for the last little
while. This obsoletes the patch series I sent for 2015-06-24, since
those haven't been merged yet.
Highlights are a SLOF update and changes to move PCI device node
creation from SLOF into qemu (using the same code pa
The sPAPRMachineState structure includes an entry_point field containing
the initial PC value for starting the machine, even though this always has
the value 0x100.
I think this is a hangover from very early versions which bypassed the
firmware when using -kernel. In any case it has no function n
From: Nikunj A Dadhania
Current code missed the Prog IF register. All Class Code, Subclass,
and Prog IF registers are needed to identify the accurate device type.
For example: USB controllers use the PROG IF for denoting: USB
FullSpeed, HighSpeed or SuperSpeed.
Signed-off-by: Nikunj A Dadhania
From: Nikunj A Dadhania
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 64-bit MEM region
Signed-off-by: Nikunj A Dadhania
Reviewed-by: Thomas Huth
Signe
Currently although we have an sPAPRMachineState descended from MachineState
we don't have an sPAPRMAchineClass descended from MachineClass. So far it
hasn't been needed, but several upcoming features are going to want it,
so this patch creates a stub implementation.
Signed-off-by: Michael Roth
S
From: Greg Kurz
XICS needs to know the upper value for cpu_index as it is used to compute
the number of servers:
smp_cpus * kvmppc_smt_threads() / smp_threads
When passing -smp cpus=1,threads=9 on a POWER8 host, we end up with:
1 * 8 / 9 = 0
... which leads to an assertion in both emu
The ram_limit field was imported from sPAPREnvironment where it predates
the machine's ram size being available generically from machine->ram_size.
Worse, the existing code was inconsistent about where it got the ram size
from. Sometimes it used spapr->ram_limit, sometimes the global 'ram_size'
a
On Fri, Jun 05, 2015 at 04:44:51PM +0800, Tiejun Chen wrote:
> v8:
>
> * Rebase on the latest qemu tree
> * Cleanup one xen leftover in patch #3
For the PC bits:
Acked-by: Michael S. Tsirkin
> v7:
>
> * Instead of "-gfx_passthru" we'd like to make that a machine
> option, "-machine xxx,igd
On Thu, Jul 02, 2015 at 03:53:43PM +1000, David Gibson wrote:
> At the moment isa-bus.c is compiled unconditionally for all targets.
> However, some targets have never used legacy ISA devices. Many more
> targets have at least some machine types without ISA.
>
> These patches allow ISA bus to be
On Wed, Jul 01, 2015 at 10:50:16PM +0800, Xiao Guangrong wrote:
> hw/acpi/aml-build.c | 32 +-
> hw/i386/acpi-build.c|9 +-
> hw/i386/acpi-dsdt.dsl |2 +-
> hw/i386/pc.c| 11 +-
> hw/mem/Makefile.objs|1 +
> hw/mem/pc-nvdimm.c
On Thu, Jul 02, 2015 at 10:30:09AM +1000, Gavin Shan wrote:
> The series of patches fix couple of issues as below:
>
> PATCH[1]: Don't enable EEH functionality on the emulated PCI devices,
> which shouldn't be affected during EEH recovery
> PATCH[2]: Clear PE's frozen state on reboot. So
Public bug reported:
we are having a problem in our hosts, all the vm running on them
suddenly, and for some seconds, lost network connectivity.
the root cause appears to be the increase of irb-tlb from low values
(less than 20) to more than >100k, that spike only last for some seconds
then ever
maybe first part is not clear, here it goes again
this happens on some hypervisors at random times, not all hypervisors
at the same time, and affects all vm on the hypervisor
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://b
The m48t59 device supports both ISA and direct sysbus attached versions of
the device in the one .c file. This can be awkward for some embedded
machine types which need the sysbus M48T59, but don't want to pull in the
ISA bus code and its other dependencies.
Therefore, this patch splits out the c
At the moment isa-bus.c is compiled unconditionally for all targets.
However, some targets have never used legacy ISA devices. Many more
targets have at least some machine types without ISA.
These patches allow ISA bus to be disabled in the configuration, thus
allowing cut down configurations for
At present, the core device model code for 8250-like serial ports
(serial.c) and the code for serial ports attached to ISA-style legacy IO
(serial-isa.c) are both controlled by the CONFIG_SERIAL variable.
There are lots and lots of embedded platforms that have 8250-like serial
ports but have never
Commit 61fcb62 "isa_mmio: delete" removed the CONFIG_ISA_MMIO switch and
the isa_mmio code controlled by it. However, a few of the default-configs
still set the variable, pointlessly. This cleans these up.
Signed-off-by: David Gibson
---
default-configs/arm-softmmu.mak | 1 -
default-conf
Currently, the code to handle the legacy ISA bus is always included in
qemu. However there are lots of platforms that don't include ISA legacy
devies, and quite a few that have never used ISA legacy devices at all.
This patch allows the ISA bus code to be disabled in the configuration for
platfor
On Tue, 30 Jun 2015 21:12:34 -0700
Serge Vakulenko wrote:
> Signed-off-by: Serge Vakulenko
> ---
> hw/mips/Makefile.objs |3 +
> hw/mips/mips_pic32mx7.c | 1652 +
> hw/mips/mips_pic32mz.c | 2840
> +++
> hw/mips
On 7/2/2015 13:13, Michael S. Tsirkin wrote:
On Thu, Jul 02, 2015 at 10:57:34AM +0800, Hong Bo Li wrote:
On 7/1/2015 21:37, Michael S. Tsirkin wrote:
On Wed, Jul 01, 2015 at 08:42:52PM +0800, Hong Bo Li wrote:
On 7/1/2015 19:57, Michael S. Tsirkin wrote:
On Wed, Jul 01, 2015 at 07:46:01PM
On Tue, 30 Jun 2015 21:12:29 -0700
Serge Vakulenko wrote:
> Please find below a set of patches, which allow to simulate Microchip PIC32
> microcontrollers on QEMU. For examples of real PIC32 applications running
> on QEMU, see page: https://github.com/sergev/qemu/wiki
>
> (1) Make the CPU clock
On Thu, Jul 02, 2015 at 10:57:34AM +0800, Hong Bo Li wrote:
>
>
> On 7/1/2015 21:37, Michael S. Tsirkin wrote:
> >On Wed, Jul 01, 2015 at 08:42:52PM +0800, Hong Bo Li wrote:
> >>
> >>On 7/1/2015 19:57, Michael S. Tsirkin wrote:
> >>>On Wed, Jul 01, 2015 at 07:46:01PM +0800, Hong Bo Li wrote:
> >>
On Wed, Jul 01, 2015 at 12:15:09PM +0100, Peter Maydell wrote:
> On 1 July 2015 at 05:20, David Gibson wrote:
> > On Mon, Jun 29, 2015 at 11:35:23AM +0100, Peter Maydell wrote:
> >> A quick grep suggests you can knock arm, moxie, sh4
> >> and sh4eb off your list of things with CONFIG_SERIAL_ISA
>
We are setting SRR0 to the instruction before the one causing the
unaligned exception. A quick testcase:
. = 0x100
.globl _start
_start:
/* Cause a 0x600 */
li 3,0x1
stwcx. 3,0,3
1: b 1b
. = 0x600
1: b 1b
Built into something we can load as a B
On Mon, Jun 29, 2015 at 04:53:12PM +0200, Igor Mammedov wrote:
> On Mon, 29 Jun 2015 19:11:30 +0530
> Bharata B Rao wrote:
>
> > On Mon, Jun 29, 2015 at 02:08:20PM +0200, Igor Mammedov wrote:
> > > On Mon, 29 Jun 2015 13:50:25 +0530
> > > Bharata B Rao wrote:
> > >
> > > > Start storing the (st
On 7/1/2015 21:37, Michael S. Tsirkin wrote:
On Wed, Jul 01, 2015 at 08:42:52PM +0800, Hong Bo Li wrote:
On 7/1/2015 19:57, Michael S. Tsirkin wrote:
On Wed, Jul 01, 2015 at 07:46:01PM +0800, Hong Bo Li wrote:
On 7/1/2015 19:23, Michael S. Tsirkin wrote:
On Wed, Jul 01, 2015 at 07:11:38PM
** Changed in: qemu (Ubuntu)
Status: Incomplete => Confirmed
** Changed in: qemu (Ubuntu)
Importance: Undecided => High
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1465935
Title:
kvm_i
On Wed, 2015-07-01 at 08:49 +0800, Chen Fan wrote:
> ping
Sorry, I'm on holiday until next week, I'll take a look at it then.
Thanks,
Alex
> On 06/24/2015 05:45 PM, Chen Fan wrote:
> > For now, for vfio pci passthough devices when qemu receives
> > an error from host aer report, there just termi
On 07/02/2015 03:37 AM, Michael R. Hines wrote:
> On 06/30/2015 11:11 PM, Wen Congyang wrote:
>> On 07/01/2015 11:09 AM, Michael R. Hines wrote:
>>> On 03/25/2015 04:36 AM, Wen Congyang wrote:
Block replication is a very important feature which is used for
continuous checkpoints(for examp
On Jul 1, 2015, at 6:13 PM, Programmingkid wrote:
> Fix real cdrom access in Mac OS X so it can be used in QEMU.
> It simply removes the r from a device file's name. This
> allows for a real cdrom to be accessible to the guest.
> It has been successfully tested with a Windows XP guest
> in qemu-s
On Wed, 1 Jul 2015 15:31:31 +0200
"Michael S. Tsirkin" wrote:
> On Wed, Jul 01, 2015 at 03:18:41PM +0200, Paolo Bonzini wrote:
> >
> >
> > On 28/06/2015 19:58, Paulo Alcantara wrote:
> > > If the signal is sampled high, this indicates that the system is
> > > strapped to the "No Reboot" mode (I
On Wed, 07/01 22:45, Naredula Janardhana Reddy wrote:
> HI,
> I am trying to improve the throughput of virtio-blk for my kernel (
> https://github.com/naredula-jana/Jiny-Kernel ) to make use of the
> multi-core using multi-queue. But I found the latest qemu does not support
> multiqueue fo
On 07/02/2015 03:37 AM, Michael R. Hines wrote:
> On 06/30/2015 11:11 PM, Wen Congyang wrote:
>> On 07/01/2015 11:09 AM, Michael R. Hines wrote:
>>> On 03/25/2015 04:36 AM, Wen Congyang wrote:
Block replication is a very important feature which is used for
continuous checkpoints(for examp
On 07/02/2015 02:42 AM, Dr. David Alan Gilbert wrote:
> * Wen Congyang (we...@cn.fujitsu.com) wrote:
>> On 07/01/2015 04:11 PM, Dr. David Alan Gilbert wrote:
>>> * Wen Congyang (we...@cn.fujitsu.com) wrote:
On 07/01/2015 03:01 AM, Dr. David Alan Gilbert wrote:
> * Wen Congyang (we...@cn.fu
The PCI device MSIx table is cleaned out in hardware after EEH PE
reset. However, we still hold the stale MSIx entries in QEMU, which
should be cleared accordingly. Otherwise, we will run into another
(recursive) EEH error and the PCI devices contained in the PE have
to be offlined exceptionally.
There might have emulated PCI devices, together with VFIO PCI
devices under one PHB. The EEH capability shouldn't enabled
on emulated PCI devices.
The patch returns error when enabling EEH capability on emulated
PCI devices by RTAS call "ibm,set-eeh-option".
Signed-off-by: Gavin Shan
---
hw/ppc
When rebooting the guest, some PEs might be in frozen state. The
contained PCI devices won't work properly if their frozen states
aren't cleared in time. One case running into this situation would
be maximal EEH error times encountered in the guest.
The patch reenables the EEH functinality on PEs
The series of patches fix couple of issues as below:
PATCH[1]: Don't enable EEH functionality on the emulated PCI devices,
which shouldn't be affected during EEH recovery
PATCH[2]: Clear PE's frozen state on reboot. Some PEs in the guest
might be put into offline because excess
[Done]
- Remove extraneous "interrupts" property from /pci/mac-io
- I'm having trouble tracking down where the property is actually being
set. The mac-io devices are defined in drivers/pci_database.c, but the
pci_dev_t struct (drivers/pci_database.h) doesn't appear to have an
Fix real cdrom access in Mac OS X so it can be used in QEMU.
It simply removes the r from a device file's name. This
allows for a real cdrom to be accessible to the guest.
It has been successfully tested with a Windows XP guest
in qemu-system-i386. The qemu-system-ppc emulator doesn't
quit anymore,
Hi Peter,
2015-06-30 19:21 GMT-07:00 Peter Crosthwaite :
> On Tue, Jun 30, 2015 at 6:57 PM, Serge Vakulenko wrote:
>> Hi Peter and Leon,
>>
>> With a bit of thinking, I agree, that the question of session
>> termination on WAIT instruction is quite complicated in case of
>> multi-core system, bac
Timer, running in periodic mode, can't be stopped or coming one-shot tick
won't be canceled because timer control code just doesn't handle timer
disabling. Fix it by checking enable bit and deleting timer if bit isn't set.
Signed-off-by: Dmitry Osipenko
---
hw/timer/arm_mptimer.c | 3 +++
1 file
It's first class, because unlike '**', it actually works, i.e. doesn't
require 'gen': false.
'**' will go away next.
Signed-off-by: Markus Armbruster
---
docs/qapi-code-gen.txt| 1 +
include/qapi/visitor-impl.h | 2 ++
include/qapi/visitor.h| 1 +
qapi/qapi-deal
The old code prints the result of parsing (list of expression
dictionaries), and partial results of semantic analysis (list of enum
dictionaries, list of struct dictionaries).
The new code prints a trace of a schema visit, i.e. what the back-ends
are going to use. Built-in and array types are omi
Clean up white-space, brace placement, and superfluous
Signed-off-by: Markus Armbruster
---
scripts/qapi-commands.py | 1 +
scripts/qapi-event.py| 3 +--
scripts/qapi-types.py| 66 +++-
scripts/qapi-visit.py| 1 +
4 files changed, 34 ins
How many bits we use internally is an implementation detail. It could
be pressed into external interface service as a very approximate range
information, but that's probably a bad idea. If we need range
information, we better do it properly.
Reduces output of query-schema by a negligible 0.5 out
It doesn't take a 'props' argument, let alone one in the format
"NAME=VALUE,..."
The bogus arguments specification doesn't matter due to 'gen': false.
Clean it up to be incomplete rather than wrong, and document the
incompleteness.
Signed-off-by: Markus Armbruster
---
docs/qapi-code-gen.txt |
With the previous commit, the generated marshalers just work, and save
us a bit of handwritten code.
Signed-off-by: Markus Armbruster
---
include/monitor/monitor.h | 3 ---
qapi-schema.json | 9 +++--
qmp-commands.hx | 6 +++---
qmp.c | 20 +++---
Fixes flat unions to visit the base's base members (the previous
commit merely added them to the struct). Same test case.
Patch's effect on visit_type_UserDefFlatUnion():
static void visit_type_UserDefFlatUnion_fields(Visitor *m,
UserDefFlatUnion **obj, Error **errp)
{
Error
Add a device option to show how it's done.
Signed-off-by: Markus Armbruster
---
qmp-commands.hx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 874da31..351173e 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -892,7 +892,9 @@ A
The QAPI code generators work with a syntax tree (nested dictionaries)
plus a few symbol tables (also dictionaties) on the side.
They have clearly outgrown these simple data structures. There's lots
of rummaging around in dictionaries, and information is recomputed on
the fly. For the work I'm g
These functions marshal both input and output.
Signed-off-by: Markus Armbruster
---
docs/qapi-code-gen.txt| 4 +-
docs/writing-qmp-commands.txt | 8 +-
monitor.c | 2 +-
qmp-commands.hx | 240 +-
scripts/qapi
Move gen_visit_decl() to a better place. Inline
generate_visit_struct_body().
Signed-off-by: Markus Armbruster
---
scripts/qapi-visit.py | 42 --
1 file changed, 16 insertions(+), 26 deletions(-)
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
Output unchanged except for white-space.
Signed-off-by: Markus Armbruster
---
scripts/qapi-commands.py | 157 ++-
scripts/qapi.py | 2 +-
2 files changed, 87 insertions(+), 72 deletions(-)
diff --git a/scripts/qapi-commands.py b/scripts/qap
Drop helper functions that are now unused.
Make pylint reasonably happy.
Rename generate_FOO() functions to gen_FOO() for consistency.
Use more consistent and sensible variable names.
Consistently use c_ for mapping keys when their value is a C
identifier or type.
Simplify gen_enum() and gen_v
'gen': false needs to stay for now, because netdev_add is still using
it.
Signed-off-by: Markus Armbruster
---
docs/qapi-code-gen.txt | 15 ---
scripts/qapi.py | 20
tests/Makefile
The visitor will help keeping the code generation code simple and
reasonably separated from QAPISchema details.
Signed-off-by: Markus Armbruster
---
scripts/qapi.py | 44
1 file changed, 44 insertions(+)
diff --git a/scripts/qapi.py b/scripts/qapi.py
To eliminate the temptation for clients to look up types by name
(which are not ABI), replace all type names by meaningless strings.
Reduces output of query-schema by 9 out of 80KiB.
Signed-off-by: Markus Armbruster
---
scripts/qapi-introspect.py | 27 +--
1 file changed
Duplicated in commit 21cd70d. Yes, we can't import qapi-types, but
that's no excuse. Move the helpers from qapi-types.py to qapi.py, and
replace the duplicates in qapi-event.py.
The generated event enumeration type gains a _MAX member, and its
lookup table becomes const-correct (see commit 2e445
Caution, rough edges.
qapi/introspect.json defines the introspection schema. It should do
for uses other than QMP.
FIXME it's almost entirely devoid of comments.
The introspection schema does not reflect all the rules and
restrictions that apply to QAPI schemata. A valid QAPI schema has an
intr
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
Signed-off-by: Markus Armbruster
---
scripts/qapi-event.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py
index aed45d6..537da17 100644
--- a/scripts/qapi-event.py
+++ b/scripts/qapi-event.py
@@ -137,7 +137,7 @@ def generate_eve
Rename gen_marshal_input() to gen_marshal(), because the generated
function marshals both arguments and results.
Rename gen_visitor_input_containers_decl() to gen_marshal_vars(), and
move the other variable declarations there, too.
Rename gen_visitor_input_block()() to gen_marshal_input_visit(),
A command'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 for it.
Sig
Clarify how they map to JSON. Add how they map to C. Fix the
reference to StringInputVisitor.
Signed-off-by: Markus Armbruster
---
docs/qapi-code-gen.txt | 29 ++---
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-
Fixes flat unions to get the base's base members. Test case is from
commit 2fc0043, in qapi-schema-test.json:
{ 'union': 'UserDefFlatUnion',
'base': 'UserDefUnionBase',
'discriminator': 'enum1',
'data': { 'value1' : 'UserDefA',
'value2' : 'UserDefB',
New methods c_name(), c_type(), c_null(), json_type(),
alternate_qtype().
Signed-off-by: Markus Armbruster
---
scripts/qapi.py | 72 +++--
1 file changed, 65 insertions(+), 7 deletions(-)
diff --git a/scripts/qapi.py b/scripts/qapi.py
index a8
Order of expressions doesn't matter. QAPISchema().get_exprs() returns
expressions in the order they're parsed.
I'm going to refactor this code. To check refactorings, I want to
diff the generated code, and for that I need to preserve its order.
Since I don't feel like preserving parse order, I'
gen_marshal_output() uses its parameter name only for name of the
generated function. Name it after the type being marshaled instead of
its caller, and drop duplicates.
Saves 7 copies of qmp_marshal_output_int() in qemu-ga, and one copy of
qmp_marshal_output_str() in qemu-system-*.
Signed-off-by
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
---
scripts/qapi-commands.py | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/scr
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.
gen_visitor_input_containers_decl()'s parameter obj is always
"QOBJECT(args)".
Signed-off-by:
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
Generated qapi-event.[ch] lose line breaks. No change otherwise.
Signed-off-by: Markus Armbruster
---
scripts/qapi-commands.py | 11 ++-
scripts/qapi-event.py| 18 +++---
scripts/qapi.py | 16
3 files changed, 21 insertions(+), 24 deletions(-)
Signed-off-by: Markus Armbruster
---
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/qapi-commands.py
@@ -57,19
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
---
scripts/qapi-commands.py | 52 +++-
1 file changed, 21 insertions(+),
1 - 100 of 469 matches
Mail list logo