[PATCH] riscv: Set xPIE to 1 after xRET

2020-01-03 Thread Yiting Wang
When executing an xRET instruction, supposing xPP holds the value y, xIE is set to xPIE; the privilege mode is changed to y; xPIE is set to 1. But QEMU sets xPIE to 0 incorrectly. Signed-off-by: Yiting Wang --- target/riscv/op_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[PULL v2 0/7] Screendump patches

2020-01-03 Thread Marc-André Lureau
The following changes since commit dd5b0f95490883cd8bc7d070db8de70d5c979cbc: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20191219' into staging (2019-12-20 16:37:07 +) are available in the Git repository at: https://github.com/elmarco/qemu.git tags/screendump-pull-request f

[PULL v2 1/7] console: add graphic_hw_update_done()

2020-01-03 Thread Marc-André Lureau
Add a function to be called when a graphic update is done. Declare the QXL renderer as async: render_update_cookie_num counts the number of outstanding updates, and graphic_hw_update_done() is called when it reaches none. (note: this is preliminary work for asynchronous screendump support) Signe

[PULL v2 3/7] ui: add pixman image g_autoptr support

2020-01-03 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/ui/qemu-pixman.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index 0668109305..3b7cf70157 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.

[PULL v2 6/7] osdep: add qemu_unlink()

2020-01-03 Thread Marc-André Lureau
Add a helper function to match qemu_open() which may return files under the /dev/fdset prefix. Those shouldn't be removed, since it's only a qemu namespace. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/qemu/osdep.h | 1 + util/osdep.c | 15 ++

[PULL v2 2/7] ppm-save: pass opened fd

2020-01-03 Thread Marc-André Lureau
This will allow to pre-open the file before running the async finish handler and avoid potential monitor fdset races. (note: this is preliminary work for asynchronous screendump support) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/console.c| 45 +

[PULL v2 4/7] object: add g_autoptr support

2020-01-03 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/qom/object.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 1d7b7e5a79..54a548868c 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -1766,4 +1766,

[PULL v2 5/7] screendump: replace FILE with QIOChannel and fix close()/qemu_close()

2020-01-03 Thread Marc-André Lureau
The file opened for ppm_save() may be a /dev/fdset, in which case a dup fd is added to the fdset. It should be removed by calling qemu_close(), instead of the implicit close() on fclose(). I don't see a convenient way to solve that with stdio streams, so I switched the code to QIOChannel which use

[PULL v2 7/7] screendump: use qemu_unlink()

2020-01-03 Thread Marc-André Lureau
Don't attempt to remove /dev/fdset files. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/console.c b/ui/console.c index 82c0b72e7e..ac79d679f5 100644 --- a/ui/console.c +++ b/ui/console.c @

Re: [PATCH v2] hppa: allow max ram size upto 4Gb

2020-01-03 Thread Igor Mammedov
On Thu, 2 Jan 2020 21:22:12 +0100 Helge Deller wrote: > On 02.01.20 18:46, Igor Mammedov wrote: > > Previous patch drops silent ram_size fixup and makes > > QEMU error out with: > > > > "RAM size more than 3840m is not supported" > > > > when user specified -m X more than supported value. > > >

Re: [PATCH v6 00/21] Add virtual device fuzzing support

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:35PM +, Oleinik, Alexander wrote: > This series adds a framework for coverage-guided fuzzing of > virtual-devices. Fuzzing targets are based on qtest and can make use of > the libqos abstractions. > > In this version, I added a virtio-scsi fuzzer. The actual fuzzi

Re: [PATCH v6 01/21] softmmu: split off vl.c:main() into main.c

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:36PM +, Oleinik, Alexander wrote: > @@ -3853,7 +3834,7 @@ int main(int argc, char **argv, char **envp) > set_memory_options(&ram_slots, &maxram_size, machine_class); > > os_daemonize(); > -rcu_disable_atfork(); > +/* rcu_disable_atfork(); */ >

Re: [PATCH v6 02/21] libqos: Rename i2c_send and i2c_recv

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:38PM +, Oleinik, Alexander wrote: > The names i2c_send and i2c_recv collide with functions defined in > hw/i2c/core.c. This causes an error when linking against libqos and > softmmu simultaneously (for example when using qtest inproc). Rename the > libqos functions

Re: [PATCH v2 2/3] tpm-ppi: page-align PPI RAM

2020-01-03 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > post-copy migration fails on destination with error such as: > 2019-12-26T10:22:44.714644Z qemu-kvm: ram_block_discard_range: > Unaligned start address: 0x559d2afae9a0 Ah good, we got a sane error message! > Use qemu_memalign() to constra

Re: [PATCH v2 1/3] misc: use QEMU_IS_ALIGNED

2020-01-03 Thread Philippe Mathieu-Daudé
On 1/3/20 8:59 AM, Marc-André Lureau wrote: On Fri, Jan 3, 2020 at 11:43 AM Philippe Mathieu-Daudé wrote: On 1/3/20 8:39 AM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau --- exec.c| 4 ++-- roms/SLOF | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 032/132] meson: uncompress edk2 bios

2020-01-03 Thread Philippe Mathieu-Daudé
On 12/12/19 1:51 PM, Paolo Bonzini wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile| 4 meson.build | 2 ++ pc-bios/meson.build | 21 + 3 files changed, 23 insertions(+), 4 deletions(-

Re: [PATCH 121/132] meson: install edk2

2020-01-03 Thread Philippe Mathieu-Daudé
On 12/19/19 1:23 PM, Paolo Bonzini wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- Makefile| 7 --- pc-bios/meson.build | 8 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makef

Re: [PATCH v6 08/21] tests: provide test variables to other targets

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:44PM +, Oleinik, Alexander wrote: > Before, when tests/Makefile.include was included, the contents would be > ignored if config-host.mak was defined. Moving the ifneq responsible for > this allows a target to depend on both testing-related and host-related > object

Re: [PATCH 032/132] meson: uncompress edk2 bios

2020-01-03 Thread Philippe Mathieu-Daudé
On 12/12/19 1:51 PM, Paolo Bonzini wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile| 4 meson.build | 2 ++ pc-bios/meson.build | 21 + 3 files changed, 23 insertions(+), 4 deletions(-

Re: [PATCH v6 09/21] libqos: split qos-test and libqos makefile vars

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:44PM +, Oleinik, Alexander wrote: > Most qos-related objects were specified in the qos-test-obj-y variable. > qos-test-obj-y also included qos-test.o which defines a main(). > This made it difficult to repurpose qos-test-obj-y to link anything > beside tests/qos-te

Re: [PATCH v6 02/21] libqos: Rename i2c_send and i2c_recv

2020-01-03 Thread Philippe Mathieu-Daudé
On 12/9/19 1:02 PM, Thomas Huth wrote: On 29/11/2019 22.34, Oleinik, Alexander wrote: The names i2c_send and i2c_recv collide with functions defined in hw/i2c/core.c. This causes an error when linking against libqos and softmmu simultaneously (for example when using qtest inproc). Rename the lib

Re: [PATCH 0/2] Speed up QMP stream reading

2020-01-03 Thread Dr. David Alan Gilbert
* Yury Kotov (yury-ko...@yandex-team.ru) wrote: > Hi! > > 20.12.2019, 19:09, "Markus Armbruster" : > > Yury Kotov writes: > > > >> Hi, > >> > >> This series is continuation of another one: > >> [PATCH] monitor: Fix slow reading > >> https://lists.gnu.org/archive/html/qemu-devel/2019-11/msg037

Re: [PATCH v6 11/21] libqtest: make bufwrite rely on the TransportOps

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:46PM +, Oleinik, Alexander wrote: > When using qtest "in-process" communication, qtest_sendf directly calls > a function in the server (qtest.c). Previously, bufwrite used > socket_send, which bypasses the TransportOps enabling the call into > qtest.c. This change

Re: [PATCH v6 12/21] libqtest: add in-process qtest.c tx/rx handlers

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:47PM +, Oleinik, Alexander wrote: > +QTestState *qtest_inproc_init(QTestState **s, bool log, const char* arch, > +void (*send)(void*, const char*)) > +{ > +QTestState *qts; > +qts = g_new0(QTestState, 1); > +*s = qts; /* Expose qts e

Re: [PATCH v6 14/21] fuzz: Add target/fuzz makefile rules

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:48PM +, Oleinik, Alexander wrote: > diff --git a/Makefile.objs b/Makefile.objs > index 9ff9b0c6f9..5478a554f6 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -86,10 +86,12 @@ common-obj-$(CONFIG_FDT) += device_tree.o > # qapi > > common-obj-y += qapi/ >

Re: [PATCH v6 05/21] libqtest: Add a layer of abstraciton to send/recv

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:41PM +, Oleinik, Alexander wrote: > This makes it simple to swap the transport functions for qtest commands > to and from the qtest client. For example, now it is possible to > directly pass qtest commands to a server handler that exists within the > same process,

Re: [PATCH v6 07/21] qtest: add in-process incoming command handler

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:43PM +, Oleinik, Alexander wrote: > The handler allows a qtest client to send commands to the server by > directly calling a function, rather than using a file/CharBackend > > Signed-off-by: Alexander Bulekov > --- > include/sysemu/qtest.h | 1 + > qtest.c

Re: [PATCH v6 15/21] fuzz: add fuzzer skeleton

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:49PM +, Oleinik, Alexander wrote: > +static QTestState *qtest_setup(void) > +{ > +qtest_server_set_send_handler(&qtest_client_inproc_recv, &fuzz_qts); > +return qtest_inproc_init(&fuzz_qts, false fuzz_arch, This line isn't valid C. I guess a later patch f

Re: [PATCH v6 16/21] fuzz: add support for fork-based fuzzing.

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:50PM +, Oleinik, Alexander wrote: > fork() is a simple way to ensure that state does not leak in between > fuzzing runs. Unfortunately, the fuzzer mutation engine relies on > bitmaps which contain coverage information for each fuzzing run, and > these bitmaps shoul

Re: [PATCH v6 17/21] fuzz: add support for qos-assisted fuzz targets

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:51PM +, Oleinik, Alexander wrote: > diff --git a/tests/fuzz/qos_fuzz.c b/tests/fuzz/qos_fuzz.c > new file mode 100644 > index 00..da76e28ca3 > --- /dev/null > +++ b/tests/fuzz/qos_fuzz.c > @@ -0,0 +1,232 @@ > +/* > + * QOS-assisted fuzzing helpers > + * > +

Re: [PATCH v6 19/21] fuzz: add virtio-net fuzz target

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:52PM +, Oleinik, Alexander wrote: > The virtio-net fuzz target feeds inputs to all three virtio-net > virtqueues, and uses forking to avoid leaking state between fuzz runs. > > Signed-off-by: Alexander Bulekov > --- > tests/fuzz/Makefile.include | 1 + > test

Re: [PATCH v6 20/21] fuzz: add virtio-scsi fuzz target

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:53PM +, Oleinik, Alexander wrote: > The virtio-scsi fuzz target sets up and fuzzes the available virtio-scsi > queues. After an element is placed on a queue, the fuzzer can select > whether to perform a kick, or continue adding elements. > > Signed-off-by: Alexand

Re: [PATCH v6 21/21] fuzz: add documentation to docs/devel/

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:54PM +, Oleinik, Alexander wrote: > Signed-off-by: Alexander Bulekov > --- > docs/devel/fuzzing.txt | 119 + > 1 file changed, 119 insertions(+) > create mode 100644 docs/devel/fuzzing.txt Reviewed-by: Stefan Hajnoczi

Re: [PATCH v6 00/21] Add virtual device fuzzing support

2020-01-03 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 09:34:35PM +, Oleinik, Alexander wrote: > This series adds a framework for coverage-guided fuzzing of > virtual-devices. Fuzzing targets are based on qtest and can make use of > the libqos abstractions. > > In this version, I added a virtio-scsi fuzzer. The actual fuzzi

Re: [RFC PATCH 0/1] Removing RAMBlocks during migration

2020-01-03 Thread Dr. David Alan Gilbert
* Yury Kotov (yury-ko...@yandex-team.ru) wrote: > Hi! > > 11.12.2019, 14:17, "Dr. David Alan Gilbert" : > > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: > >>  Hi, > >> > >>  I found that it's possible to remove a RAMBlock during migration. > >>  E.g. device hot-unplugging initiated by a guest (

Re: [PATCH 001/104] virtiofsd: Pull in upstream headers

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:21PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Pull in headers fromlibfuse's upstream fuse-3.8.0 > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse.h| 1275 +++ > tools/virtiofsd

Re: [PATCH 002/104] virtiofsd: Pull in kernel's fuse.h

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:22PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Update scripts/update-linux-headers.sh to add fuse.h and > use it to pull in fuse.h from the kernel; from v5.5-rc1 > > Signed-off-by: Dr. David Alan Gilbert > --- > include/standa

Re: [PATCH 003/104] virtiofsd: Add auxiliary .c's

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:23PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add most of the non-main .c files we need from upstream fuse-3.8.0 > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/buffer.c | 321

Re: [PATCH 004/104] virtiofsd: Add fuse_lowlevel.c

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:24PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > fuse_lowlevel is one of the largest files from the library > and does most of the work. Add it separately to keep the diff > sizes small. > Again this is from upstream fuse-3.8.0 >

Re: [PATCH 005/104] virtiofsd: Add passthrough_ll

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:25PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > passthrough_ll is one of the examples in the upstream fuse project > and is the main part of our daemon here. It passes through requests > from fuse to the underlying filesystem, us

Re: [PATCH 006/104] virtiofsd: Trim down imported files

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:26PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > There's a lot of the original fuse code we don't need; trim them down. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse.h| 8 - > tools/vir

Re: [PATCH 007/104] virtiofsd: Format imported files to qemu style

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:27PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Mostly using a set like: > > indent -nut -i 4 -nlp -br -cs -ce --no-space-after-function-call-names file > clang-format -style=file -i -- file > clang-tidy -fix-errors -checks=reada

Re: [PULL v2 16/16] qga: fence guest-set-time if hwclock not available

2020-01-03 Thread Peter Maydell
On Sat, 14 Dec 2019 at 09:46, Cornelia Huck wrote: > > The Posix implementation of guest-set-time invokes hwclock to > set/retrieve the time to/from the hardware clock. If hwclock > is not available, the user is currently informed that "hwclock > failed to set hardware clock to system time", which

Re: [PATCH 008/104] virtiofsd: remove mountpoint dummy argument

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:28PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > Classic FUSE file system daemons take a mountpoint argument but > virtiofsd exposes a vhost-user UNIX domain socket instead. The > mountpoint argument is not used by virtiofsd but the user i

Re: [PATCH 009/104] virtiofsd: remove unused notify reply support

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:29PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > Notify reply support is unused by virtiofsd. The code would need to be > updated to validate input buffer sizes. Remove this unused code since > changes to it are untestable. > > Signed-of

Re: [PATCH 005/104] virtiofsd: Add passthrough_ll

2020-01-03 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Dec 12, 2019 at 04:37:25PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > passthrough_ll is one of the examples in the upstream fuse project > > and is the main part of our daemon here. It passes t

Re: [PATCH 010/104] virtiofsd: Fix fuse_daemonize ignored return values

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:30PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > QEMU's compiler enables warnings/errors for ignored values > and the (void) trick used in the fuse code isn't enough. > Turn all the return values into a return value on the function

Re: [PATCH 011/104] virtiofsd: Fix common header and define for QEMU builds

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:31PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > All of the fuse files include config.h and define GNU_SOURCE > where we don't have either under our build - remove them. There's a bunch of other random changes in this patch - were

Re: [PATCH 012/104] virtiofsd: Trim out compatibility code

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:32PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > virtiofsd only supports major=7, minor>=31; trim out a lot of > old compatibility code. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_lowlevel.c | 330 +++

Re: [PATCH 005/104] virtiofsd: Add passthrough_ll

2020-01-03 Thread Daniel P . Berrangé
On Fri, Jan 03, 2020 at 12:15:35PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Thu, Dec 12, 2019 at 04:37:25PM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > passthrough_ll is one of the examples

Re: [PATCH] target/arm: Set ISSIs16Bit in make_issinfo

2020-01-03 Thread Peter Maydell
On Thu, 19 Dec 2019 at 18:56, Richard Henderson wrote: > > During the conversion to decodetree, the setting of > ISSIs16Bit got lost. This causes the guest os to > incorrectly adjust trapping memory operations. > > Fixes: 46beb58efbb8a2a32 > Cc: qemu-sta...@nongnu.org > Reported-by: Jeff Kubascik

Re: [PATCH 00/86] refactor main RAM allocation to use hostmem backend

2020-01-03 Thread Igor Mammedov
On Tue, 31 Dec 2019 16:58:10 +0100 Philippe Mathieu-Daudé wrote: > Hi Igor, > > On 12/31/19 2:02 PM, Igor Mammedov wrote: > > Series removes ad hoc RAM allocation API > > (memory_region_allocate_system_memory) > > and consolidates it around hostmem backend. It allows to > > * resolve conflict

Re: [PATCH 2/5] hda-codec: fix recording rate control

2020-01-03 Thread Gerd Hoffmann
On Thu, Dec 19, 2019 at 09:04:16PM +0100, Volker Rümelin wrote: > Apply previous commit to hda_audio_input_cb for the same > reasons. This mail is multipart text+html and "git am" can't process it (the others are text only). Can you please resend the patches, preferably with "git send-email" to a

Re: [PATCH 00/86] refactor main RAM allocation to use hostmem backend

2020-01-03 Thread Philippe Mathieu-Daudé
On 1/3/20 2:06 PM, Igor Mammedov wrote: On Tue, 31 Dec 2019 16:58:10 +0100 Philippe Mathieu-Daudé wrote: Hi Igor, On 12/31/19 2:02 PM, Igor Mammedov wrote: Series removes ad hoc RAM allocation API (memory_region_allocate_system_memory) and consolidates it around hostmem backend. It allows to

Re: [PATCH 1/6] tests/boot_linux_console: Add initrd test for the CubieBoard

2020-01-03 Thread Wainer dos Santos Moschetta
On 12/31/19 9:41 AM, Philippe Mathieu-Daudé wrote: On 12/30/19 9:52 PM, Wainer dos Santos Moschetta wrote: On 12/30/19 9:09 AM, Philippe Mathieu-Daudé wrote: This test boots a Linux kernel on a CubieBoard and verify the serial output is working. The kernel image and DeviceTree blob are built

[PATCH v1 2/2] intel_iommu: add present bit check for pasid table entries

2020-01-03 Thread Liu Yi L
The present bit check for pasid entry (pe) and pasid directory entry (pdire) were missed in previous commits as fpd bit check doesn't require present bit as "Set". This patch adds the present bit check for callers which wants to get a valid pe/pdire. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc

[PATCH v1 0/2] intel_iommu: two fixes to intel scalable vIOMMU

2020-01-03 Thread Liu Yi L
These two fixes are found in vSVA implementation, and could be upstreamed separately. Please feel free give your comments. Thanks, Yi Liu Liu Yi L (2): intel_iommu: a fix to vtd_find_as_from_bus_num() intel_iommu: add present bit check for pasid table entries hw/i386/intel_iommu.c

[PATCH v1 1/2] intel_iommu: a fix to vtd_find_as_from_bus_num()

2020-01-03 Thread Liu Yi L
Ensure the return value of vtd_find_as_from_bus_num() is NULL by enforcing vtd_bus=NULL. This would help caller of vtd_find_as_from_bus_num() to decide if any further operation on the returned vtd_bus. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Signed-off-by: Liu Yi L Signed-off-by:

Re: [PATCH] riscv: Set xPIE to 1 after xRET

2020-01-03 Thread Bin Meng
On Fri, Jan 3, 2020 at 4:03 PM Yiting Wang wrote: > > When executing an xRET instruction, supposing xPP holds the > value y, xIE is set to xPIE; the privilege mode is changed to y; > xPIE is set to 1. But QEMU sets xPIE to 0 incorrectly. > > Signed-off-by: Yiting Wang > --- > target/riscv/op_hel

Re: [PULL 00/30] Block layer patches

2020-01-03 Thread Peter Maydell
On Thu, 19 Dec 2019 at 17:24, Kevin Wolf wrote: > > The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 > 15:55:20 +) > > are available in the Git reposit

[PATCH] target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES)

2020-01-03 Thread Li Qiang
The ioctl(KVM_CAP_GET_MSR_FEATURES) is quite new. In old platform that doesn't support this ioctl will sometimes make the user confusion. For example, when we do nested virtualiztion using host-passthrough model the VM will has quite different cpu feature with the host. Signed-off-by: Li Qiang --

Re: [PATCH 005/104] virtiofsd: Add passthrough_ll

2020-01-03 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Jan 03, 2020 at 12:15:35PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Thu, Dec 12, 2019 at 04:37:25PM +, Dr. David Alan Gilbert (git) > > > wrote: > > > > From: "Dr. David Alan

Re: [PATCH] target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES)

2020-01-03 Thread Philippe Mathieu-Daudé
On 1/3/20 3:32 PM, Li Qiang wrote: The ioctl(KVM_CAP_GET_MSR_FEATURES) is quite new. In old platform that Can you refer to the kernel version? "is quite new (introduced in vX.Y)" doesn't support this ioctl will sometimes make the user confusion. For example, when we do nested virtualiztion us

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2020-01-03 Thread Stefan Hajnoczi
On Thu, Jan 02, 2020 at 08:01:36AM -0800, Elena Ufimtseva wrote: > On Tue, Dec 17, 2019 at 04:33:16PM +, Stefan Hajnoczi wrote: > > On Mon, Dec 16, 2019 at 07:57:32PM +, Felipe Franciosi wrote: > > > > On 16 Dec 2019, at 20:47, Elena Ufimtseva > > > > wrote: > > > > On Fri, Dec 13, 2019

Re: [PATCH] virtio: add the queue number check

2020-01-03 Thread Yang Zhong
On Mon, Dec 23, 2019 at 06:33:26PM +0100, Paolo Bonzini wrote: > On 23/12/19 15:25, Michael S. Tsirkin wrote: > > On Mon, Dec 23, 2019 at 12:02:18PM +0100, Paolo Bonzini wrote: > >> On 23/12/19 10:18, Yang Zhong wrote: > >>> In this time, the queue number in the front-end block driver is 2, but >

Re: [PATCH 013/104] virtiofsd: Make fsync work even if only inode is passed in

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:33PM +, Dr. David Alan Gilbert (git) wrote: > From: Vivek Goyal > > If caller has not sent file handle in request, then using inode, retrieve > the fd opened using O_PATH and use that to open file again and issue > fsync. This will be needed when dax_flush() call

Re: [PATCH 014/104] virtiofsd: Add options for virtio

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:34PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add options to specify parameters for virtio-fs paths, i.e. > >./virtiofsd -o vhost_user_socket=/tmp/vhostqemu > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiof

Re: [PATCH 015/104] virtiofsd: add -o source=PATH to help output

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:35PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > The -o source=PATH option will be used by most command-line invocations. > Let's document it! > > Signed-off-by: Stefan Hajnoczi > --- > tools/virtiofsd/passthrough_ll.c | 1 + > 1 file ch

Re: [PATCH 016/104] virtiofsd: Open vhost connection instead of mounting

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:36PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > When run with vhost-user options we conect to the QEMU instead > via a socket. Start this off by creating the socket. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virt

Re: [PATCH 017/104] virtiofsd: Start wiring up vhost-user

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:37PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Listen on our unix socket for the connection from QEMU, when we get it > initialise vhost-user and dive into our own loop variant (currently > dummy). > > Signed-off-by: Dr. David A

Re: [PATCH 018/104] virtiofsd: Add main virtio loop

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:38PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Processes incoming requests on the vhost-user fd. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_virtio.c | 42 --- > 1 fil

Re: [PATCH 019/104] virtiofsd: get/set features callbacks

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:39PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add the get/set features callbacks. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_virtio.c | 15 ++- > 1 file changed, 14 insertions(+), 1 del

Re: [PATCH v1 0/2] intel_iommu: two fixes to intel scalable vIOMMU

2020-01-03 Thread Peter Xu
On Fri, Jan 03, 2020 at 09:28:04PM +0800, Liu Yi L wrote: > These two fixes are found in vSVA implementation, and could be > upstreamed separately. Please feel free give your comments. Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 020/104] virtiofsd: Start queue threads

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:40PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Start a thread for each queue when we get notified it's been started. > > Signed-off-by: Dr. David Alan Gilbert > fix by: > Signed-off-by: Jun Piao > Signed-off-by: Stefan Hajnocz

Re: [PATCH 021/104] virtiofsd: Poll kick_fd for queue

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:41PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > In the queue thread poll the kick_fd we're passed. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_virtio.c | 40 ++- > 1 fi

Re: [PATCH 022/104] virtiofsd: Start reading commands from queue

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:42PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Pop queue elements off queues, copy the data from them and > pass that to fuse. > > Note: 'out' in a VuVirtqElement is from QEMU > 'in' in libfuse is into the daemon > >

Re: [PATCH 023/104] virtiofsd: Send replies to messages

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:43PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Route fuse out messages back through the same queue elements > that had the command that triggered the request. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/f

Re: [PATCH 024/104] virtiofsd: Keep track of replies

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:44PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Keep track of whether we sent a reply to a request; this is a bit > paranoid but it means: > a) We should always recycle an element even if there was an error > in the request

Re: [PATCH 025/104] virtiofsd: Add Makefile wiring for virtiofsd contrib

2020-01-03 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:45PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Wire up the building of the virtiofsd in contrib. > > virtiofsd relies on Linux-specific system calls and seccomp. Anyone > wishing to port it to other host operating systems shoul

Re: [PATCH v7 4/6] tpm_spapr: Support suspend and resume

2020-01-03 Thread Stefan Berger
On 1/2/20 7:19 PM, David Gibson wrote: On Thu, Dec 19, 2019 at 09:06:03AM -0500, Stefan Berger wrote: Extend the tpm_spapr frontend with VM suspend and resume support. Signed-off-by: Stefan Berger --- hw/tpm/tpm_spapr.c | 67 - hw/tpm/trace-event

Re: [PULL 0/2] Vga 20191220 patches

2020-01-03 Thread Peter Maydell
On Fri, 20 Dec 2019 at 06:08, Gerd Hoffmann wrote: > > The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 > 15:55:20 +) > > are available in the Git repo

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2020-01-03 Thread Stefan Hajnoczi
On Thu, Jan 02, 2020 at 11:03:22AM +, Felipe Franciosi wrote: > > On Jan 2, 2020, at 10:42 AM, Stefan Hajnoczi wrote: > > On Fri, Dec 20, 2019 at 10:22:37AM +, Daniel P. Berrangé wrote: > >> On Fri, Dec 20, 2019 at 09:47:12AM +, Stefan Hajnoczi wrote: > >>> On Thu, Dec 19, 2019 at 12:5

Re: [PATCH v6 05/21] libqtest: Add a layer of abstraciton to send/recv

2020-01-03 Thread Philippe Mathieu-Daudé
Hi Aleksander, Typo in patch subject: "abstraction" On 11/29/19 10:34 PM, Oleinik, Alexander wrote: This makes it simple to swap the transport functions for qtest commands to and from the qtest client. For example, now it is possible to directly pass qtest commands to a server handler that exis

Re: [PATCH v6 06/21] module: check module wasn't already initialized

2020-01-03 Thread Philippe Mathieu-Daudé
On 11/29/19 10:34 PM, Oleinik, Alexander wrote: The virtual-device fuzzer must initialize QOM, prior to running vl:qemu_init, so that it can use the qos_graph to identify the arguments required to initialize a guest for libqos-assisted fuzzing. This change prevents errors when vl:qemu_init tries

Re: [PATCH v6 09/21] libqos: split qos-test and libqos makefile vars

2020-01-03 Thread Philippe Mathieu-Daudé
On 11/29/19 10:34 PM, Oleinik, Alexander wrote: Most qos-related objects were specified in the qos-test-obj-y variable. qos-test-obj-y also included qos-test.o which defines a main(). This made it difficult to repurpose qos-test-obj-y to link anything beside tests/qos-test against libqos. This ch

Re: [PATCH v2 1/3] misc: use QEMU_IS_ALIGNED

2020-01-03 Thread Stefan Berger
On 1/3/20 2:43 AM, Philippe Mathieu-Daudé wrote: On 1/3/20 8:39 AM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau ---   exec.c    | 4 ++--   roms/SLOF | 2 +-   2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index d4b769d0d4..1feda49ca1 100644 --- a/ex

Re: [PATCH v6 10/21] libqos: move useful qos-test funcs to qos_external

2020-01-03 Thread Philippe Mathieu-Daudé
On 11/29/19 10:34 PM, Oleinik, Alexander wrote: The moved functions are not specific to qos-test and might be useful elsewhere. For example the virtual-device fuzzer makes use of them for qos-assisted fuzz-targets. Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi --- tests/Makef

Re: [PATCH v2 2/3] tpm-ppi: page-align PPI RAM

2020-01-03 Thread Stefan Berger
On 1/3/20 5:02 AM, Dr. David Alan Gilbert wrote: * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: post-copy migration fails on destination with error such as: 2019-12-26T10:22:44.714644Z qemu-kvm: ram_block_discard_range: Unaligned start address: 0x559d2afae9a0 Ah good, we got a sane er

Re: [PATCH v6 11/21] libqtest: make bufwrite rely on the TransportOps

2020-01-03 Thread Philippe Mathieu-Daudé
On 11/29/19 10:34 PM, Oleinik, Alexander wrote: When using qtest "in-process" communication, qtest_sendf directly calls a function in the server (qtest.c). Previously, bufwrite used socket_send, which bypasses the TransportOps enabling the call into qtest.c. This change replaces the socket_send c

Re: [PATCH v2 04/10] migration: Make multifd_save_setup() get an Error parameter

2020-01-03 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela > --- > migration/migration.c | 2 +- > migration/ram.c | 2 +- > migration/ram.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/migration/migration.c b/migration/migration.c > in

Re: [PATCH v6 13/21] fuzz: add configure flag --enable-fuzzing

2020-01-03 Thread Philippe Mathieu-Daudé
On 11/29/19 10:34 PM, Oleinik, Alexander wrote: Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi --- configure | 39 +++ 1 file changed, 39 insertions(+) diff --git a/configure b/configure index 6099be1d84..5fb2494a8e 100755 --- a/configure +

Re: [PATCH v2 01/10] migration: Increase default number of multifd channels to 16

2020-01-03 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We can scale much better with 16, so we can scale to higher numbers. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/migration.c b/migration/migration

Re: [PATCH v2 03/10] migration-test: introduce functions to handle string parameters

2020-01-03 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert (I'm surprised we don't need to quote the %s's in qtest_qmp, but it seems that we never do it in any other of the qtest_qmp calls that I can see when we use %s. Dave > --- > tests/

Re: [PATCH v2 01/10] migration: Increase default number of multifd channels to 16

2020-01-03 Thread Daniel P . Berrangé
On Wed, Dec 18, 2019 at 03:01:10AM +0100, Juan Quintela wrote: > We can scale much better with 16, so we can scale to higher numbers. What was the test scenario showing such scaling ? In the real world I'm sceptical that virt hosts will have 16 otherwise idle CPU cores available that are permissi

Re: [PATCH v2 01/10] migration: Increase default number of multifd channels to 16

2020-01-03 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, Dec 18, 2019 at 03:01:10AM +0100, Juan Quintela wrote: > > We can scale much better with 16, so we can scale to higher numbers. > > What was the test scenario showing such scaling ? > > In the real world I'm sceptical that virt hosts wil

Re: [PATCH v2 01/10] migration: Increase default number of multifd channels to 16

2020-01-03 Thread Daniel P . Berrangé
On Fri, Jan 03, 2020 at 05:01:14PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Wed, Dec 18, 2019 at 03:01:10AM +0100, Juan Quintela wrote: > > > We can scale much better with 16, so we can scale to higher numbers. > > > > What was the test scenar

Re: [PULL 0/1] Seabios 20191220 patches

2020-01-03 Thread Peter Maydell
On Fri, 20 Dec 2019 at 06:10, Gerd Hoffmann wrote: > > The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 > 15:55:20 +) > > are available in the Git repo

Re: [PATCH v2 05/10] migration: Make multifd_load_setup() get an Error parameter

2020-01-03 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We need to change the full chain to pass the Error parameter. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 10 +- > migration/migration.h | 2 +- > migration/ram.c | 2 +- > migration/ram.h | 2 +- > migrat

Re: [PATCH v2 01/10] migration: Increase default number of multifd channels to 16

2020-01-03 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Jan 03, 2020 at 05:01:14PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Dec 18, 2019 at 03:01:10AM +0100, Juan Quintela wrote: > > > > We can scale much better with 16, so we can

Re: [PATCH v2 01/10] migration: Increase default number of multifd channels to 16

2020-01-03 Thread Daniel P . Berrangé
On Wed, Dec 18, 2019 at 03:01:10AM +0100, Juan Quintela wrote: > We can scale much better with 16, so we can scale to higher numbers. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/migration.c b/m

  1   2   >