The scripts/qemu-gdb.py file is not easily discoverable. Add a .gdbinit
file so GDB either loads qemu-gdb.py automatically or prints a message
informing the user how to enable them (some systems disable ./.gdbinit
loading for security reasons).
Symlink .gdbinit and the scripts directory in order
From: Roman Pen
Submission of requests on linux aio is a bit tricky and can lead to
requests completions on submission path:
44713c9e8547 ("linux-aio: Handle io_submit() failure gracefully")
0ed93d84edab ("linux-aio: process completions from ioq_submit()")
That
The following changes since commit 0db1851becbefe3e50cfc03776fb1f75817376af:
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.10-pull-request'
into staging (2017-06-07 11:56:00 +0100)
are available in the git repository at:
git://github.com/stefanha/qemu.git
From: Philippe Mathieu-Daudé
spotted by Coccinelle script scripts/coccinelle/err-bad-newline.cocci
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Eric Blake
Reviewed-by: Laurent Vivier
Signed-off-by: Stefan Hajnoczi
From: Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Eric Blake
Signed-off-by: Stefan Hajnoczi
---
scripts/coccinelle/return_directly.cocci | 2 +-
1 file changed, 1 insertion(+), 1
Halil Pasic wrote:
> On 06/01/2017 01:32 PM, Cornelia Huck wrote:
>> On Thu, 1 Jun 2017 11:35:27 +0200
>> Halil Pasic wrote:
>>
I was about to suggest to move css from pointer to an embedded struct,
and then noticed that
Currently if you disable listening on IPv4 addresses, via the
CLI flag ipv4=off, we still mistakenly accept IPv4 clients via
the IPv6 listener socket due to IPV6_V6ONLY flag being unset.
We must ensure IPV6_V6ONLY is always set if ipv4=off
This fixes the following scenarios
-incoming
The semantics around handling ipv4=on|off & ipv6=on|off are quite
subtle to understand in combination with the various hostname addresses
and backend types. Introduce a massive test matrix that launches QEMU
and validates the ability to connect a client on each protocol as
appropriate.
The test
When inet_parse() parses the hostname, it is forcing the
has_ipv6 && ipv6 flags if the address contains a ":". This
means that if the user had set the ipv4=on flag, to try to
restrict the listener to just ipv4, an error would not have
been raised. eg
-incoming tcp:[::]:9000,ipv4
should have
The original InetSocketAddress struct may have has_ipv4 and
has_ipv6 fields set, which will control both the ai_family
used during DNS resolution, and later use of the V6ONLY
flag.
Currently the standalone DNS resolver code drops the
has_ipv4 & has_ipv6 flags after resolving, which means
the
Juan Quintela wrote:
> Hi
Hi Kevin and Stefan, I intended to cc you on this series.
Is this what you were asking for block layer migration?
Do you need anything else?
Thanks, Juan.
> This series make:
> - use of cleanup/save methods generic, not only for save_live
When binding to an IPv6 socket we currently force the
IPV6_V6ONLY flag to off. This means that the IPv6 socket
will accept both IPv4 & IPv6 sockets when QEMU is launched
with something like
-vnc :::1
While this is good for that case, it is bad for other
cases. For example if an empty hostname
The following changes since commit 0db1851becbefe3e50cfc03776fb1f75817376af:
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.10-pull-request'
into staging (2017-06-07 11:56:00 +0100)
are available in the git repository at:
git://github.com/berrange/qemu
From: Jeff Cody
In external_snapshot_abort(), we try to undo what was done in
external_snapshot_prepare() calling bdrv_replace_node() to swap the
nodes back. However, we receive a permissions error as writers are
blocked on the old node, which is now the new node backing file.
Signed-off-by: Kevin Wolf
Reviewed-by: Jeff Cody
Reviewed-by: Eric Blake
---
tests/qemu-iotests/183 | 140 +
tests/qemu-iotests/183.out | 46 +++
tests/qemu-iotests/group | 1
Peter Xu wrote:
> Move it into MigrationState, with a property binded to it.
>
> Same trick played with HW_COMPAT_2_3.
>
> Signed-off-by: Peter Xu
Reviewed-by: Juan Quintela
From: Peter Maydell
Coverity points out that the code path in qcow_create() for
the magic "fat:" backing file name leaks the memory used to
store the filename (CID 1307771). Free the memory before
we overwrite the pointer.
Signed-off-by: Peter Maydell
Signed-off-by: Kevin Wolf
Reviewed-by: John Snow
---
tests/qemu-iotests/040 | 35 +--
tests/qemu-iotests/040.out | 4 ++--
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/040
We need to release any block migrations BlockBackends on the source
before successfully completing the migration because otherwise
inactivating the images will fail (inactivation only tolerates device
BBs).
Signed-off-by: Kevin Wolf
Reviewed-by: Fam Zheng
The final bdrv_set_backing_hd() could be working on already freed nodes
because the commit job drops its references (through BlockBackends) to
both overlay_bs and top already a bit earlier.
One way to trigger the bug is hot unplugging a disk for which
blockdev_mark_auto_del() cancels the block
Block migration may still access the image during its
.save_live_complete_precopy() implementation, so we should only
inactivate the image afterwards.
Another reason for the change is that inactivating an image fails when
there is still a non-device BlockBackend using it, which includes the
BBs
blk->name isn't an array, but a pointer that can be NULL. Checking for
an anonymous BB must involve a NULL check first, otherwise we get
crashes.
Signed-off-by: Kevin Wolf
Reviewed-by: Fam Zheng
Reviewed-by: Juan Quintela
Reviewed-by:
The following changes since commit b55a69fe5f0a504dac6359bb7e99a72b130c3661:
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170607'
into staging (2017-06-07 15:06:42 +0100)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
On 06/07/2017 07:16 PM, Greg Kurz wrote:
> Similarly to what was done to spapr with commit 249127d0dfeb, this patch
> ensures that we don't keep an extra reference on the ICPState object. Also
> since the object was just created and not reparented yet, the call to
> object_property_add_child()
Peter Xu wrote:
> It was in SaveState but now moved to MigrationState altogether. Again,
> using HW_COMPAT_2_3 for old PC/SPAPR machines but still we'll have to
> keep savevm_skip_configuration() since used by xen_init().
oops.
>
> Signed-off-by: Peter Xu
On 06/07/2017 07:17 PM, Greg Kurz wrote:
> Taking into account that qemu_set_irq() returns immediatly if its first
> argument is NULL, icp_kvm_reset() largely duplicates icp_reset().
>
> This patch introduces a reset() handler, so that the common logic can
> be implemented in icp_reset() only.
>
Peter Xu wrote:
> Removing two callers of global_state_set_optional() since now we can use
> HW_COMPAT_2_3. However there is still one more caller (xen_init), so we
> still need to keep the function until it disappears.
>
> Signed-off-by: Peter Xu
On 2017-06-01 19:27, Daniel P. Berrange wrote:
> Previously posted:
>
> v1: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg00201.html
> v2: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05147.html
> v3: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05671.html
>
Peter Xu wrote:
> Put it into MigrationState then we can use the properties to specify
> whether to enable storing global state.
>
> Signed-off-by: Peter Xu
> ---
> include/migration/migration.h | 6 ++
> migration/migration.c | 21
On 2017-06-01 19:27, Daniel P. Berrange wrote:
> Currently 'qemu-img info' reports a simple "encrypted: yes"
> field. This is not very useful now that qcow2 can support
> multiple encryption formats. Users want to know which format
> is in use and some data related to it.
>
> Wire up usage of the
Peter Maydell writes:
> On 7 June 2017 at 14:09, Markus Armbruster wrote:
>> Peter Maydell writes:
>>> So how should I obtain those semantics with this cleanup in place ?
>>
>> Two ways come to mind:
>>
>> * Define a
+ more folks who made changes to hw/i386/multiboot.c
On Tue, Jun 6, 2017 at 9:41 PM, Anatol Pomozov wrote:
> It is possible to create a 64 bit elf image that has valid multiboot header.
> qemu should be able to boot such images.
>
> Tested with homemade 64bit OS - now
On 06/07/2017 07:10 PM, Dr. David Alan Gilbert wrote:
> * Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
>>
>>
>> On 06/07/2017 02:01 PM, Dr. David Alan Gilbert wrote:
>>> * Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
On 06/07/2017 01:07 PM, Dr. David Alan Gilbert wrote:
> *
Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under
sPAPRCPUCore") moved ICPState objects from the machine to CPU cores.
This is an improvement since we no longer allocate ICPState objects
that will never be used. But it has the side-effect of breaking
migration of older machine
Similarly to what was done to spapr with commit 249127d0dfeb, this patch
ensures that we don't keep an extra reference on the ICPState object. Also
since the object was just created and not reparented yet, the call to
object_property_add_child() should never fail: let's pass _abort to
make this
On 07.06.2017 16:34, Paolo Bonzini wrote:
>
>
> On 07/06/2017 09:33, Thomas Huth wrote:
>> On 07.06.2017 09:07, David Gibson wrote:
>>> The pseries machine type doesn't usually use the 'pvpanic' device as such,
>>> because it has a firmware/hypervisor facility with roughly the same
>>> purpose.
On 7 June 2017 at 17:13, Alex Bennée wrote:
>
> Peter Maydell writes:
>
>> If EL3 is not implemented (ie only one security state) then the
>> one and only ICC_BPR1 register behaves like the Non-secure
>> ICC_BPR1 in an EL3-present configuration.
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
>
>
> On 06/07/2017 02:01 PM, Dr. David Alan Gilbert wrote:
> > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
> >>
> >>
> >> On 06/07/2017 01:07 PM, Dr. David Alan Gilbert wrote:
> >>> * Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
>
On 07/06/2017 17:52, Lluís Vilanova wrote:
> Paolo Bonzini writes:
>
>> On 07/06/2017 14:07, Peter Maydell wrote:
My understanding was that adding a public instrumentation interface would
add
too much code maintenance overhead for a feature that is not in QEMU's core
Hi
On Wed, Jun 7, 2017 at 8:57 PM Anthony PERARD
wrote:
> On Mon, May 29, 2017 at 12:45:43PM +0400, Marc-André Lureau wrote:
> > Move all the fronted struct and methods to a seperate unit. This avoids
> > accidentally mixing backend and frontend calls, and helps with
** Changed in: qemu
Status: Incomplete => Won't Fix
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/893956
Title:
qemu-img bug with dynamic vhd
Status in QEMU:
Won't Fix
Bug description:
On 2017-06-01 19:27, Daniel P. Berrange wrote:
> This adds support for using LUKS as an encryption format
> with the qcow2 file, using the new encrypt.format parameter
> to request "luks" format. e.g.
>
> # qemu-img create --object secret,data=123456,id=sec0 \
>-f qcow2 -o
On 07/06/2017 18:26, Juan Quintela wrote:
> Felipe Franciosi wrote:
>> Currently, the throttle_thread_scheduled flag is reset back to 0 before
>> sleeping (as part of the throttling logic). Given that throttle_timer
>> (well, any timer) may tick with a slight delay, it so
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [Qemu-devel] [PATCH 0/5] Code cleanups with Coccinelle
Type: series
Message-id: 20170607074632.13162-1-marcandre.lur...@redhat.com
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
The ICPState objects are currently registered to vmstate as qdev objects.
Their instance ids are hence computed automatically in the migration code,
and thus depends on the order the CPU cores were plugged.
If the destination had its CPU cores plugged in a different order than the
source, then
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
>
>
> On 06/07/2017 07:10 PM, Dr. David Alan Gilbert wrote:
> > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
> >>
> >>
> >> On 06/07/2017 02:01 PM, Dr. David Alan Gilbert wrote:
> >>> * Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
>
>
Am 07.06.2017 um 15:55 hat Jeff Cody geschrieben:
> In external_snapshot_abort(), we try to undo what was done in
> external_snapshot_prepare() calling bdrv_replace_node() to swap the
> nodes back. However, we receive a permissions error as writers are
> blocked on the old node, which is now the
Taking into account that qemu_set_irq() returns immediatly if its first
argument is NULL, icp_kvm_reset() largely duplicates icp_reset().
This patch introduces a reset() handler, so that the common logic can
be implemented in icp_reset() only.
While there we can also drop icp_kvm_realize() and
Until recently, spapr used to allocate ICPState objects for the lifetime
of the machine. They would only be associated to vCPUs in xics_cpu_setup()
when plugging a CPU core.
Now that ICPState objects have the same lifecycle as vCPUs, it is
possible to associate them during realization.
This
v3: - preparatory cleanup in pnv (patch 1)
- rework ICPState realization and vmstate registration (patches 2,3,4)
- fix migration using dummy icp/server entries (patch 5)
v2: - some patches from v1 are already merged in ppc-for-2.10
- added a new fix to a potential memory leak (patch
The dump functions could be generally useful for any qobject user or for
debugging etc.
Signed-off-by: Marc-André Lureau
---
include/qapi/qmp/qdict.h | 2 ++
include/qapi/qmp/qlist.h | 2 ++
include/qapi/qmp/qobject.h | 7
block/qapi.c | 90
Similar to int support, add uint support.
Note this is RFC because this is currently unused in qemu, I haven't
found a good user for it yet (kaslr qemu-ga code did use it though).
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
TYPE_QEMU_CONSOLE property "head" is defined with
object_property_add_uint*_ptr().
Signed-off-by: Marc-André Lureau
---
ui/console.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index d914cced53..40572c9254
"size" is a property of TYPE_MEMORY_BACKEND.
host_memory_backend_get_size() and host_memory_backend_set_size() use
visit_type_size().
Signed-off-by: Marc-André Lureau
---
numa.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/numa.c
TYPE_ARM_CPU's property "mp-affinity" is defined with
DEFINE_PROP_UINT64().
Signed-off-by: Marc-André Lureau
---
hw/intc/arm_gicv3_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
The original commit (3830c7a460b8252dc975f8115fdaed8c562d2d75)
stated "Datasheet states that default dummy cycles is 8 so fix it."
But since dummy cycles are handled in bytes it must be 1, not 8.
Signed-off-by: Aleksey Kuleshov
---
hw/block/m25p80.c | 2 +-
1 file changed, 1
TYPE_PC_MACHINE's property PC_MACHINE_MAX_RAM_BELOW_4G's getter and
setter pc_machine_get_max_ram_below_4g() and
pc_machine_set_max_ram_below_4g() use visit_type_size()
Signed-off-by: Marc-André Lureau
---
hw/i386/xen/xen-hvm.c | 6 +++---
1 file changed, 3
The original commit (3830c7a460b8252dc975f8115fdaed8c562d2d75)
stated "Datasheet states that default dummy cycles is 8 so fix it."
But since dummy cycles are handled in bytes it must be 1, not 8.
Signed-off-by: Aleksey Kuleshov
---
hw/block/m25p80.c | 2 +-
1 file changed, 1
On 2017-06-01 19:27, Daniel P. Berrange wrote:
> Historically the qcow & qcow2 image formats supported a property
> "encryption=on" to enable their built-in AES encryption. We'll
> soon be supporting LUKS for qcow2, so need a more general purpose
> way to enable encryption, with a choice of
Now that we have proper locking after MTTCG patches have landed, we
can revert the commit. This reverts commit
a9353fe897ca2687e5b3385ed39e3db3927a90e0.
CC: Peter Maydell
CC: Alex Bennée
Signed-off-by: Pranith Kumar
---
PIIX4: piix4_pm_add_propeties() defines these with
object_property_add_uint*_ptr().
Q35: ich9_lpc_add_properties() and ich9_pm_add_properties() define them
similarly, except for ACPI_PM_PROP_GPE0_BLK(). That one's getter
ich9_pm_get_gpe0_blk() uses visit_type_uint32().
Signed-off-by: Marc-André
On 06/07/2017 06:35 PM, Juan Quintela wrote:
> Halil Pasic wrote:
>> Verbose error reporting for the _EQUAL family. Modify the standard _EQUAL
>> so the hint states the assertion probably failed due to a bug. Introduce
>> _EQUAL_HINT for specifying a context specific
This is TYPE_MEMORY_REGION's property. Its getter
memory_region_get_addr() uses visit_type_uint64().
Signed-off-by: Marc-André Lureau
---
hw/core/platform-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/platform-bus.c
These are properties of TYPE_X86_CPU, defined with DEFINE_PROP_UINT32()
Signed-off-by: Marc-André Lureau
---
target/i386/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index a91c0b6a64..52bda7b3f6
On 2017-06-01 19:27, Daniel P. Berrange wrote:
> This converts the qcow driver to make use of the QCryptoBlock
> APIs for encrypting image content. This is only wired up to
> permit use of the legacy QCow encryption format. Users who wish
> to have the strong LUKS format should switch to qcow2
Both properties are defined with DEFINE_PROP_UINT32().
Signed-off-by: Marc-André Lureau
---
hw/arm/bcm2835_peripherals.c | 9 -
hw/arm/raspi.c | 4 ++--
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/hw/arm/bcm2835_peripherals.c
This is an alias of TYPE_PNV_CORE's property "pir", which is defined
with DEFINE_PROP_UINT32()
Signed-off-by: Marc-André Lureau
---
hw/ppc/pnv_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
index
Peter Xu wrote:
> Let the old man "MigrationState" join the object family. Direct benefit
> is that we can start to use all the property features derived from
> current QDev, like: HW_COMPAT_* bits, command line setup for migration
> parameters (so will never need to set them
This property is an alias for device TYPE_ASPEED_SDMC's property
"ram-size", which is defined with DEFINE_PROP_UINT64().
Signed-off-by: Marc-André Lureau
---
hw/arm/aspeed.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/arm/aspeed.c
Can someone please pick this up?
Thanks,
On Fri, Feb 24, 2017 at 12:42 AM, Pranith Kumar wrote:
> In mttcg, calling pause_all_vcpus() during execution from the
> generated TBs causes a deadlock if some vCPU is waiting for exclusive
> execution in start_exclusive(). Fix
On Mon, May 29, 2017 at 12:45:43PM +0400, Marc-André Lureau wrote:
> Move all the fronted struct and methods to a seperate unit. This avoids
> accidentally mixing backend and frontend calls, and helps with readibilty.
>
> Make qemu_chr_replay() a macro shared by both char and char-fe.
>
> Export
The property is defined with object_property_add_uint32_ptr()
Signed-off-by: Marc-André Lureau
---
hw/acpi/pcihp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index 3a531a4416..c420a388ea 100644
---
Those properties use visit_type_uint*()
Signed-off-by: Marc-André Lureau
---
hw/i386/acpi-build.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 7c4c61290f..0b8bc62b99
Signed-off-by: Marc-André Lureau
Suggested-by: Markus Armbruster
Reviewed-by: Markus Armbruster
---
tests/check-qdict.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tests/check-qdict.c b/tests/check-qdict.c
index
TYPE_ISA_PVPANIC_DEVICE's property PVPANIC_IOPORT_PROP is defined with
DEFINE_PROP_UINT16().
Signed-off-by: Marc-André Lureau
---
hw/misc/pvpanic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index
Modify the unsigned type for various properties to use QNUM_U64, to
avoid type casts.
There are a few empty lines added to improve code reading/style.
Signed-off-by: Marc-André Lureau
---
include/hw/qdev-core.h | 1 +
include/hw/qdev-properties.h | 29
Those are defined with object_property_add_uint16_ptr()
Signed-off-by: Marc-André Lureau
---
hw/i386/acpi-build.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index b2dc3d8580..d1ffce7ce3 100644
This is TYPE_MEMORY_REGION's property. Its getter
memory_region_get_addr() uses visit_type_uint64().
Signed-off-by: Marc-André Lureau
---
hw/misc/auxbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
index
e->size is hwaddr, i.e. uint64_t. We silently truncate.
Signed-off-by: Marc-André Lureau
Suggested-by: Markus Armbruster
Reviewed-by: Markus Armbruster
---
hw/pci-host/q35.c | 3 +--
1 file changed, 1 insertion(+), 2
This carries the memory_region_size() value without implicit cast.
Signed-off-by: Marc-André Lureau
---
hw/acpi/memory_hotplug.c | 5 +++--
hw/acpi/nvdimm.c | 8
hw/mem/pc-dimm.c | 18 +-
3 files changed, 16 insertions(+),
Wrap the Property default value (an int64_t) in a union, to prepare
for the next patch adding a uint64_t.
Signed-off-by: Marc-André Lureau
---
include/hw/qdev-core.h | 4 +++-
include/hw/qdev-properties.h | 8
hw/core/qdev-properties.c| 6 +++---
TYPE_HPET's property HPET_INTCAP is defined with DEFINE_PROP_UINT32().
Signed-off-by: Marc-André Lureau
---
hw/i386/pc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f6d5717f8b..02f9a8fe91 100644
---
TYPE_PC_DIMM's property PC_DIMM_ADDR_PROP is defined with
DEFINE_PROP_UINT64().
TYPE_PC_DIMM's property PC_DIMM_NODE_PROP is defined with
DEFINE_PROP_UINT32().
Signed-off-by: Marc-André Lureau
---
hw/acpi/memory_hotplug.c | 7 ---
hw/acpi/nvdimm.c | 10
Switch strtoll() usage to qemu_strtoi64() helper while at it.
Add a few tests for large numbers.
Signed-off-by: Marc-André Lureau
---
qobject/json-lexer.c | 4
qobject/json-parser.c | 36
tests/check-qjson.c | 44
Prepare for the next patch's DEFINE_PROP_UNSIGNED().
Signed-off-by: Marc-André Lureau
---
include/hw/qdev-properties.h | 26 +-
hw/block/fdc.c | 18 +-
hw/net/e1000e.c | 6 +++---
3 files changed,
TYPE_X86_CPU's property "apic-id" is defined with DEFINE_PROP_UINT32().
Signed-off-by: Marc-André Lureau
---
hw/i386/pc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f670ecb7f2..f6d5717f8b 100644
---
Before the previous commit, parameter promote_int = true made
visit_start_alternate() with an input visitor avoid QTYPE_QINT
variants and create QTYPE_QFLOAT variants instead. This was used
where QTYPE_QINT variants were invalid.
The previous commit fused QTYPE_QINT with QTYPE_QFLOAT, rendering
The property is defined with DEFINE_PROP_UINT32().
Signed-off-by: Marc-André Lureau
---
include/hw/isa/isa.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index c2fdd70cdc..95593408ef 100644
---
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
---
include/qom/object.h | 23 +++
qom/object.c | 29 +
2 files changed, 52 insertions(+)
diff --git a/include/qom/object.h
TYPE_ISA_FDC's property "iobase" is defined with DEFINE_PROP_UINT32().
Signed-off-by: Marc-André Lureau
---
hw/i386/pc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 5b8c6fbbea..f670ecb7f2 100644
---
Based on the underlying type of the data accessed, use the appropriate
getters/setters.
Signed-off-by: Marc-André Lureau
---
hw/i386/acpi-build.c | 12 ++--
hw/pci-host/gpex.c| 2 +-
hw/pci-host/q35.c | 2 +-
hw/pci-host/xilinx-pcie.c
Use the more common pattern to error out.
Signed-off-by: Marc-André Lureau
---
qapi/qobject-input-visitor.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c
index
Switch to use QNum/uint where appropriate to remove i64 limitation.
The input visitor will cast i64 input to u64 for compatibility
reasons (existing json QMP client already use negative i64 for large
u64, and expect an implicit cast in qemu).
Note: before the patch, uint64_t values above
The getter and setter of TYPE_APIC_COMMON property "id" are
apic_common_get_id() and apic_common_set_id().
apic_common_get_id() reads either APICCommonState member uint32_t
initial_apic_id or uint8_t id into an int64_t local variable. It then
passes this variable to visit_type_int().
Alternates with both a 'number' and an 'int' branch will become
invalid when the next patch merges of QFloat and QInt into QNum.
More sophisticated alternate code could keep them valid, but since
we have no users outside tests, simply drop the tests.
Signed-off-by: Marc-André Lureau
Use the actual unsigned integer type name.
The type name change impacts the following externally visible area:
* vl.c's machine_help_func() puts it in help for -machine NAME,help.
* QMP command qom-list exposes it in ObjectPropertyInfo member @type.
* QMP command device-list-properties exposes
In order to store integer values between INT64_MAX and UINT64_MAX, add
a uint64_t internal representation.
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
---
include/qapi/qmp/qnum.h | 7 ++
qobject/qnum.c | 64
We would like to use a same QObject type to represent numbers, whether
they are int, uint, or floats. Getters will allow some compatibility
between the various types if the number fits other representations.
Add a few more tests while at it.
Signed-off-by: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
tests/test-qobject-input-visitor.c | 38 +-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/tests/test-qobject-input-visitor.c
b/tests/test-qobject-input-visitor.c
index
"Dr. David Alan Gilbert" wrote:
> * Halil Pasic (pa...@linux.vnet.ibm.com) wrote:
>> This one has to be fixed up to 's390x: vmstatify config migration for
>> virtio-ccw' provided we want to achieve the same as 's390x/css: catch
>> section mismatch on load' does.
>>
>>
101 - 200 of 445 matches
Mail list logo