Re: [PATCH 3/3] scripts/qmp/qom-fuse: Fix getattr(), read() for files in /

2020-07-24 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/23/20 4:27 PM, Markus Armbruster wrote: >> path, prop = "type".rsplit('/', 1) sets path to "", which doesn't >> work. Correct to "/". >> >> Signed-off-by: Markus Armbruster >> --- >> scripts/qmp/qom-fuse | 10 -- >> 1 file changed, 8 insertions(+)

Re: [PATCH] block/amend: Check whether the node exists

2020-07-24 Thread Max Reitz
On 23.07.20 19:56, Peter Maydell wrote: > On Fri, 10 Jul 2020 at 10:51, Max Reitz wrote: >> >> We should check whether the user-specified node-name actually refers to >> a node. The simplest way to do that is to use bdrv_lookup_bs() instead >> of bdrv_find_node() (the former wraps the latter, and

Re: [PATCH] block/amend: Check whether the node exists

2020-07-24 Thread Max Reitz
On 10.07.20 11:50, Max Reitz wrote: > We should check whether the user-specified node-name actually refers to > a node. The simplest way to do that is to use bdrv_lookup_bs() instead > of bdrv_find_node() (the former wraps the latter, and produces an error > message if necessary). > > Reported-by

[RFC PATCH] buildsys: Only build capstone if softmmu/user mode is enabled

2020-07-24 Thread Philippe Mathieu-Daudé
At least one of softmmu or user mode has to be enabled to use capstone. If not, don't clone/built it. This save CI time for the tools/documentation-only build jobs. Signed-off-by: Philippe Mathieu-Daudé --- configure | 4 1 file changed, 4 insertions(+) diff --git a/configure b/configure

Re: [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file

2020-07-24 Thread Liu, Jingqi
Ping for comments. On 7/15/2020 10:54 AM, Liu, Jingqi wrote: At the end of live migration, QEMU uses msync() to flush the data to the backend storage. When the backend file is a character device dax, the pages explicitly avoid the page cache. It will return failure from msync(). The following w

Re: [PATCH v3 14/16] python/qemu: Cleanup changes to ConsoleSocket

2020-07-24 Thread Philippe Mathieu-Daudé
+John who requested the changes. On 7/24/20 8:45 AM, Alex Bennée wrote: > From: Robert Foley > > The changes to console_socket.py and machine.py are to > cleanup for pylint and flake8. > > Signed-off-by: Robert Foley > Reviewed-by: Alex Bennée > Signed-off-by: Alex Bennée > Message-Id: <2020

Re: [PATCH v2 09/22] migration/block-dirty-bitmap: relax error handling in incoming part

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 18:34, Vladimir Sementsov-Ogievskiy wrote: 18.02.2020 21:54, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Bitmaps data is not critical, and we should not fail the migration (or use postcopy recovering) because of dirty-bitmaps migration failure.

Status of scripts/qmp/ (was: [PATCH 0/3] scripts/qmp/qom-fuse: Scrape off the bitrot)

2020-07-24 Thread Markus Armbruster
Thomas Huth writes: > On 23/07/2020 16.27, Markus Armbruster wrote: >> Markus Armbruster (3): >> scripts/qmp/qom-fuse: Unbreak import of QEMUMonitorProtocol >> scripts/qmp/qom-fuse: Port to current Python module fuse >> scripts/qmp/qom-fuse: Fix getattr(), read() for files in / > > Could it

[PATCH 2/2] tests: Exclude 'boot_linux.py' from fetch-acceptance rule

2020-07-24 Thread Philippe Mathieu-Daudé
The boot_linux.py file triggers an exception: $ make fetch-acceptance AVOCADO tests/acceptance Fetching assets from tests/acceptance/empty_cpu_model.py. Fetching assets from tests/acceptance/vnc.py. Fetching assets from tests/acceptance/boot_linux_console.py. Fetching assets from tests

[PATCH 0/2] tests: Add 'fetch-acceptance' rule

2020-07-24 Thread Philippe Mathieu-Daudé
Add a rule to fetch acceptance test assets. This is particularly useful in a CI context, when a single job can fetch and save the cache so other jobs reuse it directly. It is also useful to measure the time spent downloading the assets versus the time spent running the tests. For now we have to

[PATCH 1/2] tests: Add 'fetch-acceptance' rule

2020-07-24 Thread Philippe Mathieu-Daudé
Add a rule to fetch acceptance test assets. This is particularly useful in a CI context, when a single job can fetch and save the cache so other jobs reuse it directly. It is also useful to measure the time spent downloading the assets versus the time spent running the tests. Signed-off-by: Phil

[PATCH v2] gitlab-ci: Fix Avocado cache usage

2020-07-24 Thread Philippe Mathieu-Daudé
In commit 6957fd98dc ("gitlab: add avocado asset caching") we tried to save the Avocado cache (as in commit c1073e44b4 with Travis-CI) however it doesn't work as expected. For some reason Avocado uses /root/avocado_cache/ which we can not select later. Manually generate a Avocado config to force t

Re: [PATCH v2 22/22] qemu-iotests/199: add source-killed case to bitmaps postcopy

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 20:15, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Previous patches fixes behavior of bitmaps migration, so that errors are handled by just removing unfinished bitmaps, and not fail or try to recover postcopy migration. Add corresponding test. Si

Re: [RFC PATCH] buildsys: Only build capstone if softmmu/user mode is enabled

2020-07-24 Thread Thomas Huth
On 24/07/2020 09.16, Philippe Mathieu-Daudé wrote: > At least one of softmmu or user mode has to be enabled to use > capstone. If not, don't clone/built it. > > This save CI time for the tools/documentation-only build jobs. > > Signed-off-by: Philippe Mathieu-Daudé > --- > configure | 4 >

Re: [PATCH v2] qapi: enable use of g_autoptr with QAPI types

2020-07-24 Thread Markus Armbruster
Daniel P. Berrangé writes: > Currently QAPI generates a type and function for free'ing it: > > typedef struct QCryptoBlockCreateOptions QCryptoBlockCreateOptions; > void qapi_free_QCryptoBlockCreateOptions(QCryptoBlockCreateOptions *obj); > > This is used in the traditional manner: > > QCry

Re: [PATCH-for-5.1? v2] qapi/error: Check format string argument in error_*prepend()

2020-07-24 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > error_propagate_prepend() "behaves like error_prepend()", and > error_prepend() uses "formatting @fmt, ... like printf()". > error_prepend() checks its format string argument, but > error_propagate_prepend() does not. Fix by addint the format s/addint/adding/ >

Re: Status of scripts/qmp/ (was: [PATCH 0/3] scripts/qmp/qom-fuse: Scrape off the bitrot)

2020-07-24 Thread Thomas Huth
On 24/07/2020 09.33, Markus Armbruster wrote: > Thomas Huth writes: > >> On 23/07/2020 16.27, Markus Armbruster wrote: >>> Markus Armbruster (3): >>> scripts/qmp/qom-fuse: Unbreak import of QEMUMonitorProtocol >>> scripts/qmp/qom-fuse: Port to current Python module fuse >>> scripts/qmp/qom-

Re: [PATCH v0 0/4] background snapshot

2020-07-24 Thread Denis Plotnikov
On 23.07.2020 20:39, Peter Xu wrote: On Thu, Jul 23, 2020 at 11:03:55AM +0300, Denis Plotnikov wrote: On 22.07.2020 19:30, Peter Xu wrote: On Wed, Jul 22, 2020 at 06:47:44PM +0300, Denis Plotnikov wrote: On 22.07.2020 18:42, Denis Plotnikov wrote: On 22.07.2020 17:50, Peter Xu wrote: Hi,

Re: [PATCH for-5.1] iotests: Select a default machine for the rx and avr targets

2020-07-24 Thread Max Reitz
On 22.07.20 18:19, Thomas Huth wrote: > If you are building only with either the new rx-softmmu or avr-softmmu > target, "make check-block" fails a couple of tests since there is no > default machine defined in these new targets. We have to select a machine > in the "check" script for these, just l

[Bug 1888601] Re: QEMU v5.1.0-rc0/rc1 hang with nested virtualization

2020-07-24 Thread Dr. David Alan Gilbert
Simon: Please answer Jason's questions But my reading is; I don't know what a VSI is but I'm guessing it's the host and he doesn't know the host qemu; so the 5.1is the qemu that kata is running? It perhaps would make more sense if this has nothing to do with nesting, and more to do with Kata's vi

[PATCH] pseries: fix kvmppc_set_fwnmi()

2020-07-24 Thread Laurent Vivier
QEMU issues the ioctl(KVM_CAP_PPC_FWNMI) on the first vCPU. If the first vCPU is currently running, the vCPU mutex is held and the ioctl() cannot be done and waits until the mutex is released. This never happens and the VM is stuck. To avoid this deadlock, issue the ioctl on the same vCPU doing t

[PATCH-for-5.2] stubs/cmos: Use correct include

2020-07-24 Thread Philippe Mathieu-Daudé
cmos_get_fd_drive_type() is declared in "hw/block/fdc.h". This currently works because "hw/i386/pc.h" happens to include it. Simplify including the correct header. Fixes: 2055dbc1c9 ("acpi: move aml builder code for floppy device") Signed-off-by: Philippe Mathieu-Daudé --- stubs/cmos.c | 2 +- 1

[PATCH v3 for-5.1?? 00/21] Fix error handling during bitmap postcopy

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Hi all! I'm resending this now, as Eric started to review v2 and it occurs outdated. Last time it was somehow postponed, and I thought that I'll to rebase it onto Max's "[PATCH v2 0/3] migration: Add block-bitmap-mapping parameter" Of course, if this goes into 5.1, Max's series will need a rebas

[PATCH v3 04/21] qemu-iotests/199: improve performance: set bitmap by discard

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Discard dirties dirty-bitmap as well as write, but works faster. Let's use it instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Tested-by: Eric Blake --- tests/qemu-iotests/199 | 31 --- 1 file changed, 20 insertions(+), 11 deletion

[PATCH v3 05/21] qemu-iotests/199: change discard patterns

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
iotest 199 works too long because of many discard operations. At the same time, postcopy period is very short, in spite of all these efforts. So, let's use less discards (and with more interesting patterns) to reduce test timing. In the next commit we'll increase postcopy period. Signed-off-by: V

[PATCH v3 02/21] qemu-iotests/199: drop extra constraints

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
We don't need any specific format constraints here. Still keep qcow2 for two reasons: 1. No extra calls of format-unrelated test 2. Add some check around persistent bitmap in future (require qcow2) Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Tested-by: Eric Blake

[PATCH v3 01/21] qemu-iotests/199: fix style

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Mostly, satisfy pep8 complains. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Tested-by: Eric Blake --- tests/qemu-iotests/199 | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/199 b/tests/qemu-iotests/199 index 40

[PATCH v3 07/21] migration/block-dirty-bitmap: fix dirty_bitmap_mig_before_vm_start

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
No reason to use _locked version of bdrv_enable_dirty_bitmap, as we don't lock this mutex before. Moreover, the adjacent bdrv_dirty_bitmap_enable_successor do lock the mutex. Fixes: 58f72b965e9e1q Cc: qemu-sta...@nongnu.org # v3.0 Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Sh

[PATCH v3 09/21] migration/block-dirty-bitmap: rename dirty_bitmap_mig_cleanup

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Rename dirty_bitmap_mig_cleanup to dirty_bitmap_do_save_cleanup, to stress that it is on save part. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Reviewed-by: Eric Blake --- migration/block-dirty-bitmap.c | 8 1 file changed, 4 insertions(+), 4 deletions(-

[PATCH v3 03/21] qemu-iotests/199: better catch postcopy time

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
The test aims to test _postcopy_ migration, and wants to do some write operations during postcopy time. Test considers migrate status=complete event on source as start of postcopy. This is completely wrong, completion is completion of the whole migration process. Let's instead consider destination

[PATCH v3 14/21] migration/block-dirty-bitmap: keep bitmap state for all bitmaps

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Keep bitmap state for disabled bitmaps too. Keep the state until the end of the process. It's needed for the following commit to implement bitmap postcopy canceling. To clean-up the new list the following logic is used: We need two events to consider bitmap migration finished: 1. chunk with DIRTY_

[PATCH v3 08/21] migration/block-dirty-bitmap: rename state structure types

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Rename types to be symmetrical for load/save part and shorter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Reviewed-by: Eric Blake --- migration/block-dirty-bitmap.c | 70 ++ 1 file changed, 37 insertions(+), 33 deletions(-) diff

[PATCH v3 06/21] qemu-iotests/199: increase postcopy period

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
The test wants to force a bitmap postcopy. Still, the resulting postcopy period is very small. Let's increase it by adding more bitmaps to migrate. Also, test disabled bitmaps migration. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Tested-by: Eric Blake --- tests/

[PATCH v3 10/21] migration/block-dirty-bitmap: move mutex init to dirty_bitmap_mig_init

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
No reasons to keep two public init functions. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- migration/migration.h | 1 - migration/block-dirty-bitmap.c | 6 +- migration/migration.c | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) d

[PATCH v3 19/21] qemu-iotests/199: check persistent bitmaps

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Check that persistent bitmaps are not stored on source and that bitmaps are persistent on destination. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- tests/qemu-iotests/199 | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests

[PATCH v3 16/21] migration/block-dirty-bitmap: cancel migration on shutdown

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
If target is turned off prior to postcopy finished, target crashes because busy bitmaps are found at shutdown. Canceling incoming migration helps, as it removes all unfinished (and therefore busy) bitmaps. Similarly on source we crash in bdrv_close_all which asserts that all bdrv states are remove

[PATCH v3 18/21] qemu-iotests/199: prepare for new test-cases addition

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Move future common part to start_postcopy() method. Move checking number of bitmaps to check_bitmap(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- tests/qemu-iotests/199 | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(

[PATCH v3 17/21] migration/savevm: don't worry if bitmap migration postcopy failed

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
First, if only bitmaps postcopy enabled (not ram postcopy) postcopy_pause_incoming crashes on assertion assert(mis->to_src_file). And anyway, bitmaps postcopy is not prepared to be somehow recovered. The original idea instead is that if bitmaps postcopy failed, we just loss some bitmaps, which is

[PATCH v3 12/21] migration/block-dirty-bitmap: rename finish_lock to just lock

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
finish_lock is bad name, as lock used not only on process end. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- migration/block-dirty-bitmap.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/migration/block-dirty-bitmap.c b/migratio

[PATCH v3 11/21] migration/block-dirty-bitmap: refactor state global variables

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Move all state variables into one global struct. Reduce global variable usage, utilizing opaque pointer where possible. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- migration/block-dirty-bitmap.c | 179 ++--- 1 file changed, 99 inser

[PATCH v3 20/21] qemu-iotests/199: add early shutdown case to bitmaps postcopy

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Previous patches fixed two crashes which may occur on shutdown prior to bitmaps postcopy finished. Check that it works now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- tests/qemu-iotests/199 | 24 tests/qemu-iotests/199.out | 4 ++

[PATCH v3 13/21] migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
bdrv_enable_dirty_bitmap_locked() call does nothing, as if we are in postcopy, bitmap successor must be enabled, and reclaim operation will enable the bitmap. So, actually we need just call _reclaim_ in both if branches, and making differences only to add an assertion seems not really good. The lo

Re: [PATCH] MAINTAINERS: Add an entry to review Avocado based acceptance tests

2020-07-24 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Add an entry for to allow reviewers to be notified when acceptance / > integration tests are added or modified. > The designated reviewers are not maintainers, subsystem maintainers > are expected to merge their tests. > > Signed-off-by: Philippe Mathieu-Daudé

[PATCH v3 21/21] qemu-iotests/199: add source-killed case to bitmaps postcopy

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Previous patches fixes behavior of bitmaps migration, so that errors are handled by just removing unfinished bitmaps, and not fail or try to recover postcopy migration. Add corresponding test. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- tests/qemu-iotests/199

[PATCH v3 15/21] migration/block-dirty-bitmap: relax error handling in incoming part

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
Bitmaps data is not critical, and we should not fail the migration (or use postcopy recovering) because of dirty-bitmaps migration failure. Instead we should just lose unfinished bitmaps. Still we have to report io stream violation errors, as they affect the whole migration stream. Signed-off-by:

Re: [PATCH v7 28/47] block/null: Implement bdrv_get_allocated_file_size

2020-07-24 Thread Max Reitz
On 20.07.20 17:10, Andrey Shinkevich wrote: > On 25.06.2020 18:21, Max Reitz wrote: >> It is trivial, so we might as well do it. >> >> Signed-off-by: Max Reitz >> --- >>   block/null.c   | 7 +++ >>   tests/qemu-iotests/153.out | 2 +- >>   tests/qemu-iotests/184.out | 6 -- >>  

Re: [PATCH 1/4] qom: make object_ref/unref use a void * instead of Object *.

2020-07-24 Thread Daniel P . Berrangé
On Thu, Jul 23, 2020 at 02:04:45PM -0500, Eric Blake wrote: > On 7/23/20 1:14 PM, Daniel P. Berrangé wrote: > > The object_ref/unref methods are intended for use with any subclass of > > the base Object. Using "Object *" in the signature is not adding any > > meaningful level of type safety, since

[PATCH v4 0/4] Fix some PMP implementations

2020-07-24 Thread Zong Li
This patch set contains the fixes for wrong index of pmpcfg CSR on rv64, and the pmp range in CSR function table. After 3rd version of this patch series, we also fix the PMP issues such as wrong physical address translation and ignoring PMP checking. Chagned in v4: - Refine the implementation. Su

[PATCH v4 2/4] target/riscv/pmp.c: Fix the index offset on RV64

2020-07-24 Thread Zong Li
On RV64, the reg_index is 2 (pmpcfg2 CSR) after the seventh pmp entry, it is not 1 (pmpcfg1 CSR) like RV32. In the original implementation, the second parameter of pmp_write_cfg is "reg_index * sizeof(target_ulong)", and we get the the result which is started from 16 if reg_index is 2, but we expec

[PATCH v4 4/4] target/riscv: Change the TLB page size depends on PMP entries.

2020-07-24 Thread Zong Li
The minimum granularity of PMP is 4 bytes, it is small than 4KB page size, therefore, the pmp checking would be ignored if its range doesn't start from the alignment of one page. This patch detects the pmp entries and sets the small page size to TLB if there is a PMP entry which cover the page size

[PATCH v4 3/4] target/riscv: Fix the translation of physical address

2020-07-24 Thread Zong Li
The real physical address should add the 12 bits page offset. It also causes the PMP wrong checking due to the minimum granularity of PMP is 4 byte, but we always get the physical address which is 4KB alignment, that means, we always use the start address of the page to check PMP for all addresses

[PATCH v4 1/4] target/riscv: Fix the range of pmpcfg of CSR funcion table

2020-07-24 Thread Zong Li
The range of Physical Memory Protection should be from CSR_PMPCFG0 to CSR_PMPCFG3, not to CSR_PMPADDR9. Signed-off-by: Zong Li Reviewed-by: Alistair Francis Reviewed-by: Bin Meng --- target/riscv/csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/tar

Re: [PATCH 2/4] qom: provide convenient macros for declaring and defining types

2020-07-24 Thread Daniel P . Berrangé
On Thu, Jul 23, 2020 at 02:23:54PM -0500, Eric Blake wrote: > On 7/23/20 1:14 PM, Daniel P. Berrangé wrote: > > When creating new QOM types, there is a lot of boilerplate code that > > must be repeated using a standard pattern. This is tedious to write > > and liable to suffer from subtle inconsist

Re: [PATCH 3/4] crypto: use QOM macros for declaration/definition of secret types

2020-07-24 Thread Daniel P . Berrangé
On Thu, Jul 23, 2020 at 02:50:06PM -0400, Eduardo Habkost wrote: > On Thu, Jul 23, 2020 at 07:14:09PM +0100, Daniel P. Berrangé wrote: > > This introduces the use of the OBJECT_DEFINE and OBJECT_DECLARE macro > > families in the secret types, in order to eliminate boilerplate code. > > > > Signed-

Re: [PATCH] pseries: fix kvmppc_set_fwnmi()

2020-07-24 Thread Philippe Mathieu-Daudé
On 7/24/20 10:35 AM, Laurent Vivier wrote: > QEMU issues the ioctl(KVM_CAP_PPC_FWNMI) on the first vCPU. > > If the first vCPU is currently running, the vCPU mutex is held > and the ioctl() cannot be done and waits until the mutex is released. > This never happens and the VM is stuck. > > To avoi

Re: [PATCH v4 2/4] target/riscv/pmp.c: Fix the index offset on RV64

2020-07-24 Thread Bin Meng
Hi Zong, On Fri, Jul 24, 2020 at 5:08 PM Zong Li wrote: > > On RV64, the reg_index is 2 (pmpcfg2 CSR) after the seventh pmp > entry, it is not 1 (pmpcfg1 CSR) like RV32. In the original > implementation, the second parameter of pmp_write_cfg is > "reg_index * sizeof(target_ulong)", and we get the

Re: [PATCH v7 29/47] blockdev: Use CAF in external_snapshot_prepare()

2020-07-24 Thread Max Reitz
On 20.07.20 18:08, Andrey Shinkevich wrote: > On 25.06.2020 18:21, Max Reitz wrote: >> This allows us to differentiate between filters and nodes with COW >> backing files: Filters cannot be used as overlays at all (for this >> function). >> >> Signed-off-by: Max Reitz >> --- >>   blockdev.c | 7 ++

[Bug 1888818] [NEW] Multi-queue vhost-user fails to reconnect with qemu version >=4.2

2020-07-24 Thread xuan
Public bug reported: Test Environment: DPDK version: DPDK v20.08 Other software versions: qemu4.2.0, qemu5.0.0. OS: Linux 4.15.0-20-generic Compiler: gcc (Ubuntu 7.3.0-16ubuntu3) 8.4.0 Hardware platform: Purley. Test Setup Steps to reproduce List the steps to reproduce the issue. Test flow ==

Re: [PATCH for-5.1] iotests: Select a default machine for the rx and avr targets

2020-07-24 Thread Philippe Mathieu-Daudé
Hi Max/Kevin, On 7/24/20 10:24 AM, Max Reitz wrote: > On 22.07.20 18:19, Thomas Huth wrote: >> If you are building only with either the new rx-softmmu or avr-softmmu >> target, "make check-block" fails a couple of tests since there is no >> default machine defined in these new targets. We have to

Re: [PATCH-for-5.1? v2] qapi/error: Check format string argument in error_*prepend()

2020-07-24 Thread Philippe Mathieu-Daudé
On 7/24/20 10:03 AM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> error_propagate_prepend() "behaves like error_prepend()", and >> error_prepend() uses "formatting @fmt, ... like printf()". >> error_prepend() checks its format string argument, but >> error_propagate_prepend() do

Re: [RFC PATCH] buildsys: Only build capstone if softmmu/user mode is enabled

2020-07-24 Thread Philippe Mathieu-Daudé
On 7/24/20 9:56 AM, Thomas Huth wrote: > On 24/07/2020 09.16, Philippe Mathieu-Daudé wrote: >> At least one of softmmu or user mode has to be enabled to use >> capstone. If not, don't clone/built it. >> >> This save CI time for the tools/documentation-only build jobs. >> >> Signed-off-by: Philippe

Re: Possible regression with VGA and resolutions in Windows 10?

2020-07-24 Thread Gerd Hoffmann
On Thu, Jul 23, 2020 at 04:24:06PM +0200, Aaron Lauterer wrote: > Hi all, > > I think we have a regression introduced in commit 0221d73ce6. > > Once I start a Windows 10 VM (build 18363) with `-device VGA` I have only the > following resolutions to choose from instead of the much longer list: >

Re: [PATCH] MAINTAINERS: Add an entry to review Avocado based acceptance tests

2020-07-24 Thread Philippe Mathieu-Daudé
On 7/24/20 10:45 AM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> Add an entry for to allow reviewers to be notified when acceptance / >> integration tests are added or modified. >> The designated reviewers are not maintainers, subsystem maintainers >> are expected to merge their t

Re: [RFC PATCH] buildsys: Only build capstone if softmmu/user mode is enabled

2020-07-24 Thread Thomas Huth
On 24/07/2020 11.38, Philippe Mathieu-Daudé wrote: > On 7/24/20 9:56 AM, Thomas Huth wrote: >> On 24/07/2020 09.16, Philippe Mathieu-Daudé wrote: >>> At least one of softmmu or user mode has to be enabled to use >>> capstone. If not, don't clone/built it. >>> >>> This save CI time for the tools/doc

Re: [RFC PATCH] buildsys: Only build capstone if softmmu/user mode is enabled

2020-07-24 Thread Philippe Mathieu-Daudé
On 7/24/20 11:38 AM, Philippe Mathieu-Daudé wrote: > On 7/24/20 9:56 AM, Thomas Huth wrote: >> On 24/07/2020 09.16, Philippe Mathieu-Daudé wrote: >>> At least one of softmmu or user mode has to be enabled to use >>> capstone. If not, don't clone/built it. >>> >>> This save CI time for the tools/doc

Re: [PATCH v7 28/47] block/null: Implement bdrv_get_allocated_file_size

2020-07-24 Thread Andrey Shinkevich
On 24.07.2020 11:58, Max Reitz wrote: On 20.07.20 17:10, Andrey Shinkevich wrote: On 25.06.2020 18:21, Max Reitz wrote: It is trivial, so we might as well do it. Signed-off-by: Max Reitz ---   block/null.c   | 7 +++   tests/qemu-iotests/153.out | 2 +-   tests/qemu-iotests/1

Re: [PATCH 1/3] block/nbd: allow drain during reconnect attempt

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
20.07.2020 12:00, Vladimir Sementsov-Ogievskiy wrote: It should be to reenter qio_channel_yield() on io/channel read/write path, so it's safe to reduce in_flight and allow attaching new aio context. And no problem to allow drain itself: connection attempt is not a guest request. Moreover, if remo

Re: [PATCH v7 33/47] mirror: Deal with filters

2020-07-24 Thread Max Reitz
On 22.07.20 20:31, Andrey Shinkevich wrote: > On 25.06.2020 18:22, Max Reitz wrote: >> This includes some permission limiting (for example, we only need to >> take the RESIZE permission for active commits where the base is smaller >> than the top). >> >> Use this opportunity to rename qmp_drive_mir

Re: [PULL 0/5] riscv-to-apply queue

2020-07-24 Thread Peter Maydell
On Wed, 22 Jul 2020 at 18:00, Alistair Francis wrote: > > The following changes since commit 3cbc8970f55c87cb58699b6dc8fe42998bc79dc0: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2020-07-21' > into staging (2020-07-22 09:13:46 +0100) > > are available in the Git repositor

Re: [PATCH v7 34/47] backup: Deal with filters

2020-07-24 Thread Max Reitz
On 23.07.20 17:51, Andrey Shinkevich wrote: > On 25.06.2020 18:22, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >>   block/backup-top.c |  2 +- >>   block/backup.c |  9 + >>   blockdev.c | 19 +++ >>   3 files changed, 21 insertions(+), 9 deletions(-) >> >

Re: [PATCH v2] configure: actually disable 'git_update' mode with --disable-git-update

2020-07-24 Thread Michael Tokarev
Hi! Dan, can you please resend this with To: qemu-devel@, maybe Cc: qemu-trivial@? It isn't exactly trivial and it needs some review from the developers. Thanks, /mjt 16.07.2020 13:22, Dan Streetman wrote: > The --disable-git-update configure param sets git_update=no, but > some later checks on

Re: [RFC PATCH] buildsys: Only build capstone if softmmu/user mode is enabled

2020-07-24 Thread Peter Maydell
On Fri, 24 Jul 2020 at 10:47, Philippe Mathieu-Daudé wrote: > > On 7/24/20 11:38 AM, Philippe Mathieu-Daudé wrote: > > On 7/24/20 9:56 AM, Thomas Huth wrote: > >> On 24/07/2020 09.16, Philippe Mathieu-Daudé wrote: > >>> At least one of softmmu or user mode has to be enabled to use > >>> capstone.

Re: [PATCH 1/3] block/nbd: allow drain during reconnect attempt

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
23.07.2020 21:47, Eric Blake wrote: On 7/20/20 4:00 AM, Vladimir Sementsov-Ogievskiy wrote: It should be to reenter qio_channel_yield() on io/channel read/write path, so it's safe to reduce in_flight and allow attaching new aio context. And no problem to allow drain itself: connection attempt is

Re: [PATCH 1/3] block/nbd: allow drain during reconnect attempt

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
20.07.2020 12:00, Vladimir Sementsov-Ogievskiy wrote: It should be to reenter qio_channel_yield() on io/channel read/write path, so it's safe to reduce in_flight and allow attaching new aio context. And no problem to allow drain itself: connection attempt is not a guest request. Moreover, if remo

Re: [PATCH v7 33/47] mirror: Deal with filters

2020-07-24 Thread Andrey Shinkevich
On 24.07.2020 12:49, Max Reitz wrote: On 22.07.20 20:31, Andrey Shinkevich wrote: On 25.06.2020 18:22, Max Reitz wrote: This includes some permission limiting (for example, we only need to take the RESIZE permission for active commits where the base is smaller than the top). Use this opportuni

Re: [PATCH v7 35/47] commit: Deal with filters

2020-07-24 Thread Andrey Shinkevich
On 23.07.2020 20:15, Andrey Shinkevich wrote: On 25.06.2020 18:22, Max Reitz wrote: This includes some permission limiting (for example, we only need to take the RESIZE permission if the base is smaller than the top). Signed-off-by: Max Reitz ---   block/block-backend.c  |  9 +++-   bl

Re: [PATCH v7 29/47] blockdev: Use CAF in external_snapshot_prepare()

2020-07-24 Thread Andrey Shinkevich
On 24.07.2020 12:23, Max Reitz wrote: On 20.07.20 18:08, Andrey Shinkevich wrote: On 25.06.2020 18:21, Max Reitz wrote: This allows us to differentiate between filters and nodes with COW backing files: Filters cannot be used as overlays at all (for this function). Signed-off-by: Max Reitz ---

Re: [PATCH v11 00/11] iotests: Dump QCOW2 dirty bitmaps metadata

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
23.07.2020 23:18, Eric Blake wrote: On 7/23/20 2:42 PM, Eric Blake wrote: On 7/17/20 3:14 AM, Andrey Shinkevich wrote: Add dirty bitmap information to QCOW2 metadata dump in the qcow2_format.py.   block/qcow2.c  |   2 +-   docs/interop/qcow2.txt |   2 +-   te

Re: Testing the virtio-vhost-user QEMU patch

2020-07-24 Thread Alyssa Ross
Alyssa Ross writes: > Stefan Hajnoczi writes: > >> On Tue, Jul 21, 2020 at 07:14:38AM +, Alyssa Ross wrote: >>> Hi -- I hope it's okay me reaching out like this. >>> >>> I've been trying to test out the virtio-vhost-user implementation that's >>> been posted to this list a couple of times,

Re: [PATCH-for-5.1? v2] qapi/error: Check format string argument in error_*prepend()

2020-07-24 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > error_propagate_prepend() "behaves like error_prepend()", and > error_prepend() uses "formatting @fmt, ... like printf()". > error_prepend() checks its format string argument, but > error_propagate_prepend() does not. Fix by addint the format > attribute to error_

Re: [PATCH 1/3] block/nbd: allow drain during reconnect attempt

2020-07-24 Thread Vladimir Sementsov-Ogievskiy
23.07.2020 21:47, Eric Blake wrote: On 7/20/20 4:00 AM, Vladimir Sementsov-Ogievskiy wrote: It should be to reenter qio_channel_yield() on io/channel read/write path, so it's safe to reduce in_flight and allow attaching new aio context. And no problem to allow drain itself: connection attempt is

[Bug 1888431] Re: v5.1.0-rc1 build fails on Mac OS X 10.11.6

2020-07-24 Thread Robert Ball
Fantastic. Thank you Thomas, greatly appreciated! Best regards, Robert Ball -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1888431 Title: v5.1.0-rc1 build fails on Mac OS X 10.11.6 Status in QE

Re: [PATCH for-5.1 2/3] virtiofsd: add container-friendly -o chroot sandboxing option

2020-07-24 Thread Stefan Hajnoczi
On Thu, Jul 23, 2020 at 06:55:38PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Wed, Jul 22, 2020 at 08:03:18PM +0100, Dr. David Alan Gilbert wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > +/* > > > > + * Make the shared d

Re: 答复: [PATCH v1] hw/pci-host: save/restore pci host config register

2020-07-24 Thread Michael S. Tsirkin
On Thu, Jul 23, 2020 at 02:29:36PM +, Wangjing (Hogan, Cloud Infrastructure Service Product Dept.) wrote: > Wang King wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Thu, Jul 23, 2020 at 08:53:03PM +0800, Wang King wrote: > > > > From: Hogan Wang > > > > > > > > The pci hos

Re: Testing the virtio-vhost-user QEMU patch

2020-07-24 Thread Stefan Hajnoczi
On Fri, Jul 24, 2020 at 10:58:45AM +, Alyssa Ross wrote: > Alyssa Ross writes: > > > Stefan Hajnoczi writes: > > > >> On Tue, Jul 21, 2020 at 07:14:38AM +, Alyssa Ross wrote: > >>> Hi -- I hope it's okay me reaching out like this. > >>> > >>> I've been trying to test out the virtio-vhos

Re: [PATCH] hw/input/virtio-input-hid.c: Don't undef CONFIG_CURSES

2020-07-24 Thread Michael S. Tsirkin
On Thu, Jul 23, 2020 at 08:24:57PM +0100, Peter Maydell wrote: > virtio-input-hid.c undefines CONFIG_CURSES before including > ui/console.h. However since commits e2f82e924d057935 and b0766612d16da18 > that header does not have behaviour dependent on CONFIG_CURSES. > Remove the now-unneeded undef.

Re: [PATCH] ACPI: Assert that we don't run out of the preallocated memory

2020-07-24 Thread Michael S. Tsirkin
On Thu, Jul 23, 2020 at 06:50:06PM +0100, Peter Maydell wrote: > On Mon, 22 Jun 2020 at 12:30, Dongjiu Geng wrote: > > > > data_length is a constant value, so we use assert instead of > > condition check. > > > > Signed-off-by: Dongjiu Geng > > --- > > 1. Address Peter and Michael's comments to u

Re: [PATCH v1] hw/pci-host: save/restore pci host config register

2020-07-24 Thread Michael S. Tsirkin
On Fri, Jul 24, 2020 at 03:21:58AM +, Wangjing (Hogan, Cloud Infrastructure Service Product Dept.) wrote: > On Sat, Jul 25, 2020 at 10:53:03AM Hogan Wang wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Thu, Jul 23, 2020 at 02:12:54PM +0100, Dr. David Alan Gilbert wrote: > > >

Re: [PATCH v1] hw/pci-host: save/restore pci host config register

2020-07-24 Thread Michael S. Tsirkin
On Thu, Jul 23, 2020 at 05:04:53PM +0100, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Thu, Jul 23, 2020 at 02:12:54PM +0100, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Thu, Jul 23, 2020 at 08:53:03PM +0800, W

Re: [PATCH] ACPI: Assert that we don't run out of the preallocated memory

2020-07-24 Thread Peter Maydell
On Fri, 24 Jul 2020 at 13:55, Michael S. Tsirkin wrote: > > On Thu, Jul 23, 2020 at 06:50:06PM +0100, Peter Maydell wrote: > > On Mon, 22 Jun 2020 at 12:30, Dongjiu Geng wrote: > > > > > > data_length is a constant value, so we use assert instead of > > > condition check. > > > > > > Signed-off-b

Re: Possible regression with VGA and resolutions in Windows 10?

2020-07-24 Thread Aaron Lauterer
On 7/24/20 11:41 AM, Gerd Hoffmann wrote: On Thu, Jul 23, 2020 at 04:24:06PM +0200, Aaron Lauterer wrote: Hi all, I think we have a regression introduced in commit 0221d73ce6. Once I start a Windows 10 VM (build 18363) with `-device VGA` I have only the following resolutions to choose from

Re: [PATCH-for-5.1 v3] hw/misc/aspeed_sdmc: Fix incorrect memory size

2020-07-24 Thread Peter Maydell
On Tue, 21 Jul 2020 at 13:42, Philippe Mathieu-Daudé wrote: > > The SDRAM Memory Controller has a 32-bit address bus, thus > supports up to 4 GiB of DRAM. There is a signed to unsigned > conversion error with the AST2600 maximum memory size: > > (uint64_t)(2048 << 20) = (uint64_t)(-2147483648) >

Re: [PATCH for-5.1] target/arm: Always pass cacheattr in S1_ptw_translate

2020-07-24 Thread Peter Maydell
On Tue, 21 Jul 2020 at 17:35, Richard Henderson wrote: > > When we changed the interface of get_phys_addr_lpae to require > the cacheattr parameter, this spot was missed. The compiler is > unable to detect the use of NULL vs the nonnull attribute here. > > Fixes: 7e98e21c098 > Reported-by: Jan Ki

[PATCH v3 0/4] block: improve error reporting for unsupported O_DIRECT

2020-07-24 Thread Daniel P . Berrangé
v1: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg00269.html v2: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg00589.html See patch commit messages for rationale Ideally we would convert other callers of qemu_open to use qemu_open_err, and eventually remove qemu_open, renami

[PATCH v3 3/4] util: give a specific error message when O_DIRECT doesn't work

2020-07-24 Thread Daniel P . Berrangé
A common error scenario is to tell QEMU to use O_DIRECT in combination with a filesystem that doesn't support it. To aid users to diagnosing their mistake we want to provide a clear error message when this happens. Signed-off-by: Daniel P. Berrangé --- util/osdep.c | 13 + 1 file cha

[PATCH v3 4/4] block: switch to use qemu_open/qemu_create for improved errors

2020-07-24 Thread Daniel P . Berrangé
Currently at startup if using cache=none on a filesystem lacking O_DIRECT such as tmpfs, at startup QEMU prints qemu-system-x86_64: -drive file=/tmp/foo.img,cache=none: file system may not support O_DIRECT qemu-system-x86_64: -drive file=/tmp/foo.img,cache=none: Could not open '/tmp/foo.img': In

[PATCH v3 1/4] util: rename qemu_open() to qemu_open_old()

2020-07-24 Thread Daniel P . Berrangé
We want to introduce a new version of qemu_open() that uses an Error object for reporting problems and make this it the preferred interface. Rename the existing method to release the namespace for the new impl. Signed-off-by: Daniel P. Berrangé --- accel/kvm/kvm-all.c| 2 +- backend

[PATCH v3 2/4] util: introduce qemu_open and qemu_create with error reporting

2020-07-24 Thread Daniel P . Berrangé
This introduces two new helper metohds int qemu_open(const char *name, int flags, Error **errp); int qemu_create(const char *name, int flags, mode_t mode, Error **errp); Note that with this design we no longer require or even accept the O_CREAT flag. Avoiding overloading the two distinct oper

[BUG] vhost-vdpa: qemu-system-s390x crashes with second virtio-net-ccw device

2020-07-24 Thread Cornelia Huck
When I start qemu with a second virtio-net-ccw device (i.e. adding -device virtio-net-ccw in addition to the autogenerated device), I get a segfault. gdb points to #0 0x55d6ab52681d in virtio_net_get_config (vdev=, config=0x55d6ad9e3f80 "RT") at /home/cohuck/git/qemu/hw/net/virtio-net.c:

[PATCH] tpm_emulator: Report an error if chardev is missing

2020-07-24 Thread Stefan Berger
This patch fixes the odd error reporting when trying to send a file descriptor to the TPM emulator if one has not passed a valid chardev. $ x86_64-softmmu/qemu-system-x86_64 -tpmdev emulator,id=tpm0 qemu-system-x86_64: -tpmdev emulator,id=tpm0: tpm-emulator: Failed to send CMD_SET_DATAFD: Success

  1   2   3   >