[Qemu-devel] [Bug 1502095] Re: Sporadic input / output error — x86-64 linux guest

2018-11-16 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1502095 Title: Sporadic

Re: [Qemu-devel] [PATCH] migration: savevm: consult migration blockers

2018-11-16 Thread Wang, Wei W
On Saturday, November 17, 2018 12:48 AM, Paolo Bonzini wrote: > To: qemu-devel@nongnu.org > Subject: [Qemu-devel] [PATCH] migration: savevm: consult migration > blockers > > There is really no difference between live migration and savevm, except that > savevm does not require

Re: [Qemu-devel] [PATCH] hw/i2c/smbus_eeprom: Create at most SMBUS_EEPROM_MAX EEPROMs on a SMBus

2018-11-16 Thread Corey Minyard
On 11/15/18 5:05 PM, Philippe Mathieu-Daudé wrote: Calling smbus_eeprom_init() with more than 8 EEPROMs would lead to a heap overflow. Replace the '8' magic number by a definition, and check no more than this number are created. This looks like a good idea.  I have it in my tree. Thanks,

Re: [Qemu-devel] [PATCH v4] hw/arm: Add arm SBSA reference machine

2018-11-16 Thread Ard Biesheuvel
On Fri, 16 Nov 2018 at 04:27, Gerd Hoffmann wrote: > > Hi, > > > > What is this using the exynos4210 USB device for? That > > > is definitely not correct for a generic board. > > > > > Checked the code: > > #define TYPE_SYS_BUS_EHCI "sysbus-ehci-usb" > > #define TYPE_EXYNOS4210_EHCI

Re: [Qemu-devel] [PATCH v6 12/16] gdbstub: add support for vAttach packets

2018-11-16 Thread Alistair Francis
On 15/11/2018 1:42 am, Luc Michel wrote: Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel Acked-by: Alistair Francis Alistair --- gdbstub.c | 35 +++ 1 file changed,

Re: [Qemu-devel] [PATCH v6 11/16] gdbstub: add support for extended mode packet

2018-11-16 Thread Alistair Francis
On 15/11/2018 1:42 am, Luc Michel wrote: Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel Acked-by: Alistair Francis Alistair --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c

Re: [Qemu-devel] [PATCH v6 10/16] gdbstub: add multiprocess support to 'D' packets

2018-11-16 Thread Alistair Francis
On 15/11/2018 1:42 am, Luc Michel wrote: 'D' packets are used by GDB to detach from a process. In multiprocess mode, the PID to detach from is sent in the request. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis Alistair --- gdbstub.c | 60

Re: [Qemu-devel] [PATCH v6 09/16] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-11-16 Thread Alistair Francis
On 15/11/2018 1:42 am, Luc Michel wrote: Add support for multiprocess extension in gdb_vm_state_change() function. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis Alistair --- gdbstub.c | 15 --- 1 file changed, 12 insertions(+), 3

Re: [Qemu-devel] [PATCH v6 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-11-16 Thread Alistair Francis
On 15/11/2018 1:41 am, Luc Michel wrote: Change the Xfer:features:read: packet handling to support the multiprocess extension. This packet is used to request the XML description of the CPU. In multiprocess mode, different descriptions can be sent for different processes. This function now takes

Re: [Qemu-devel] [PATCH v6 05/16] gdbstub: add multiprocess support to vCont packets

2018-11-16 Thread Alistair Francis
On 15/11/2018 1:41 am, Luc Michel wrote: Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all the CPUs in currently attached processes. Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to iterate over CPUs of a given process. Use them to add multiprocess extension

[Qemu-devel] [PATCH] iotests: Drop use of bash keyword 'function'

2018-11-16 Thread Eric Blake
Bash allows functions to be declared with or without the leading keyword 'function'; but including the keyword does not comply with POSIX syntax, and is confusing to ksh users where the use of the keyword changes the scoping rules for functions. Stick to the POSIX form through iotests. Done

Re: [Qemu-devel] [PATCH 3/6] tests: pull qemu-nbd iotest helpers into common.nbd file

2018-11-16 Thread Eric Blake
On 11/16/18 3:41 PM, Eric Blake wrote: +#!/bin/bash I know we're using bash, + +function nbd_server_stop() +{ +function nbd_server_wait_for_unix_socket() and bash supports 'function', but it is an obsolete syntactic sugar thing that I don't recommend using.  (In ksh, it actually makes

Re: [Qemu-devel] [PATCH 3/6] tests: pull qemu-nbd iotest helpers into common.nbd file

2018-11-16 Thread Eric Blake
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote: The helpers for starting/stopping qemu-nbd in 058 will be useful in other test cases, so move them into a common.nbd file. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/058| 47 +

[Qemu-devel] [PULL 4/4] RISC-V: Respect fences for user-only emulators

2018-11-16 Thread Palmer Dabbelt
Our current fence implementation ignores fences for the user-only configurations. This is incorrect but unlikely to manifest: it requires multi-threaded user-only code that takes advantage of the weakness in the host's memory model and can be inlined by TCG. This patch simply treats fences the

[Qemu-devel] [PULL 3/4] target/riscv: Fix sfence.vm/a both available in any priv version

2018-11-16 Thread Palmer Dabbelt
From: Bastian Koppelmann sfence.vm has been replaced in priv v1.10 spec by sfence.vma. Reported-by: Richard Henderson Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson Signed-off-by: Palmer Dabbelt --- target/riscv/translate.c | 18 +- 1 file changed, 13

[Qemu-devel] [PULL] RISC-V Patches for 3.1-rc2

2018-11-16 Thread Palmer Dabbelt
The following changes since commit cb968d275c145467c8b385a3618a207ec111eab1: Update version for v3.1.0-rc1 release (2018-11-13 18:16:14 +) are available in the Git repository at: git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-rc2 for you to fetch changes up to

[Qemu-devel] [PULL 1/4] hw/riscv/virt: Free the test device tree node name

2018-11-16 Thread Palmer Dabbelt
From: Alistair Francis Signed-off-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- hw/riscv/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 4a137a503c8a..2b38f890702c 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -240,6 +240,7

[Qemu-devel] [PULL 2/4] target/riscv: Fix FCLASS_D being treated as RV64 only

2018-11-16 Thread Palmer Dabbelt
From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson Signed-off-by: Palmer Dabbelt --- target/riscv/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index

Re: [Qemu-devel] [PATCH v7 12/12] target/arm: Send interrupts on PMU counter overflow

2018-11-16 Thread Aaron Lindsay
On Nov 05 13:52, Aaron Lindsay wrote: > Setup a QEMUTimer to get a callback when we expect counters to next > overflow and trigger an interrupt at that time. Peter, It looks like there's probably going to be at least a v8 in this series since you've made a few comments which require changes. But

Re: [Qemu-devel] [PATCH v7 03/12] target/arm: Swap PMU values before/after migrations

2018-11-16 Thread Aaron Lindsay
On Nov 16 16:44, Peter Maydell wrote: > On 16 November 2018 at 16:09, Aaron Lindsay > wrote: > > On Nov 16 14:53, Peter Maydell wrote: > >> On 5 November 2018 at 18:51, Aaron Lindsay > >> wrote: > >> > Because of the PMU's design, many register accesses have side effects > >> > which are

Re: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: convert `pwd` and $(pwd) to $PWD

2018-11-16 Thread Eric Blake
On 10/24/18 4:40 AM, Mao Zhongyi wrote: POSIX requires $PWD to be reliable, and we expect all shells used by qemu scripts to be relatively close to POSIX. Thus, it is smarter to avoid forking the pwd executable for something that is already available in the environment. So replac it with the

Re: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: convert `pwd` and $(pwd) to $PWD

2018-11-16 Thread Eric Blake
On 11/16/18 10:53 AM, Eric Blake wrote: On 10/24/18 4:40 AM, Mao Zhongyi wrote: POSIX requires $PWD to be reliable, and we expect all shells used by qemu scripts to be relatively close to POSIX.  Thus, it is smarter to avoid forking the pwd executable for something that is already available in

Re: [Qemu-devel] [PATCH v7 07/12] target/arm: Add array for supported PMU events, generate PMCEID[01]

2018-11-16 Thread Aaron Lindsay
On Nov 16 15:06, Peter Maydell wrote: > On 5 November 2018 at 18:51, Aaron Lindsay > wrote: > > --- a/target/arm/cpu.c > > +++ b/target/arm/cpu.c > > @@ -957,9 +957,19 @@ static void arm_cpu_realizefn(DeviceState *dev, Error > > **errp) > > if (!cpu->has_pmu) { > >

[Qemu-devel] [PATCH v3] qapi: Reduce Makefile boilerplate

2018-11-16 Thread Eric Blake
Adding a new qapi module had some rather tedious repetition to wire it into Makefile, Makefile.objs, and .gitignore (for example, see commit bf42508f and its followup b61acdec). For make, add some indirection by taking advantage of GNU Make string processing to expand a list of module names into

Re: [Qemu-devel] [PATCH v5 19/24] hw: acpi: Retrieve the PCI bus from AcpiPciHpState

2018-11-16 Thread Boeuf, Sebastien
Hi Igor, On Fri, 2018-11-16 at 10:39 +0100, Igor Mammedov wrote: > On Mon,  5 Nov 2018 02:40:42 +0100 > Samuel Ortiz wrote: > > > > > From: Sebastien Boeuf > > > > Instead of using the machine type specific method find_i440fx() to > > retrieve the PCI bus, this commit aims to rely on the

[Qemu-devel] util/aio-posix: Use RCU for handler insertion.

2018-11-16 Thread remy . noel
From: Remy Noel get rid of the delete attribute. We still need to get rid of the context list lock. Signed-off-by: Remy Noel --- util/aio-posix.c | 75 ++-- util/aio-win32.c | 43 ++- 2 files changed, 49 insertions(+), 69

[Qemu-devel] [PATCH] aio_poll race condition.

2018-11-16 Thread remy . noel
From: Remy Noel It is possible for an io_poll callback to be concurrently executed along with an aio_set_fd_handlers. This can cause all sorts of problems, like a NULL callback or a bad opaque pointer. We fixes that by using an remove/insert RCU scheme. Please note that i did not test the win32

[Qemu-devel] aio: Do not use list_lock as a sync mechanism for aio_handlers anymore.

2018-11-16 Thread remy . noel
From: Remy Noel It is still used for bottom halves though and to avoid concurent set_fd_handlers (We could probably decorrelate the two, but set_fd_handlers are quite rare so it probably isn't worth it). Signed-off-by: Remy Noel --- include/block/aio.h | 4 +++- util/aio-posix.c| 20

[Qemu-devel] aio-posix: Fix concurrent aio_poll/set_fd_handler.

2018-11-16 Thread remy . noel
From: Remy Noel We no longer modify existing handlers entries and instead, always insert those after having properly initialized those. Also, we do not call aio_epoll_update for deleted handlers as this has no impact whastoever. Signed-off-by: Remy Noel --- util/aio-posix.c | 85

Re: [Qemu-devel] [PATCH] tests: add /vmstate/simple/array

2018-11-16 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > A very simple test to show VMSTATE_*_ARRAY usage and result. It could > be systematically extended to other primitives, but I leave that as an > exercise for others :). > > Signed-off-by: Marc-André Lureau Yes, fair enough. I don't

[Qemu-devel] [PATCH] migration/block-dirty-bitmap: Silence coverity CID 1390625

2018-11-16 Thread John Snow
Coverity warns that backing_bs() could give us a NULL pointer, which we then use without checking that it isn't. In our loop condition, we check bs && bs->drv as a point of habit, but by nature of the block graph, we cannot have null bs pointers here. This loop skips only implicit nodes, which

Re: [Qemu-devel] [PATCH V2] migration/colo.c: Fix compilation issue when disable replication

2018-11-16 Thread Dr. David Alan Gilbert
* Zhang Chen (zhangc...@gmail.com) wrote: > On Wed, Nov 14, 2018 at 7:17 PM Peter Maydell > wrote: > > > On 14 November 2018 at 11:06, Thomas Huth wrote: > > > On 2018-11-14 11:47, Peter Xu wrote: > > >> On Thu, Nov 01, 2018 at 10:12:26AM +0800, Zhang Chen wrote: > > >>> This compilation issue

Re: [Qemu-devel] KVM Forum block no[td]es

2018-11-16 Thread Max Reitz
I feel bad for trimming your mail so much, but that's just because I've read it and I agree. So, it's trimming of the good kind. (Then again, when is trimming of a long mail ever bad?) On 16.11.18 18:13, Kevin Wolf wrote: [...] > What we noted down about counters was more meaningful progress

Re: [Qemu-devel] [PATCH v5 13/14] tests/microbit-test: Add Tests for nRF51 Timer

2018-11-16 Thread Stefan Hajnoczi
On Mon, Nov 12, 2018 at 04:42:23PM -0500, Steffen Görtz wrote: > Basic tests for nRF51 Timer Peripheral. > > Signed-off-by: Steffen Görtz > --- > tests/microbit-test.c | 101 ++ > 1 file changed, 101 insertions(+) Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v5 06/14] arm: Instantiate NRF51 special NVM's and NVMC

2018-11-16 Thread Stefan Hajnoczi
On Mon, Nov 12, 2018 at 04:42:16PM -0500, Steffen Görtz wrote: > Instantiates UICR, FICR, FLASH and NVMC in nRF51 SOC. > > Signed-off-by: Steffen Görtz > --- > hw/arm/nrf51_soc.c | 43 +++--- > include/hw/arm/nrf51_soc.h | 2 ++ > 2 files changed, 33

Re: [Qemu-devel] QEMU Summit 2018 minutes

2018-11-16 Thread Eric Blake
On 11/16/18 11:23 AM, Peter Maydell wrote: As usual, during this year's KVM Forum we also held the QEMU Summit, which is where the more active subsystem maintainers meet up for a discussion of various maintenance and other project issues. As always, none of this is set-in-stone decisions;

Re: [Qemu-devel] [RFC v1 23/23] configure: Add support for building RISC-V host

2018-11-16 Thread Richard Henderson
On 11/15/18 11:37 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > configure | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [RFC v1 21/23] tcg: Add RISC-V cpu signal handler

2018-11-16 Thread Richard Henderson
On 11/15/18 11:37 PM, Alistair Francis wrote: > +/* Detect store by reading the instruction at the program > + counter. Note: we currently only generate 32-bit > + instructions so we thus only detect 32-bit stores */ Actually, you need to handle what the compiler generates too.

Re: [Qemu-devel] [RFC v1 22/23] dias: Add RISC-V support

2018-11-16 Thread Richard Henderson
On 11/15/18 11:37 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > disas.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [RFC v1 21/23] tcg: Add RISC-V cpu signal handler

2018-11-16 Thread Richard Henderson
On 11/15/18 11:37 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > accel/tcg/user-exec.c | 48 +++ > 1 file changed, 48 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [RFC v1 20/23] riscv: tcg-target: Add the target init code

2018-11-16 Thread Richard Henderson
On 11/15/18 11:36 PM, Alistair Francis wrote: > +tcg_regset_set_reg(s->reserved_regs, TCG_REG_L0); > +tcg_regset_set_reg(s->reserved_regs, TCG_REG_L1); > +tcg_regset_set_reg(s->reserved_regs, TCG_REG_RA); Why are these three reserved? r~

Re: [Qemu-devel] [RFC v1 19/23] riscv: tcg-target: Add the prologue generation

2018-11-16 Thread Richard Henderson
On 11/15/18 11:36 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > tcg/riscv/tcg-target.inc.c | 66 ++ > 1 file changed, 66 insertions(+) Reviewed-by: Richard Henderson r~

[Qemu-devel] QEMU Summit 2018 minutes

2018-11-16 Thread Peter Maydell
As usual, during this year's KVM Forum we also held the QEMU Summit, which is where the more active subsystem maintainers meet up for a discussion of various maintenance and other project issues. As always, none of this is set-in-stone decisions; further input and discussion on-list is welcome.

Re: [Qemu-devel] [RFC v1 18/23] riscv: tcg-target: Add the out op decoder

2018-11-16 Thread Richard Henderson
On 11/15/18 11:36 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > tcg/riscv/tcg-target.inc.c | 472 + > 1 file changed, 472 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [RFC v1 05/23] riscv: Add the tcg-target header file

2018-11-16 Thread Richard Henderson
On 11/15/18 11:34 PM, Alistair Francis wrote: > +#define TCG_TARGET_HAS_extrl_i64_i320 > +#define TCG_TARGET_HAS_extrh_i64_i320 You need these two for rv64 to preserve the invariant that 32-bit values are sign-extended in a 64-bit register. Otherwise _i32 comparisons won't work reliably.

Re: [Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-16 Thread Eric Blake
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote: Add tests that validate it is possible to connect to an NBD server running TLS mode. Also test mis-matched TLS vs non-TLS connections correctly fail. --- tests/qemu-iotests/233| 99 +++

Re: [Qemu-devel] KVM Forum block no[td]es

2018-11-16 Thread Alberto Garcia
(I just wanted to reply quickly to this point, I'll read the rest of the e-mail later) On Fri 16 Nov 2018 05:34:08 PM CET, Max Reitz wrote: > > GRAPH_MOD with the meaning that Berto suggested isn't weird or > > complicated to understand. It's only the wrong tool because it > > blocks more than

Re: [Qemu-devel] KVM Forum block no[td]es

2018-11-16 Thread Kevin Wolf
Am 16.11.2018 um 17:34 hat Max Reitz geschrieben: > On 16.11.18 16:51, Kevin Wolf wrote: > > Am 16.11.2018 um 16:27 hat Max Reitz geschrieben: > >> On 16.11.18 16:18, Kevin Wolf wrote: > >>> Am 16.11.2018 um 16:03 hat Alberto Garcia geschrieben: > > I don't think anything needs a way to

Re: [Qemu-devel] [PATCH] migration: savevm: consult migration blockers

2018-11-16 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > There is really no difference between live migration and savevm, except > that savevm does not require bdrv_invalidate_cache to be implemented > by all disks. However, it is unlikely that savevm is used with anything > except qcow2 disks, so the

[Qemu-devel] [PATCH] docker: dockerfile for openSUSE Leap

2018-11-16 Thread Dario Faggioli
Dockerfile for building an openSUSE Leap container. Tracks the latest release (at the time of writing this patch, it is Leap 15). Signed-off-by: Dario Faggioli --- Cc: "Alex Bennée" Cc: Fam Zheng Cc: "Philippe Mathieu-Daudé" --- tests/docker/dockerfiles/opensuse-leap.docker | 62

Re: [Qemu-devel] [RFC v1 17/23] riscv: tcg-target: Add direct load and store instructions

2018-11-16 Thread Richard Henderson
On 11/15/18 11:36 PM, Alistair Francis wrote: > +tcg_out_opc_reg(s, OPC_ADD, base, TCG_GUEST_BASE_REG, addr_regl); Should avoid this when guest_base == 0, which happens fairly regularly for a 64-bit guest. > +/* Prefer to load from offset 0 first, but allow for overlap. */ > +

Re: [Qemu-devel] [PATCH v2 3/3] qemu-iotests: Modern shell scripting (use $() instead of ``)

2018-11-16 Thread Eric Blake
On 10/24/18 4:40 AM, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: kw...@redhat.com Cc: mre...@redhat.com Cc: ebl...@redhat.com Suggested-by: Eric Blake Signed-off-by: Mao Zhongyi ---

Re: [Qemu-devel] [PATCH] target/i386: kvm: add VMX and SVM migration blockers

2018-11-16 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Nested VMX and SVM do not support live migration yet. Add a blocker > until that is worked out. > > Signed-off-by: Paolo Bonzini > --- > target/i386/kvm.c | 25 + > 1 file changed, 25 insertions(+) > > diff --git

Re: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: convert `pwd` and $(pwd) to $PWD

2018-11-16 Thread Eric Blake
On 10/24/18 4:40 AM, Mao Zhongyi wrote: POSIX requires $PWD to be reliable, and we expect all shells used by qemu scripts to be relatively close to POSIX. Thus, it is smarter to avoid forking the pwd executable for something that is already available in the environment. So replac it with the

Re: [Qemu-devel] [PATCH 2/2] hw: fw_cfg: refactor fw_cfg_reboot()

2018-11-16 Thread Markus Armbruster
Li Qiang writes: > Currently the user can set a negative reboot_timeout. > Also it is wrong to parse 'reboot-timeout' with qemu_opt_get() and then > convert it to number. Again, it's not wrong per se, just needlessly complicated and error-prone. What makes it wrong is ... > convert it to

Re: [Qemu-devel] [Qemu-block] [PATCH] migration/block-dirty-bitmap: fix Coverity CID1390625

2018-11-16 Thread Peter Maydell
On 16 November 2018 at 16:16, John Snow wrote: > On 11/16/18 5:04 AM, Peter Maydell wrote: >> Personally I think the main benefit of this sort of Coverity >> warning is that it nudges you to work through and figure out >> whether something really can be NULL or not. Stefan's fix >> will satisfy

Re: [Qemu-devel] [PATCH v2 2/3] qemu-iotests: remove unused variable here

2018-11-16 Thread Eric Blake
On 10/24/18 6:26 PM, Philippe Mathieu-Daudé wrote: Hi Mao, On 24/10/18 11:40, Mao Zhongyi wrote: run git grep '\$here' tests/qemu-iotests Correct. You want both the \ and the $ to be handed to the grep regex. This command doesn't look correct, I believe you have to use either - git grep

[Qemu-devel] [PATCH] migration: savevm: consult migration blockers

2018-11-16 Thread Paolo Bonzini
There is really no difference between live migration and savevm, except that savevm does not require bdrv_invalidate_cache to be implemented by all disks. However, it is unlikely that savevm is used with anything except qcow2 disks, so the penalty is small and worth the improvement in catching

[Qemu-devel] [PATCH] target/i386: kvm: add VMX and SVM migration blockers

2018-11-16 Thread Paolo Bonzini
Nested VMX and SVM do not support live migration yet. Add a blocker until that is worked out. Signed-off-by: Paolo Bonzini --- target/i386/kvm.c | 25 + 1 file changed, 25 insertions(+) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index db1f4104b6..3b6fbd3f20

Re: [Qemu-devel] [PATCH] Support u-boot noload images for arm as used by NetBSD/evbarm GENERIC kernel.

2018-11-16 Thread Nick Hudson
On 16/11/2018 14:34, Peter Maydell wrote: On 7 November 2018 at 13:19, Nick Hudson wrote: noload kernels are loaded with the u-boot image header and as a result the header size needs adding to the entry point. Fake up a hdr so the kernel image is loaded at the right address and the entry

[Qemu-devel] [PATCH for-3.1? v2 2/3] file-posix: Fix shared locks on reopen commit

2018-11-16 Thread Max Reitz
s->locked_shared_perm is the set of bits locked in the file, which is the inverse of the permissions actually shared. So we need to pass them as they are to raw_apply_lock_bytes() instead of inverting them again. Reported-by: Alberto Garcia Signed-off-by: Max Reitz --- block/file-posix.c | 2

Re: [Qemu-devel] qemu-user performance

2018-11-16 Thread Etienne Dublé
On 16/11/2018 16:41, Emilio G. Cota wrote: There's a recent paper that implements something similar to what you propose: "A General Persistent Code Caching Framework for Dynamic Binary Translation (DBT)", ATC'16 https://www.usenix.org/system/files/conference/atc16/atc16_paper-wang.pdf

[Qemu-devel] [PATCH for-3.1? v2 3/3] iotests: Test file-posix locking and reopen

2018-11-16 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/182 | 71 ++ tests/qemu-iotests/182.out | 9 + 2 files changed, 80 insertions(+) diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182 index 4b31592fb8..3b7689c1d5 100755 ---

[Qemu-devel] [PATCH for-3.1? v2 1/3] block: Always abort reopen after prepare succeeded

2018-11-16 Thread Max Reitz
bdrv_reopen_multiple() does not invoke bdrv_reopen_abort() for the element of the reopen queue for which bdrv_reopen_prepare() failed, because it assumes that the prepare function will have rolled back all changes already. However, bdrv_reopen_prepare() does not do this in every case: It may

[Qemu-devel] [PATCH for-3.1? v2 0/3] block: Fix two minor reopen issues

2018-11-16 Thread Max Reitz
These are fixes for issues I found when looking after something Berto has reported. The second patch fixes that issue Berto found, the first one is only kind of related. For the first patch: bdrv_reopen_abort() or bdrv_reopen_commit() are called only if the respective bdrv_reopen_prepare() has

Re: [Qemu-devel] [PATCH v7 03/12] target/arm: Swap PMU values before/after migrations

2018-11-16 Thread Peter Maydell
On 16 November 2018 at 16:09, Aaron Lindsay wrote: > On Nov 16 14:53, Peter Maydell wrote: >> On 5 November 2018 at 18:51, Aaron Lindsay >> wrote: >> > Because of the PMU's design, many register accesses have side effects >> > which are inter-related, meaning that the normal method of saving CP

Re: [Qemu-devel] SeaBIOS booting time optimization

2018-11-16 Thread Stefan Hajnoczi
On Fri, Nov 16, 2018 at 4:21 PM Stefano Garzarella wrote: > I'm investigating the SeaBIOS booting time, to understand if we can reduce > the boot time in some cases (e.g. legacy hardware is not needed). I think > this > can be interesting also for NEMU developers. Questions for NEMU folks:

Re: [Qemu-devel] [PATCH 5/6] tests: add iotests helpers for dealing with TLS certificates

2018-11-16 Thread Eric Blake
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote: Add helpers to common.tls for creating TLS certificates for a CA, server and client. MUCH appreciated! We NEED this coverage, easily automated. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/common.tls | 139

Re: [Qemu-devel] [PATCH for-3.1? 1/3] block: Always abort reopen after prepare succeeded

2018-11-16 Thread Max Reitz
On 16.11.18 17:02, Alberto Garcia wrote: > On Fri 16 Nov 2018 04:53:00 PM CET, Max Reitz wrote: >> bdrv_reopen_multiple() does not invoke bdrv_reopen_abort() for the >> element of the reopen queue for which bdrv_reopen_prepare() failed, >> because it assumes that the prepare function will have

Re: [Qemu-devel] [PATCH v5 11/14] hw/timer/nrf51_timer: Add nRF51 Timer peripheral

2018-11-16 Thread Peter Maydell
On 12 November 2018 at 21:42, Steffen Görtz wrote: > This patch adds the model for the nRF51 timer peripheral. > Currently, only the TIMER mode is implemented. > > Signed-off-by: Steffen Görtz > +static void set_prescaler(NRF51TimerState *s, uint32_t prescaler) > +{ > +uint64_t period; > +

Re: [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-16 Thread Paolo Bonzini
On 16/11/18 17:29, Igor Mammedov wrote: > General suggestions for this series: > 1. Preferably don't do multiple changes within a patch > neither post huge patches (unless it's pure code movement). > (it's easy to squash patches later it necessary) > 2. Start small, pick a table

Re: [Qemu-devel] [PATCH v7 01/12] migration: Add post_save function to VMStateDescription

2018-11-16 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 5 November 2018 at 18:51, Aaron Lindsay > wrote: > > In some cases it may be helpful to modify state before saving it for > > migration, and then modify the state back after it has been saved. The > > existing pre_save function provides half

Re: [Qemu-devel] KVM Forum block no[td]es

2018-11-16 Thread Max Reitz
On 16.11.18 16:51, Kevin Wolf wrote: > Am 16.11.2018 um 16:27 hat Max Reitz geschrieben: >> On 16.11.18 16:18, Kevin Wolf wrote: >>> Am 16.11.2018 um 16:03 hat Alberto Garcia geschrieben: > I don't think anything needs a way to generally block graph changes > around some node. We only

Re: [Qemu-devel] [PATCH 1/2] hw: fw_cfg: refactor fw_cfg_bootsplash()

2018-11-16 Thread Markus Armbruster
Li Qiang writes: > Currently when the splash-time value is bigger than 0x > we report and correct it, when it is less than 0 we just ingore it. s/ingore/ignore/ > Also we use qemu_opt_get() to get 'splash-time', then convert it to a number > ourselves. This is wrong. Well, doing it that

Re: [Qemu-devel] [PATCH v2 05/13] block: Switch to 64-bit bl.max_transfer

2018-11-16 Thread Kevin Wolf
Am 16.11.2018 um 16:54 hat Eric Blake geschrieben: > On 11/16/18 9:32 AM, Kevin Wolf wrote: > > Am 15.11.2018 um 17:28 hat Eric Blake geschrieben: > > > On 11/15/18 9:45 AM, Kevin Wolf wrote: > > > > Am 15.11.2018 um 03:03 hat Eric Blake geschrieben: > > > > > This change has no semantic impact:

Re: [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-16 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:23 +0100 Samuel Ortiz wrote: > This patch set provides an ACPI code reorganization in preparation for > adding a shared hardware-reduced ACPI API to QEMU. > > The changes are coming from the NEMU [1] project where we're defining > a new x86 machine type: i386/virt.

Re: [Qemu-devel] [PATCH v5 06/14] arm: Instantiate NRF51 special NVM's and NVMC

2018-11-16 Thread Peter Maydell
On 12 November 2018 at 21:42, Steffen Görtz wrote: > Instantiates UICR, FICR, FLASH and NVMC in nRF51 SOC. > > Signed-off-by: Steffen Görtz > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH 4/6] tests: check if qemu-nbd is still alive before waiting

2018-11-16 Thread Eric Blake
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote: If the qemu-nbd UNIX socket has not shown up, the tests will sleep a bit and then check again repeatedly for upto 30 seconds. This is pointless s/upto/up to/ if the qemu-nbd process has quit due to an error, so check whether the pid is still

Re: [Qemu-devel] [PATCH v5 05/14] hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories

2018-11-16 Thread Peter Maydell
On 12 November 2018 at 21:42, Steffen Görtz wrote: > The nRF51 contains three regions of non-volatile memory (NVM): > - CODE (R/W): contains code > - FICR (R): Factory information like code size, chip id etc. > - UICR (R/W): Changeable configuration data. Lock bits, Code > protection

[Qemu-devel] SeaBIOS booting time optimization

2018-11-16 Thread Stefano Garzarella
Hi, I'm investigating the SeaBIOS booting time, to understand if we can reduce the boot time in some cases (e.g. legacy hardware is not needed). I think this can be interesting also for NEMU developers. Following this thread ( https://mail.coreboot.org/pipermail/seabios/2015-July/009497.html),

Re: [Qemu-devel] [Qemu-block] [PATCH] migration/block-dirty-bitmap: fix Coverity CID1390625

2018-11-16 Thread John Snow
On 11/16/18 5:04 AM, Peter Maydell wrote: > On 16 November 2018 at 03:28, John Snow wrote: >> I looked again. I think Vladimir's patch will shut up Coverity for sure, >> feel free to apply it if you want this out of your hair. >> >> Stefan suggests the following, however; >> >> >> diff --git

Re: [Qemu-devel] [PATCH 3/6] tests: pull qemu-nbd iotest helpers into common.nbd file

2018-11-16 Thread Eric Blake
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote: The helpers for starting/stopping qemu-nbd in 058 will be useful in other test cases, so move them into a common.nbd file. In fact, I already have a proposed patch 228 that I'm trying to clean up for potential inclusion in 3.1 that could use

Re: [Qemu-devel] [PATCH v5 00/14] arm: nRF51 Devices and Microbit Support

2018-11-16 Thread Peter Maydell
On 12 November 2018 at 21:42, Steffen Görtz wrote: > This series contains additional peripheral devices for the nRF51822 > microcontroller. > > Included devices: > - Random Number Generator > - Non-volatile Memories > - General purpose I/O > - Timer > - Stub for clock peripheral > > v5: Hi; if I

Re: [Qemu-devel] [PATCH v7 03/12] target/arm: Swap PMU values before/after migrations

2018-11-16 Thread Aaron Lindsay
On Nov 16 14:53, Peter Maydell wrote: > On 5 November 2018 at 18:51, Aaron Lindsay > wrote: > > Because of the PMU's design, many register accesses have side effects > > which are inter-related, meaning that the normal method of saving CP > > registers can result in inconsistent state. These

Re: [Qemu-devel] [PATCH 2/6 for-3.1] nbd: stop waiting for a NBD response with NBD_CMD_DISC

2018-11-16 Thread Eric Blake
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote: When sending a NBD_CMD_DISC message there is no reply expected, however, the nbd_read_eof() coroutine is still waiting for a reply. In a plain NBD connection this doesn't matter as it will just get an EOF, however, on a TLS connection it will get an

Re: [Qemu-devel] [PATCH v5 20/24] hw: acpi: Define ACPI tables builder interface

2018-11-16 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:43 +0100 Samuel Ortiz wrote: > In order to decouple ACPI APIs from specific machine types, we are > creating an ACPI builder interface that each ACPI platform can choose to > implement. > This way, a new machine type can re-use the high level ACPI APIs and > define some

Re: [Qemu-devel] [PATCH 1/6 for-3.1] nbd: fix whitespace in server error message

2018-11-16 Thread Eric Blake
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote: A space was missing after the option number was printed: Option 0x8not permitted before TLS becomes Option 0x8 not permitted before TLS This fixes commit 3668328303429f3bc93ab3365c66331600b06a2d Author: Eric Blake Date: Fri

Re: [Qemu-devel] [PATCH for 3.1 v9] qcow2: Document some maximum size constraints

2018-11-16 Thread Kevin Wolf
Am 15.11.2018 um 19:34 hat Eric Blake geschrieben: > Although off_t permits up to 63 bits (8EB) of file offsets, in > practice, we're going to hit other limits first. Document some > of those limits in the qcow2 spec (some are inherent, others are > implementation choices of qemu), and how choice

[Qemu-devel] [PATCH 5/6] tests: add iotests helpers for dealing with TLS certificates

2018-11-16 Thread Daniel P . Berrangé
Add helpers to common.tls for creating TLS certificates for a CA, server and client. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/common.tls | 139 ++ 1 file changed, 139 insertions(+) create mode 100644 tests/qemu-iotests/common.tls diff --git

Re: [Qemu-devel] [PATCH for-3.1? 1/3] block: Always abort reopen after prepare succeeded

2018-11-16 Thread Alberto Garcia
On Fri 16 Nov 2018 04:53:00 PM CET, Max Reitz wrote: > bdrv_reopen_multiple() does not invoke bdrv_reopen_abort() for the > element of the reopen queue for which bdrv_reopen_prepare() failed, > because it assumes that the prepare function will have rolled back all > changes already. > > However,

Re: [Qemu-devel] [PATCH v2 05/13] block: Switch to 64-bit bl.max_transfer

2018-11-16 Thread Eric Blake
On 11/16/18 9:32 AM, Kevin Wolf wrote: Am 15.11.2018 um 17:28 hat Eric Blake geschrieben: On 11/15/18 9:45 AM, Kevin Wolf wrote: Am 15.11.2018 um 03:03 hat Eric Blake geschrieben: This change has no semantic impact: all drivers either leave the value at 0 (no inherent 32-bit limit is still

[Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-16 Thread Daniel P . Berrangé
Add tests that validate it is possible to connect to an NBD server running TLS mode. Also test mis-matched TLS vs non-TLS connections correctly fail. --- tests/qemu-iotests/233| 99 +++ tests/qemu-iotests/233.out| 33

[Qemu-devel] [PATCH 3/6] tests: pull qemu-nbd iotest helpers into common.nbd file

2018-11-16 Thread Daniel P . Berrangé
The helpers for starting/stopping qemu-nbd in 058 will be useful in other test cases, so move them into a common.nbd file. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/058| 47 + tests/qemu-iotests/common.nbd | 56

[Qemu-devel] [PATCH 4/6] tests: check if qemu-nbd is still alive before waiting

2018-11-16 Thread Daniel P . Berrangé
If the qemu-nbd UNIX socket has not shown up, the tests will sleep a bit and then check again repeatedly for upto 30 seconds. This is pointless if the qemu-nbd process has quit due to an error, so check whether the pid is still alive before waiting and retrying. Signed-off-by: Daniel P. Berrangé

[Qemu-devel] [PATCH 1/6 for-3.1] nbd: fix whitespace in server error message

2018-11-16 Thread Daniel P . Berrangé
A space was missing after the option number was printed: Option 0x8not permitted before TLS becomes Option 0x8 not permitted before TLS This fixes commit 3668328303429f3bc93ab3365c66331600b06a2d Author: Eric Blake Date: Fri Oct 14 13:33:09 2016 -0500 nbd: Send message along

[Qemu-devel] [PATCH for-3.1? 3/3] iotests: Test file-posix locking and reopen

2018-11-16 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/182 | 71 ++ tests/qemu-iotests/182.out | 9 + 2 files changed, 80 insertions(+) diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182 index 4b31592fb8..3b7689c1d5 100755 ---

[Qemu-devel] [PATCH 2/6 for-3.1] nbd: stop waiting for a NBD response with NBD_CMD_DISC

2018-11-16 Thread Daniel P . Berrangé
When sending a NBD_CMD_DISC message there is no reply expected, however, the nbd_read_eof() coroutine is still waiting for a reply. In a plain NBD connection this doesn't matter as it will just get an EOF, however, on a TLS connection it will get an interrupted TLS data packet. The nbd_read_eof()

[Qemu-devel] [PATCH for-3.1? 2/3] file-posix: Fix shared locks on reopen commit

2018-11-16 Thread Max Reitz
s->locked_shared_perm is the set of bits locked in the file, which is the inverse of the permissions actually shared. So we need to pass them as they are to raw_apply_lock_bytes() instead of inverting them again. Reported-by: Alberto Garcia Signed-off-by: Max Reitz --- block/file-posix.c | 2

[Qemu-devel] [PATCH 0/6] Misc fixes to NBD

2018-11-16 Thread Daniel P . Berrangé
This does two minor fixes to the NBD code and adds significant coverage of the NBD TLS support to detect future problems. The first two patches should be for 3.1. The tests can wait till 4.0 if desired. Daniel P. Berrangé (6): nbd: fix whitespace in server error message nbd: stop waiting

[Qemu-devel] [PATCH for-3.1? 1/3] block: Always abort reopen after prepare succeeded

2018-11-16 Thread Max Reitz
bdrv_reopen_multiple() does not invoke bdrv_reopen_abort() for the element of the reopen queue for which bdrv_reopen_prepare() failed, because it assumes that the prepare function will have rolled back all changes already. However, bdrv_reopen_prepare() does not do this in every case: It may

  1   2   3   >