[Qemu-devel] [PATCH 2/5] tests/libqos: rename qpci_init_pc and qpci_init_spapr functions

2019-01-15 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito Rename qpci_init_pc in qpci_pc_new and qpci_init_spapr in qpci_spapr_new, since theese function actually allocate a new pci struct and initialize it. Changed QOSOps field name from qpci_init to qpci_new. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: P

[Qemu-devel] [PATCH 1/5] tests/libqos: introduce virtio_start_device

2019-01-15 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito This function is intended to group all the qvirtio_* functions that start the qvirtio devices. Applied in all tests using this combination of functions. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Paolo Bonzini --- tests/libqos/virtio.c| 7 ++

[Qemu-devel] [PATCH 5/5] tests: qgraph API for the qtest driver framework

2019-01-15 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito Add qgraph API that allows to add/remove nodes and edges from the graph, implementation of Depth First Search to discover the paths and basic unit test to check correctness of the API. Included also a main executable that takes care of starting the framework, crea

[Qemu-devel] [PATCH 4/5] tests/libqos: embed allocators instead of malloc-ing them separately

2019-01-15 Thread Paolo Bonzini
qgraph will embed these objects instead of allocating them in a separate object. Expose a new API "generic_alloc_init" and "generic_alloc_destroy" for that, and rename the existing API with s/init/new/ and s/uninit/free/. Signed-off-by: Paolo Bonzini --- tests/ahci-test.c | 6 ++--

Re: [Qemu-devel] Booting Raspbian on RPi emulation

2019-01-15 Thread BALATON Zoltan
On Thu, 29 Nov 2018, BALATON Zoltan wrote: Then I've tried the same with the pll patches posted by Philippe Mathieu-Daudé here: http://lists.nongnu.org/archive/html/qemu-devel/2018-11/msg00191.html on top of v3.1.0-rc3 which helped to get rid of the cprman warnings Will these patches be merg

[Qemu-devel] [Bug 1777252] Re: tests/Makefile.include trying to add linking library '-lutil' that break the build on Solaris

2019-01-15 Thread Peter Maydell
The condition we use in configure to decide whether to add -lutil to libs_softmmu is "not Darwin and not MinGW and not Solaris and not Haiku"... I think the thing we're trying to get from libutil is openpty(), which is in that library for Linux and the BSDs. It's not in libutil for OSX (though sin

Re: [Qemu-devel] Hosted CI for FreeBSD - Cirrus CI

2019-01-15 Thread Ed Maste
On Fri, 14 Dec 2018 at 09:57, Ed Maste wrote: > > Indeed - having a hosted CI service to build on FreeBSD is something > I've wanted for a long time; so much better if one service can support > most or all platforms of interest. My most recent test build with cirrus-ci (https://cirrus-ci.com/gith

[Qemu-devel] [PATCH] .cirrus.yml: basic compile and test for FreeBSD

2019-01-15 Thread Ed Maste
From: Ed Maste Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports several platforms, including FreeBSD. Later on we could build for other hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not supported by other CI services. Signed-off-by: Ed Maste --- .cirru

Re: [Qemu-devel] Hosted CI for FreeBSD - Cirrus CI

2019-01-15 Thread Peter Maydell
On Tue, 15 Jan 2019 at 18:34, Ed Maste wrote: > My most recent test build with cirrus-ci > (https://cirrus-ci.com/github/emaste/qemu) failed with: > /usr/bin/ld: error: undefined symbol: fdt_check_full > >>> referenced by spapr_hcall.c:1797 > >>> (/tmp/cirrus-ci-build/hw/ppc/spapr_hcall.c:1797) >

Re: [Qemu-devel] [PATCH] .cirrus.yml: basic compile and test for FreeBSD

2019-01-15 Thread Ed Maste
On Tue, 15 Jan 2019 at 13:42, Ed Maste wrote: > > From: Ed Maste I'm not sure what part of the path between `git send-email` and the list moved this From: into the message body, but it's not intentional. If someone's going to pick up this patch please edit the commit message. > Cirrus-CI (https

Re: [Qemu-devel] Booting Raspbian on RPi emulation

2019-01-15 Thread Philippe Mathieu-Daudé
On 1/15/19 7:29 PM, BALATON Zoltan wrote: > On Thu, 29 Nov 2018, BALATON Zoltan wrote: >> Then I've tried the same with the pll patches posted by Philippe >> Mathieu-Daudé here: >> >> http://lists.nongnu.org/archive/html/qemu-devel/2018-11/msg00191.html >> >> on top of v3.1.0-rc3 which helped to ge

Re: [Qemu-devel] [PATCH v2 4/4] hw/i386/pc: use PVH option rom

2019-01-15 Thread Michael S. Tsirkin
On Tue, Jan 15, 2019 at 11:00:58AM +0100, Stefano Garzarella wrote: > Use pvh.bin option rom when we are booting an uncompressed > kernel using the x86/HVM direct boot ABI. > > Signed-off-by: Stefano Garzarella > Based-on: <1545422632-2-5-git-send-email-liam.merw...@oracle.com> I don't think

Re: [Qemu-devel] [PATCH] .cirrus.yml: basic compile and test for FreeBSD

2019-01-15 Thread Philippe Mathieu-Daudé
On 1/15/19 7:51 PM, Ed Maste wrote: > On Tue, 15 Jan 2019 at 13:42, Ed Maste wrote: >> >> From: Ed Maste > > I'm not sure what part of the path between `git send-email` and the > list moved this From: into the message body, but it's not intentional. > If someone's going to pick up this patch ple

Re: [Qemu-devel] Hosted CI for FreeBSD - Cirrus CI

2019-01-15 Thread Ed Maste
On Tue, 15 Jan 2019 at 13:47, Peter Maydell wrote: > > > > It looks like this was introduced between > > 9b2e891ec5ccdb4a7d583b77988848282606fdea (works) and > > 44ba6010635641a538c9b9b1f377dfa288751906 (fails). The .cirrus.yml file > > in my branch is at least good enough to catch this sort of th

Re: [Qemu-devel] [PATCH] .cirrus.yml: basic compile and test for FreeBSD

2019-01-15 Thread Marc-André Lureau
Hi On Tue, Jan 15, 2019 at 10:42 PM Ed Maste wrote: > > From: Ed Maste > > Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports > several platforms, including FreeBSD. Later on we could build for other > hosts in Cirrus-CI, but I'm starting with only FreeBSD as it is not > su

Re: [Qemu-devel] [PATCH] tap: flush STDOUT on newline

2019-01-15 Thread Philippe Mathieu-Daudé
On 1/15/19 6:56 PM, Paolo Bonzini wrote: > This makes it easier to follow what is going on. > > Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé > --- > scripts/tap-driver.pl | 1 + > scripts/tap-merge.pl | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/scripts/tap

Re: [Qemu-devel] [PATCH v1 4/8] RISC-V: Use riscv prefix consistently on cpu helpers

2019-01-15 Thread Philippe Mathieu-Daudé
On 1/15/19 6:50 PM, Alistair Francis wrote: > On Tue, Jan 15, 2019 at 9:17 AM Philippe Mathieu-Daudé > wrote: >> >> On 1/15/19 11:50 AM, Philippe Mathieu-Daudé wrote: >>> Hi Alistair, >>> >>> On 1/15/19 12:58 AM, Alistair Francis wrote: From: Michael Clark * Add riscv prefix to rai

Re: [Qemu-devel] [PATCH] .cirrus.yml: basic compile and test for FreeBSD

2019-01-15 Thread Eric Blake
On 1/15/19 12:51 PM, Ed Maste wrote: > On Tue, 15 Jan 2019 at 13:42, Ed Maste wrote: >> >> From: Ed Maste > > I'm not sure what part of the path between `git send-email` and the > list moved this From: into the message body, but it's not intentional. It doesn't hurt. 'git am' prefers the From:

Re: [Qemu-devel] [PATCH v1] virtio: add checks for the size of the indirect table

2019-01-15 Thread Michael S. Tsirkin
On Tue, Jan 15, 2019 at 02:38:22PM +0100, Cornelia Huck wrote: > On Tue, 15 Jan 2019 16:11:19 +0300 > Dima Stepanov wrote: > > > On Tue, Jan 15, 2019 at 11:40:09AM +0100, Cornelia Huck wrote: > > > On Tue, 15 Jan 2019 13:08:47 +0300 > > > Dima Stepanov wrote: > > > > > > > The virtqueue_pop()

Re: [Qemu-devel] [PATCH] seccomp: Work-around GCC 4.x bug in gnu99 mode

2019-01-15 Thread Philippe Mathieu-Daudé
On 1/15/19 6:32 PM, Thomas Huth wrote: > We'd like to compile QEMU with -std=gnu99, but GCC 4.8 currently > fails to compile qemu-seccomp.c in this mode: > > qemu-seccomp.c:45:1: error: initializer element is not constant > }; > ^ > qemu-seccomp.c:45:1: error: (near initialization for > ‘sched_

Re: [Qemu-devel] [PATCH] .cirrus.yml: basic compile and test for FreeBSD

2019-01-15 Thread Eric Blake
On 1/15/19 1:02 PM, Eric Blake wrote: > On 1/15/19 12:51 PM, Ed Maste wrote: >> On Tue, 15 Jan 2019 at 13:42, Ed Maste wrote: >>> >>> From: Ed Maste >> >> I'm not sure what part of the path between `git send-email` and the >> list moved this From: into the message body, but it's not intentional.

Re: [Qemu-devel] [PATCH v2 2/3] target/ppc: Add GDB callbacks for SPRs

2019-01-15 Thread Fabiano Rosas
Fabiano Rosas writes: > These will be used to let GDB know about PPC's Special Purpose > Registers (SPR). > > They take an index based on the order the registers appear in the XML > file sent by QEMU to GDB. This index does not match the actual > location of the registers in the env->spr array so

Re: [Qemu-devel] [PATCH v2 4/4] hw/i386/pc: use PVH option rom

2019-01-15 Thread Eric Blake
On 1/15/19 12:57 PM, Michael S. Tsirkin wrote: > On Tue, Jan 15, 2019 at 11:00:58AM +0100, Stefano Garzarella wrote: >> Use pvh.bin option rom when we are booting an uncompressed >> kernel using the x86/HVM direct boot ABI. >> >> Signed-off-by: Stefano Garzarella >> Based-on: <1545422632-2-5-g

Re: [Qemu-devel] [PATCH 02/12] chardev: forbid 'reconnect' option with server sockets

2019-01-15 Thread Marc-André Lureau
On Tue, Jan 15, 2019 at 6:53 PM Daniel P. Berrangé wrote: > > The 'reconnect' option is used to give the sleep time, in seconds, > before a client socket attempts to re-establish a connection to the > server. It does not make sense to set this for server sockets, as they > will always accept a new

Re: [Qemu-devel] [PATCH 01/12] chardev: fix validation of options for QMP created chardevs

2019-01-15 Thread Marc-André Lureau
Hi On Tue, Jan 15, 2019 at 6:53 PM Daniel P. Berrangé wrote: > > The TLS creds option is not valid with certain address types. The user > config was only checked for errors when parsing legacy QemuOpts, thus > the user could pass unsupported values via QMP. > > Pull all code for validating option

Re: [Qemu-devel] [PATCH 03/12] chardev: forbid 'wait' option with client sockets

2019-01-15 Thread Marc-André Lureau
On Tue, Jan 15, 2019 at 6:53 PM Daniel P. Berrangé wrote: > > The 'wait'/'nowait' parameter is used to tell server sockets whether to > block until a client is accepted during initialization. Client chardevs > have always silently ignored this option. Various tests were mistakenly > passing this o

Re: [Qemu-devel] [PATCH] .cirrus.yml: basic compile and test for FreeBSD

2019-01-15 Thread Ed Maste
On Tue, 15 Jan 2019 at 13:59, Marc-André Lureau wrote: > > Hi > > On Tue, Jan 15, 2019 at 10:42 PM Ed Maste wrote: > > > > From: Ed Maste > > > > Cirrus-CI (https://cirrus-ci.org) is a hosted CI service which supports > > several platforms, including FreeBSD. Later on we could build for other >

Re: [Qemu-devel] [PATCH 04/12] chardev: remove many local variables in qemu_chr_parse_socket

2019-01-15 Thread Marc-André Lureau
Hi On Tue, Jan 15, 2019 at 6:53 PM Daniel P. Berrangé wrote: > > Now that all validation is separated off into a separate method, > we can directly populate the ChardevSocket struct from the > QemuOpts values, avoiding many local variables. > > Signed-off-by: Daniel P. Berrangé > --- > chardev/

Re: [Qemu-devel] [PATCH 04/12] chardev: remove many local variables in qemu_chr_parse_socket

2019-01-15 Thread Eric Blake
[adding Markus in relation to a QemuOpts observation] On 1/15/19 8:52 AM, Daniel P. Berrangé wrote: > Now that all validation is separated off into a separate method, > we can directly populate the ChardevSocket struct from the > QemuOpts values, avoiding many local variables. > > Signed-off-by:

Re: [Qemu-devel] [PATCH for-3.2 08/41] slirp: add callbacks for timer

2019-01-15 Thread Marc-André Lureau
Hi On Thu, Nov 15, 2018 at 4:56 PM Paolo Bonzini wrote: > > On 14/11/2018 13:36, Marc-André Lureau wrote: > > Signed-off-by: Marc-André Lureau > > --- > > slirp/libslirp.h | 6 ++ > > slirp/slirp.h| 2 +- > > net/slirp.c | 23 +++ > > slirp/ip6_icmp.c | 21 +++

Re: [Qemu-devel] [PATCH for-3.2 09/41] slirp: add a set_nonblock() callback

2019-01-15 Thread Marc-André Lureau
Hi On Thu, Nov 15, 2018 at 5:04 PM Paolo Bonzini wrote: > > On 14/11/2018 13:36, Marc-André Lureau wrote: > > qemu_set_nonblock() does some event registration with the main loop on > > win32, let's have a callback. > > > > Signed-off-by: Marc-André Lureau > > Perhaps a better interface would be

Re: [Qemu-devel] [PATCH for-3.2 06/41] slirp: add a callback for qemu_chr_fe_write_all()

2019-01-15 Thread Marc-André Lureau
Hi On Thu, Nov 15, 2018 at 5:15 PM Paolo Bonzini wrote: > > On 14/11/2018 13:36, Marc-André Lureau wrote: > > Replace strong dependency on QEMU. > > > > Signed-off-by: Marc-André Lureau > > --- > > slirp/libslirp.h | 1 + > > net/slirp.c | 6 ++ > > slirp/slirp.c| 2 +- > > 3 files

Re: [Qemu-devel] [PATCH 05/12] chardev: ensure qemu_chr_parse_compat reports missing driver error

2019-01-15 Thread Marc-André Lureau
Hi On Tue, Jan 15, 2019 at 6:53 PM Daniel P. Berrangé wrote: > > If no valid char driver was identified the qemu_chr_parse_compat method > was silent, leaving callers no clue what failed. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Marc-André Lureau > --- > chardev/char.c | 2 ++ > 1

[Qemu-devel] [PATCH v3 1/3] target/ppc: Add SPRs XML generation code for gdbstub

2019-01-15 Thread Fabiano Rosas
A following patch will add support for handling the Special Purpose Registers (SPR) in GDB via gdbstub. For that purpose, GDB needs to be provided with an XML description of the registers (see gdb-xml directory). This patch adds the code that generates the XML dynamically based on the SPRs already

[Qemu-devel] [PATCH v3 0/3] ppc/gdbstub: Expose SPRs to GDB

2019-01-15 Thread Fabiano Rosas
This series implements the reading and writing of Special Purpose Registers in PPC's gdbstub. How it works generally [1]: GDB asks for the target.xml file which contains the target description along with the list of available feature XMLs. GDB then asks for each of the XML files in sequence. The

[Qemu-devel] [PATCH v3 2/3] target/ppc: Add GDB callbacks for SPRs

2019-01-15 Thread Fabiano Rosas
These will be used to let GDB know about PPC's Special Purpose Registers (SPR). They take an index based on the order the registers appear in the XML file sent by QEMU to GDB. This index does not match the actual location of the registers in the env->spr array so the gdb_find_spr_idx function does

[Qemu-devel] [PATCH v3 3/3] target/ppc: Enable reporting of SPRs to GDB

2019-01-15 Thread Fabiano Rosas
This allows reading and writing of SPRs via GDB: (gdb) p/x $srr1 $1 = 0x82803033 (gdb) p/x $pvr $2 = 0x4b0201 (gdb) set $pvr=0x4b (gdb) p/x $pvr $3 = 0x4b They can also be shown as a group: (gdb) info reg spr Signed-off-by: Fabiano Rosas --- target/ppc/translate_init.inc.c | 4

Re: [Qemu-devel] [PATCH 07/12] chardev: split tcp_chr_wait_connected into two methods

2019-01-15 Thread Marc-André Lureau
Hi On Tue, Jan 15, 2019 at 6:53 PM Daniel P. Berrangé wrote: > > The tcp_chr_wait_connected method can deal with either server or client > chardevs, but some callers only care about one of these possibilities. > The tcp_chr_wait_connected method will also need some refactoring to > reliably deal

Re: [Qemu-devel] [PATCH 06/12] chardev: remove unused 'sioc' variable & cleanup paths

2019-01-15 Thread Marc-André Lureau
On Tue, Jan 15, 2019 at 6:53 PM Daniel P. Berrangé wrote: > > The 'sioc' variable in qmp_chardev_open_socket was unused since > > commit 3e7d4d20d3a528b1ed10b1dc3d83119bfb0c5f24 > Author: Peter Xu > Date: Tue Mar 6 13:33:17 2018 +0800 > > chardev: use chardev's gcontext for async conn

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2019-01-15 Thread Michele
Indeed. Almost all of the problems I was having were due to an incomplete understanding on my part of the way Solaris handles POSIX. Once I figured that out, everything quickly fell into place. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed

[Qemu-devel] [PATCH 0/2] cpu-exec fixes

2019-01-15 Thread Emilio G. Cota
Just a couple of small fixes. The first adds an assert that we should have added when performing the conversion from tb_lock to per-page locks. The second adds a missing reset of the BQL after the longjmp in cpu_exec_step_atomic returns. Thanks, Emilio

[Qemu-devel] [PATCH 2/2] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic

2019-01-15 Thread Emilio G. Cota
Just like we do in cpu_exec(). Reported-by: Max Filippov Tested-by: Max Filippov Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 55e0ca41c4..fefd955d66 100644 --- a/accel/tcg/cpu-exe

[Qemu-devel] [PATCH 1/2] cpu-exec: add assert_no_pages_locked() after longjmp

2019-01-15 Thread Emilio G. Cota
We forgot to add this check in faa9372c07 ("translate-all: introduce assert_no_pages_locked", 2018-06-15); we only added it after returning from a longjmp in cpu_exec_step_atomic. Fix it. Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/a

Re: [Qemu-devel] [PATCH] egl-helpers.h: add a missing X11 include

2019-01-15 Thread Philippe Mathieu-Daudé
Hi Alexander, Cc'ing Gerd (the maintainer) and Marc-André. On 1/15/19 12:50 PM, Alexander Kanavin wrote: > Otherwise these errors occur, when qemu is built in the Yocto project: > | In file included from > /home/alexander/development/poky/build-virgl-gtk-64/tmp/work/x86_64-nativesdk-pokysdk-linu

Re: [Qemu-devel] [PATCH] cpus: ignore ESRCH in qemu_cpu_kick_thread()

2019-01-15 Thread Emilio G. Cota
On Tue, Jan 08, 2019 at 00:02:36 +0100, Paolo Bonzini wrote: > On 02/01/19 15:16, Laurent Vivier wrote: > > We can have a race condition between qemu_cpu_kick_thread() and > > qemu_kvm_cpu_thread_fn() when we hotunplug a CPU. In this case, > > qemu_cpu_kick_thread() can try to kick a thread that is

[Qemu-devel] [PULL v2 02/49] msix: make pba size math more uniform

2019-01-15 Thread Michael S. Tsirkin
From: Dongli Zhang In msix_exclusive_bar the bar_pba_size is more than what the pba is expected to have, although this never affects the bar size. Specifically, the math in msix_init_exclusive_bar allocates too much memory in some cases. For example consider nentries = 8. msix_exclusive_bar wi

[Qemu-devel] [PULL v2 01/49] pci/pcie: stop plug/unplug if the slot is locked

2019-01-15 Thread Michael S. Tsirkin
From: David Hildenbrand We better stop right away. For now, errors would be partially ignored (so the guest might get informed or the device might get unplugged), although actual plug/unplug will be reported as failed to the user. While at it, properly move the check to the pre_plug handler for

[Qemu-devel] [PULL v2 03/49] hw/misc/ivshmem: Remove deprecated "ivshmem" legacy device

2019-01-15 Thread Michael S. Tsirkin
From: Thomas Huth It's been marked as deprecated in QEMU v2.6.0 already, so really nobody should use the legacy "ivshmem" device anymore (but use ivshmem-plain or ivshmem-doorbell instead). Time to remove the deprecated device now. Belatedly also update a mention of the deprecated "ivshmem" in t

[Qemu-devel] [PULL v2 06/49] vhost-user: fix ioeventfd_enabled

2019-01-15 Thread Michael S. Tsirkin
From: Li Qiang Currently, the vhost-user-test assumes the eventfd is available. However it's not true because the accel is qtest. So the 'vhost_set_vring_file' will not add fds to the msg and the server side of vhost-user-test will be broken. The bug is in 'ioeventfd_enabled'. We should make this

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

2019-01-15 Thread Michael S. Tsirkin
Changes from v1: - fix an out of tree build by unmangling a patch I mangled when applying - fix a gcc 8 build by applying philippe's patches The following changes since commit 89bd861c2b470e3fb45596945509079c72af3ac2: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request'

[Qemu-devel] [PULL v2 05/49] tests: vhost-user-test: initialize 'fd' in chr_read

2019-01-15 Thread Michael S. Tsirkin
From: Li Qiang Currently when processing VHOST_USER_SET_VRING_CALL if 'qemu_chr_fe_get_msgfds' get no fd, the 'fd' will be a stack uninitialized value. Signed-off-by: Li Qiang Reviewed-by: Thomas Huth Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-tes

[Qemu-devel] [PULL v2 07/49] util: check the return value of fcntl in qemu_set_{block, nonblock}

2019-01-15 Thread Michael S. Tsirkin
From: Li Qiang Assert that the return value is not an error. This is like commit 7e6478e7d4f for qemu_set_cloexec. Signed-off-by: Li Qiang Reviewed-by: Thomas Huth Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- util/oslib-posix.c | 8 ++-- 1 file changed, 6 insert

[Qemu-devel] [PULL v2 12/49] tests: acpi: reuse fetch_table() in vmgenid-test

2019-01-15 Thread Michael S. Tsirkin
From: Igor Mammedov Move fetch_table() into acpi-utils.c renaming it to acpi_fetch_table() and reuse it in vmgenid-test that reads RSDT and then tables it references, to find and parse VMGNEID SSDT. While at it wrap RSDT referenced tables enumeration into FOREACH macro (similar to what we do with

[Qemu-devel] [PULL v2 14/49] tests: acpi: squash sanitize_fadt_ptrs() into test_acpi_fadt_table()

2019-01-15 Thread Michael S. Tsirkin
From: Igor Mammedov some parts of sanitize_fadt_ptrs() do redundant job - locating FADT - checking original checksum There is no need to do it as test_acpi_fadt_table() already does that, so drop duplicate code and move remaining fixup code into test_acpi_fadt_table(). Signed-off-by: Igor M

[Qemu-devel] [PULL v2 15/49] tests: acpi: use AcpiSdtTable::aml instead of AcpiSdtTable::header::signature

2019-01-15 Thread Michael S. Tsirkin
From: Igor Mammedov AcpiSdtTable::header::signature is the only remained field from AcpiTableHeader structure used by tests. Instead of using packed structure to access signature, just read it directly from table blob and remove no longer used AcpiSdtTable::header / union and keep only AcpiSdtTab

[Qemu-devel] [PULL v2 09/49] tests: acpi: make sure FADT is fetched only once

2019-01-15 Thread Michael S. Tsirkin
From: Igor Mammedov Whole FADT is fetched as part of RSDT referenced tables in fetch_rsdt_referenced_tables() albeit a bit later than when FADT is partially parsed in fadt_fetch_facs_and_dsdt_ptrs(). However there is no reason for calling fetch_rsdt_referenced_tables() so late, just move it right

[Qemu-devel] [PULL v2 11/49] tests: acpi: reuse fetch_table() for fetching FACS and DSDT

2019-01-15 Thread Michael S. Tsirkin
From: Igor Mammedov It allows to remove a bit more of code duplication and reuse common utility to get ACPI tables from guest (modulo RSDP). While at it, consolidate signature checking into fetch_table() instead of open-codding it. Considering FACS is special and doesn't have checksum, make che

[Qemu-devel] [PULL v2 13/49] tests: smbios: fetch whole table in one step instead of reading it step by step

2019-01-15 Thread Michael S. Tsirkin
From: Igor Mammedov replace a bunch of ACPI_READ_ARRAY/ACPI_READ_FIELD macro, that read SMBIOS table field by field with one memread() to fetch whole table at once and drop no longer used ACPI_READ_ARRAY/ACPI_READ_FIELD macro. Signed-off-by: Igor Mammedov Acked-by: Thomas Huth Reviewed-by: Phi

[Qemu-devel] [PULL v2 10/49] tests: acpi: simplify rsdt handling

2019-01-15 Thread Michael S. Tsirkin
From: Igor Mammedov RSDT referenced tables always have length at offset 4 and checksum at offset 9, that's enough for reusing fetch_table() and replacing custom RSDT fetching code with it. While at it * merge fetch_rsdt_referenced_tables() into test_acpi_rsdt_table() * drop test_data::rsdt_tabl

[Qemu-devel] [PULL v2 16/49] virtio-net: support RSC v4/v6 tcp traffic for Windows HCK

2019-01-15 Thread Michael S. Tsirkin
From: Yuri Benditovich This commit adds implementation of RX packets coalescing, compatible with requirements of Windows Hardware compatibility kit. The device enables feature VIRTIO_NET_F_RSC_EXT in host features if it supports extended RSC functionality as defined in the specification. This fe

[Qemu-devel] [PULL v2 04/49] qemu: avoid memory leak while remove disk

2019-01-15 Thread Michael S. Tsirkin
From: Jian Wang Memset vhost_dev to zero in the vhost_dev_cleanup function. This causes dev.vqs to be NULL, so that vqs does not free up space when calling the g_free function. This will result in a memory leak. But you can't release vqs directly in the vhost_dev_cleanup function, because vhost_n

[Qemu-devel] [PULL v2 08/49] tests: acpi: use AcpiSdtTable::aml in consistent way

2019-01-15 Thread Michael S. Tsirkin
From: Igor Mammedov Currently in the 1st case we store table body fetched from QEMU in AcpiSdtTable::aml minus it's header but in the 2nd case when we load reference aml from disk, it holds whole blob including header. More over in the 1st case, we read header in separate AcpiSdtTable::header str

[Qemu-devel] [PULL v2 18/49] virtio: split vhost vsock bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 18 hw/virtio/vhost-vsock-pci.c | 86 + hw/virtio/virtio-pci.c |

Re: [Qemu-devel] [PATCH v2 4/4] hw/i386/pc: use PVH option rom

2019-01-15 Thread Michael S. Tsirkin
On Tue, Jan 15, 2019 at 01:12:21PM -0600, Eric Blake wrote: > On 1/15/19 12:57 PM, Michael S. Tsirkin wrote: > > On Tue, Jan 15, 2019 at 11:00:58AM +0100, Stefano Garzarella wrote: > >> Use pvh.bin option rom when we are booting an uncompressed > >> kernel using the x86/HVM direct boot ABI. > >> >

[Qemu-devel] [PULL v2 17/49] virtio-net: changed VIRTIO_NET_F_RSC_EXT to be 61

2019-01-15 Thread Michael S. Tsirkin
From: Yuri Benditovich Allocated feature bit changed in spec draft per TC request. Signed-off-by: Yuri Benditovich Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c

[Qemu-devel] [PULL v2 25/49] virtio: split vhost user scsi bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 11 hw/virtio/vhost-user-scsi-pci.c | 103 hw/virtio/virtio-pci.c

[Qemu-devel] [PULL v2 35/49] virtio: Make disable-legacy/disable-modern compat properties optional

2019-01-15 Thread Michael S. Tsirkin
From: Eduardo Habkost The disable-legacy and disable-modern properties apply only to some virtio-pci devices. Make those properties optional. This fixes the crash introduced by commit f6e501a28ef9 ("virtio: Provide version-specific variants of virtio PCI devices"): $ qemu-system-x86_64 -mach

[Qemu-devel] [PULL v2 26/49] virtio: split vhost scsi bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 19 hw/virtio/vhost-scsi-pci.c | 97 ++ hw/virtio/virtio-pci.c | 61

[Qemu-devel] [PULL v2 31/49] virtio: split virtio gpu bits from virtio-pci.h

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 14 -- hw/display/virtio-gpu-pci.c | 14 ++ hw/display/virtio-vga.c | 1 + 3 files cha

[Qemu-devel] [PULL v2 29/49] virtio: split virtio net bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 14 -- hw/virtio/virtio-net-pci.c | 98 ++ hw/virt

[Qemu-devel] [PULL v2 27/49] virtio: split virtio scsi bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Notice that we can't still run tests with it disabled. Both cdrom-test and drive_del-test use virtio-scsi without checking if it is enabled. Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: M

[Qemu-devel] [PULL v2 38/49] tpm: allocate/map buffer for TPM Physical Presence interface

2019-01-15 Thread Michael S. Tsirkin
From: Stefan Berger Implement a virtual memory device for the TPM Physical Presence interface. The memory is located at 0xFED45000 and used by ACPI to send messages to the firmware (BIOS) and by the firmware to provide parameters for each one of the supported codes. This interface should be used

[Qemu-devel] [PULL v2 28/49] virtio: split virtio blk bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 14 -- hw/virtio/virtio-blk-pci.c | 100 + hw/vir

[Qemu-devel] [PULL v2 33/49] virtio: virtio 9p really requires CONFIG_VIRTFS to work

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Signed-off-by: Juan Quintela Reviewed-by: Greg Kurz Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- default-configs/virtio.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak

[Qemu-devel] [PULL v2 23/49] virtio: split virtio 9p bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Acked-by: Greg Kurz Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h| 20 - hw/virtio/virtio-9p-pci.c | 88 +++ hw/virtio/

Re: [Qemu-devel] [PATCH] include/fpu/softfloat: Fix compilation with Clang on s390x

2019-01-15 Thread Emilio G. Cota
On Tue, Jan 15, 2019 at 16:01:32 +, Alex Bennée wrote: > Ahh I should have mentioned we already have the technology for this ;-) > > If you build the fpu/next tree on a s390x you can then run: > > ./tests/fp/fp-bench f64_div > > with and without the CONFIG_128 path. To get an idea of the r

[Qemu-devel] [PULL v2 39/49] acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg

2019-01-15 Thread Michael S. Tsirkin
From: Stefan Berger To avoid having to hard code the base address of the PPI virtual memory device we introduce a fw_cfg file etc/tpm/config that holds the base address of the PPI device, the version of the PPI interface and the version of the attached TPM. Signed-off-by: Stefan Berger [ Marc-A

[Qemu-devel] [PULL v2 37/49] tpm: add a "ppi" boolean property

2019-01-15 Thread Michael S. Tsirkin
From: Marc-André Lureau The following patches implement the TPM Physical Presence Interface, make use of a new memory region and a fw_cfg entry. Enable PPI by default with >=4.0 machine type, to avoid migration issues. Signed-off-by: Marc-André Lureau Reviewed-by: Igor Mammedov Reviewed-by: Ph

[Qemu-devel] [PULL v2 34/49] globals: Allow global properties to be optional

2019-01-15 Thread Michael S. Tsirkin
From: Eduardo Habkost Making some global properties optional will let us simplify compat code when a given property works on most (but not all) subclasses of a given type. Device types will be able to opt out from optional compat properties by simply not registering those properties. Signed-off

[Qemu-devel] [PULL v2 41/49] acpi: add ACPI memory clear interface

2019-01-15 Thread Michael S. Tsirkin
From: Marc-André Lureau The interface is described in the "TCG Platform Reset Attack Mitigation Specification", chapter 6 "ACPI _DSM Function". According to Laszlo, it's not so easy to implement in OVMF, he suggested to do it in qemu instead. See specification documentation for more details, and

[Qemu-devel] [PULL v2 19/49] virtio: split virtio input host bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela For consistency with other devices, rename virtio_host_{initfn,pci_info} to virtio_input_host_{initfn,info}. Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- default-configs/virtio.mak|

[Qemu-devel] [PULL v2 30/49] virtio: split virtio serial bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Virtio console and qga tests also depend on CONFIG_VIRTIO_SERIAL. Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h| 14 - hw/virtio

[Qemu-devel] [PULL v2 42/49] tpm: clear RAM when "memory overwrite" requested

2019-01-15 Thread Michael S. Tsirkin
From: Marc-André Lureau Note: the "Platform Reset Attack Mitigation" specification isn't explicit about NVDIMM, since they could have different usages. It uses the term "system memory" generally (and also "volatile memory RAM" in its introduction). For initial support, I propose to consider non-v

[Qemu-devel] [PULL v2 36/49] hw/misc/edu: add msi_uninit() for pci_edu_uninit()

2019-01-15 Thread Michael S. Tsirkin
From: Fei Li Let's supplement the msi_uninit() when failing to realize the pci edu device. Reported-by: Markus Armbruster Signed-off-by: Fei Li Reviewed-by: Marcel Apfelbaum Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[Qemu-devel] [PULL v2 45/49] qemu/compiler: Define QEMU_NONSTRING

2019-01-15 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé GCC 8 introduced the -Wstringop-truncation checker to detect truncation by the strncat and strncpy functions (closely related to -Wstringop-overflow, which detect buffer overflow by string-modifying functions declared in ). In tandem of -Wstringop-truncation, the "no

[Qemu-devel] [PULL v2 44/49] acpi: update expected files

2019-01-15 Thread Michael S. Tsirkin
Update expected files affected by: hw: acpi: Fix memory hotplug AML generation error Signed-off-by: Michael S. Tsirkin --- tests/data/acpi/pc/DSDT.dimmpxm | Bin 6790 -> 6784 bytes tests/data/acpi/pc/DSDT.memhp| Bin 6496 -> 6490 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9474 -> 9468 byt

[Qemu-devel] [PULL v2 21/49] virtio: split virtio rng bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 14 -- hw/virtio/virtio-pci.c | 54 --- hw/virtio/virtio-rng-pci.c | 88

Re: [Qemu-devel] [PATCH 01/14] tests: acpi: add uefi_find_rsdp_addr() helper

2019-01-15 Thread Laszlo Ersek
Hi Igor, On 01/15/19 16:40, Igor Mammedov wrote: > introduce UEFI specific counterpart to acpi_find_rsdp_address() > that will help to find RSDP address when [OA]VMF is used as > firmware. It requires a [OA]VMF built with PcdAcpiTestSupport=TRUE, > to locate RSDP address within 1Mb aligned ACPI te

[Qemu-devel] [PULL v2 22/49] virtio: split virtio balloon bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 14 - hw/virtio/virtio-balloon-pci.c | 95 ++ hw/v

[Qemu-devel] [PULL v2 46/49] block/sheepdog: Use QEMU_NONSTRING for non NUL-terminated arrays

2019-01-15 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the

Re: [Qemu-devel] [PATCH 10/14] tests: acpi: ignore SMBIOS tests when UEFI firmware is used

2019-01-15 Thread Laszlo Ersek
On 01/15/19 16:41, Igor Mammedov wrote: > once FW provides a pointer to SMBIOS entry point like it does for > RSDP it should be possible to enable this one the same way. Good point, I didn't think of SMBIOS. We have the following options: (1) Use just one "test support" structure, and add more f

[Qemu-devel] [PULL v2 20/49] virtio: split virtio input bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 22 - hw/virtio/virtio-input-pci.c | 157 +++ hw/virtio/virtio-pci.c |

Re: [Qemu-devel] [PATCH 04/14] tests: acpi: make pointer to RSDP 64bit

2019-01-15 Thread Laszlo Ersek
On 01/15/19 16:40, Igor Mammedov wrote: > In case of UEFI RSDP doesn't have to be located in lowmem, I suggest inserting a comma (,) after "UEFI". Currently the message reads like in case of UEFI RSDP, doesn't have to... ENOPARSE :) It should be in case of UEFI, RSDP doesn't have to... Tha

[Qemu-devel] [PULL v2 24/49] virtio: split vhost user blk bits from virtio-pci

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 18 -- hw/virtio/vhost-user-blk-pci.c | 103 + hw

Re: [Qemu-devel] [PATCH 08/14] tests: acpi: introduce an abilty start tests with UEFI firmware

2019-01-15 Thread Laszlo Ersek
On 01/15/19 16:41, Igor Mammedov wrote: > For testcase to use UEFI firmware, one needs to provide and specify > firmware and varstore blobs names in test_data { uefi_fl1, uefi_fl2) } > fields respectively. > > Signed-off-by: Igor Mammedov > --- > tests/bios-tables-test.c | 36 +++

[Qemu-devel] [PULL v2 43/49] hw: acpi: Fix memory hotplug AML generation error

2019-01-15 Thread Michael S. Tsirkin
From: Yang Zhong When using the generated memory hotplug AML, the iasl compiler would give the following error: dsdt.dsl 266: Return (MOST (_UID, Arg0, Arg1, Arg2)) Error 6080 - Called method returns no value ^ Signed-off-by: Yang Zhong Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirk

Re: [Qemu-devel] [RFC] Questions on the I/O performance of emulated host cdrom device

2019-01-15 Thread John Snow
On 1/8/19 10:20 PM, Ying Fang wrote: > > > On 2019/1/8 20:46, Kevin Wolf wrote: >> Am 29.12.2018 um 07:33 hat Ying Fang geschrieben: >>> Hi. >>> Recently one of our customer complained about the I/O performance of QEMU >>> emulated host cdrom device. >>> I did some investigation on it and the

[Qemu-devel] [PULL v2 32/49] virtio: split virtio crypto bits from virtio-pci.h

2019-01-15 Thread Michael S. Tsirkin
From: Juan Quintela Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h| 14 -- hw/virtio/virtio-crypto-pci.c | 14 ++ 2 files changed, 14 insertions(+), 14 delet

[Qemu-devel] [PULL v2 40/49] acpi: build TPM Physical Presence interface

2019-01-15 Thread Michael S. Tsirkin
From: Stefan Berger The TPM Physical Presence interface consists of an ACPI part, a shared memory part, and code in the firmware. Users can send messages to the firmware by writing a code into the shared memory through invoking the ACPI code. When a reboot happens, the firmware looks for the code

[Qemu-devel] [PULL v2 49/49] migration: Use strnlen() for fixed-size string

2019-01-15 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé GCC 8 introduced the -Wstringop-overflow, which detect buffer overflow by string-modifying functions declared in , such strncpy(), used in global_state_store_running(). GCC indeed found an incorrect use of strlen(), because this array is loaded by VMSTATE_BUFFER(runs

<    1   2   3   4   >