[Qemu-devel] [PULL 28/51] tests/boot-serial-test: Add support for the raspi2 machine

2018-01-16 Thread Paolo Bonzini
From: Thomas Huth The raspi2 machine supports loading firmware images, so we can easily load a small test sequence as raw binary blob here to test the UART. Signed-off-by: Thomas Huth Message-Id: <1512031988-32490-8-git-send-email-th...@redhat.com>

[Qemu-devel] [PULL 30/51] target/i386: hax: change to use x86_update_hflags

2018-01-16 Thread Paolo Bonzini
From: Tao Wu Change to use x86_update_hflags instead of keeping another copy at hax side. This also fix bug like HF_CPL_MASK should be SS.DPL, not CS.DPL. Signed-off-by: Tao Wu Message-Id: <20180110195056.85403-2-lep...@google.com> Signed-off-by: Paolo

[Qemu-devel] [PULL 34/51] scripts/qemu-gdb/timers.py: new helper to dump timer state

2018-01-16 Thread Paolo Bonzini
From: Alex Bennée This introduces the qemu-gdb command "qemu timers" which will dump the state of the main timers in the system. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 46/51] find_ram_offset: Add comments and tracing

2018-01-16 Thread Paolo Bonzini
From: "Dr. David Alan Gilbert" Add some comments so I can understand the various nested loops. Add some tracing so I can see what they're doing. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20180105170138.23357-2-dgilb...@redhat.com>

[Qemu-devel] [PULL 33/51] scripts/qemu-gdb: add simple tcg lock status helper

2018-01-16 Thread Paolo Bonzini
From: Alex Bennée Add a simple helper to dump lock state. Signed-off-by: Alex Bennée Signed-off-by: Paolo Bonzini --- scripts/qemu-gdb.py| 3 ++- scripts/qemugdb/tcg.py | 46

[Qemu-devel] [PATCH v2 0/4] coroutine-lock: polymorphic CoQueue

2018-01-16 Thread Paolo Bonzini
There are cases in which a queued coroutine must be restarted from non-coroutine context (with qemu_co_enter_next). In this cases, qemu_co_enter_next also needs to be thread-safe, but it cannot use a CoMutex and so cannot qemu_co_queue_wait. This happens in curl (which right now is rolling its

[Qemu-devel] [PULL 50/51] util/qemu-thread-*: add qemu_lock, locked and unlock trace events

2018-01-16 Thread Paolo Bonzini
From: Alex Bennée Signed-off-by: Alex Bennée Signed-off-by: Paolo Bonzini --- include/qemu/thread.h| 39 +++ util/qemu-thread-posix.c | 21 -

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

2018-01-16 Thread Zhoujian (jay)
VHOST_USER_CREATE_CRYPTO_SESSION and VHOST_USER_CLOSE_CRYPTO_SESSION are new added messages, they should be sent only when VHOST_USER_PROTOCOL_F_CRYPTO_SESSION feature has been successfully negotiated. The differs between v2 and v3 are listed below, pls review, thanks! --- diff --git

[Qemu-devel] [PULL 38/51] net: Drop unusual use of do { } while (0);

2018-01-16 Thread Paolo Bonzini
From: Eric Blake For a couple of macros in pcnet.c, we have to provide a new scope to avoid compiler warnings about declarations in the middle of a switch statement that aren't in a sub-scope. But use of 'do { ... } while (0);' merely to provide that new scope is arcane

Re: [Qemu-devel] [PATCHv2 1/2] spapr: Allow some cases where we can't set VSMT mode in the kernel

2018-01-16 Thread Greg Kurz
On Tue, 16 Jan 2018 23:24:32 +1100 David Gibson wrote: > On Tue, Jan 16, 2018 at 10:20:18AM +0100, Greg Kurz wrote: > > On Tue, 16 Jan 2018 15:47:13 +1100 > > David Gibson wrote: > > > > > At present if we require a vsmt mode that's

[Qemu-devel] [PATCH 4/4] curl: convert to CoQueue

2018-01-16 Thread Paolo Bonzini
Now that CoQueues can use a QemuMutex for thread-safety, there is no need for curl to roll its own coroutine queue. Coroutines can be placed directly on the queue instead of using a list of CURLAIOCBs. Signed-off-by: Paolo Bonzini --- block/curl.c | 20

[Qemu-devel] [PULL 42/51] tests: Avoid 'do/while(false); ' in vhost-user-bridge

2018-01-16 Thread Paolo Bonzini
From: Eric Blake Use of a do/while(0) loop as a way to allow break statements in the middle of execute-once code is unusual. More typical is the use of goto for early exits, with a label at the end of the execute-once code, rather than nesting code in a scope; however, the

Re: [Qemu-devel] [PATCH v4 12/14] i.MX: Add i.MX7 SOC implementation.

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 01:37, Andrey Smirnov wrote: > The following interfaces are partially or fully emulated: > > * up to 2 Cortex A9 cores (SMP works with PSCI) > * A7 MPCORE (identical to A15 MPCORE) > * 4 GPTs modules > * 7 GPIO controllers > * 2

[Qemu-devel] [PULL 45/51] cpu_physical_memory_sync_dirty_bitmap: Another alignment fix

2018-01-16 Thread Paolo Bonzini
From: "Dr. David Alan Gilbert" This code has an optimised, word aligned version, and a boring unaligned version. My commit f70d345 fixed one alignment issue, but there's another. The optimised version operates on 'longs' dealing with (typically) 64 pages at a time,

Re: [Qemu-devel] [PATCH v4 03/14] i.MX: Add code to emulate i.MX7 CCM, PMU and ANALOG IP blocks

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 01:36, Andrey Smirnov wrote: > Add minimal code needed to allow upstream Linux guest to boot. > > Cc: Peter Maydell > Cc: Jason Wang > Cc: Philippe Mathieu-Daudé > Cc:

[Qemu-devel] [PULL 49/51] cpu: flush TB cache when loading VMState

2018-01-16 Thread Paolo Bonzini
From: Pavel Dovgalyuk Flushing TB cache is required because TBs key in the cache may match different code which existed in the previous state. Signed-off-by: Pavel Dovgalyuk Signed-off-by: Maria Klimushenkova

Re: [Qemu-devel] [PATCH v5 08/14] qapi: force a UTF-8 locale for running Python

2018-01-16 Thread Eric Blake
On 01/16/2018 07:42 AM, Daniel P. Berrange wrote: > Python2 did not validate locale correctness when reading input data, so > would happily read UTF-8 data in non-UTF-8 locales. Python3 is strict so > if you try to read UTF-8 data in the C locale, it will raise an error > for any UTF-8 bytes that

Re: [Qemu-devel] [PULL v3 00/53] Misc changes for 2017-01-12

2018-01-16 Thread Paolo Bonzini
On 16/01/2018 14:50, Marc-André Lureau wrote: > Hi > > On Tue, Jan 16, 2018 at 1:06 PM, Peter Maydell > wrote: >> On 16 January 2018 at 11:58, Marc-André Lureau >> wrote: >>> Hi >>> >>> On Tue, Jan 16, 2018 at 12:25 PM, Peter Maydell >>>

[Qemu-devel] [PULL 47/51] find_ram_offset: Align ram_addr_t allocation on long boundaries

2018-01-16 Thread Paolo Bonzini
From: "Dr. David Alan Gilbert" The dirty bitmaps are built from 'long's and there is fast-path code for synchronising the case where the RAMBlock is aligned to the start of a long boundary. Align the allocation to this boundary to cause the fast path to be used. Offsets

[Qemu-devel] [PATCH 1/4] lockable: add QemuLockable

2018-01-16 Thread Paolo Bonzini
QemuLockable is a polymorphic lock type that takes an object and knows which function to use for locking and unlocking. The implementation could use C11 _Generic, but since the support is not very widespread I am instead using __builtin_choose_expr and __builtin_types_compatible_p, which are

Re: [Qemu-devel] [RFC 3/3] vhost-user: add VFIO based accelerators support

2018-01-16 Thread Alex Williamson
On Fri, 22 Dec 2017 14:41:51 +0800 Tiwei Bie wrote: > Signed-off-by: Tiwei Bie > --- > docs/interop/vhost-user.txt| 57 ++ > hw/vfio/common.c | 2 +- > hw/virtio/vhost-user.c | 381 >

[Qemu-devel] [PATCH v2 0/4] linux-user: select CPU type according ELF header values

2018-01-16 Thread Laurent Vivier
This idea has been suggested to me before by Philippe Mathieu-Daudé, and recently YunQiang Su has proposed a patch to manage the MIPS r6 case. Based on this, this series tries to clean-up the original patch, and introduces the use for m68k architecture and port the patch from YunQiang Su. v2:

[Qemu-devel] [PATCH v2 4/4] linux-user: MIPS set cpu to r6 CPU if binary is R6

2018-01-16 Thread Laurent Vivier
From: YunQiang Su So here we need to detect the version of binaries and set cpu_model for it. [lv: original patch modified to move code into cpu_get_model()] Signed-off-by: Laurent Vivier --- Notes: YunQiang Su, please add your Signed-off-by that was

Re: [Qemu-devel] [PULL v4 00/51] Misc patches for 2018-01-12

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 14:16, Paolo Bonzini wrote: > The following changes since commit 997eba28a3ed5400a80f754bf3a1c8044b75b9ff: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20180111' into staging (2018-01-11 > 14:34:41 +) > > are

Re: [Qemu-devel] [PATCH x86-next v2] target-i386: add PCID flag to Westmere, Sandy Bridge and Ivy Bridge

2018-01-16 Thread Daniel P. Berrange
On Tue, Jan 16, 2018 at 03:08:15PM -0200, Eduardo Habkost wrote: > [CCing Daniel] > > On Tue, Jan 16, 2018 at 04:33:00PM +0100, Kashyap Chamarthy wrote: > > On Tue, Jan 16, 2018 at 01:55:22PM +0100, Vincent Bernat wrote: > > > ❦ 16 janvier 2018 10:41 -0200, Eduardo Habkost  

[Qemu-devel] [PULL v2 01/34] MAINTAINERS: Add myself as maintainer to X86 machines

2018-01-16 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[Qemu-devel] [PULL v2 09/34] pci/shpc: Move function to generic header file

2018-01-16 Thread Michael S. Tsirkin
From: Yuval Shaia This function should be declared in generic header file so we can utilize it. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Yuval Shaia Signed-off-by: Marcel Apfelbaum Reviewed-by:

[Qemu-devel] [PULL v2 03/34] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-16 Thread Michael S. Tsirkin
From: Changpeng Liu This commit introduces a new vhost-user device for block, it uses a chardev to connect with the backend, same with Qemu virito-blk device, Guest OS still uses the virtio-blk frontend driver. To use it, start QEMU with command line like this:

[Qemu-devel] [PULL v2 16/34] vhost-user-test: fix features mask

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin VIRTIO_NET_F_MAC is a bit position, not a bit mask. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marc-André Lureau

[Qemu-devel] [PULL v2 28/34] tests: acpi: rename test_acpi_tables()/test_dst_table() to reflect its usage

2018-01-16 Thread Michael S. Tsirkin
From: Igor Mammedov Main purpose of test_dst_table() is loading a table from QEMU with checking that checksum in header matches actual one, rename it reflect main action it performs. Likewise test_acpi_tables() name is to broad, while the function only loads tables

[Qemu-devel] [PULL v2 20/34] vhost-user-test: use init_virtio_dev in multiqueue test

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin Now that init_virtio_dev() has been generalized to all cases, use it in test_multiqueue() to avoid code duplication. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by:

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

2018-01-16 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 --

[Qemu-devel] [PULL v2 26/34] tests: acpi: move tested tables array allocation outside of test_acpi_dsdt_table()

2018-01-16 Thread Michael S. Tsirkin
From: Igor Mammedov at best it's confusing that array for list of tables to be tested against reference tables is allocated within test_acpi_dsdt_table() and at worst it would just overwrite list of tables if they were added before test_acpi_dsdt_table(). Move array

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

2018-01-16 Thread Marc-André Lureau
Hi On Wed, Jan 10, 2018 at 2:18 PM, 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

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

2018-01-16 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

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

2018-01-16 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

Re: [Qemu-devel] [PATCH 0/4] Implements the Windows Hypervisor Platform accelerator

2018-01-16 Thread Justin Terry (VM) via Qemu-devel
Hey Stefan, Thanks for the feedback. I really apologize I forgot to run the checkpath.pl script before submission. I have fixed up all the issues and will send them in patch v2 once I fixup the other feedback. Thanks, Justin -Original Message- From: Stefan Weil

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

2018-01-16 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

Re: [Qemu-devel] [PULL 09/27] migration: calculate vCPU blocktime on dst side

2018-01-16 Thread Dr. David Alan Gilbert
* Max Reitz (mre...@redhat.com) wrote: > On 2018-01-15 12:52, Juan Quintela wrote: > > From: Alexey Perevalov > > > > This patch provides blocktime calculation per vCPU, > > as a summary and as a overlapped value for all vCPUs. > > > > This approach was suggested by

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

2018-01-16 Thread Michael S. Tsirkin
Changes from v1: 32 build fix vhost-user-blk build fix s390 qom fix include mem slot limit fix The following changes since commit f5213bd060b460c99e605472b7e03967db43: Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20180115' into staging (2018-01-15

[Qemu-devel] [PULL v2 02/34] vhost-user: add new vhost user messages to support virtio config space

2018-01-16 Thread Michael S. Tsirkin
From: Changpeng Liu Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be used for live migration of vhost user devices, also vhost user devices can benefit from the messages to get/set virtio config space from/to the I/O target. For the purpose to

[Qemu-devel] [PULL v2 10/34] vhost-user: fix multiple queue specification

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin The number of queues supported by the slave is queried with message VHOST_USER_GET_QUEUE_NUM, not with message VHOST_USER_GET_PROTOCOL_FEATURES. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PULL v2 04/34] contrib/libvhost-user: enable virtio config space messages

2018-01-16 Thread Michael S. Tsirkin
From: Changpeng Liu Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between QEMU host device and the I/O target.

[Qemu-devel] [PULL v2 07/34] virtio: postpone the execution of event_notifier_cleanup function

2018-01-16 Thread Michael S. Tsirkin
From: Gal Hammer Use the EventNotifier's cleanup callback function to execute the event_notifier_cleanup function after kvm unregistered the eventfd. This change supports running the virtio_bus_set_host_notifier function inside a memory region transaction. Otherwise, a

[Qemu-devel] [PULL v2 24/34] x86_iommu: Move machine check to x86_iommu_realize()

2018-01-16 Thread Michael S. Tsirkin
From: Mohammed Gamal Instead of having the same error checks in vtd_realize() and amdvi_realize(), move that over to the generic x86_iommu_realize(). Reviewed-by: Peter Xu Reviewed-by: Eduardo Habkost Signed-off-by: Mohammed Gamal

[Qemu-devel] [PULL v2 11/34] intel-iommu: Redefine macros to enable supporting 48 bit address width

2018-01-16 Thread Michael S. Tsirkin
From: Prasad Singamsetty The current implementation of Intel IOMMU code only supports 39 bits host/iova address width so number of macros use hard coded values based on that. This patch is to redefine them so they can be used with variable address widths. This

[Qemu-devel] [PULL v2 08/34] virtio: improve virtio devices initialization time

2018-01-16 Thread Michael S. Tsirkin
From: Gal Hammer The loading time of a VM is quite significant when its virtio devices use a large amount of virt-queues (e.g. a virtio-serial device with max_ports=511). Most of the time is spend in the creation of all the required event notifiers (ioeventfd and memory

[Qemu-devel] [PULL v2 14/34] ACPI/unit-test: Add a testcase for RAM allocation in numa node

2018-01-16 Thread Michael S. Tsirkin
From: Dou Liyang As QEMU supports the memory-less node, it is possible that there is no RAM in the first numa node(also be called as node0). eg: ... \ -m 128,slots=3,maxmem=1G \ -numa node -numa node,mem=128M \ But, this makes it hard for QEMU to build a

[Qemu-devel] [PULL v2 21/34] vhost: Build temporary section list and deref after commit

2018-01-16 Thread Michael S. Tsirkin
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

[Qemu-devel] [PULL v2 12/34] intel-iommu: Extend address width to 48 bits

2018-01-16 Thread Michael S. Tsirkin
From: Prasad Singamsetty The current implementation of Intel IOMMU code only supports 39 bits iova address width. This patch provides a new parameter (x-aw-bits) for intel-iommu to extend its address width to 48 bits but keeping the default the same (39 bits). The

[Qemu-devel] [PULL v2 17/34] vhost-user-test: extract read-guest-mem test from main loop

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin This patch makes read-guest-test consistent with other tests, i.e. create the test server in the test function. Reviewed-by: Marc-André Lureau Signed-off-by: Maxime Coquelin Reviewed-by:

[Qemu-devel] [PULL v2 22/34] vhost: Simplify ring verification checks

2018-01-16 Thread Michael S. Tsirkin
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

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

2018-01-16 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(-)

[Qemu-devel] [PULL v2 27/34] tests: acpi: init table descriptor in test_dst_table()

2018-01-16 Thread Michael S. Tsirkin
From: Igor Mammedov remove code duplication and make sure that table descriptor passed in for initialization is in expected state. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PULL v2 34/34] vhost: used_memslots refactoring

2018-01-16 Thread Michael S. Tsirkin
From: Jay Zhou Used_memslots is shared by vhost kernel and user, it is equal to dev->mem->nregions, which is correct for vhost kernel, but not for vhost user, the latter one uses memory regions that have file descriptor. E.g. a VM has a vhost-user NIC and 8(vhost user

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

2018-01-16 Thread Daniel P. Berrange
On Tue, Jan 16, 2018 at 06:56:20PM +0100, Marc-André Lureau wrote: > Hi > > On Wed, Jan 10, 2018 at 2:18 PM, Klim Kireev > wrote: > > The following behavior was observed for QEMU configured by libvirt > > to use guest agent as usual for the guests without

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

2018-01-16 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

[Qemu-devel] [PATCH v2 3/4] linux-user, m68k: select CPU according to ELF header values

2018-01-16 Thread Laurent Vivier
M680x0 doesn't support the same set of instructions as ColdFire, so we can't use "any" CPU type to execute m68020 instructions. We select CPU type ("m68020" or "any" for ColdFire) according to the ELF header. If we can't, we use by default the value used until now: "any". Signed-off-by: Laurent

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

2018-01-16 Thread Paolo Bonzini
On 10/01/2018 14:18, 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 device socket >

[Qemu-devel] [PATCH v2 2/4] linux-user: introduce functions to detect CPU type

2018-01-16 Thread Laurent Vivier
From: YunQiang Su Add a function to return ELF e_flags and use it to select the CPU model. [lv: split the patch and some cleanup in get_elf_eflags()] Signed-off-by: Laurent Vivier --- Notes: YunQiang Su, please add your Signed-off-by that was

[Qemu-devel] [PATCH v2 1/4] linux-user: Move CPU type name selection to a function

2018-01-16 Thread Laurent Vivier
Instead of a sequence of "#if ... #endif" move the selection to a function in linux-user/*/target_elf.h We can't add them in linux-user/*/target_cpu.h because we will need to include "elf.h" to use ELF flags with eflags, and including "elf.h" in "target_cpu.h" introduces some conflic in elfload.c

Re: [Qemu-devel] [PATCH v2 5/7] target/m68k: add moves

2018-01-16 Thread Laurent Vivier
Le 15/01/2018 à 19:37, Richard Henderson a écrit : > On 01/12/2018 04:43 PM, Laurent Vivier wrote: ... >> -dc->user = (env->sr & SR_S) == 0; >> +#if defined(CONFIG_SOFTMMU) >> +dc->user = (env->sr & SR_S) == 0 ? M68K_USER_FROM_MSR : 0; >> +dc->user |= (env->sfc & 4) == 0 ?

[Qemu-devel] [PULL v2 15/34] hw/acpi-build: Make next_base easy to follow

2018-01-16 Thread Michael S. Tsirkin
From: Dou Liyang It may be hard to read the assignment statement of "next_base", so S/next_base += (1ULL << 32) - pcms->below_4g_mem_size; /next_base = mem_base + mem_len; ... for readability. No functionality change. Signed-off-by: Dou Liyang

[Qemu-devel] [PULL v2 06/34] qemu: add a cleanup callback function to EventNotifier

2018-01-16 Thread Michael S. Tsirkin
From: Gal Hammer Adding a cleanup callback function to the EventNotifier struct which allows users to execute event_notifier_cleanup in a different context. Signed-off-by: Gal Hammer Reviewed-by: Michael S. Tsirkin Signed-off-by:

[Qemu-devel] [PULL v2 19/34] vhost-user-test: make features mask an init_virtio_dev() argument

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin The goal is to generalize the use of [un]init_virtio_dev() to all tests, which does not necessarily expose the same features set. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PULL v2 05/34] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2018-01-16 Thread Michael S. Tsirkin
From: Changpeng Liu This commit introduces a vhost-user-blk backend device, it uses UNIX domain socket to communicate with QEMU. The vhost-user-blk sample application should be used with QEMU vhost-user-blk-pci device. To use it, complie with: make vhost-user-blk and

[Qemu-devel] [PULL v2 13/34] hw/pci-bridge: fix QEMU crash because of pcie-root-port

2018-01-16 Thread Michael S. Tsirkin
From: Marcel Apfelbaum If we try to use more pcie_root_ports then available slots and an IO hint is passed to the port, QEMU crashes because we try to init the "IO hint" capability even if the device is not created. Fix it by checking for error before adding the capability, so

[Qemu-devel] [PULL v2 23/34] vhost: Merge sections added to temporary list

2018-01-16 Thread Michael S. Tsirkin
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

[Qemu-devel] [PULL v2 29/34] tests: acpi: add comments to fetch_rsdt_referenced_tables/data->tables usage

2018-01-16 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[Qemu-devel] [PULL v2 18/34] vhost-user-test: setup virtqueues in all tests

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin Only the multiqueue test setups the virtqueues. This patch generalizes the setup of virtqueues for all tests. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[Qemu-devel] [PULL v2 30/34] vhost-user: factor out msg head and payload

2018-01-16 Thread Michael S. Tsirkin
split header and payload into separate structures, to enable easier handling of alignment issues. Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 198 + 1 file changed, 101 insertions(+), 97 deletions(-) diff --git

[Qemu-devel] [PULL v2 25/34] x86_iommu: check if machine has PCI bus

2018-01-16 Thread Michael S. Tsirkin
From: Mohammed Gamal Starting qemu with qemu-system-x86_64 -S -M isapc -device {amd|intel}-iommu leads to a segfault. The code assume PCI bus is present and tries to access the bus structure without checking. Since Intel VT-d and AMDVI should only work with PCI, add a check

[Qemu-devel] [PULL v2 31/34] vhost-user: fix misaligned access to payload

2018-01-16 Thread Michael S. Tsirkin
We currently take a pointer to a misaligned field of a packed structure. clang reports this as a build warning. A fix is to keep payload in a separate structure, and access is it from there using a vectored write. Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c |

[Qemu-devel] [PULL v2 32/34] vhost: remove assertion to prevent crash

2018-01-16 Thread Michael S. Tsirkin
From: Jay Zhou QEMU will assert on vhost-user backed virtio device hotplug if QEMU is using more RAM regions than VHOST_MEMORY_MAX_NREGIONS (for example if it were started with a lot of DIMM devices). Fix it by returning error instead of asserting and let callers of

[Qemu-devel] [PULL v2 33/34] vhost: fix memslot limit check

2018-01-16 Thread Michael S. Tsirkin
From: Jay Zhou Since used_memslots will be updated to the actual value after registering memory listener for the first time, move the memslots limit checking to the right place. Reviewed-by: Igor Mammedov Signed-off-by: Jay Zhou

Re: [Qemu-devel] [PATCH v4 11/14] ARM: Add basic code to emulate A7MPCore DAP block

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 04:32, Philippe Mathieu-Daudé wrote: > You can just use add this in fsl_imx7_realize(): > > create_unimplemented_device("a7mpcore-dap-container", > FSL_IMX7_A7MPCORE_DAP_ADDR, > 0x10); > > to

Re: [Qemu-devel] [PATCH v5 10/14] configure: allow use of python 3

2018-01-16 Thread Eric Blake
On 01/16/2018 07:42 AM, Daniel P. Berrange wrote: > Signed-off-by: Daniel P. Berrange > --- > configure | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Reviewed-by: Eric Blake Presumably, you tested with this patch first in the series to

Re: [Qemu-devel] [PULL v1 0/8] Xilinx queue

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 14:49, Edgar E. Iglesias wrote: > This didn't show up on my clang testing, do you mind sharing configure line > and clang version you use? > > @Alistair, it does seem like the call to microblaze_load_kernel is passing > wrong arguments. > Can you

Re: [Qemu-devel] [PATCH v5 12/14] ui: update keycodemapdb to get py3 fixes

2018-01-16 Thread Eric Blake
On 01/16/2018 07:42 AM, Daniel P. Berrange wrote: > Signed-off-by: Daniel P. Berrange > --- > ui/keycodemapdb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > When posting submodule diffs, you can do: $ git submodule summary ui/keycodemapdb HEAD^ to come up with

Re: [Qemu-devel] [PATCH v4 08/14] i.MX: Add implementation of i.MX7 GPR IP block

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 01:37, Andrey Smirnov wrote: > Add minimal code needed to allow upstream Linux guest to boot. > > Cc: Peter Maydell > Cc: Jason Wang > Cc: Philippe Mathieu-Daudé > Cc:

[Qemu-devel] [PATCH v2] tests: acpi: fix FADT not being compared to reference table

2018-01-16 Thread Igor Mammedov
It turns out that FADT isn't actually tested for changes against reference table, since it happens to be the 1st table in RSDT which is currently ignored. Fix it by making sure that all tables from RSDT are added to test list. NOTE: FADT contains guest allocated pointers to FACS/DSDT, zero them

Re: [Qemu-devel] [PATCH v4 09/14] pci: Add support for Designware IP block

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 01:37, Andrey Smirnov wrote: > Add code needed to get a functional PCI subsytem when using in > conjunction with upstream Linux guest (4.13+). Tested to work against > "e1000e" (network adapter, using MSI interrupts) as well as > "usb-ehci" (USB

Re: [Qemu-devel] [PATCH] memory: update comments and fix some typos

2018-01-16 Thread Paolo Bonzini
On 16/01/2018 09:32, Zhoujian (jay) wrote: > Hi Paolo, > Maybe it is a little boring to review updated comments, but I think it is the > right thing to do, so could you have a look when you're free? On the contrary, it's useful! I just missed it among the email after new year's break. I queued

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 1/8] s390-ccw: update libc

2018-01-16 Thread Collin L. Walling
On 01/16/2018 06:07 AM, Christian Borntraeger wrote: On 01/15/2018 06:23 PM, Collin L. Walling wrote: On 01/15/2018 12:05 PM, Eric Blake wrote: On 01/15/2018 10:44 AM, Collin L. Walling wrote: Moved:    memcmp from bootmap.h to libc.h (renamed from _memcmp)    strlen from sclp.c to libc.h

[Qemu-devel] QEMU virt board: extending various limits

2018-01-16 Thread Peter Maydell
We've had discussions before about the various limits in the virt board imposed by its current address space layout: * number of CPUs limited to 123 (not enough space for more redistributors) * number of PCIe devices limited by size of ECAM space * max memory size limits * (anything else?) If

[Qemu-devel] [PATCH 0/3] Sanitizers configuration

2018-01-16 Thread Marc-André Lureau
Hi, This is a few reworked patches from "[PATCH v3 00/18] Various build-sys and sanitizer related fixes" series. It enables sanitizers by default with --enable-debug. But sanitizers can be also enabled/disabled independently with a configure option. If ASAN is detected but coroutine annotations

Re: [Qemu-devel] [PATCH v4 14/14] Implement support for i.MX7 Sabre board

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 01:37, Andrey Smirnov wrote: > Implement code needed to set up emulation of MCIMX7SABRE board from > NXP. For more info about the HW see: > >

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 1/8] s390-ccw: update libc

2018-01-16 Thread Thomas Huth
On 16.01.2018 16:32, Collin L. Walling wrote: > On 01/16/2018 06:07 AM, Christian Borntraeger wrote: >> >> On 01/15/2018 06:23 PM, Collin L. Walling wrote: >>> On 01/15/2018 12:05 PM, Eric Blake wrote: [...] I'm not a lawyer, but generically, the GPL and its variants depend on a

[Qemu-devel] [PATCH 2/3] build-sys: add --enable-sanitizers

2018-01-16 Thread Marc-André Lureau
Typical slowdown introduced by AddressSanitizer is 2x. UBSan shouldn't have much impact on runtime cost. Enable it by default when --enable-debug, unless --disable-sanitizers. Signed-off-by: Marc-André Lureau --- configure | 35 +++

Re: [Qemu-devel] [PATCH 1/3] linux-user: introduce functions to detect CPU type

2018-01-16 Thread Richard Henderson
On 01/16/2018 06:13 AM, Laurent Vivier wrote: >> There is no reason to read the elf header twice -- e_flags has already been >> stored in the struct image_info. > > When we set cpu_model, image_info is not initialized. > Do you propose to move cpu_init() after loader_exec()? Sure. r~

Re: [Qemu-devel] [RFC PATCH 0/3] vfio: ccw: basic channel path event handling

2018-01-16 Thread Halil Pasic
On 01/15/2018 09:59 AM, Dong Jia Shi wrote: > * Halil Pasic [2018-01-12 19:10:20 +0100]: > >> >> >> On 01/11/2018 04:04 AM, Dong Jia Shi wrote: >>> What are still missing, thus need to be offered in the next version are: >>> - I/O termination and FSM state handling if

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 2/8] s390-ccw: ipl structs for eckd cdl/ldl

2018-01-16 Thread Collin L. Walling
On 01/16/2018 07:32 AM, Thomas Huth wrote: On 15.01.2018 17:44, Collin L. Walling wrote: ECKD DASDs have different IPL structures for CDL and LDL formats. The current Ipl1 and Ipl2 structs follow the CDL format, so we prepend "EckdCdl" to them. Boot info for LDL has been moved to a new struct:

Re: [Qemu-devel] [PATCH v4 00/14] Initial i.MX7 support

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 01:36, Andrey Smirnov wrote: > Hi everyone, > > This v4 of the patch series containing the work that I've done in > order to enable support for i.MX7 emulation in QEMU. > > *NOTE*: Patches 1 and 2 are provided for the sake of completness and >

Re: [Qemu-devel] [PATCH 1/3] exynos4210: workaround UBSAN compilation error

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 15:11, Marc-André Lureau wrote: > gcc 5.4.0-6ubuntu1~16.04.5 build with UBSAN enabled error: > > CC hw/display/exynos4210_fimd.o > /home/petmay01/linaro/qemu-for-merges/hw/display/exynos4210_fimd.c: In > function ‘fimd_get_buffer_id’: >

Re: [Qemu-devel] [PULL v4 00/51] Misc patches for 2018-01-12

2018-01-16 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1516112253-14480-1-git-send-email-pbonz...@redhat.com Subject: [Qemu-devel] [PULL v4 00/51] Misc patches for 2018-01-12 === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH v6 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-01-16 Thread Alberto Garcia
On Tue 16 Jan 2018 02:04:29 PM CET, Anton Nefedov wrote: > iotest 060: > write to the discarded cluster does not trigger COW anymore. > so, break on write_aio event instead, will work for the test > (but write won't fail anymore, so update reference output) I'm wondering about this. The reason

[Qemu-devel] [PATCH 3/4] coroutine-lock: make qemu_co_enter_next thread-safe

2018-01-16 Thread Paolo Bonzini
qemu_co_queue_next does not need to release and re-acquire the mutex, because the queued coroutine does not run immediately. However, this does not hold for qemu_co_enter_next. Now that qemu_co_queue_wait can synchronize (via QemuLockable) with code that is not running in coroutine context, it's

Re: [Qemu-devel] [PULL v3 00/53] Misc changes for 2017-01-12

2018-01-16 Thread Paolo Bonzini
On 16/01/2018 15:22, Marc-André Lureau wrote: > Hi > > On Tue, Jan 16, 2018 at 2:54 PM, Paolo Bonzini wrote: >> On 16/01/2018 14:47, Peter Maydell wrote: >>> On 16 January 2018 at 13:41, Paolo Bonzini wrote: On 16/01/2018 13:06, Peter Maydell

Re: [Qemu-devel] [PATCH v5 11/14] input: add missing JIS keys to virtio input

2018-01-16 Thread Eric Blake
On 01/16/2018 07:42 AM, Daniel P. Berrange wrote: > From: Miika S > > keycodemapdb updated to add the QKeyCodes muhenkan and katakanahiragana > > Signed-off-by: Miika S Not a typical legal name (since a Signed-off-by is a legal statement for tracing

Re: [Qemu-devel] [PATCH v4 11/14] ARM: Add basic code to emulate A7MPCore DAP block

2018-01-16 Thread Andrey Smirnov
On Mon, Jan 15, 2018 at 8:32 PM, Philippe Mathieu-Daudé wrote: > Hi Andrey, > > On 01/15/2018 10:37 PM, Andrey Smirnov wrote: >> Add minimal code to emulate A7MPCore DAP block needed to boot Linux >> guest. > > I was not aware the DAP is accessed by upstream Linux... > > You sure

<    1   2   3   4   5   >