Re: [Qemu-devel] [PATCH RFC 2/2] tests/virtio-blk: add test for WRITE_ZEROES command

2019-01-29 Thread Liu, Changpeng
> -Original Message- > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > Sent: Wednesday, January 30, 2019 3:40 PM > To: Michael S. Tsirkin > Cc: Stefan Hajnoczi ; Thomas Huth ; > Stefano Garzarella ; Liu, Changpeng > ; Laurent Vivier ; Kevin Wolf > ; qemu-bl...@nongnu.org;

Re: [Qemu-devel] [PATCH v3 4/5] configure: Let SDL support be optional on OpenBSD

2019-01-29 Thread Gerd Hoffmann
Hi, > sdl) > if test "$sdl" = "no"; then > -error_exit "sdl not found or disabled, can not use sdl audio driver" > +echo "WARNING: SDL not found or disabled, can not use sdl audio > driver" > +audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/sdl *//g') Not

Re: [Qemu-devel] [PATCH v5 2/2] hw/arm: add Arm SBSA reference machine, devices part

2019-01-29 Thread Hongbo Zhang
On Tue, 29 Jan 2019 at 23:26, Peter Maydell wrote: > > On Mon, 28 Jan 2019 at 09:46, Hongbo Zhang wrote: > > > > On Tue, 22 Jan 2019 at 19:49, Peter Maydell > > wrote: > > > > > > On Fri, 7 Dec 2018 at 09:08, Hongbo Zhang wrote: > > > > +static void sbsa_ref_machine_done(Notifier *notifier,

Re: [Qemu-devel] [PATCH v3 1/5] hw/lm32: Move LM32 specific hardware out of common-obj list

2019-01-29 Thread Gerd Hoffmann
On Tue, Jan 29, 2019 at 04:00:25PM +0100, Philippe Mathieu-Daudé wrote: > The LM32 specific hardware is only used by the LM32 target, > it is pointless to compile those objects in other targets. I think the idea was to only move the critical object files from common-obj to obj (i.e. tmu2 only, or

Re: [Qemu-devel] [libvirt] Configuring pflash devices for OVMF firmware

2019-01-29 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 28 Jan 2019 at 12:40, Gerd Hoffmann wrote: >> The tricky part is the access control here. On physical hardware you >> typically have one flash rom, say 16M below 4G (on x86). >> >> Our pflash device doesn't allow to define multiple regions, so we use >> multiple

Re: [Qemu-devel] [PATCH RFC 2/2] tests/virtio-blk: add test for WRITE_ZEROES command

2019-01-29 Thread Stefan Hajnoczi
On Sun, Jan 27, 2019 at 01:42:03PM -0500, Michael S. Tsirkin wrote: > On Sun, Jan 27, 2019 at 12:57:20PM +, Stefan Hajnoczi wrote: > > On Fri, Jan 25, 2019 at 02:17:01PM -0500, Michael S. Tsirkin wrote: > > > On Fri, Jan 25, 2019 at 03:12:45PM +, Stefan Hajnoczi wrote: > > > > Based on the

[Qemu-devel] [PULL 7/8] usb-mtp: breakup MTP write into smaller chunks

2019-01-29 Thread Gerd Hoffmann
From: Bandan Das For every MTP_WRITE_BUF_SZ copied, this patch writes it to file before getting the next block of data. The file is kept opened for the duration of the operation but the sanity checks on the write operation are performed only once when the write operation starts. Additionally, we

Re: [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-29 Thread Markus Armbruster
Let me reply to the "why is the cfi.pflash01 device so weird" part first, because that's relatively quick, and because it could easily distract us from the more important "how do we want to configure OVMF" part. I'll reply to that part later. Peter Maydell writes: > On Fri, 25 Jan 2019 at

[Qemu-devel] [PULL 8/8] usb-mtp: replace the homebrew write with qemu_write_full

2019-01-29 Thread Gerd Hoffmann
From: Bandan Das qemu_write_full takes care of partial blocking writes, as in cases of larger file sizes Suggested-by: Peter Maydell Signed-off-by: Bandan Das Message-id: 20190129131908.27924-4-...@redhat.com Signed-off-by: Gerd Hoffmann --- hw/usb/dev-mtp.c | 14 +++--- 1 file

[Qemu-devel] [PULL 1/8] usb: assign unique serial numbers to hid devices

2019-01-29 Thread Gerd Hoffmann
Windows guests have trouble dealing with usb devices having identical serial numbers. So, assign unique serial numbers to usb hid devices. All other usb devices have this already. In the past the fixed serial number has been used to indicate working remote setup to linux guests. Here is a bit

[Qemu-devel] [PULL 4/8] usb: XHCI shall not halt isochronous endpoints

2019-01-29 Thread Gerd Hoffmann
From: Yuri Benditovich According to the XHCI spec (4.10.2) the controller never halts isochronous endpoints. This commit prevent stop of isochronous streaming when sporadic errors status received from backends. Signed-off-by: Yuri Benditovich Message-id:

[Qemu-devel] [PULL 5/8] usb: implement XHCI underrun/overrun events

2019-01-29 Thread Gerd Hoffmann
From: Yuri Benditovich Implement underrun/overrun events of isochronous endpoints according to XHCI spec (4.10.3.1) Guest software restarts data streaming when receives these events. The XHCI reports these events using interrupter assigned to the slot (as these events do not have TRB), so

[Qemu-devel] [PULL 3/8] hw/usb: Fix LGPL information in the file headers

2019-01-29 Thread Gerd Hoffmann
From: Thomas Huth It's either "GNU *Library* General Public version 2" or "GNU Lesser General Public version *2.1*", but there was no "version 2.0" of the "Lesser" library. So assume that version 2.1 is meant here. Additionally, suggest that the user should have received a copy of the LGPL, and

[Qemu-devel] [PULL 0/8] Usb 20190130 patches

2019-01-29 Thread Gerd Hoffmann
The following changes since commit b4fbe1f65a4769c09e6bf2d79fc84360f840f40e: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190129' into staging (2019-01-29 12:00:19 +) are available in the git repository at: git://git.kraxel.org/qemu tags/usb-20190130-pull

[Qemu-devel] [PULL 6/8] usb-mtp: Reallocate buffer in multiples of MTP_WRITE_BUF_SZ

2019-01-29 Thread Gerd Hoffmann
From: Bandan Das This is a "pre-patch" to breaking up the write buffer for MTP writes. Instead of allocating a mtp buffer equal to size sent by the initiator, we start with a small size and reallocate multiples (of that small size) as needed. Signed-off-by: Bandan Das Message-id:

[Qemu-devel] [PULL 2/8] usb: dev-mtp: close fd in usb_mtp_object_readdir()

2019-01-29 Thread Gerd Hoffmann
From: Li Qiang Spotted by Coverity: CID 1397070 Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daudé Message-id: 20190103133113.49599-1-liq...@163.com [ kraxel: dropped chunk which adds close() after successful fdopendir() call, that is not needed according to

[Qemu-devel] [PATCH v3 2/3] arm: Instantiate NRF51 special NVM's and NVMC

2019-01-29 Thread Stefan Hajnoczi
From: Steffen Görtz Instantiates UICR, FICR, FLASH and NVMC in nRF51 SOC. Signed-off-by: Steffen Görtz Reviewed-by: Peter Maydell Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- include/hw/arm/nrf51_soc.h | 2 ++ hw/arm/nrf51_soc.c | 41

[Qemu-devel] [PATCH v3 3/3] tests/microbit-test: Add tests for nRF51 NVMC

2019-01-29 Thread Stefan Hajnoczi
From: Steffen Görtz Signed-off-by: Steffen Görtz Signed-off-by: Stefan Hajnoczi Acked-by: Thomas Huth --- tests/microbit-test.c | 108 ++ 1 file changed, 108 insertions(+) diff --git a/tests/microbit-test.c b/tests/microbit-test.c index

[Qemu-devel] [PATCH v3 1/3] hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories

2019-01-29 Thread Stefan Hajnoczi
From: Steffen Görtz 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 configuration, Bootloader address, Nordic

[Qemu-devel] [PATCH v3 0/3] arm: microbit Non-Volatile Memory Controller

2019-01-29 Thread Stefan Hajnoczi
v3: * Fix endianness of s->storage[], tested by Joel Stanley on big-endian ppc [Peter] * Fix off-by-one that prevented clearing the last page of flash * Add missing memory_region_flush_rom_device() call to flash_write() v2: * Add Patch 2 to call memory_region_flush_rom_device() from pflash

Re: [Qemu-devel] [PATCH v2 02/18] configure: Disable W^X on OpenBSD

2019-01-29 Thread Thomas Huth
On 2019-01-29 22:54, Eric Blake wrote: > On 1/29/19 11:53 AM, Philippe Mathieu-Daudé wrote: >> Since OpenBSD 6.0 [1], W^X is enforced by default [2]. >> TCG requires WX access. Disable W^X if it is available. >> This fixes: >> > >> configure | 11 +++ >> 1 file changed, 11 insertions(+)

[Qemu-devel] [PATCH] scripts: use git archive in archive-source

2019-01-29 Thread Gerd Hoffmann
Use git archive to create tarballs of qemu and submodules instead of cloning the repository and the submodules. This is a order of magnitude faster because it doesn't fetch the submodules from the internet each time the script runs. Signed-off-by: Gerd Hoffmann --- scripts/archive-source.sh |

Re: [Qemu-devel] [PATCH v5 3/6] libvhost-user: Support tracking inflight I/O in shared memory

2019-01-29 Thread Yongji Xie
On Wed, 30 Jan 2019 at 10:32, Jason Wang wrote: > > > On 2019/1/22 下午4:31, elohi...@gmail.com wrote: > > +static int > > +vu_queue_inflight_get(VuDev *dev, VuVirtq *vq, int desc_idx) > > +{ > > +if (!has_feature(dev->protocol_features, > > +VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)) { > >

[Qemu-devel] [RFC v1 1/3] intel_iommu: scalable mode emulation

2019-01-29 Thread Yi Sun
From: "Liu, Yi L" Intel(R) VT-d 3.0 spec introduces scalable mode address translation to replace extended context mode. This patch extends current emulator to support Scalable Mode which includes root table, context table and new pasid table format change. Now intel_iommu emulates both legacy

[Qemu-devel] [RFC v1 2/3] intel_iommu: add 256 bits qi_desc support

2019-01-29 Thread Yi Sun
From: "Liu, Yi L" Per Intel(R) VT-d 3.0, the qi_desc is 256 bits in Scalable Mode. This patch adds emulation of 256bits qi_desc. [Yi Sun is co-developer to rebase and refine the patch.] Signed-off-by: Yi Sun Signed-off-by: Liu, Yi L --- hw/i386/intel_iommu.c | 182

[Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-01-29 Thread Yi Sun
This patch adds an option to provide flexibility for user to expose Scalable Mode to guest. User could expose Scalable Mode to guest by the config as below: "-device intel-iommu,caching-mode=on,scalable-mode=on" The Linux iommu driver has supported scalable mode. Please refer below patch set:

[Qemu-devel] [RFC v1 0/3] intel_iommu: support scalable mode

2019-01-29 Thread Yi Sun
Intel vt-d rev3.0 [1] introduces a new translation mode called 'scalable mode', which enables PASID-granular translations for first level, second level, nested and pass-through modes. The vt-d scalable mode is the key ingredient to enable Scalable I/O Virtualization (Scalable IOV) [2] [3], which

Re: [Qemu-devel] [PATCH v4 2/8] target/ppc: rework vmrg{l, h}{b, h, w} instructions to use Vsr* macros

2019-01-29 Thread Mark Cave-Ayland
On 29/01/2019 23:05, Richard Henderson wrote: > On 1/29/19 11:17 AM, Mark Cave-Ayland wrote: >> +#define VMRG_DO(name, element, access, ofs) \ >> void helper_v##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ >> {

[Qemu-devel] [Bug 1519037] Re: qemu-i386 32-bit segfault

2019-01-29 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/1519037 Title: qemu-i386

Re: [Qemu-devel] [PATCH v5 1/6] vhost-user: Support transferring inflight buffer between qemu and backend

2019-01-29 Thread Yongji Xie
On Wed, 30 Jan 2019 at 12:07, Michael S. Tsirkin wrote: > > On Wed, Jan 30, 2019 at 11:49:56AM +0800, Yongji Xie wrote: > > On Wed, 30 Jan 2019 at 10:30, Michael S. Tsirkin wrote: > > > > > > On Wed, Jan 30, 2019 at 10:07:28AM +0800, Yongji Xie wrote: > > > > On Tue, 29 Jan 2019 at 22:15,

Re: [Qemu-devel] [PATCH v5 1/6] vhost-user: Support transferring inflight buffer between qemu and backend

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 11:49:56AM +0800, Yongji Xie wrote: > On Wed, 30 Jan 2019 at 10:30, Michael S. Tsirkin wrote: > > > > On Wed, Jan 30, 2019 at 10:07:28AM +0800, Yongji Xie wrote: > > > On Tue, 29 Jan 2019 at 22:15, Michael S. Tsirkin wrote: > > > > > > > > On Tue, Jan 29, 2019 at

Re: [Qemu-devel] [PATCH v8 0/2] qemu-img info lists bitmap directory entries

2019-01-29 Thread Eric Blake
On 1/28/19 12:40 PM, Andrey Shinkevich wrote: > Here is the update for the bitmap extension of the qcow2 specific > information as the output of the 'qemu-img info' command. > The version #7 was in email with the message ID: > <1544698788-52893-1-git-send-email-andrey.shinkev...@virtuozzo.com> >

Re: [Qemu-devel] [PATCH v5 3/6] libvhost-user: Support tracking inflight I/O in shared memory

2019-01-29 Thread Yongji Xie
On Wed, 30 Jan 2019 at 10:32, Jason Wang wrote: > > > On 2019/1/22 下午4:31, elohi...@gmail.com wrote: > > +static int > > +vu_queue_inflight_get(VuDev *dev, VuVirtq *vq, int desc_idx) > > +{ > > +if (!has_feature(dev->protocol_features, > > +VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)) { > >

Re: [Qemu-devel] [PATCH] arm: Clarify the logic of set_pc()

2019-01-29 Thread Stefan Hajnoczi
On Tue, Jan 29, 2019 at 03:18:17PM +0300, Julia Suvorova wrote: > Until now, the set_pc logic was unclear, which raised questions about > whether it should be used directly, applying a value to PC or adding > additional checks, for example, set the Thumb bit in Arm cpu. Let's set > the set_pc

Re: [Qemu-devel] [PATCH v5 1/6] vhost-user: Support transferring inflight buffer between qemu and backend

2019-01-29 Thread Yongji Xie
On Wed, 30 Jan 2019 at 10:30, Michael S. Tsirkin wrote: > > On Wed, Jan 30, 2019 at 10:07:28AM +0800, Yongji Xie wrote: > > On Tue, 29 Jan 2019 at 22:15, Michael S. Tsirkin wrote: > > > > > > On Tue, Jan 29, 2019 at 02:15:35PM +0800, Yongji Xie wrote: > > > > On Tue, 29 Jan 2019 at 12:26,

Re: [Qemu-devel] [PATCH v5 0/6] vhost-user-blk: Add support for backend reconnecting

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 10:29:10AM +0800, Jason Wang wrote: > > On 2019/1/22 下午4:31, elohi...@gmail.com wrote: > > From: Xie Yongji > > > > This patchset is aimed at supporting qemu to reconnect > > vhost-user-blk backend after vhost-user-blk backend crash or > > restart. > > > > The patch 1

Re: [Qemu-devel] [PATCH] iothread: fix iothread hang when stop too soon

2019-01-29 Thread Stefan Hajnoczi
On Tue, Jan 29, 2019 at 01:14:32PM +0800, Peter Xu wrote: > Lukas reported an hard to reproduce QMP iothread hang on s390 that > QEMU might hang at pthread_join() of the QMP monitor iothread before > quitting: > > Thread 1 > #0 0x03ffad10932c in pthread_join > #1 0x000109e95750 in

[Qemu-devel] [PULL 5/6] trace: improve runstate tracing

2019-01-29 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy Trace previous state, move tracepoint to runstate_set start (to cover all cases for debugging), add string representations of traced states. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20190124125154.474650-1-vsement...@virtuozzo.com

[Qemu-devel] [PULL 6/6] trace: rerun tracetool after ./configure changes

2019-01-29 Thread Stefan Hajnoczi
Autogenerated code in trace.h/trace.c and friends is specific to the config-host.mak TRACE_BACKENDS setting and must be regenerated when ./configure --enable-trace-backend= changes settings. This patch ensures that changes to TRACE_BACKENDS are detected. For example, the trace-root.h file is now

[Qemu-devel] [PULL 4/6] trace: add ability to do simple printf logging via systemtap

2019-01-29 Thread Stefan Hajnoczi
From: Daniel P. Berrangé The dtrace systemtap trace backend for QEMU is very powerful but it is also somewhat unfriendly to users who aren't familiar with systemtap, or who don't need its power right now. stap -e "some strange script" The 'log' backend for QEMU by comparison is very

[Qemu-devel] [PULL 3/6] trace: forbid use of %m in trace event format strings

2019-01-29 Thread Stefan Hajnoczi
From: Daniel P. Berrangé The '%m' format instructs glibc's printf()/syslog() implementation to insert the contents of strerror(errno). Since this is a glibc extension it should generally be avoided in QEMU due to need for portability to a variety of platforms. Even though vfio is Linux-only

[Qemu-devel] [PULL 2/6] trace: enforce that every trace-events file has a final newline

2019-01-29 Thread Stefan Hajnoczi
From: Daniel P. Berrangé When generating the trace-events-all file, the build system simply concatenates all the individual trace-events files. If any one of those files does not have a final newline, the printf format string will have the contents of the first line of the next file appended to

[Qemu-devel] [PULL 1/6] display: ensure qxl log_buf is a nul terminated string

2019-01-29 Thread Stefan Hajnoczi
From: Daniel P. Berrangé The QXL_IO_LOG command allows the guest to send log messages to the host via a buffer in the QXLRam struct. QEMU prints these to the console if the qxl 'guestdebug' option is set to non-zero. It will also feed them to the trace subsystem if any backends are built-in. In

[Qemu-devel] [PULL 0/6] Tracing patches

2019-01-29 Thread Stefan Hajnoczi
The following changes since commit f6b06fcceef465de0cf2514c9f76fe0192896781: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190121-pull-request' into staging (2019-01-23 17:57:47 +) are available in the Git repository at: git://github.com/stefanha/qemu.git

[Qemu-devel] [PATCH V2] test-filter-mirror: pass UNIX domain socket through fd

2019-01-29 Thread Jason Wang
The tests tries to let qemu server mode to process the connection which turns out to be racy after commit 8258292e18c3 ("monitor: Remove "x-oob", offer capability "oob" unconditionally"). This is because the filter may try to mirror the packets before UNIX socket object is ready (connected was set

Re: [Qemu-devel] [PATCH v5 3/6] libvhost-user: Support tracking inflight I/O in shared memory

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 10:31:49AM +0800, Jason Wang wrote: > > On 2019/1/22 下午4:31, elohi...@gmail.com wrote: > > +static int > > +vu_queue_inflight_get(VuDev *dev, VuVirtq *vq, int desc_idx) > > +{ > > +if (!has_feature(dev->protocol_features, > > +

Re: [Qemu-devel] [Qemu-block] [RFC PATCH] block: local qiov helper

2019-01-29 Thread Stefan Hajnoczi
On Tue, Jan 29, 2019 at 01:34:48PM +0100, Kevin Wolf wrote: > Am 29.01.2019 um 12:18 hat Vladimir Sementsov-Ogievskiy geschrieben: > > 29.01.2019 13:32, Stefan Hajnoczi wrote: > > > On Tue, Jan 29, 2019 at 6:24 PM Vladimir Sementsov-Ogievskiy > > > wrote: > > >> 29.01.2019 6:31, Stefan Hajnoczi

[Qemu-devel] [PATCH] i386, acpi: cleanup build_facs by removing second unused argument

2019-01-29 Thread Wei Yang
The second argument of build_facs() is not used, just remove it. Signed-off-by: Wei Yang --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 236a20eaa8..023729c1f2 100644 --- a/hw/i386/acpi-build.c

Re: [Qemu-devel] [PATCH] iothread: fix iothread hang when stop too soon

2019-01-29 Thread Peter Xu
On Tue, Jan 29, 2019 at 05:20:40PM +0100, Markus Armbruster wrote: > Marc-André (cc'ed) recently fixed a deadlock (commit 34f1f3e06d8 > "monitor: avoid potential dead-lock when cleaning up"). Looks like we > got more. Yes, and a few tests too. Hopefully these fallouts can settle soon before the

Re: [Qemu-devel] [PATCH] trace: rerun tracetool after ./configure changes

2019-01-29 Thread Stefan Hajnoczi
On Tue, Jan 29, 2019 at 10:53:43AM +0800, Stefan Hajnoczi wrote: > Autogenerated code in trace.h/trace.c and friends is specific to the > config-host.mak TRACE_BACKENDS setting and must be regenerated when > ./configure --enable-trace-backend= changes settings. > > This patch ensures that changes

[Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-01-29 Thread Jim Wilson
The gdb CSR xml file has registers in documentation order, not numerical order, so we need a table to map the register numbers. This also adds fairly standard gdb hooks to access xml specified registers. Signed-off-by: Jim Wilson --- target/riscv/cpu.c | 9 +- target/riscv/cpu.h |

[Qemu-devel] [PATCH 4/5 v3] RISC-V: Add debug support for accessing CSRs.

2019-01-29 Thread Jim Wilson
Adds a debugger field to CPURISCVState. Disable mode checks in riscv_csrrw when true. Signed-off-by: Jim Wilson --- target/riscv/cpu.h | 3 +++ target/riscv/csr.c | 16 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h

[Qemu-devel] [PATCH 3/5 v3] RISC-V: Fixes to CSR_* register macros.

2019-01-29 Thread Jim Wilson
This adds some missing CSR_* register macros, and documents some as being priv v1.9.1 specific. Signed-off-by: Jim Wilson --- target/riscv/cpu_bits.h | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu_bits.h

[Qemu-devel] [PATCH 2/5 v3] RISC-V: Add 64-bit gdb xml files.

2019-01-29 Thread Jim Wilson
Signed-off-by: Jim Wilson --- configure | 1 + gdb-xml/riscv-64bit-cpu.xml | 43 gdb-xml/riscv-64bit-csr.xml | 250 gdb-xml/riscv-64bit-fpu.xml | 52 + 4 files changed, 346 insertions(+) create mode 100644

[Qemu-devel] [PATCH 1/5 v3] RISC-V: Add 32-bit gdb xml files.

2019-01-29 Thread Jim Wilson
Signed-off-by: Jim Wilson --- configure | 1 + gdb-xml/riscv-32bit-cpu.xml | 43 gdb-xml/riscv-32bit-csr.xml | 250 gdb-xml/riscv-32bit-fpu.xml | 46 4 files changed, 340 insertions(+) create mode 100644

Re: [Qemu-devel] [PATCH] iothread: fix iothread hang when stop too soon

2019-01-29 Thread Peter Xu
On Tue, Jan 29, 2019 at 03:44:05PM +0100, Thomas Huth wrote: [...] > I ran this on s390x with Lukáš' reproducer for a while now, and so far I > haven't seen any hangs anymore. Thus this seems to fix the issue as far > as I can see, thanks! > > Tested-by: Thomas Huth Thanks for the quick

Re: [Qemu-devel] [PATCH v11 3/3] docs: Added MAP_SYNC documentation

2019-01-29 Thread Yi Zhang
On 2019-01-29 at 09:09:54 -0500, Michael S. Tsirkin wrote: > On Tue, Jan 29, 2019 at 10:49:18PM +0800, Zhang, Yi wrote: > > From: Zhang Yi > > > > Signed-off-by: Zhang Yi > > --- > > docs/nvdimm.txt | 29 - > > qemu-options.hx | 4 > > 2 files changed, 32

[Qemu-devel] [PATCH 0/5 v3] RISC-V: Add gdb xml files and gdbstub support.

2019-01-29 Thread Jim Wilson
This is the 3rd version of the patch set, updated as per the review from Richard and Alistair, and updated for current top of tree. Parts 1 and 2 are the same. Part 3 is smaller because some of it was moved to part 5. Part 5 is bigger because it received part of part 3. Parts 4 and 5 have

Re: [Qemu-devel] [PATCH v11 2/3] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2019-01-29 Thread Yi Zhang
On 2019-01-29 at 01:55:06 -0500, Pankaj Gupta wrote: > > > > > From: Zhang Yi > > > > When a file supporting DAX is used as vNVDIMM backend, mmap it with > > MAP_SYNC flag in addition which can ensure file system metadata > > synced in each guest writes to the backend file, without other QEMU

Re: [Qemu-devel] [PATCH v5 3/6] libvhost-user: Support tracking inflight I/O in shared memory

2019-01-29 Thread Jason Wang
On 2019/1/22 下午4:31, elohi...@gmail.com wrote: +static int +vu_queue_inflight_get(VuDev *dev, VuVirtq *vq, int desc_idx) +{ +if (!has_feature(dev->protocol_features, +VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)) { +return 0; +} + +if (unlikely(!vq->inflight)) { +

Re: [Qemu-devel] [PATCH v5 0/6] vhost-user-blk: Add support for backend reconnecting

2019-01-29 Thread Jason Wang
On 2019/1/22 下午4:31, elohi...@gmail.com wrote: From: Xie Yongji This patchset is aimed at supporting qemu to reconnect vhost-user-blk backend after vhost-user-blk backend crash or restart. The patch 1 introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to

Re: [Qemu-devel] [PATCH v5 1/6] vhost-user: Support transferring inflight buffer between qemu and backend

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 10:07:28AM +0800, Yongji Xie wrote: > On Tue, 29 Jan 2019 at 22:15, Michael S. Tsirkin wrote: > > > > On Tue, Jan 29, 2019 at 02:15:35PM +0800, Yongji Xie wrote: > > > On Tue, 29 Jan 2019 at 12:26, Michael S. Tsirkin wrote: > > > > > > > > On Tue, Jan 29, 2019 at

Re: [Qemu-devel] [PATCH v11 2/3] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 06:36:46PM +0800, Yi Zhang wrote: > On 2019-01-29 at 08:50:46 -0500, Michael S. Tsirkin wrote: > > On Tue, Jan 29, 2019 at 10:49:09PM +0800, Zhang, Yi wrote: > > > From: Zhang Yi > > > > > > When a file supporting DAX is used as vNVDIMM backend, mmap it with > > >

Re: [Qemu-devel] [PATCH v5 1/6] vhost-user: Support transferring inflight buffer between qemu and backend

2019-01-29 Thread Yongji Xie
On Tue, 29 Jan 2019 at 22:15, Michael S. Tsirkin wrote: > > On Tue, Jan 29, 2019 at 02:15:35PM +0800, Yongji Xie wrote: > > On Tue, 29 Jan 2019 at 12:26, Michael S. Tsirkin wrote: > > > > > > On Tue, Jan 29, 2019 at 12:11:55PM +0800, Stefan Hajnoczi wrote: > > > > On Tue, Jan 22, 2019 at

Re: [Qemu-devel] [PATCH v11 2/3] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2019-01-29 Thread Yi Zhang
On 2019-01-29 at 08:50:46 -0500, Michael S. Tsirkin wrote: > On Tue, Jan 29, 2019 at 10:49:09PM +0800, Zhang, Yi wrote: > > From: Zhang Yi > > > > When a file supporting DAX is used as vNVDIMM backend, mmap it with > > MAP_SYNC flag in addition which can ensure file system metadata > > synced in

Re: [Qemu-devel] [PATCH] tests/microbit-test: Add tests for nRF51 NVMC

2019-01-29 Thread Stefan Hajnoczi
On Tue, Jan 29, 2019 at 7:47 PM Peter Maydell wrote: > On Mon, 28 Jan 2019 at 19:01, Peter Maydell wrote: > > This assertion fails on PPC64 hosts: > > ERROR:/home/pm215/qemu/tests/microbit-test.c:181:fill_and_erase: > > assertion failed (qtest_readl(qts, base + i * 4) == i): (16777216 == > > 1)

[Qemu-devel] [PATCH v6 63/73] ppc: convert to cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: David Gibson Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota --- target/ppc/translate_init.inc.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH qemu] spapr: Drop unused parameters from fdt building helper

2019-01-29 Thread Alexey Kardashevskiy
spapr_load_rtas() handles now RTAS address and size information in the FDT so drop them from spapr_build_fdt(). While we are here, fix a small typo. Fixes: 2cac78c12ade9 "pseries: Consolidate RTAS loading" Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 8 +++- 1 file changed, 3

[Qemu-devel] [PATCH v6 44/73] ppc: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: David Gibson Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota --- hw/ppc/ppc.c| 2 +- target/ppc/excp_helper.c| 2 +- target/ppc/kvm.c| 4 ++-- target/ppc/translate_init.inc.c | 14

[Qemu-devel] [PATCH v6 65/73] s390x: convert to cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Cornelia Huck Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/s390x/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/s390x/cpu.c

[Qemu-devel] [PATCH v6 73/73] cputlb: queue async flush jobs without the BQL

2019-01-29 Thread Emilio G. Cota
This yields sizable scalability improvements, as the below results show. Host: Two Intel E5-2683 v3 14-core CPUs at 2.00 GHz (Haswell) Workload: Ubuntu 18.04 ppc64 compiling the linux kernel with "make -j N", where N is the number of cores in the guest. Speedup vs a single

[Qemu-devel] [PATCH v6 38/73] arm: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Peter Maydell Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/arm/cpu.c | 6 +++--- target/arm/helper.c | 16 +++- target/arm/machine.c | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git

[Qemu-devel] [PATCH v6 70/73] cpu: protect CPU state with cpu->lock instead of the BQL

2019-01-29 Thread Emilio G. Cota
Use the per-CPU locks to protect the CPUs' state, instead of using the BQL. These locks are uncontended (they are mostly acquired by the corresponding vCPU thread), so acquiring them is cheaper than acquiring the BQL, which particularly in MTTCG can be contended at high core counts. In this

[Qemu-devel] [PATCH v6 69/73] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle

2019-01-29 Thread Emilio G. Cota
This function is only called from TCG rr mode, so add a prefix to mark this as well as an assertion. Signed-off-by: Emilio G. Cota --- cpus.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index aee129c0b3..0d255c2655 100644 --- a/cpus.c +++

[Qemu-devel] [PATCH v6 71/73] cpus-common: release BQL earlier in run_on_cpu

2019-01-29 Thread Emilio G. Cota
After completing the conversion to per-CPU locks, there is no need to release the BQL after having called cpu_kick. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- cpus-common.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git

[Qemu-devel] [PATCH v6 68/73] xtensa: convert to cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Max Filippov Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/xtensa/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index d4ca35e6cc..5f3b4a70b0

[Qemu-devel] [PATCH v6 62/73] cpu: introduce cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
It will gain some users soon. Suggested-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index

[Qemu-devel] [PATCH v6 67/73] sparc: convert to cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Acked-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu.c

[Qemu-devel] [PATCH v6 61/73] cpu: call .cpu_has_work with the CPU lock held

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 4a87c1fef7..96a5d0cb94 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -85,7

[Qemu-devel] [PATCH v6 72/73] cpu: add async_run_on_cpu_no_bql

2019-01-29 Thread Emilio G. Cota
Some async jobs do not need the BQL. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 14 ++ cpus-common.c | 39 ++- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/include/qom/cpu.h

[Qemu-devel] [PATCH v6 64/73] mips: convert to cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Aurelien Jarno Cc: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/mips/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index

[Qemu-devel] [PATCH v6 52/73] s390x: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Cornelia Huck Cc: Christian Borntraeger Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Cornelia Huck Signed-off-by: Emilio G. Cota --- hw/intc/s390_flic.c | 2 +- target/s390x/cpu.c | 2 +- 2 files changed, 2

[Qemu-devel] [PATCH v6 66/73] riscv: convert to cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Reviewed-by: Palmer Dabbelt Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/riscv/cpu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v6 58/73] microblaze: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/microblaze/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 5596cd5485..0cdd7fe917 100644

[Qemu-devel] [PATCH v6 54/73] moxie: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Anthony Green Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/moxie/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/moxie/cpu.c b/target/moxie/cpu.c index 8d67eb6727..bad92cfc61 100644 ---

[Qemu-devel] [PATCH v6 57/73] unicore32: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Guan Xuetao Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/unicore32/cpu.c | 2 +- target/unicore32/softmmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c index

[Qemu-devel] [PATCH v6 36/73] s390x: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Cornelia Huck Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Reviewed-by: Cornelia Huck Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota ---

[Qemu-devel] [PATCH v6 00/73] per-CPU locks

2019-01-29 Thread Emilio G. Cota
v5: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg02979.html For context, the goal of this series is to substitute the BQL for the per-CPU locks in many places, notably the execution loop in cpus.c. This leads to better scalability for MTTCG, since CPUs don't have to acquire a

[Qemu-devel] [PATCH v6 56/73] openrisc: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Stafford Horne Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/openrisc/cputimer.c | 2 +- target/openrisc/cpu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/openrisc/cputimer.c b/hw/openrisc/cputimer.c index

[Qemu-devel] [PATCH v6 33/73] ppc: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
From: Paolo Bonzini Cc: David Gibson Cc: qemu-...@nongnu.org Acked-by: David Gibson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/ppc/excp_helper.c | 2 +- 1 file changed,

[Qemu-devel] [PATCH v6 51/73] nios: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Chris Wulff Cc: Marek Vasut Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/nios2/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index fbfaa2ce26..49a75414d3 100644 ---

[Qemu-devel] [PATCH v6 59/73] accel/tcg: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 15 --- accel/tcg/tcg-all.c | 12 +--- accel/tcg/translate-all.c | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git

[Qemu-devel] [PATCH v6 50/73] mips: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/mips/cpu.c | 7 --- target/mips/kvm.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index

[Qemu-devel] [PATCH v6 53/73] alpha: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/alpha/cpu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 1fd95d6c0f..cebd459251 100644 --- a/target/alpha/cpu.c +++

[Qemu-devel] [PATCH v6 43/73] i386/hvf: convert to cpu_request_interrupt

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/hvf/hvf.c| 8 +--- target/i386/hvf/x86hvf.c | 26 +++--- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index

[Qemu-devel] [PATCH v6 35/73] i386: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
From: Paolo Bonzini Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/i386/hax-all.c| 4 ++-- target/i386/hvf/x86hvf.c | 8 target/i386/kvm.c| 14 +++--- target/i386/seg_helper.c | 13

[Qemu-devel] [PATCH v6 55/73] sparc: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota --- hw/sparc64/sparc64.c | 4 ++-- target/sparc/cpu.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH v6 48/73] lm32: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Michael Walle Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/lm32/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/lm32/cpu.c b/target/lm32/cpu.c index b7499cb627..1508bb6199 100644 --- a/target/lm32/cpu.c

[Qemu-devel] [PATCH v6 49/73] m68k: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Signed-off-by: Emilio G. Cota --- target/m68k/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 582e3a73b3..99a7eb4340 100644 ---

[Qemu-devel] [PATCH v6 41/73] i386/hax-all: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/hax-all.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index 518c6ff103..18da1808c6 100644 ---

  1   2   3   4   >