On Thu, Aug 03, 2017 at 11:50:22AM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (pet...@redhat.com) wrote:
> > Introducing new return path message MIG_RP_MSG_RECV_BITMAP to send
> > received bitmap of ramblock back to source.
> >
> > This is the reply message of MIG_CMD_RECV_BITMAP, it contai
On Thu, 08/03 23:01, no-re...@patchew.org wrote:
> /var/tmp/patchew-tester-tmp-2j515e8v/src/tcg/tcg-op.c:3056:1: fatal error:
> error writing to /tmp/cc9gtyQ1.s: No space left on device
Sorry, it is a false positive. I will clean up the disk space and rerun the
test. Sorry for the noise.
Fam
This was tested with macOS 10.12.5 and Clover r4114.
Without this patch, the macOS boot process gets stuck at the Apple logo
without showing any progress bar.
I have documented the process of running macOS on QEMU/KVM at,
https://github.com/kholia/OSX-KVM/
Instead of using this patch, adding an
Could you please try to run QEMU without the "-usb" option here? "-usb"
automatically creates an EHCI and UHCI controller on the q35 machine, so
that might be the reason that your USB devices get connected as USB 2.0
instead.
** Changed in: qemu
Status: New => Incomplete
--
You received t
Hi Greg,
Did you push the qemu patch upstream, and now it is a matter of fixing
the kernel?
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1336794
Title:
9pfs does not honor open file handles on un
Signed-off-by: Richard Henderson
---
disas/i386.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/disas/i386.c b/disas/i386.c
index 7eaa378a10..a557e678ec 100644
--- a/disas/i386.c
+++ b/disas/i386.c
@@ -684,6 +684,7 @@ fetch_data(struct disassemble_info *info,
Which includes pext, pdep and bzhi.
Signed-off-by: Richard Henderson
---
disas/i386.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/disas/i386.c b/disas/i386.c
index 7a238b203b..7eaa378a10 100644
--- a/disas/i386.c
+++ b/disas/i386.c
@@ -683,6 +683,7 @@ fet
Signed-off-by: Richard Henderson
---
disas/i386.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/disas/i386.c b/disas/i386.c
index f1e376ca4a..7a238b203b 100644
--- a/disas/i386.c
+++ b/disas/i386.c
@@ -3559,6 +3559,7 @@ ckvexprefix (void)
} else {
/* Two byte VEX prefix. */
This allows the backend to allocate an otherwise unused register.
This can allow the backend to avoid having to reserve a full-time
temporary register.
Signed-off-by: Richard Henderson
---
tcg/tcg.h | 1 +
tcg/tcg.c | 58 +-
2 files change
We can implement extract and deposit fairly efficiently with
the bmi2 pext and pdep instructions.
I did wonder about using bextr and tcg_reg_alloc_new to
allocate the register required to hold the parameters. But
pdep allows the mask to be stored in the constant pool, and
there's the chance that
Signed-off-by: Richard Henderson
---
tcg/i386/tcg-target.h | 4 ++-
tcg/i386/tcg-target.inc.c | 82 ++-
2 files changed, 70 insertions(+), 16 deletions(-)
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index 85b0ccd98c..e512648c95 1006
Signed-off-by: Richard Henderson
---
tcg/i386/tcg-target.h | 6 +-
tcg/i386/tcg-target.inc.c | 147 +-
2 files changed, 109 insertions(+), 44 deletions(-)
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index b89dababf4..85b0ccd98c 100
On Fri, Aug 04, 2017 at 02:08:33PM +0800, Peter Xu wrote:
> On Thu, Aug 03, 2017 at 10:49:02AM +0100, Dr. David Alan Gilbert wrote:
> > * Peter Xu (pet...@redhat.com) wrote:
> > > Add a new vm command MIG_CMD_RECV_BITMAP to request received bitmap for
> > > one ramblock.
> > >
> > > Signed-off-by:
> On 08/03/2017 05:10 PM, Paolo Bonzini wrote:
> > On 03/08/2017 15:26, Hannes Reinecke wrote:
> >> Hi all,
> >>
> >> due to a customer issue I've added simple subenclosure support
> >> to the SCSI emulation. The patch simply converts the current invisible
> >> LUN0 into an enclosure device; exist
On Thu, Aug 03, 2017 at 10:49:02AM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (pet...@redhat.com) wrote:
> > Add a new vm command MIG_CMD_RECV_BITMAP to request received bitmap for
> > one ramblock.
> >
> > Signed-off-by: Peter Xu
> > ---
> > migration/savevm.c | 59
> > +
On Thu, Aug 03, 2017 at 10:28:20AM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (pet...@redhat.com) wrote:
> > On the destination side, we cannot wake up all the threads when we got
> > reconnected. The first thing to do is to wake up the main load thread,
> > so that we can continue to receiv
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.inc.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c
index bc14d2c9c6..4b32809217 100644
--- a/tcg/ppc/tcg-target.inc.c
+++ b/tcg/ppc/tcg-target.inc.c
@@ -598,6 +598,7 @@ stat
Signed-off-by: Richard Henderson
---
tcg/arm/tcg-target.inc.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c
index 2736022d5a..db46aea38c 100644
--- a/tcg/arm/tcg-target.inc.c
+++ b/tcg/arm/tcg-target.inc.c
@@ -1054
Use UBFX to avoid limitation on CPU_TLB_BITS. Since we're dropping
the initial shift, we need to replace the page masking. We can use
MOVW+BIC to do this without shifting. The result is the same size
as the armv6 path with one less conditional instruction.
Signed-off-by: Richard Henderson
---
Signed-off-by: Richard Henderson
---
tcg/sparc/tcg-target.inc.c | 170 +
1 file changed, 140 insertions(+), 30 deletions(-)
diff --git a/tcg/sparc/tcg-target.inc.c b/tcg/sparc/tcg-target.inc.c
index bb7f7e8906..7d73c25347 100644
--- a/tcg/sparc/tcg-tar
On 08/03/2017 05:10 PM, Paolo Bonzini wrote:
> On 03/08/2017 15:26, Hannes Reinecke wrote:
>> Hi all,
>>
>> due to a customer issue I've added simple subenclosure support
>> to the SCSI emulation. The patch simply converts the current invisible
>> LUN0 into an enclosure device; existing setups usin
At this point the conversion is a wash. Loading of TB+ofs is
smaller, but the actual return address from exit_tb is larger.
There are a few more insns required to transition between TBs.
But the expectation is that accesses to the constant pool will
on the whole be smaller.
Signed-off-by: Richar
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [Qemu-devel] [PATCH for-2.11 0/8] tcg/s390 improvments
Message-id: 20170804052833.10187-1-...@twiddle.net
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --
Signed-off-by: Richard Henderson
---
tcg/sparc/tcg-target.h | 2 ++
tcg/sparc/tcg-target.inc.c | 77 +-
2 files changed, 58 insertions(+), 21 deletions(-)
diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h
index 3ac0bd33d3..83f9397e04 10
Move constants before all of the functions.
Move tcg_out_ functions before all
of the others. No functional change.
Signed-off-by: Richard Henderson
---
tcg/arm/tcg-target.inc.c | 599 +++
1 file changed, 299 insertions(+), 300 deletions(-)
diff --gi
Dispense with TCGBackendData, as it has never been used for more than
holding a single pointer. Use a define in the cpu/tcg-target.h to
signal requirement for TCGLabelQemuLdst, so that we can drop the no-op
tcg-be-null.h stubs. Rename tcg-be-ldst.h to tcg-ldst.inc.c.
Signed-off-by: Richard Hende
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.h | 1 +
tcg/ppc/tcg-target.inc.c | 34 ++
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h
index c1226ea5b6..e10d7e4411 100644
--- a/tcg/ppc/tcg
Signed-off-by: Richard Henderson
---
tcg/aarch64/tcg-target.h | 1 +
tcg/aarch64/tcg-target.inc.c | 62 +++-
2 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h
index 484cf6236c..e86c2684
Signed-off-by: Richard Henderson
---
tcg/arm/tcg-target.h | 1 +
tcg/arm/tcg-target.inc.c | 92 ++--
2 files changed, 75 insertions(+), 18 deletions(-)
diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h
index 55de35a691..0f71a85a45 100644
--
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.h | 2 +-
tcg/s390/tcg-target.inc.c | 71 +++
2 files changed, 61 insertions(+), 12 deletions(-)
diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h
index 8fea9646b4..8c5a30ccf8 10064
A new shared header tcg-pool.inc.c adds new_pool_label,
for registering a tcg_target_ulong to be emitted after
the generated code, plus relocation data to install a
pointer to the data.
A new pointer is added to the TCGContext, so that we
dump the constant pool as data, not code.
Signed-off-by: R
Also use CHI/CGHI for 16-bit signed constants.
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 136 +++---
1 file changed, 67 insertions(+), 69 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index b0b34fa5
We'll want this for tcg_out_nop_fill.
Signed-off-by: Richard Henderson
---
tcg/arm/tcg-target.inc.c | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c
index f40e87066f..78603a19db 100644
--- a/tcg/arm/tc
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 77 ---
1 file changed, 40 insertions(+), 37 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index 83fac71c31..b0b34fa5ab 100644
--- a/tcg/s390/tcg-target.
Already it saves 2 bytes per call, but also the constant pool
entry may well be shared across multiple calls.
Signed-off-by: Richard Henderson
---
tcg/i386/tcg-target.h | 1 +
tcg/i386/tcg-target.inc.c | 18 +++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/
We are not going to use ldrd for loading the comparator
for 32-bit guests, so don't limit cmp_off to 8 bits then.
This eliminates one insn in the tlb load for some guests.
Signed-off-by: Richard Henderson
---
tcg/arm/tcg-target.inc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 20 ++--
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index 29b77ff67f..4be57c5765 100644
--- a/tcg/s390/tcg-target.inc.c
+++ b/tcg/s390/tcg-tar
Split out maybe_out_small_movi for use with other operations
that want to add to the constant pool.
Signed-off-by: Richard Henderson
---
include/elf.h | 3 +-
tcg/s390/tcg-target.h | 1 +
tcg/s390/tcg-target.inc.c | 130 +++---
3 files
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 74 ++-
1 file changed, 34 insertions(+), 40 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index 4be57c5765..83fac71c31 100644
--- a/tcg/s390/tcg-target.
RISC machines often require many instructions in order to construct large
constants from the immediate values available to individual instructions.
Static compilers like GCC often place these large constants into read-only
memory and use one load instruction to fetch the constant instead; a
collect
Replace the USE_DIRECT_JUMP ifdef with a TCG_TARGET_HAS_direct_jump
boolean test. Replace the tb_set_jmp_target1 ifdef with an unconditional
function tb_target_set_jmp_target.
While we're touching all backends, add a parameter for tb->tc_ptr;
we're going to need it shortly for some backends.
Mov
We were passing in -2 instead of +2, but then ignoring
the actual contents of addend in the calculation.
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/
Add CONFIG_ACPI_APEI configuration in the Makefile and
enable it in the arm-softmmu.mak
Signed-off-by: Dongjiu Geng
---
thanks a lot Michael and Laszlo's review and comments:
change since v5:
(1) no change
change since v4:
(1) fix email threading in this series is incorrect issue
change since
This implements APEI GHES Table by passing the error CPER info
to the guest via a fw_cfg_blob. After a CPER info is recorded, an
SEA(Synchronous External Abort)/SEI(SError Interrupt) exception
will be injected into the guest OS.
Below is the table layout, the max number of error soure is 11,
which
This allows LOAD HALFWORD IMMEDIATE ON CONDITION,
eliminating one insn in some common cases.
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.h | 1 +
tcg/s390/tcg-target.inc.c | 79 +--
2 files changed, 63 insertions(+), 17 deletions(-)
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 38 ++
1 file changed, 14 insertions(+), 24 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index ff3f644f8e..6b08ccea6d 100644
--- a/tcg/s390/tcg-target.inc.c
+++
(1) Add related APEI/HEST table structures and macros, these
definition refer to ACPI 6.1 and UEFI 2.6 spec.
(2) Add generic error status block and CPER memory section
definition, user space only handle memory section errors.
Signed-off-by: Dongjiu Geng
---
thanks Michael and Laszlo's re
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 119 +-
1 file changed, 43 insertions(+), 76 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index 0de968fde2..38b9e791ee 100644
--- a/tcg/s390/tcg-target.
In the armv8 platform, the mainly hardware error source are ARMv8
SEA/SEI/GSIV. For the ARMv8 SEA/SEI, the KVM or host kernel will signal SIGBUS
or use other interface to notify user space, such as Qemu. After Qemu gets
the notification, it will record the CPER and inject the SEA/SEI to KVM. this
s
Use a switch instead of searching a table.
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 278 +-
1 file changed, 154 insertions(+), 124 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index 5d7083e90c
This allows using a 3-operand insn form for some arithmetic,
logicals and shifts.
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.h | 1 +
tcg/s390/tcg-target.inc.c | 118 +++---
2 files changed, 91 insertions(+), 28 deletions(-)
diff --git
Found by Coverity (CID 1378273).
Reviewed-by: Philippe Mathieu-Daudé
Reported-by: Paolo Bonzini
Signed-off-by: Richard Henderson
---
target/s390x/mem_helper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index cdc78aa3d4..c71dce4b1e
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 68 +--
1 file changed, 30 insertions(+), 38 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index d34649eb13..e075b4844a 100644
--- a/tcg/s390/tcg-target.
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 45 +
1 file changed, 25 insertions(+), 20 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index e075b4844a..ff3f644f8e 100644
--- a/tcg/s390/tcg-target.in
The distinct-operands facility was introduced with z196, but using
it wasn't practical until the tcg_target_op_def cleanup.
The load-on-condition-2 facility was introduced with z13. This has
been compile-tested only, because I've never had access to anything
beyond z12. It'd be nice if someone w
Signed-off-by: Richard Henderson
---
tcg/s390/tcg-target.inc.c | 101 +++---
1 file changed, 33 insertions(+), 68 deletions(-)
diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c
index 6b08ccea6d..5414c9d879 100644
--- a/tcg/s390/tcg-target.
For a 64-bit ILP32 host, aligning to sizeof(long) is not enough.
Guess the minimum for any host is 8, as that covers uint64_t.
Qemu doesn't use a host long double or host vectors, except in
extremely limited circumstances.
Fixes a bus error for a sparc v8plus host.
Signed-off-by: Richard Henderso
Patch 85aa80813dd changed the IF emitting the TST instruction,
but failed to change the ?: converting CMP to CMPEQ, so the
result of the TST is ignored.
Signed-off-by: Richard Henderson
---
tcg/arm/tcg-target.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/arm/tcg-t
This implements APEI GHES Table by passing the error CPER info
to the guest via a fw_cfg_blob. After a CPER info is recorded, an
SEA(Synchronous External Abort)/SEI(SError Interrupt) exception
will be injected into the guest OS.
Below is the table layout, the max number of error soure is 11,
which
In the armv8 platform, the mainly hardware error source are ARMv8
SEA/SEI/GSIV. For the ARMv8 SEA/SEI, the KVM or host kernel will signal SIGBUS
or use other interface to notify user space, such as Qemu. After Qemu gets
the notification, it will record the CPER and inject the SEA/SEI to KVM. this
s
Add CONFIG_ACPI_APEI configuration in the Makefile and
enable it in the arm-softmmu.mak
Signed-off-by: Dongjiu Geng
---
thanks a lot Michael and Laszlo's review and comments:
change since v5:
(1) no change
change since v4:
(1) fix email threading in this series is incorrect issue
change since
(1) Add related APEI/HEST table structures and macros, these
definition refer to ACPI 6.1 and UEFI 2.6 spec.
(2) Add generic error status block and CPER memory section
definition, user space only handle memory section errors.
Signed-off-by: Dongjiu Geng
---
thanks Michael and Laszlo's re
Hi Kevin
Thanks for the information.
So I sounds like we do want multiboot to load all sections regardless
of its segments info. To achieve it we need to read sections headers
and load all section that were not loaded yet.
I have a working implementation here
https://github.com/anatol/qemu/commi
This implements APEI GHES Table by passing the error CPER info
to the guest via a fw_cfg_blob. After a CPER info is recorded, an
SEA(Synchronous External Abort)/SEI(SError Interrupt) exception
will be injected into the guest OS.
Below is the table layout, the max number of error soure is 11,
which
(1) Add related APEI/HEST table structures and macros, these
definition refer to ACPI 6.1 and UEFI 2.6 spec.
(2) Add generic error status block and CPER memory section
definition, user space only handle memory section errors.
Signed-off-by: Dongjiu Geng
---
thanks Michael and Laszlo's re
In the armv8 platform, the mainly hardware error source are ARMv8
SEA/SEI/GSIV. For the ARMv8 SEA/SEI, the KVM or host kernel will signal SIGBUS
or use other interface to notify user space, such as Qemu. After Qemu gets
the notification, it will record the CPER and inject the SEA/SEI to KVM. this
s
Add CONFIG_ACPI_APEI configuration in the Makefile and
enable it in the arm-softmmu.mak
Signed-off-by: Dongjiu Geng
---
thanks a lot Michael and Laszlo's review and comments:
change since v5:
(1) no change
change since v4:
(1) fix email threading in this series is incorrect issue
change since
On Thu, Aug 03, 2017 at 03:03:57PM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (pet...@redhat.com) wrote:
> > On Tue, Aug 01, 2017 at 10:47:16AM +0100, Dr. David Alan Gilbert wrote:
> > > * Peter Xu (pet...@redhat.com) wrote:
> >
> > [...]
> >
> > > > +/* Return true if we should continue t
On Thu, Aug 03, 2017 at 04:28:52PM +1000, Sam Bobroff wrote:
> The concept of a VCPU ID that differs from the CPU's index
> (cpu->cpu_index) exists only within SPAPR machines so, move the
> functions ppc_get_vcpu_id() and ppc_get_cpu_by_vcpu_id() into spapr.c
> and rename them appropriately.
>
> S
On Thu, Aug 03, 2017 at 07:28:06PM +0200, Greg Kurz wrote:
> On Thu, 13 Jul 2017 11:21:18 +1000
> David Gibson wrote:
>
> > On Wed, Jul 12, 2017 at 04:45:17PM +1000, Suraj Jitindar Singh wrote:
> > > On Mon, 2017-07-03 at 19:20 +1000, David Gibson wrote:
> > > > On Mon, Jul 03, 2017 at 01:18:38
On Thu, Aug 03, 2017 at 03:19:40PM +0200, Greg Kurz wrote:
> On Thu, 3 Aug 2017 16:28:44 +1000
> Sam Bobroff wrote:
>
> > This field actually records the VCPU ID used by KVM and, although the
> > value is also used in the device tree it is primarily the VCPU ID so
> > rename it as such.
> >
> >
On Thu, Aug 03, 2017 at 03:15:04PM +0200, Greg Kurz wrote:
> On Thu, 3 Aug 2017 16:28:36 +1000
> Sam Bobroff wrote:
>
> > The e500 platform code uses the function ppc_get_vcpu_dt_id() but that
> > function is actually specific to SPAPR machines, not PPC CPUs, and
> > will always return the cpu_in
On Thu, Aug 03, 2017 at 02:37:15PM +0200, Greg Kurz wrote:
> On Thu, 3 Aug 2017 16:28:27 +1000
> Sam Bobroff wrote:
>
> > The unicast case in h_signal_sys_reset() seems to be broken:
> > rather than selecting the target CPU, it looks like it will pick
> > either the first CPU or fail to find one
Hi,
This series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.
Subject: [Qemu-devel] [PATCH v4 00/22] Clean up around qmp() and hmp()
Message-id: 20170804012551.2714-1-ebl...@redhat.com
Typ
On 08/03/2017 10:21 AM, Eric Blake wrote:
> On 08/03/2017 10:02 AM, Kevin Wolf wrote:
>> BDRV_O_ALLOW_RDWR is a flag that tells whether qemu can internally
>> reopen a node read-write temporarily because the user requested
>> read-write for the top-level image, but qemu decided that read-only is
>>
Similar to the previous helper, we can reduce the boilerplate
of most callers by passing the command name separately from
the interpolated arguments. Adjust the majority of the callers
that can use the new helpers; in the process, fixing a few
places where we would have failed -Wformat-nonliteral.
From: Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building
QMP input manually, as explained in previous commits.
The case in qpci_plug_device_test() is a bit complicated: it
interpolates several JSON object members, not just a value. Clean it
up by passing the
From: Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building
QMP input manually, as explained in a previous commit.
The case in usb_test_hotplug() is slightly more complicated: it
interpolates *into* JSON values. Clean it up by building the values
separately, so
The majority of calls into libqtest's qmp() and friends are passing
a JSON object that includes a command name; we can prove this by
adding an assertion. The only outlier is qmp-test, which is testing
appropriate error responses to protocol violations and id support,
by sending raw strings, where
Upcoming patches will be adding new convenience methods for
constructing QMP commands. But making every variation of sending
support every variation of response handling becomes unwieldy;
it's easier to specify that discarding a JSON response is
unassociated with sending the command, where qmp_asy
Now that the previous patch got rid of the old signature of qmp(),
we can go back to using the shortest possible name for the common
action.
Performed mechanically with:
for f in $(git grep -l qmp_cmd tests/); do
case $f in *qemu-iotests*) continue;; esac
sed -i s/qmp_cmd/qmp/ $f; done
Sig
When you build qga input manually like this:
cmd = g_strdup_printf("{'execute': 'guest-file-write',"
" 'arguments': {'handle': %" PRId64 ","
" 'buf-b64': '%s' } }", id, enc);
ret = qmp_fd(fixture->fd, cmd);
g_free(cmd);
you're respon
With the previous commit, no external clients are using qmp_fd()
or qmp_fd_sendv(). Making qmp_fd_sendv() static lets us refactor
the public qmp_fd_send() to be the common point where we send a
fixed string over the wire as well as log that string, while
qmp_fd_sendv() worries about converting var
Now that we've asserted that all of our interpolated QMP commands
include 'execute', we can reduce some of the caller boilerplate
by providing a helpr function to wrap commands with no arguments
(later patches will cover commands with arguments).
Adjust all callers that can use the new helpers; in
We want -Wformat to catch blatant programming errors in format
strings that we pass to qobject_from_jsonf(). But if someone
were to pass a JSON string "'%s'" as the format string, gcc would
insist that it be paired with a char* argument, even though our
lexer does not recognize % sequences inside
When we don't have to do any % interpolation in qmp() and friends,
there is no point wasting time allocating a QObject from the format
string only to then format it back into the string we send over
the wire.
This is a temporary measure: it becomes important in the next
patch, where test-qga will
All callers have been converted to a form of qmp_cmd() or
qmp_args() that takes the command name with less boilerplate.
Therefore, we also know that all commands are using
interpolation, and can remove an assertion.
This also means that we have fixed the testsuite to comply with
-Wformat checking
qobject_from_jsonv() was unusual in that it took a va_list*, instead
of the more typical va_list; this was so that callers could pass
NULL to avoid % interpolation. While this works under the hood, it
is awkward for callers, so move the magic into qjson.c rather than
in the public interface, and f
Leaving interpolation into JSON to qobject_from_jsonf() is more
robust than building QMP input manually; however, we have a few
places where code is already creating a QDict to interpolate
individual arguments, which cannot be reproduced with the
qobject_from_jsonf() parser. Expose a public wrappe
The next patch will add __attribute__((__format__)) to hmp(), which
in turn causes gcc to warn about non-literal format strings. Rather
than risk an arbitrary string containing % being mis-handled, always
pass variable strings along with a %s format. It also makes it
easier to prove correctness l
None of our tests were directly using qtest_qmp() and friends;
even tests like postcopy-test.c that manage multiple connections
get along just fine changing global_qtest as needed (other than
one callsite where it forgot to use the inlined form). It's
also annoying that we have qmp_async() but qte
Now that the previous patches have fixed all callers to avoid an
empty message, we can tweak qmp_fd_sendv() to assert that we
don't introduce new callers, and reindent accordingly. The
additional assertions will also help verify that later refactoring
is not breaking anything.
Signed-off-by: Eric
From: Markus Armbruster
We still use hacks like qmp("") to wait for an event, even though we
have qmp_eventwait() since commit 8fe941f, and qmp_eventwait_ref()
since commit 7ffe312. Both commits neglected to convert all the
existing hacks. Make up what they missed.
Bonus: gets rid of empty for
We have two flavors of vararg usage in qtest: hmp() etc. work
like sprintf(), and qmp() etc. work like qobject_from_jsonf().
Spell that out in the comments.
Also add GCC_FMT_ATTR() to qtest_hmp() etc. so that the compiler
can flag incorrect use.
We have some cleanup work to do before we can do th
Definitely 2.11 material now. v4 is a rather big overhaul
of what has been previously posted, rebasing things to make
it easier to pass the command name separately from the args
when calling qmp() derivatives in the testsuite, and adding
support for %% handling to make -Wformat checking more robus
From: Markus Armbruster
qtest_init() still uses the qtest_qmp_discard_response(s, "") hack to
receive the greeting, even though we have qtest_qmp_receive() since
commit 66e0c7b. Put it to use.
Bonus: gets rid of an empty format string. A step towards
compile-time format string checking without
Don't open-code something that has a convenient helper available.
Signed-off-by: Eric Blake
---
tests/numa-test.c | 21 +++--
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/tests/numa-test.c b/tests/numa-test.c
index 3f636840b1..e1b6152244 100644
--- a/tests/numa-
Commit 1792d7d0 was written because PRId64 expands to non-portable
crap for some libc, and we had testsuite failures on Mac OS as a
result. This in turn makes it difficult to rely on the obvious
conversions of 64-bit values into JSON, requiring things such as
casting int64_t to long long so we can
Public bug reported:
Description:
I'm having trouble with USB Passthrough. Running `system_profiler
SPUSBDataType` on macOS guest confirms that the system "sees" my device, and
that qemu is passing *something* through. However, the system sees my
connection as USB 2.0, even though i'm passing t
- Original Message -
> From: "Dr. David Alan Gilbert"
> To: "Alberto Garcia"
> Cc: qemu-devel@nongnu.org, pbonz...@redhat.com, js...@redhat.com
> Sent: Thursday, August 3, 2017 6:45:17 PM
> Subject: Re: [Qemu-devel] [PATCH] vl.c/exit: pause cpus before closing block
> devices
>
> * Al
1 - 100 of 269 matches
Mail list logo