Re: [Qemu-devel] [PATCH qemu] spapr_pci: Alias MMIO windows to PHB address space

2018-01-19 Thread Alexey Kardashevskiy
On 18/01/18 16:33, Alexey Kardashevskiy wrote: > On 18/01/18 14:47, Alexey Kardashevskiy wrote: >> At the moment the sPAPR PHB MMIO space does not have an address space >> object as it does not really need one - guest accesses it via virtual >> addresses (and we provide mappings to the CPU space),

Re: [Qemu-devel] [PATCH v5 0/4] cryptodev: add vhost support

2018-01-19 Thread Zhoujian (jay)
[...] > Configure options: > --enable-werror --target-list=x86_64-softmmu,aarch64-softmmu -- > prefix=/tmp/qemu-test/install [...] > KVM support yes > HAX support no > HVF support no > TCG support yes > TCG debug enabled no > TCG interpreter no > malloc trim support yes

[Qemu-devel] [PATCH] ppc/pnv: fix PnvChip redefinition in

2018-01-19 Thread Cédric Le Goater
This redefinition generates warnings on some clang compilers and older gcc4.4. ...include/hw/ppc/pnv_xscom.h:24:24: warning: redefinition of typedef 'PnvChip' is a C11 feature [-Wtypedef-redefinition] typedef struct PnvChip PnvChip; ^ ...include/hw/ppc/pnv.h:65:3: not

Re: [Qemu-devel] [PATCH] ppc/pnv: fix PnvChip redefinition in

2018-01-19 Thread Thomas Huth
On 19.01.2018 09:15, Cédric Le Goater wrote: > This redefinition generates warnings on some clang compilers and older > gcc4.4. > > ...include/hw/ppc/pnv_xscom.h:24:24: warning: redefinition of typedef > 'PnvChip' is a C11 > feature [-Wtypedef-redefinition] > typedef struct PnvChip PnvChip;

[Qemu-devel] [RFC PATCH v4 00/23] replay additions

2018-01-19 Thread Pavel Dovgalyuk
Accidentally sent draft version of patches to the mailing list. Please consider this one as the correct one. This set of patches includex fixes from Alex Bennée for fixing BQL and replay locks after inventing the MTTCG. It also includes some additional replay patches that makes this set of fixes w

[Qemu-devel] [RFC 1/2] memory: do explicit cleanup when remove listeners

2018-01-19 Thread Peter Xu
When unregister memory listeners, we should call, e.g., region_del() (and possibly other undo operations) on every existing memory region sections there, otherwise we may leak resources that are held during the region_add(). This patch undo the stuff for the listeners, which emulates the case when

[Qemu-devel] [RFC 2/2] vfio: listener unregister before unset container

2018-01-19 Thread Peter Xu
After previous patch, listener unregister will need the container to be alive. Let's move this unregister phase to be before unset container, since that operation will free the backend container in kernel, then we'll get these after previous patch: qemu-system-x86_64: VFIO_UNMAP_DMA: -22 qemu-sys

[Qemu-devel] [RFC PATCH v4 07/23] replay: fix save/load vm for non-empty queue

2018-01-19 Thread Pavel Dovgalyuk
This patch does not allows saving/loading vmstate when replay events queue is not empty. There is no reliable way to save events queue, because it describes internal coroutine state. Therefore saving and loading operations should be deferred to another record/replay step. Signed-off-by: Pavel Dovg

[Qemu-devel] [RFC 0/2] memory/vfio: notify region_del() when unregister listeners

2018-01-19 Thread Peter Xu
I encountered an event loss problem during unplugging vfio devices: https://bugzilla.redhat.com/show_bug.cgi?id=1531393 I thought it should be a simple VT-d issue but I was wrong. The whole debugging leads me to these patches. Basically I think what we missed is that when unregistering memory

[Qemu-devel] [RFC PATCH v4 12/23] cpus: push BQL lock to qemu_*_wait_io_event

2018-01-19 Thread Pavel Dovgalyuk
From: Alex Bennée We only really need to grab the lock for initial setup (so we don't race with the thread-spawning thread). After that we can drop the lock for the whole main loop and only grab it for waiting for IO events. There is a slight wrinkle for the round-robin TCG thread as we also exp

[Qemu-devel] [RFC PATCH v4 01/23] This patch adds a condition before overwriting exception_index fields.

2018-01-19 Thread Pavel Dovgalyuk
It is needed when exception_index is already set to some meaningful value. Signed-off-by: Pavel Dovgalyuk Signed-off-by: Paolo Bonzini --- accel/tcg/cpu-exec.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 280200f..9

[Qemu-devel] [RFC PATCH v4 10/23] replay: save prior value of the host clock

2018-01-19 Thread Pavel Dovgalyuk
This patch adds saving/restoring of the host clock field 'last'. It is used in host clock calculation and therefore clock may become incorrect when using restored vmstate. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- include/qemu/timer.h | 14 ++ replay/replay-in

[Qemu-devel] [RFC PATCH v4 02/23] block: implement bdrv_snapshot_goto for blkreplay

2018-01-19 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch enables making snapshots with blkreplay used in block devices. This function is required to make bdrv_snapshot_goto without calling .bdrv_open which is not implemented. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c |8 1 file changed, 8 inse

[Qemu-devel] [RFC PATCH v4 05/23] replay: fix processing async events

2018-01-19 Thread Pavel Dovgalyuk
Asynchronous events saved at checkpoints may invoke callbacks when processed. These callbacks may also generate/read new events (e.g. clock reads). Therefore event processing flag must be reset before callback invocation. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- replay/replay-

[Qemu-devel] [RFC PATCH v4 14/23] replay/replay.c: bump REPLAY_VERSION again

2018-01-19 Thread Pavel Dovgalyuk
From: Alex Bennée This time commit 802f045a5f61b781df55e4492d896b4d20503ba7 broke the replay file format. Also add a comment about this to replay-internal.h. Signed-off-by: Alex Bennée Reviewed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- replay/replay-internal.h |2 +- replay/rep

[Qemu-devel] [RFC PATCH v4 16/23] replay: make locking visible outside replay code

2018-01-19 Thread Pavel Dovgalyuk
From: Alex Bennée The replay_mutex_lock/unlock/locked functions are now going to be used for ensuring lock-step behaviour between the two threads. Make them public API functions and also provide stubs for non-QEMU builds on common paths. Signed-off-by: Alex Bennée Tested-by: Pavel Dovgalyuk --

[Qemu-devel] [RFC PATCH v4 03/23] blkreplay: create temporary overlay for underlaying devices

2018-01-19 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch allows using '-snapshot' behavior in record/replay mode. blkreplay layer creates temporary overlays on top of underlaying disk images. It is needed, because creating an overlay over blkreplay breaks the determinism. This patch creates similar temporary overlay (wh

[Qemu-devel] [RFC PATCH v4 06/23] replay: fixed replay_enable_events

2018-01-19 Thread Pavel Dovgalyuk
This patch fixes assignment to internal events_enabled variable. Now it is set only in record/replay mode. This affects the behavior of the external functions that check this flag. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- replay/replay-events.c |8 +--- 1 file changed,

[Qemu-devel] [RFC PATCH v4 19/23] replay: check return values of fwrite

2018-01-19 Thread Pavel Dovgalyuk
This patch adds error reporting when fwrite cannot completely save the buffer to the file. Signed-off-by: Pavel Dovgalyuk -- v3: also check putc() return value --- replay/replay-internal.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/replay/replay-in

[Qemu-devel] [RFC PATCH v4 21/23] scripts/replay-dump.py: replay log dumper

2018-01-19 Thread Pavel Dovgalyuk
From: Alex Bennée This script is a debugging tool for looking through the contents of a replay log file. It is incomplete but should fail gracefully at events it doesn't understand. It currently understands two different log formats as the audio record/replay support was merged during since MTTC

[Qemu-devel] [RFC PATCH v4 08/23] replay: added replay log format description

2018-01-19 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch adds description of the replay log file format into the docs/replay.txt. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- docs/replay.txt | 69 +++ 1 file changed, 69 insertions(+) diff --git a/d

[Qemu-devel] [RFC PATCH v4 04/23] replay: disable default snapshot for record/replay

2018-01-19 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch disables setting '-snapshot' option on by default in record/replay mode. This is needed for creating vmstates in record and replay modes. Signed-off-by: Pavel Dovgalyuk --- vl.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vl.c

[Qemu-devel] [RFC PATCH v4 23/23] replay: save vmstate of the asynchronous events

2018-01-19 Thread Pavel Dovgalyuk
This patch fixes saving and loading the snapshots in the replay mode. It is required for the snapshots created in the moment when the header of the asynchronous event is read. This information was not saved in the snapshot. After loading the vmstate replay continued with the file offset passed the

Re: [Qemu-devel] [PATCH qemu v2] RFC: vfio-pci: Allow mmap of MSIX BAR

2018-01-19 Thread Alexey Kardashevskiy
On 19/01/18 08:59, Alex Williamson wrote: > On Tue, 16 Jan 2018 16:17:58 +1100 > Alexey Kardashevskiy wrote: > >> On 06/01/18 02:29, Alex Williamson wrote: >>> On Fri, 5 Jan 2018 10:48:07 +0100 >>> Auger Eric wrote: >>> Hi Alexey, On 15/12/17 07:29, Alexey Kardashevskiy wrote:

[Qemu-devel] [RFC PATCH v4 11/23] target/arm/arm-powertctl: drop BQL assertions

2018-01-19 Thread Pavel Dovgalyuk
From: Alex Bennée The powerctl code is run in the context of the vCPU changing power state. It does not need the BQL to protect its changes. Signed-off-by: Alex Bennée --- target/arm/arm-powerctl.c |8 1 file changed, 8 deletions(-) diff --git a/target/arm/arm-powerctl.c b/target

[Qemu-devel] [RFC PATCH v4 09/23] replay: make safe vmstop at record/replay

2018-01-19 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch disables bdrv flush/drain in record/replay mode. When block request is in the replay queue it cannot be processed with drain/flush until it is found in the log. Therefore vm should just stop leaving unfinished operations in the queue. Signed-off-by: Pavel Dovgaly

[Qemu-devel] [RFC PATCH v4 13/23] cpus: only take BQL for sleeping threads

2018-01-19 Thread Pavel Dovgalyuk
From: Alex Bennée Now the only real need to hold the BQL is for when we sleep on the cpu->halt conditional. The lock is actually dropped while the thread sleeps so the actual window for contention is pretty small. This also means we can remove the special case hack for exclusive work and simply d

[Qemu-devel] [RFC PATCH v4 18/23] replay: don't destroy mutex at exit

2018-01-19 Thread Pavel Dovgalyuk
Replay mutex is held by vCPU thread and destroy function is called from atexit of the main thread. Therefore we cannot destroy it safely. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- replay/replay.c |1 - 1 file changed, 1 deletion(-) diff --git a/replay/replay.c b/replay/rep

Re: [Qemu-devel] [PATCH V4 2/7] CAN bus support to connect bust to Linux host SocketCAN interface.

2018-01-19 Thread Pavel Pisa
Hello Philippe, On Tuesday 16 of January 2018 01:12:09 Philippe Mathieu-Daudé wrote: > On 01/15/2018 06:29 PM, Pavel Pisa wrote: > > Hello Philippe, > > > > thanks for review. > > > > I have updated patch series in can-pci branch in > > > > https://gitlab.fel.cvut.cz/canbus/qemu-canbus > > > > I

[Qemu-devel] [RFC PATCH v4 15/23] replay/replay-internal.c: track holding of replay_lock

2018-01-19 Thread Pavel Dovgalyuk
From: Alex Bennée This is modelled after the iothread mutex lock. We keep a TLS flag to indicate when that thread has acquired the lock and assert we don't double-lock or release when we shouldn't have. Signed-off-by: Alex Bennée Tested-by: Pavel Dovgalyuk --- replay/replay-internal.c | 11

[Qemu-devel] [RFC PATCH v4 17/23] replay: push replay_mutex_lock up the call tree

2018-01-19 Thread Pavel Dovgalyuk
From: Alex Bennée Now instead of using the replay_lock to guard the output of the log we now use it to protect the whole execution section. This replaces what the BQL used to do when it was held during TCG execution. We also introduce some rules for locking order - mainly that you cannot take th

[Qemu-devel] [RFC PATCH v4 20/23] replay: avoid recursive call of checkpoints

2018-01-19 Thread Pavel Dovgalyuk
This patch adds a flag which denies recursive call of replay_checkpoint function. Checkpoints may be accompanied by the hardware events. When event is processed, virtual device may invoke timer modification functions that also invoke the checkpoint function. This leads to infinite loop. Signed-off

[Qemu-devel] [RFC PATCH v4 22/23] replay: don't process async events when warping the clock

2018-01-19 Thread Pavel Dovgalyuk
Virtual clock is wapred from iothread and vcpu thread. When the hardware events associated with warp checkpoint, then interrupt delivering may be non-deterministic if checkpoint is processed in different threads in record and replay. This patch disables event processing for clock warp checkpoint an

Re: [Qemu-devel] [RFC PATCH v4 01/23] This patch adds a condition before overwriting exception_index fields.

2018-01-19 Thread Paolo Bonzini
On 19/01/2018 09:42, Pavel Dovgalyuk wrote: > It is needed when exception_index is already set to some meaningful value. > Pavel, very frankly, this commit message is awful, and for two reasons. First, it should include the high level overview of the bug ("XYZ does not work") and the description

Re: [Qemu-devel] [RFC PATCH v4 12/23] cpus: push BQL lock to qemu_*_wait_io_event

2018-01-19 Thread Paolo Bonzini
On 19/01/2018 09:44, Pavel Dovgalyuk wrote: > static void qemu_wait_io_event(CPUState *cpu) > { > +qemu_mutex_lock_iothread(); > + > while (cpu_thread_is_idle(cpu)) { > qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex); > } This function locks the iothread and never unloc

Re: [Qemu-devel] [RFC PATCH v4 13/23] cpus: only take BQL for sleeping threads

2018-01-19 Thread Paolo Bonzini
On 19/01/2018 09:44, Pavel Dovgalyuk wrote: > while (all_cpu_threads_idle()) { > +qemu_mutex_lock_iothread(); > stop_tcg_kick_timer(); > qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex); > +qemu_mutex_unlock_iothread(); > } cpu_has_work cannot be calle

Re: [Qemu-devel] [PATCH] block: implement the bdrv_reopen_prepare helper for LUKS driver

2018-01-19 Thread Daniel P. Berrange
On Thu, Jan 18, 2018 at 01:51:36PM -0600, Eric Blake wrote: > On 01/18/2018 04:31 AM, Daniel P. Berrange wrote: > > If the bdrv_reopen_prepare helper isn't provided, the qemu-img commit > > command fails to re-open the base layer after committing changes into > > it. Provide a no-op implementation

Re: [Qemu-devel] [PATCH] allow to build with older sed

2018-01-19 Thread Daniel P. Berrange
On Fri, Jan 19, 2018 at 12:52:27AM -0700, Jan Beulich wrote: > sed's -E option may not be supported by older distros. As there's no > point using sed here at all, use just shell mechanisms to establish the > variable values, starting from the stem instead of the full target. > > Signed-off-by: Jan

Re: [Qemu-devel] [RFC PATCH v4 00/23] replay additions

2018-01-19 Thread no-reply
Hi, This series failed docker-quick@centos6 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180119084235.7100.98318.stgit@pasha-VirtualBox Subject: [Qemu-devel] [RFC PATCH v4 00/2

[Qemu-devel] [PULL 01/13] default-configs/ppc64-softmmu: Include 32-bit configs instead of copying them

2018-01-19 Thread David Gibson
From: Thomas Huth qemu-softmmu-ppc64 is supposed to be a superset of qemu-softmmu-ppc. However, instead of simply including the 32-bit config file, we've duplicated all CONFIG_xxx settings there instead. This way, we've missed some CONFIG switches in ppc64-softmmu.mak which were only added to the

[Qemu-devel] [PULL 06/13] target/ppc: msgsnd and msgclr instructions need hypervisor privilege

2018-01-19 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- target/ppc/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 0ef21cce33..396f422cf4 100644 --- a/target/ppc/translate.c

[Qemu-devel] [PULL 11/13] sii3112: Add explicit type casts to avoid unintended sign extension

2018-01-19 Thread David Gibson
From: BALATON Zoltan Noticed by Coverity Reported-by: Peter Maydell Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/ide/sii3112.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index e2f5562bb7..17aa930e39 1

[Qemu-devel] [PULL 00/13] ppc-for-2.12 queue 20180119

2018-01-19 Thread David Gibson
The following changes since commit b4d6ed1c5ae519d3efb5297be3ef6625ca2a20f4: Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-01-17' into staging (2018-01-18 15:25:17 +) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.1

[Qemu-devel] [PULL 02/13] default-configs/ppc-softmmu: Restructure the switches according to the machines

2018-01-19 Thread David Gibson
From: Thomas Huth Order the CONFIG switches in ppc-softmmu.mak according to the machine classes where they are used (embedded, Mac or PReP), so that it is easier for the users to disable a set of switches completely if they are not needed. Also add the missing CONFIG_IDE_SII3112 switch to the em

[Qemu-devel] [PULL 04/13] ppc: Deprecate qemu-system-ppcemb

2018-01-19 Thread David Gibson
From: Thomas Huth qemu-system-ppcemb has been once split of qemu-system-ppc to support CPU page sizes < 4096 for some of the embedded 4xx PowerPC CPUs. However, there was hardly any OS available in the wild that really used such small page sizes (Linux uses 4096 on PPC), so there is no known rece

[Qemu-devel] [PULL 05/13] target/ppc: fix doorbell and hypervisor doorbell definitions

2018-01-19 Thread David Gibson
From: Cédric Le Goater commit f03a1af581b9 ("ppc: Fix POWER7 and POWER8 exception definitions") introduced definitions for the server doorbell exceptions by reusing the embedded definitions but this adds complexity in the powerpc_excp() routine. Let's introduce specific definitions for the Server

[Qemu-devel] [PULL 12/13] target/ppc: add support for hypervisor doorbells on book3s CPUs

2018-01-19 Thread David Gibson
From: Cédric Le Goater The hypervisor doorbells are used by skiboot and Linux on POWER9 processors to wake up secondaries. This adds processor control support to the Server architecture by reusing the Embedded support. They are very similar, only the bits definition of the CPU identifier differ.

[Qemu-devel] [PULL 10/13] sm501: Add missing break to case

2018-01-19 Thread David Gibson
From: BALATON Zoltan Noticed by Coverity, forgotten in 5690d9ece Reported-by: Peter Maydell Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/display/sm501.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 4f7dc59b25..134cbed60

[Qemu-devel] [PULL 03/13] hw/ppc/Makefile: Add a way to disable the PPC4xx boards

2018-01-19 Thread David Gibson
From: Thomas Huth We've got the config switch CONFIG_PPC4XX, so we should use it in the Makefile accordingly and only include the PPC4xx boards if this switch has been enabled. (Note: Unfortunately, the files ppc4xx_devs.c and ppc405_uc.c still have to be included in the build anyway to fulfil so

[Qemu-devel] [PULL 09/13] target-ppc: optimize cmp translation

2018-01-19 Thread David Gibson
From: "pbonz...@redhat.com" We know that only one bit (in addition to SO) is going to be set in the condition register, so do two movconds instead of three setconds, three shifts and two ORs. For ppc64-linux-user, the code size reduction is around 5% and the performance improvement slightly less

[Qemu-devel] [PULL 08/13] spapr: fix device tree properties when using compatibility mode

2018-01-19 Thread David Gibson
From: Greg Kurz Commit 51f84465dd98 changed the compatility mode setting logic: - machine reset only sets compatibility mode for the boot CPU - compatibility mode is set for other CPUs when they are put online by the guest with the "start-cpu" RTAS call This causes a regression for machines st

[Qemu-devel] [PULL 13/13] target/ppc/spapr_caps: Add macro to generate spapr_caps migration vmstate

2018-01-19 Thread David Gibson
From: Suraj Jitindar Singh The vmstate description and the contained needed function for migration of spapr_caps is the same for each cap, with the name of the cap substituted. As such introduce a macro to allow for easier generation of these. Convert the three existing spapr_caps (htm, vsx, and

Re: [Qemu-devel] [PATCH v2 5/5] vfio/pci: Allow relocating MSI-X MMIO

2018-01-19 Thread Auger Eric
Hi Alex, On 10/01/18 20:02, Alex Williamson wrote: > Recently proposed vfio-pci kernel changes (v4.16) remove the > restriction preventing userspace from mmap'ing PCI BARs in areas > overlapping the MSI-X vector table. This change is primarily intended > to benefit host platforms which make use o

[Qemu-devel] [PULL 07/13] spapr: drop duplicate variable in spapr_core_plug()

2018-01-19 Thread David Gibson
From: Greg Kurz A variable is already defined at the begining of the function to hold a pointer to the CPU core object: sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev)); No need to define it again in the pre-2.10 compatibility code snipplet. Signed-off-by: Greg Kurz Signed-off-by: David G

Re: [Qemu-devel] [PATCH v2 2/6] hmp: add name parameter to nbd_server_add

2018-01-19 Thread Vladimir Sementsov-Ogievskiy
19.01.2018 00:08, Eric Blake wrote: On 01/18/2018 12:11 PM, Vladimir Sementsov-Ogievskiy wrote: Support name parameter for HMP too. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hmp.c | 3 ++- hmp-commands.hx | 9 + 2 files changed, 7 insertions(+), 5 deletions(-) +++

Re: [Qemu-devel] [PULL v2 00/34] pc, pci, virtio: features, fixes, cleanups

2018-01-19 Thread Peter Maydell
On 18 January 2018 at 19:30, Michael S. Tsirkin wrote: > On Thu, Jan 18, 2018 at 10:09:09AM +, Peter Maydell wrote: >> Hi -- this pullreq triggers a lot of alignment warnings for vhost >> in the clang runtime sanitizer: > > Are these build or make check errors? They're runtime, so they fire d

Re: [Qemu-devel] [PATCH 20/24] machine: drop MachineState::cpu_model

2018-01-19 Thread Igor Mammedov
On Thu, 18 Jan 2018 17:18:09 -0200 Eduardo Habkost wrote: > On Thu, Jan 18, 2018 at 11:10:35AM +0100, Igor Mammedov wrote: > > On Wed, 17 Jan 2018 23:48:46 -0200 > > Eduardo Habkost wrote: > > > > > On Wed, Jan 17, 2018 at 04:43:32PM +0100, Igor Mammedov wrote: > > > > The last user of it w

Re: [Qemu-devel] [RFC 1/2] memory: do explicit cleanup when remove listeners

2018-01-19 Thread Paolo Bonzini
On 19/01/2018 09:42, Peter Xu wrote: > +FOR_EACH_FLAT_RANGE(fr, view) { listener->begin is missing before the loop. Paolo > +MemoryRegionSection section = section_from_flat_range(fr, view); > + > +if (fr->dirty_log_mask && listener->log_stop) { > +listener->log_st

Re: [Qemu-devel] [PATCH v2 6/6] iotest 201: new test for qmp nbd-server-remove

2018-01-19 Thread Vladimir Sementsov-Ogievskiy
19.01.2018 01:43, Eric Blake wrote: On 01/18/2018 12:11 PM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/201 | 159 + tests/qemu-iotests/201.out | 5 ++ tests/qemu-iotests/group |

Re: [Qemu-devel] [RFC v2 3/5] linux-user: prepare for switching to cpu_create() API

2018-01-19 Thread Igor Mammedov
On Thu, 18 Jan 2018 18:33:37 -0200 Eduardo Habkost wrote: > On Thu, Jan 18, 2018 at 06:34:00PM +0100, Igor Mammedov wrote: > > temporarily add #ifdef CPU_RESOLVING_TYPE in linux-user/main.c > > so that each target could gradually switch to cpu_create() and > > not converted yet could continue to

Re: [Qemu-devel] [PATCH v2 0/5] vfio/pci: MSI-X MMIO relocation

2018-01-19 Thread Auger Eric
Hi Alex, On 10/01/18 20:01, Alex Williamson wrote: > v1: https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg03350.html > > See patch 5/5 for a thorough description. v2 changes the 'auto' > behavior as we've determined that there's no algorithm which has even > a likely chance of success. I

Re: [Qemu-devel] [RFC] qid path collision issues in 9pfs

2018-01-19 Thread Greg Kurz
On Mon, 15 Jan 2018 11:49:31 +0800 Antonios Motakis wrote: > On 13-Jan-18 00:14, Greg Kurz wrote: > > On Fri, 12 Jan 2018 19:32:10 +0800 > > Antonios Motakis wrote: > > > >> Hello all, > >> > > > > Hi Antonios, > > > > I see you have attached a patch to this email... this really isn't the

Re: [Qemu-devel] [PATCH v2 0/6] nbd export qmp interface

2018-01-19 Thread Kevin Wolf
Am 18.01.2018 um 23:45 hat Eric Blake geschrieben: > On 01/18/2018 12:11 PM, Vladimir Sementsov-Ogievskiy wrote: > > v2: > > 01: tweak comment > > add Eric's r-b > > 02: new patch > > 03: rewritten, to move form 'bool force' flag to 'enum mode' parameter > > 04: add Eric's r-b > > 05: improve c

Re: [Qemu-devel] [PATCH 0/5 v3] preparation for Parallels Disk xml driver

2018-01-19 Thread klim
On 01/12/2018 12:01 PM, Klim Kireev wrote: ping Parallels Desktop and Parallels Cloud Server uses images glued with the bundle description in XML format. This series contains very basic description of this XML files and makes preparations for actual implementation to be followed. Signed-off-by:

[Qemu-devel] [PATCH] build: fix typo in error message

2018-01-19 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- scripts/git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index bc7224a27f..807ca0b4f8 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -28,7 +28,7 @@ er

[Qemu-devel] [PATCH v7 2/7] vhost: Simplify ring verification checks

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" vhost_verify_ring_mappings() were used to verify that rings are still accessible and related memory hasn't been moved after flatview is updated. It was doing checks by mapping ring's GPA+len and checking that HVA hadn't changed with new memory map. To avoid maybe e

[Qemu-devel] [PATCH v7 0/7] Rework vhost memory region updates

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This patch set reworks the way the vhost code handles changes in physical address space layout that came from a discussion with Igor. Its intention is to simplify a lot of the update code, and to make it easier for the postcopy+shared code to do the hugepage

[Qemu-devel] [PATCH v7 6/7] vhost: Merge and delete unused callbacks

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now that the olf vhost_set_memory code is gone, the _nop and _add callbacks are identical and can be merged. The _del callback is no longer needed. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Igor Mammedov --- hw/virtio/vhost.c | 33 +

[Qemu-devel] [PATCH v7 1/7] vhost: Build temporary section list and deref after commit

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Igor spotted that there's a race, where a region that's unref'd in a _del callback might be free'd before the set_mem_table call in the _commit callback, and thus the vhost might end up using free memory. Fix this by building a complete temporary sections list, ref

[Qemu-devel] [PATCH v7 3/7] vhost: Merge sections added to temporary list

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" As sections are reported by the listener to the _nop and _add methods, add them to the temporary section list but now merge them with the previous section if the new one abuts and the backend allows. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Igor Mammedov

[Qemu-devel] [PATCH v7 5/7] vhost: Clean out old vhost_set_memory and friends

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Remove the old update mechanism, vhost_set_memory, and the functions and flags it used. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 251 -- include/hw/virtio/vhost.h | 3 - 2 files changed, 2

[Qemu-devel] [PATCH v7 4/7] vhost: Regenerate region list from changed sections list

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Compare the sections list that's just been generated, and if it's different from the old one regenerate the region list. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 1 + hw/virtio/vhost.c | 39 +++

Re: [Qemu-devel] [PATCH v6 0/7] Rework vhost memory region updates

2018-01-19 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Thu, Jan 18, 2018 at 07:59:35PM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Tue, Jan 16, 2018 at 06:04:01PM +, Dr. David Alan Gilbert (git) > > > wrote: > > > > From: "Dr. David Alan Gilbert"

[Qemu-devel] [PATCH v7 7/7] vhost: Move log_dirty check

2018-01-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Move the log_dirty check into vhost_section. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 1 + hw/virtio/vhost.c | 20 +--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/virtio/trace-events b/hw/vir

[Qemu-devel] [PATCH v3] chardev/char-socket: add POLLHUP handler

2018-01-19 Thread Klim Kireev
The following behavior was observed for QEMU configured by libvirt to use guest agent as usual for the guests without virtio-serial driver (Windows or the guest remaining in BIOS stage). In QEMU on first connect to listen character device socket the listen socket is removed from poll just after th

Re: [Qemu-devel] [PATCH v3] chardev/char-socket: add POLLHUP handler

2018-01-19 Thread Marc-Andre Lureau
Hi On Fri, Jan 19, 2018 at 11:47 AM, Klim Kireev wrote: > The following behavior was observed for QEMU configured by libvirt > to use guest agent as usual for the guests without virtio-serial > driver (Windows or the guest remaining in BIOS stage). > > In QEMU on first connect to listen character

Re: [Qemu-devel] [Qemu-block] [PATCH] block/vmdk: Report failures in vmdk_read_cid()

2018-01-19 Thread Paolo Bonzini
On 28/07/2017 14:54, Kevin Wolf wrote: > Am 09.07.2017 um 19:06 hat Peter Maydell geschrieben: >> The function vmdk_read_cid() can fail if the read on the underlying >> block device fails, or if there's a format error in the VMDK file. >> However its API doesn't provide a mechanism to report these

Re: [Qemu-devel] [RFC 0/2] memory/vfio: notify region_del() when unregister listeners

2018-01-19 Thread Paolo Bonzini
On 19/01/2018 09:42, Peter Xu wrote: > I encountered an event loss problem during unplugging vfio devices: > > https://bugzilla.redhat.com/show_bug.cgi?id=1531393 > > I thought it should be a simple VT-d issue but I was wrong. The whole > debugging leads me to these patches. > > Basically I t

[Qemu-devel] [PATCH] target/m68k: fix TCG variable double free

2018-01-19 Thread Laurent Vivier
t64 is also unconditionally freed after the switch () { ... } Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index f0e86a73d4..ea18df940a 100644 --- a/target/m68k/translate.c +++ b/tar

Re: [Qemu-devel] [RFC PATCH v4 12/23] cpus: push BQL lock to qemu_*_wait_io_event

2018-01-19 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 19/01/2018 09:44, Pavel Dovgalyuk wrote: > > static void qemu_wait_io_event(CPUState *cpu) > > { > > +qemu_mutex_lock_iothread(); > > + > > while (cpu_thread_is_idle(cpu)) { > > qemu_cond_wait(cpu->halt_cond, &qemu_global_m

Re: [Qemu-devel] [PATCH v2 1/1] s390x: fix storage attributes migration for non-small guests

2018-01-19 Thread Cornelia Huck
On Thu, 18 Jan 2018 18:51:44 +0100 Claudio Imbrenda wrote: > Fix storage attribute migration so that it does not fail for guests > with more than a few GB of RAM. > With such guests, the index in the buffer would go out of bounds, > usually by large amounts, thus receiving -EFAULT from the kernel

Re: [Qemu-devel] [PATCH] s390x/tcg: fixup TEST PROTECTION

2018-01-19 Thread Cornelia Huck
On Fri, 12 Jan 2018 13:54:52 +0100 David Hildenbrand wrote: > CC == 2 can only happen due to a protection exception, not if memory is > not available (PGM_ADDRESSING). So all PGM_ADDRESSING exceptions have to > be forwarded to the guest. > > Since the initial definition of TEST PROTECTION, we no

Re: [Qemu-devel] [RFC PATCH v4 13/23] cpus: only take BQL for sleeping threads

2018-01-19 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 19/01/2018 09:44, Pavel Dovgalyuk wrote: > > while (all_cpu_threads_idle()) { > > +qemu_mutex_lock_iothread(); > > stop_tcg_kick_timer(); > > qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex); > > +qemu_

Re: [Qemu-devel] [Qemu-trivial] [PATCH] build: fix typo in error message

2018-01-19 Thread Philippe Mathieu-Daudé
On 01/19/2018 07:32 AM, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé > --- > scripts/git-submodule.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh > index bc7224a27f..8

Re: [Qemu-devel] [PATCH] allow to build with older sed

2018-01-19 Thread Philippe Mathieu-Daudé
On 01/19/2018 06:28 AM, Daniel P. Berrange wrote: > On Fri, Jan 19, 2018 at 12:52:27AM -0700, Jan Beulich wrote: >> sed's -E option may not be supported by older distros. As there's no >> point using sed here at all, use just shell mechanisms to establish the >> variable values, starting from the s

Re: [Qemu-devel] [PATCH] target/m68k: fix TCG variable double free

2018-01-19 Thread Thomas Huth
On 19.01.2018 12:44, Laurent Vivier wrote: > t64 is also unconditionally freed after the switch () { ... } > > Signed-off-by: Laurent Vivier > --- > target/m68k/translate.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/target/m68k/translate.c b/target/m68k/translate.c > index f0e86a73

Re: [Qemu-devel] [PATCH v2 1/1] s390x: fix storage attributes migration for non-small guests

2018-01-19 Thread Christian Borntraeger
On 01/18/2018 06:51 PM, Claudio Imbrenda wrote: > Fix storage attribute migration so that it does not fail for guests > with more than a few GB of RAM. > With such guests, the index in the buffer would go out of bounds, > usually by large amounts, thus receiving -EFAULT from the kernel. > Migrati

Re: [Qemu-devel] [RFC PATCH v4 13/23] cpus: only take BQL for sleeping threads

2018-01-19 Thread Paolo Bonzini
On 19/01/2018 13:05, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 19/01/2018 09:44, Pavel Dovgalyuk wrote: >>> while (all_cpu_threads_idle()) { >>> +qemu_mutex_lock_iothread(); >>> stop_tcg_kick_timer(); >>> qemu_cond_wait(cpu->halt

Re: [Qemu-devel] [PATCH v7 3/4] ui: fix alphabetical ordering of keymaps

2018-01-19 Thread Philippe Mathieu-Daudé
On 01/17/2018 01:41 PM, Daniel P. Berrange wrote: > The qcode-to-linux keymaps was accidentally added in the wrong place > by > > commit de80d78594b4c3767a12d8d42debcf12cbf85a5b > Author: Owen Smith > Date: Fri Nov 3 11:56:28 2017 + > > ui: generate qcode to linux mappings > > b

Re: [Qemu-devel] [PATCH] hw/char: remove legacy interface escc_init()

2018-01-19 Thread Philippe Mathieu-Daudé
On 01/18/2018 05:53 AM, Laurent Vivier wrote: > Move necessary stuff in escc.h and update type names. > Remove slavio_serial_ms_kbd_init(). > Fix code style problems reported by checkpatch.pl > Update mac_newworld, mac_oldworld and sun4m to use directly the > QDEV interface. > > Signed-off-by: Lau

Re: [Qemu-devel] [RFC PATCH v4 13/23] cpus: only take BQL for sleeping threads

2018-01-19 Thread Pavel Dovgalyuk
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, January 19, 2018 3:20 PM > To: Pavel Dovgalyuk; 'Pavel Dovgalyuk'; qemu-devel@nongnu.org > Cc: kw...@redhat.com; peter.mayd...@linaro.org; boost.li...@gmail.com; > quint...@redhat.com; > jasow...@redh

Re: [Qemu-devel] [RFC PATCH v4 13/23] cpus: only take BQL for sleeping threads

2018-01-19 Thread Paolo Bonzini
On 19/01/2018 13:25, Pavel Dovgalyuk wrote: >>> It means, that I'll have to fix all the has_work function to avoid races, >>> because x86_cpu_has_work may have them? >> Why only x86_cpu_has_work? >> >> Even reading cs->interrupt_request outside the mutex is unsafe. > All the vcpu function that acce

Re: [Qemu-devel] [PATCH v2 1/1] s390x: fix storage attributes migration for non-small guests

2018-01-19 Thread Cornelia Huck
On Fri, 19 Jan 2018 13:17:29 +0100 Christian Borntraeger wrote: > On 01/18/2018 06:51 PM, Claudio Imbrenda wrote: > > Fix storage attribute migration so that it does not fail for guests > > with more than a few GB of RAM. > > With such guests, the index in the buffer would go out of bounds, > > u

Re: [Qemu-devel] [RFC PATCH v4 13/23] cpus: only take BQL for sleeping threads

2018-01-19 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, January 19, 2018 3:26 PM > To: Pavel Dovgalyuk; 'Pavel Dovgalyuk'; qemu-devel@nongnu.org > Cc: kw...@redhat.com; peter.mayd...@linaro.org; boost.li...@gmail.com; > quint...@redhat.com; > jasow...@redhat.com; m...@redhat.com; zuban.

Re: [Qemu-devel] [PATCH V4 1/7] CAN bus simple messages transport implementation for QEMU

2018-01-19 Thread Philippe Mathieu-Daudé
On 01/14/2018 05:14 PM, p...@cmp.felk.cvut.cz wrote: > From: Pavel Pisa > > The CanBusState state structure is created for each > emulated CAN channel. Individual clients/emulated > CAN interfaces or host interface connection registers > to the bus by CanBusClientState structure. > > The CAN cor

Re: [Qemu-devel] [PULL v4 00/29] pc, pci, virtio: features, fixes, cleanups

2018-01-19 Thread Peter Maydell
On 18 January 2018 at 20:44, Michael S. Tsirkin wrote: > changes since v3: > - dropped vhost memory rework due to clang warnings > - dropped vhost memslot rework due to merge conflicts > > > The following changes since commit b4d6ed1c5ae519d3efb5297be3ef6625ca2a20f4: > > Merge remote-tracking br

[Qemu-devel] [PATCH] ide-test: test trim requests

2018-01-19 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- tests/ide-test.c | 71 1 file changed, 71 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index aa9de06..259f39f 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -52,6 +52,7 @@ enum {

Re: [Qemu-devel] [PATCH] hw/char: remove legacy interface escc_init()

2018-01-19 Thread Mark Cave-Ayland
On 18/01/18 08:53, Laurent Vivier wrote: Move necessary stuff in escc.h and update type names. Remove slavio_serial_ms_kbd_init(). Fix code style problems reported by checkpatch.pl Update mac_newworld, mac_oldworld and sun4m to use directly the QDEV interface. Signed-off-by: Laurent Vivier ---

[Qemu-devel] [RFC virtio-dev v2] vhost-user: add vhost-user device type

2018-01-19 Thread Stefan Hajnoczi
The vhost-user device backend facilitates vhost-user device emulation through vhost-user protocol exchanges and access to shared memory. Software-defined networking, storage, and other I/O appliances can provide services through this device. For more information about virtio-vhost-user, see https:

[Qemu-devel] [PATCH v2 0/8] discard blockstats

2018-01-19 Thread Anton Nefedov
v2: - rebased on top of series 'ide: abort TRIM operation for invalid range' (http://lists.nongnu.org/archive/html/qemu-devel/2017-12/msg01432.html) Now invalid trim requests are properly accounted - patches 1/2 - qapi fields regrouped together v1: http://lists.nongnu.org/archive/

  1   2   3   4   >