Re: [Qemu-devel] [PATCH 00/32] qmp: Fixes and cleanups around OOB commands

2018-07-02 Thread Markus Armbruster
Peter Xu writes: > On Mon, Jul 02, 2018 at 06:21:46PM +0200, Markus Armbruster wrote: >> We're trying to get the out-of-band execution feature ready. This >> series fixes a number of issues, and marks a design flaw FIXME. More >> work is needed. > > Hi, Markus, > > I roughly went over the serie

Re: [Qemu-devel] [PATCH 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue

2018-07-02 Thread Markus Armbruster
Peter Xu writes: > On Mon, Jul 02, 2018 at 06:22:02PM +0200, Markus Armbruster wrote: >> When OOB is enabled, out-of-band commands are executed right away, >> everything else is queued. This lets out-of-band commands "jump the >> queue". >> >> However, certain errors are always reported right a

Re: [Qemu-devel] [PATCH 30/32] qmp: Clean up capability negotiation after commit 02130314d8c

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 11:22 AM, Markus Armbruster wrote: >> qmp_greeting() offers capabilities to the client, and >> qmp_qmp_capabilities() accepts or denies capabilities requested by the >> client. The two compute the set of available capabilities >> independently. Not nice. >> >>

Re: [Qemu-devel] [PATCH 17/32] qmp: Don't let malformed in-band commands jump the queue

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 11:22 AM, Markus Armbruster wrote: >> handle_qmp_command() reports certain errors right away. This is wrong >> when OOB is enabled, because the errors can "jump the queue" then, as >> the previous commit demonstrates. >> >> To fix, we need to delay errors until

Re: [Qemu-devel] [PATCH 00/32] qmp: Fixes and cleanups around OOB commands

2018-07-02 Thread Peter Xu
On Mon, Jul 02, 2018 at 06:21:46PM +0200, Markus Armbruster wrote: > We're trying to get the out-of-band execution feature ready. This > series fixes a number of issues, and marks a design flaw FIXME. More > work is needed. Hi, Markus, I roughly went over the series (without going into every de

Re: [Qemu-devel] [PATCH 10/32] tests/test-qga: Demonstrate the guest-agent ignores "control"

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 11:21 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> tests/test-qga.c | 17 + >> 1 file changed, 17 insertions(+) > > Well, if we get rid of 'control' in favor of 'exec-oob', this test > would still have to test th

Re: [Qemu-devel] [PATCH 14/32] qmp: Always free QMPRequest with qmp_request_free()

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 11:22 AM, Markus Armbruster wrote: >> monitor_qmp_dispatch_one() frees a QMPRequest manually, because it >> needs to keep a reference to ->id. Premature optimization. Take an >> additional reference so we can use qmp_request_free(). >> >> Signed-off-by: Markus

Re: [Qemu-devel] [PATCH 07/12] migration: hold the lock only if it is really needed

2018-07-02 Thread Xiao Guangrong
On 06/29/2018 07:22 PM, Dr. David Alan Gilbert wrote: * Xiao Guangrong (guangrong.x...@gmail.com) wrote: On 06/19/2018 03:36 PM, Peter Xu wrote: On Mon, Jun 04, 2018 at 05:55:15PM +0800, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Try to hold src_page_req_mutex only if the queu

Re: [Qemu-devel] [PATCH v2 2/2] warn about two vga cards

2018-07-02 Thread Gerd Hoffmann
On Mon, Jul 02, 2018 at 02:03:58PM -0300, Philippe Mathieu-Daudé wrote: > On 07/02/2018 01:43 PM, Gerd Hoffmann wrote: > > On Mon, Jul 02, 2018 at 06:33:45PM +0200, Gerd Hoffmann wrote: > >> Two vga cards will try to register for the same legacy (isa) ioports. > >> Due to this conflict only one of

Re: [Qemu-devel] [PATCH 07/32] qmp: Make "id" optional again even in "oob" monitors

2018-07-02 Thread Peter Xu
On Tue, Jul 03, 2018 at 08:14:35AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Mon, Jul 02, 2018 at 06:21:53PM +0200, Markus Armbruster wrote: > >> Commit cf869d53172 "qmp: support out-of-band (oob) execution" made > >> "id" mandatory for all commands when the client accepted capa

Re: [Qemu-devel] [PATCH 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue

2018-07-02 Thread Peter Xu
On Mon, Jul 02, 2018 at 06:22:02PM +0200, Markus Armbruster wrote: > When OOB is enabled, out-of-band commands are executed right away, > everything else is queued. This lets out-of-band commands "jump the > queue". > > However, certain errors are always reported right away, and therefore > can j

Re: [Qemu-devel] [PATCH 07/32] qmp: Make "id" optional again even in "oob" monitors

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 11:21 AM, Markus Armbruster wrote: >> Commit cf869d53172 "qmp: support out-of-band (oob) execution" made >> "id" mandatory for all commands when the client accepted capability >> "oob". This is rather onerous when you play with QMP by hand, and >> unnecessarily

Re: [Qemu-devel] [PATCH 05/32] qmp: Get rid of x-oob-test command

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 11:21 AM, Markus Armbruster wrote: >> tests/qmp-test tests an out-of-band command overtaking a slow in-band >> command. To do that, it needs: >> >> 1. An in-band command that *reliably* takes long enough to be >> overtaken. >> >> 2. An out-of-band command t

Re: [Qemu-devel] [PATCH 08/32] tests/test-qga: Demonstrate the guest-agent ignores "id"

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 11:21 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> tests/test-qga.c | 17 + >> 1 file changed, 17 insertions(+) >> >> diff --git a/tests/test-qga.c b/tests/test-qga.c >> index 30c9643257..4edd35535d 100644 >> ---

[Qemu-devel] [PULL 29/35] ppc440_uc: Basic emulation of PPC440 DMA controller

2018-07-02 Thread David Gibson
From: BALATON Zoltan PPC440 SoCs such as the AMCC 460EX have a DMA controller which is used by AmigaOS on the sam460ex. Implement the parts used by AmigaOS so it can get further booting on the sam460ex machine. Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/ppc/ppc440.h|

[Qemu-devel] [PULL 35/35] ppc: Include vga cirrus card into the compiling process

2018-07-02 Thread David Gibson
From: Sebastian Bauer Drivers for this card exists on PPC-based AmigaOS guests so it is useful to allow users to emulate the graphics card for PPC machines. As cirrus vga is currently preferred over std(vga) in absence of any user choice, this change also sets the default display of spapr machin

[Qemu-devel] [PULL 26/35] ppc4xx_i2c: Rewrite to model hardware more closely

2018-07-02 Thread David Gibson
From: BALATON Zoltan Rewrite to make it closer to how real device works so that guest OS drivers can access I2C devices. Previously this was only a hack to allow U-Boot to get past accessing SPD EEPROMs but to support other I2C devices and allow guests to access them we need to model real device

Re: [Qemu-devel] [PATCH 03/32] docs/interop/qmp: Improve OOB documentation

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 11:21 AM, Markus Armbruster wrote: >> OOB documentation is spread over qmp-spec.txt sections 2.2.1 >> Capabilities and 2.3 Issuing Commands. The amount of detail is a bit >> distracting there. Move the meat of the matter to new section 2.3.1 >> Out of band exe

Re: [Qemu-devel] [PATCH 07/32] qmp: Make "id" optional again even in "oob" monitors

2018-07-02 Thread Markus Armbruster
Peter Xu writes: > On Mon, Jul 02, 2018 at 06:21:53PM +0200, Markus Armbruster wrote: >> Commit cf869d53172 "qmp: support out-of-band (oob) execution" made >> "id" mandatory for all commands when the client accepted capability >> "oob". This is rather onerous when you play with QMP by hand, and

[Qemu-devel] [PULL 28/35] sam460ex: Add RTC device

2018-07-02 Thread David Gibson
From: BALATON Zoltan The Sam460ex has an M41T80 serial RTC chip on I2C bus 0 at address 0x68. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/ppc/sam460ex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.

[Qemu-devel] [PULL 24/35] fpu_helper.c: fix setting FPSCR[FI] bit

2018-07-02 Thread David Gibson
From: John Arbuckle The FPSCR[FI] bit indicates if the last floating point instruction had a result that was rounded. Each consecutive floating point instruction is suppose to set this bit to the correct value. What currently happens is this bit is not set as often as it should be. I have veri

[Qemu-devel] [PULL 30/35] target/ppc/kvm: get rid of kvm_get_fallback_smmu_info()

2018-07-02 Thread David Gibson
From: Greg Kurz Now that we're checking our MMU configuration is supported by KVM, rather than adjusting it to KVM, it doesn't really make sense to have a fallback for kvm_get_smmu_info(). If KVM is too old or buggy to provide the details, we should rather treat this as an error. This patch thus

[Qemu-devel] [PULL 19/35] target/ppc: Split out gen_st_atomic

2018-07-02 Thread David Gibson
From: Richard Henderson Move the guts of ST_ATOMIC to a function. Use foo_tl for the operations instead of foo_i32 or foo_i64 specifically. Use MO_ALIGN instead of an explicit call to gen_check_align. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/translate.c |

[Qemu-devel] [PULL 15/35] target/ppc: Remove POWERPC_EXCP_STCX

2018-07-02 Thread David Gibson
From: Richard Henderson Always use the gen_conditional_store implementation that uses atomic_cmpxchg. Make sure and clear reserve_addr across most interrupts crossing the cpu_loop. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- linux-user/ppc/cpu_loop.c | 121 +++---

[Qemu-devel] [PULL 33/35] target/ppc: set is_jmp on ppc_tr_breakpoint_check

2018-07-02 Thread David Gibson
From: "Emilio G. Cota" The use of GDB breakpoints was broken by b0c2d52 ("target/ppc: convert to TranslatorOps", 2018-02-16). Fix it by setting is_jmp, so that we break from the translation loop as originally intended. Tested-by: Mark Cave-Ayland Reported-by: Mark Cave-Ayland Signed-off-by: E

[Qemu-devel] [PULL 25/35] hw/ppc: Give sam46ex its own config option

2018-07-02 Thread David Gibson
At present the Sam460ex board is activated by the general CONFIG_PPC4XX option. However that includes the board for both ppc-softmmu and (deprecated) ppcemb-softmmu builds. As Sam460ex is developed, that would require adding more things into ppcemb-softmmu, which we don't want to do. Signed-off-

[Qemu-devel] [PULL 31/35] target/ppc/kvm: don't pass cpu to kvm_get_smmu_info()

2018-07-02 Thread David Gibson
From: Greg Kurz In a future patch the machine code will need to retrieve the MMU information from KVM during machine initialization before the CPUs are created. Actually, KVM_PPC_GET_SMMU_INFO is a VM class ioctl, and thus, we don't need to have a CPU object around. We just need for KVM to be in

[Qemu-devel] [PULL 04/35] ppc/xics: introduce ICP DeviceRealize and DeviceReset handlers

2018-07-02 Thread David Gibson
From: Cédric Le Goater This changes the ICP realize and reset handlers in DeviceRealize and DeviceReset handlers. parent handlers are now called from the inheriting classes which is a cleaner object pattern. Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/intc/xics.c

[Qemu-devel] [PULL 32/35] spapr: compute default value of "hpt-max-page-size" later

2018-07-02 Thread David Gibson
From: Greg Kurz It is currently not possible to run a pseries-2.12 or older machine with HV KVM. QEMU prints the following and exits right away. qemu-system-ppc64: KVM doesn't support for base page shift 34 The "hpt-max-page-size" capability was recently added to spapr to hide host configuratio

[Qemu-devel] [PULL 13/35] target/ppc: Use atomic store for STQ

2018-07-02 Thread David Gibson
From: Richard Henderson Section 1.4 of the Power ISA v3.0B states that this insn is single-copy atomic. As we cannot (yet) issue 128-bit stores within TCG, use the generic helpers provided. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/helper.h | 4 ta

[Qemu-devel] [PULL 34/35] target/ppc: Relax reserved bitmask of indexed store instructions

2018-07-02 Thread David Gibson
From: BALATON Zoltan The PPC440 User Manual says that if bit 31 is set, the contents of CR[CR0] are undefined for indexed store instructions but this form is not invalid. Other PPC variants confirming to recent ISA where this bit may be reserved should ignore reserved bits and not raise invalid i

[Qemu-devel] [PULL 07/35] ppx/xics: introduce a parent_reset in ICSStateClass

2018-07-02 Thread David Gibson
From: Cédric Le Goater Just like for the realize handlers, this makes possible to move the common ICSState code of the reset handlers in the ics-base class. Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/intc/xics.c| 45 ---

[Qemu-devel] [PULL 21/35] target/ppc: Use atomic min/max helpers

2018-07-02 Thread David Gibson
From: Richard Henderson These operations were previously unimplemented for ppc. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/translate.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/target/ppc/translate.c b/target/p

[Qemu-devel] [PULL 23/35] target/ppc: Implement the rest of gen_st_atomic

2018-07-02 Thread David Gibson
From: Richard Henderson The store twin case was stubbed out. For now, implement it only within a serial context, forcing parallel execution to synchronize. It would be possible to implement with a cmpxchg loop, if we care, but the loose alignment requirements (simply no crossing 32-byte boundar

[Qemu-devel] [PULL 14/35] target/ppc: Use atomic cmpxchg for STQCX

2018-07-02 Thread David Gibson
From: Richard Henderson When running in a parallel context, we must use a helper in order to perform the 128-bit atomic operation. When running in a serial context, do the compare before the store. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/helper.h | 2

[Qemu-devel] [PULL 08/35] ppc/xics: move the vmstate structures under the ics-base class

2018-07-02 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/intc/xics.c | 112 - 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 8cfe223153..b9f1a3c972 100644 ---

[Qemu-devel] [PULL 27/35] hw/timer: Add basic M41T80 emulation

2018-07-02 Thread David Gibson
From: BALATON Zoltan Basic emulation of the M41T80 serial (I2C) RTC chip. Only getting time of day is implemented. Setting time and RTC alarm are not supported. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Signed-off-by: David Gibson --- MAINTAINERS | 1 +

[Qemu-devel] [PULL 18/35] target/ppc: Split out gen_ld_atomic

2018-07-02 Thread David Gibson
From: Richard Henderson Move the guts of LD_ATOMIC to a function. Use foo_tl for the operations instead of foo_i32 or foo_i64 specifically. Use MO_ALIGN instead of an explicit call to gen_check_align. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/translate.c |

[Qemu-devel] [PULL 11/35] target/ppc: Add do_unaligned_access hook

2018-07-02 Thread David Gibson
From: Richard Henderson This allows faults from MO_ALIGN to have the same effect as from gen_check_align. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/excp_helper.c| 18 +- target/ppc/internal.h | 5 + target/ppc/translate_

[Qemu-devel] [PULL 05/35] ppc/xics: introduce a parent_realize in ICSStateClass

2018-07-02 Thread David Gibson
From: Cédric Le Goater This makes possible to move the common ICSState code of the realize handlers in the ics-base class. Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/intc/xics.c| 37 ++--- hw/intc/xics_kvm.c| 20 +

[Qemu-devel] [PULL 22/35] target/ppc: Implement the rest of gen_ld_atomic

2018-07-02 Thread David Gibson
From: Richard Henderson These cases were stubbed out. For now, implement them only within a serial context, forcing parallel execution to synchronize. It would be possible to implement these with cmpxchg loops, if we care. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- tar

[Qemu-devel] [PULL 16/35] target/ppc: Tidy gen_conditional_store

2018-07-02 Thread David Gibson
From: Richard Henderson Leave only the minimal amount of code within the STCX macro, moving the rest of the code into gen_conditional_store. Remove the explicit call to gen_check_align; the matching LDAX will have already checked alignment, and we verify the same address. Signed-off-by: Richard

[Qemu-devel] [PULL 02/35] mac_newworld: always enable disable_direct_reg3_writes for ADB machines

2018-07-02 Thread David Gibson
From: Mark Cave-Ayland Commit 84051eb400 "adb: add property to disable direct reg 3 writes" added a workaround for MacOS 9 incorrectly setting the mouse address during boot of PMU machines. Further testing has shown that since fb6649f172 "adb: fix read reg 3 byte ordering" this can still sometim

[Qemu-devel] [PULL 06/35] ppc/xics: move the instance_init handler under the ics-base class

2018-07-02 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/intc/xics.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index d6066d561f..83340770f7 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics

[Qemu-devel] [PULL 12/35] target/ppc: Use atomic load for LQ and LQARX

2018-07-02 Thread David Gibson
From: Richard Henderson Section 1.4 of the Power ISA v3.0B states that both of these instructions are single-copy atomic. As we cannot (yet) issue 128-bit loads within TCG, use the generic helpers provided. Since TCG cannot (yet) return a 128-bit value, add a slot within CPUPPCState for returni

[Qemu-devel] [PULL 20/35] target/ppc: Use MO_ALIGN for EXIWX and ECOWX

2018-07-02 Thread David Gibson
From: Richard Henderson This avoids the need for gen_check_align entirely. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/translate.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc

[Qemu-devel] [PULL 09/35] ppc/xics: rework the ICS classes inheritance tree

2018-07-02 Thread David Gibson
From: Cédric Le Goater With the previous changes, we can now let the ICS_KVM class inherit directly from ICS_BASE class and not from the intermediate ICS_SIMPLE. It makes the class hierarchy much cleaner. What is left in the top classes is the low level interface to access the KVM XICS device in

[Qemu-devel] [PULL 03/35] sam460ex: Fix sam460ex device tree when booting the Linux kernel

2018-07-02 Thread David Gibson
From: Guenter Roeck sam460ex (or at least this emulation) does not support the "ibm,cpm" power management. As a result, Linux crashes when trying to access it. Remove its device tree node. Also, if/when we boot the Linux kernel directly, serial port clock frequencies in the device tree file will

[Qemu-devel] [PULL 17/35] target/ppc: Split out gen_load_locked

2018-07-02 Thread David Gibson
From: Richard Henderson Leave only the minimal amount of code within the LDAR macro, moving the rest of the code into gen_load_locked. Use MO_ALIGN and remove the explicit call to gen_check_align. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/translate.c | 35 ++

[Qemu-devel] [PULL 01/35] mac_dbdma: only dump commands for debug enabled channels

2018-07-02 Thread David Gibson
From: Mark Cave-Ayland This enables us to apply the same filter in DEBUG_DBDMA_CHANMASK to the DBDMA command execution debug output. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/mac_dbdma.c | 21 +++-- 1 file changed, 11 insertions(+), 10 delet

[Qemu-devel] [PULL 10/35] ppc/pnv: fix pnv_core_realize() error handling

2018-07-02 Thread David Gibson
From: Cédric Le Goater commit d35aefa9ae15 ("ppc/pnv: introduce a new intc_create() operation to the chip model") changed the object link in the pnv_core_realize() routine but a return was forgotten in case of error, which can lead to more problems afterwards (segv) Signed-off-by: Cédric Le Goat

[Qemu-devel] [PULL 00/35] ppc-for-3.0 queue 20180703

2018-07-02 Thread David Gibson
The following changes since commit ab08440a4ee09032d1a9cb22fdcab23bc7e1c656: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180702' into staging (2018-07-02 17:57:46 +0100) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-3.0-201

Re: [Qemu-devel] [PATCH v0 0/7] Background snapshots

2018-07-02 Thread Peter Xu
On Mon, Jul 02, 2018 at 03:40:31PM +0300, Denis Plotnikov wrote: > > > On 02.07.2018 14:23, Peter Xu wrote: > > On Fri, Jun 29, 2018 at 11:03:13AM +0300, Denis Plotnikov wrote: > > > The patch set adds the ability to make external snapshots while VM is > > > running. > > > > Hi, Denis, > > > >

Re: [Qemu-devel] [PATCH 2/2] qapi: Drop qapi-gen --unmask option

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 01:48 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Now that we have useful access to the type name as a comment >>> in the generated qapi-introspect.c, we don't need to regenerate >>> code with a temporary -u option just to get at type names. >>> >

Re: [Qemu-devel] [PULL, 14/18] translate-all: discard TB when tb_link_page returns an existing matching TB

2018-07-02 Thread Pavel Dovgalyuk
> From: Emilio G. Cota [mailto:c...@braap.org] > On Mon, Jul 02, 2018 at 08:52:14 +0300, Pavel Dovgalyuk wrote: > > The same failure can be reproduced with linux-0.2.img, which was > > downloaded from QEMU site. > > I can't find it now, but I can upload this file if needed. > > Please upload it so

Re: [Qemu-devel] [PATCH 1/2] qapi: Add comments to aid debugging generated introspection

2018-07-02 Thread Markus Armbruster
Eric Blake writes: > On 07/02/2018 01:43 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 06/29/2018 02:55 PM, Eric Blake wrote: We consciously chose in commit 1a9a507b to hide QAPI type names from the generated introspection output, but added a command line option -u

Re: [Qemu-devel] [PATCH 00/32] qmp: Fixes and cleanups around OOB commands

2018-07-02 Thread Markus Armbruster
Copying Michael Roth for the qemu-ga parts, belatedly.

[Qemu-devel] [PATCH] module: Use QEMU_MODULE_PATH as a search path

2018-07-02 Thread ryang
The current paths for modules are CONFIG_QEMU_MODDIR and paths relative to the executable. Qemu and its modules can be installed and executed in paths that are different from these search paths. This change allows a search path to be specified by environment variable. An example usage for this is

Re: [Qemu-devel] [PATCH] ppc: Include vga cirrus card into the compiling process

2018-07-02 Thread David Gibson
On Mon, Jul 02, 2018 at 09:42:49AM +0200, Sebastian Bauer wrote: > Am 2018-07-02 07:22, schrieb David Gibson: > > And now unapplied, since it breaks make check all over the place for > > ppc64-softmmu. > > > > Please folks, running an all-targets make check is really the > > *minimum* bar for test

[Qemu-devel] [PATCH] ui/cocoa.m: replace scrollingDeltaY with deltaY

2018-07-02 Thread John Arbuckle
The NSEvent class method scrollingDeltaY is available for Mac OS 10.7 and newer. Since QEMU supports Mac OS 10.5 and up, we need to be using a method that is available on these version of Mac OS X. The deltaY method is a method that does the same thing as scrollingDeltaY and is available on Mac

Re: [Qemu-devel] [PATCH] migration: add capability to bypass the shared memory

2018-07-02 Thread Peng Tao
On Tue, Jul 3, 2018 at 6:15 AM, Andrea Arcangeli wrote: > Hello, > > On Mon, Jul 02, 2018 at 09:52:08PM +0800, Peng Tao wrote: >> I think we can write some host generated random seeds to guest's >> urandom device, when cloning VMs from the same template before handing >> it to users. Is it enough

Re: [Qemu-devel] [PATCH v2] e1000e: Prevent MSI/MSI-X storms

2018-07-02 Thread Jason Wang
On 2018年07月02日 13:14, Jan Kiszka wrote: On 2018-07-02 05:40, Jason Wang wrote: On 2018年06月30日 14:13, Jan Kiszka wrote: On 2018-04-05 19:41, Jan Kiszka wrote: From: Jan Kiszka Only signal MSI/MSI-X events on rising edges. So far we re-triggered the interrupt sources even if the guest did

Re: [Qemu-devel] [PATCH 06/12] migration: do not detect zero page for compression

2018-07-02 Thread Xiao Guangrong
On 06/29/2018 05:42 PM, Dr. David Alan Gilbert wrote: * Xiao Guangrong (guangrong.x...@gmail.com) wrote: Hi Peter, Sorry for the delay as i was busy on other things. On 06/19/2018 03:30 PM, Peter Xu wrote: On Mon, Jun 04, 2018 at 05:55:14PM +0800, guangrong.x...@gmail.com wrote: From: Xi

[Qemu-devel] [PULL 3/3] backup: Use copy offloading

2018-07-02 Thread Jeff Cody
From: Fam Zheng The implementation is similar to the 'qemu-img convert'. In the beginning of the job, offloaded copy is attempted. If it fails, further I/O will go through the existing bounce buffer code path. Then, as Kevin pointed out, both this and qemu-img convert can benefit from a local ch

[Qemu-devel] [PULL 1/3] block: Fix parameter checking in bdrv_co_copy_range_internal

2018-07-02 Thread Jeff Cody
From: Fam Zheng src may be NULL if BDRV_REQ_ZERO_WRITE flag is set, in this case only check dst and dst->bs. This bug was introduced when moving in the request tracking code from bdrv_co_copy_range, in 37aec7d75eb. This especially fixes the possible segfault when initializing src_bs with a NULL

[Qemu-devel] [PULL 2/3] block: Honour BDRV_REQ_NO_SERIALISING in copy range

2018-07-02 Thread Jeff Cody
From: Fam Zheng This semantics is needed by drive-backup so implement it before using this API there. Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 20180703023758.14422-3-f...@redhat.com Signed-off-by: Jeff Cody --- block/io.c| 6 -- include/block/block.h

[Qemu-devel] [PULL 0/3] Block patches

2018-07-02 Thread Jeff Cody
The following changes since commit ab08440a4ee09032d1a9cb22fdcab23bc7e1c656: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180702' into staging (2018-07-02 17:57:46 +0100) are available in the Git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/

Re: [Qemu-devel] [PATCH] target/ppc: set is_jmp on ppc_tr_breakpoint_check

2018-07-02 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 1530568927-4738-1-git-send-email-c...@braap.org Subject: [Qemu-devel] [PATCH] target/ppc: set is_jmp on ppc_tr_breakpoint_check === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: set is_jmp on ppc_tr_breakpoint_check

2018-07-02 Thread David Gibson
On Mon, Jul 02, 2018 at 11:22:57PM -0400, Emilio G. Cota wrote: > On Tue, Jul 03, 2018 at 11:03:48 +1000, David Gibson wrote: > > On Mon, Jul 02, 2018 at 06:02:07PM -0400, Emilio G. Cota wrote: > > > The use of GDB breakpoints was broken by b0c2d52 ("target/ppc: convert > > > to TranslatorOps", 201

Re: [Qemu-devel] [PATCH 07/32] qmp: Make "id" optional again even in "oob" monitors

2018-07-02 Thread Peter Xu
On Mon, Jul 02, 2018 at 06:21:53PM +0200, Markus Armbruster wrote: > Commit cf869d53172 "qmp: support out-of-band (oob) execution" made > "id" mandatory for all commands when the client accepted capability > "oob". This is rather onerous when you play with QMP by hand, and > unnecessarily so: only

Re: [Qemu-devel] [PATCH v4 0/3] backup: Use copy offloading

2018-07-02 Thread Jeff Cody
On Tue, Jul 03, 2018 at 10:37:55AM +0800, Fam Zheng wrote: > v4: Rebase to master. > Pick up Stefan's rev-bys. > Include a block/io.c fix to fix a new issue caused by recent block/io.c > change - our drive-backup cases in iotests exposes the bug loudly. > > This enhances the backup job

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: set is_jmp on ppc_tr_breakpoint_check

2018-07-02 Thread Emilio G. Cota
On Tue, Jul 03, 2018 at 11:03:48 +1000, David Gibson wrote: > On Mon, Jul 02, 2018 at 06:02:07PM -0400, Emilio G. Cota wrote: > > The use of GDB breakpoints was broken by b0c2d52 ("target/ppc: convert > > to TranslatorOps", 2018-02-16). > > > > Fix it by setting is_jmp, so that we break from the t

Re: [Qemu-devel] [PATCH v4 1/3] block: Fix parameter checking in bdrv_co_copy_range_internal

2018-07-02 Thread Jeff Cody
On Tue, Jul 03, 2018 at 10:37:56AM +0800, Fam Zheng wrote: > src may be NULL if BDRV_REQ_ZERO_WRITE flag is set, in this case only > check dst and dst->bs. This bug was introduced when moving in the > request tracking code from bdrv_co_copy_range, in 37aec7d75eb. > > This especially fixes the poss

Re: [Qemu-devel] [virtio-dev] [PATCH v3 2/3] Add "Group Identifier" support to Red Hat PCI bridge.

2018-07-02 Thread Siwei Liu
On Fri, Jun 29, 2018 at 3:19 PM, Venu Busireddy wrote: > Add the "Vendor-Specific" capability to the Red Hat PCI bridge device > "pci-bridge", to contain the "Group Identifier" that will be used to pair > a virtio device with the passthrough device attached to that bridge. Also, > change the Devic

[Qemu-devel] [Bug 1779634] Re: qemu-x86_64 on aarch64 reports "Synchronous External Abort"

2018-07-02 Thread He Yi
Thanks very much @Peter Maydell, when invoking these tools through docker/qemu-user I really saw syscall disorders, even strace fails. You are right these tools have x86_64 syscall numbers & perhaps mmaps of /dev/mem to allocate contiguous memory region for DMA transactions. Then the goal cannot b

[Qemu-devel] [PATCH v4 3/3] backup: Use copy offloading

2018-07-02 Thread Fam Zheng
The implementation is similar to the 'qemu-img convert'. In the beginning of the job, offloaded copy is attempted. If it fails, further I/O will go through the existing bounce buffer code path. Then, as Kevin pointed out, both this and qemu-img convert can benefit from a local check if one request

[Qemu-devel] [PATCH v4 1/3] block: Fix parameter checking in bdrv_co_copy_range_internal

2018-07-02 Thread Fam Zheng
src may be NULL if BDRV_REQ_ZERO_WRITE flag is set, in this case only check dst and dst->bs. This bug was introduced when moving in the request tracking code from bdrv_co_copy_range, in 37aec7d75eb. This especially fixes the possible segfault when initializing src_bs with a NULL src. Signed-off-b

Re: [Qemu-devel] [PATCH 32/32] qapi: Polish command flags documentation in qapi-code-gen.txt

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.txt | 61 +++- 1 file changed, 25 insertions(+), 36 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc.

[Qemu-devel] [PATCH v4 2/3] block: Honour BDRV_REQ_NO_SERIALISING in copy range

2018-07-02 Thread Fam Zheng
This semantics is needed by drive-backup so implement it before using this API there. Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/io.c| 6 -- include/block/block.h | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block/io.c b/block/io

[Qemu-devel] [PATCH v4 0/3] backup: Use copy offloading

2018-07-02 Thread Fam Zheng
v4: Rebase to master. Pick up Stefan's rev-bys. Include a block/io.c fix to fix a new issue caused by recent block/io.c change - our drive-backup cases in iotests exposes the bug loudly. This enhances the backup job to make use of the copy offloading API. It eliminates the necessity to

Re: [Qemu-devel] [PATCH 31/32] monitor: Improve some comments

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- monitor.c | 100 -- 1 file changed, 45 insertions(+), 55 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: [Qemu-devel] [PATCH 30/32] qmp: Clean up capability negotiation after commit 02130314d8c

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: qmp_greeting() offers capabilities to the client, and qmp_qmp_capabilities() accepts or denies capabilities requested by the client. The two compute the set of available capabilities independently. Not nice. Clean this up as follows. Compute av

Re: [Qemu-devel] [PATCH 29/32] qobject: Let qobject_from_jsonf() fail instead of abort

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: qobject_from_jsonf() aborts on error, unlike qobject_from_jsonv(), which returns null. Since all remaining users of qobject_from_jsonf() cope fine with null, change it to return null. Signed-off-by: Markus Armbruster --- qobject/qjson.c | 5 --

Re: [Qemu-devel] [PATCH 28/32] qmp: Switch timestamp_put() to qdict_from_jsonf_nofail()

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: There's just one use of qobject_from_jsonf() to parse a JSON object left: timestamp_put(). Switch it to qdict_from_jsonf_nofail(). Signed-off-by: Markus Armbruster --- qapi/qmp-event.c | 10 +- 1 file changed, 5 insertions(+), 5 delet

Re: [Qemu-devel] [PATCH 27/32] qmp: Add some comments around null responses

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- qapi/qmp-dispatch.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Eric Blake diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 761812e924..6f2d466596 100644 --- a/qapi/qmp-dispatch.c

Re: [Qemu-devel] [PATCH 26/32] qmp: Simplify monitor_qmp_respond()

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: monitor_qmp_respond() takes both a response object and an error object. If an error object is non-null, the response object must be null, and the response is built from the error object. Of the two callers, one always passes a null response objec

Re: [Qemu-devel] [PATCH 25/32] qmp: Replace get_qmp_greeting() by qmp_greeting()

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: get_qmp_greeting() returns a QDict * as QObject *. It's caller converts it right back. Return QDict * instead. While there, rename to qmp_greeting(). Signed-off-by: Markus Armbruster --- monitor.c | 13 +++-- 1 file changed, 7 inser

Re: [Qemu-devel] [PATCH 24/32] qmp: Replace monitor_json_emitter{, raw}() by qmp_{queue, send}_response()

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: monitor_json_emitter() and monitor_json_emitter_raw() are unnecessarily general: they can send arbitrary JSON values, even though we only ever use them for QMP, which may send only JSON objects. Specialize the argument from QObject * to QDict *, a

Re: [Qemu-devel] [PATCH 23/32] qmp: Use QDict * instead of QObject * for response objects

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: By using the more specific type, we get fewer downcasts. The downcasts are safe, but not obviously so, at least not locally. Signed-off-by: Markus Armbruster --- Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc

Re: [Qemu-devel] [PATCH 22/32] qmp: De-duplicate error response building

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: All callers of qmp_build_error_object() duplicate the code to wrap it in a response object. Replace it by qmp_error_response() that captures the duplicated code, including error_free(). Signed-off-by: Markus Armbruster --- include/qapi/qmp/dis

Re: [Qemu-devel] [PATCH 21/32] qobject: New qdict_from_jsonf_nofail()

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: Many uses of qobject_from_jsonf() convert JSON objects. Create new convenience function qdict_from_jsonf_nofail() that includes the conversion to QDict. The next few commits will put it to use. Signed-off-by: Markus Armbruster --- include/qap

Re: [Qemu-devel] [PATCH 20/32] monitor: Peel off @mon_global wrapper

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: Wrapping global variables in a struct without a use for the wrapper struct buys us nothing but longer lines. Unwrap them. Well, it also makes it slightly more obvious where you are using a global variable, and thus need to be careful of reentra

Re: [Qemu-devel] [PATCH 19/32] monitor: Rename use_io_thr to use_io_thread

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- monitor.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/monitor.c b/monitor.c index fd83a57dda..10b6634d3e 100644 --- a/monitor.c +++ b/monitor.c @@ -206,11 +20

Re: [Qemu-devel] [PATCH 18/32] qmp: Don't let JSON errors jump the queue

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: handle_qmp_command() reports JSON syntax errors right away. This is wrong when OOB is enabled, because the errors can "jump the queue" then. The previous commit fixed the same bug for semantic errors, by delaying the checking until dispatch. We

Re: [Qemu-devel] [PATCH 17/32] qmp: Don't let malformed in-band commands jump the queue

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: handle_qmp_command() reports certain errors right away. This is wrong when OOB is enabled, because the errors can "jump the queue" then, as the previous commit demonstrates. To fix, we need to delay errors until dispatch. Do that for semantic er

Re: [Qemu-devel] [PATCH 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: When OOB is enabled, out-of-band commands are executed right away, everything else is queued. This lets out-of-band commands "jump the queue". However, certain errors are always reported right away, and therefore can jump the queue even when the

Re: [Qemu-devel] [PATCH 15/32] qmp: Simplify code around monitor_qmp_dispatch_one()

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: Change monitor_qmp_dispatch_one() to take its parameters unwrapped, move monitor_resume() to the one caller that needs it, rename the function to monitor_qmp_dispatch(). Signed-off-by: Markus Armbruster --- monitor.c | 58 ++

Re: [Qemu-devel] [PATCH 14/32] qmp: Always free QMPRequest with qmp_request_free()

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: monitor_qmp_dispatch_one() frees a QMPRequest manually, because it needs to keep a reference to ->id. Premature optimization. Take an additional reference so we can use qmp_request_free(). Signed-off-by: Markus Armbruster --- monitor.c | 6 ++

[Qemu-devel] [PATCH v2] ui/cocoa.m: prevent stuck command key when going into full screen mode

2018-07-02 Thread John Arbuckle
When the user pushes Command-F in QEMU while the mouse is ungrabbed, QEMU goes into full screen mode. When the user finally releases the command key, it is sent to the guest as an event. The makes the guest operating system think the command key is down when it is really up. To prevent this situati

Re: [Qemu-devel] [PATCH 13/32] qmp: Revert change to handle_qmp_command tracepoint

2018-07-02 Thread Eric Blake
On 07/02/2018 11:21 AM, Markus Armbruster wrote: Commit 71da4667db6 "monitor: separate QMP parser and dispatcher" moved the handle_qmp_command tracepoint from handle_qmp_command() to monitor_qmp_dispatch_one(). This delays tracing from enqueue time to dequeue time. Revert that. Dequeue remains

  1   2   3   4   5   6   >