Re: [PATCH v2 1/1] hw/arm/aspeed: Allow machine to set UART default

2021-09-01 Thread Cédric Le Goater
On 9/1/21 5:36 PM, p...@fb.com wrote: > From: Peter Delevoryas > > When you run QEMU with an Aspeed machine and a single serial device > using stdio like this: > > qemu -machine ast2600-evb -drive ... -serial stdio > > The guest OS can read and write to the UART5 registers at 0x1E784000

Re: [PATCH] gitlab: Escape git-describe match pattern on Windows hosts

2021-09-01 Thread Daniel P . Berrangé
On Wed, Sep 01, 2021 at 05:35:42PM +0200, Philippe Mathieu-Daudé wrote: > On 9/1/21 5:21 PM, Daniel P. Berrangé wrote: > > On Wed, Sep 01, 2021 at 04:17:48PM +0100, Peter Maydell wrote: > >> On Wed, 1 Sept 2021 at 15:59, Daniel P. Berrangé > >> wrote: > >>> > >>> On Wed, Sep 01, 2021 at

[PULL 51/56] iotests/image-fleecing: rename tgt_node

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Actually target of backup(sync=None) is not a final backup target: image fleecing is intended to be used with external tool, which will copy data from fleecing node to some real backup target. Also, we are going to add a test case for "push backup with

Re: [PATCH] s390x: Replace PAGE_SIZE, PAGE_SHIFT and PAGE_MASK

2021-09-01 Thread Philippe Mathieu-Daudé
On 9/1/21 2:58 PM, Thomas Huth wrote: > The PAGE_SIZE macro is causing trouble on Alpine Linux since it > clashes with a macro from a system header there. We already have > the TARGET_PAGE_SIZE, TARGET_PAGE_MASK and TARGET_PAGE_BITS macros > in QEMU anyway, so let's simply replace the PAGE_SIZE,

[PULL 50/56] iotests/image-fleecing: proper source device

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Define scsi device to operate with it by qom-set in further patch. Give a new node-name to source block node, to not look like device name. Job now don't want to work without giving explicit id, so, let's call it "fleecing". Signed-off-by: Vladimir

Re: [PATCH v3] memory: Have 'info mtree' remove duplicated Address Space information

2021-09-01 Thread Philippe Mathieu-Daudé
On 9/1/21 6:01 PM, Philippe Mathieu-Daudé wrote: > On 8/23/21 11:20 AM, David Hildenbrand wrote: >> On 23.08.21 10:54, Philippe Mathieu-Daudé wrote: >>> Per Peter Maydell [*]: >>> >>>    'info mtree' monitor command was designed on the assumption that >>>    there's really only one or two

[PATCH] tests/vhost-user-bridge.c: Fix typo in help message

2021-09-01 Thread Peter Maydell
Fix a typo in the help message printed by vhost-user-bridge. Signed-off-by: Peter Maydell --- tests/vhost-user-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c index cb009545fa5..35088dd67f7 100644 ---

Re: [qemu-web PATCH] Fix link to Windows page in Wiki

2021-09-01 Thread Stefano Garzarella
CCing Paolo and Thomas On Wed, Aug 25, 2021 at 06:43:56PM +0200, Helge Konetzka wrote: The appended patch fixes the link to Wiki Windows page on Website Download Sources page. Furthermore I would like to propose to change the instructions for Native builds with MSYS2 on Wiki Windows page.

[PULL 48/56] iotests: move 222 to tests/image-fleecing

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Give a good name to test file. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210824083856.17408-29-vsement...@virtuozzo.com> [hreitz: Adjust .gitlab-ci.d/buildtest.yml] Signed-off-by: Hanna Reitz ---

[PATCH] coroutine: resize pool periodically instead of limiting size

2021-09-01 Thread Stefan Hajnoczi
It was reported that enabling SafeStack reduces IOPS significantly (>25%) with the following fio benchmark on virtio-blk using a NVMe host block device: # fio --rw=randrw --bs=4k --iodepth=64 --runtime=1m --direct=1 \ --filename=/dev/vdb --name=job1 --ioengine=libaio --thread \

[PULL 47/56] iotests/222: constantly use single quotes for strings

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy The file use both single and double quotes for strings. Let's be consistent. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210824083856.17408-28-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz ---

Re: [PATCH] gitlab: Escape git-describe match pattern on Windows hosts

2021-09-01 Thread Peter Maydell
On Wed, 1 Sept 2021 at 15:59, Daniel P. Berrangé wrote: > > On Wed, Sep 01, 2021 at 04:52:29PM +0200, Philippe Mathieu-Daudé wrote: > > Properly escape git-describe 'match' pattern to avoid (MinGW): > > > > $ if grep -q "EXESUF=.exe" config-host.mak; then make installer; > > version="$(git

Re: [PATCH v1 2/3] io: Add zerocopy and errqueue

2021-09-01 Thread Daniel P . Berrangé
On Wed, Sep 01, 2021 at 11:52:13AM -0400, Peter Xu wrote: > On Wed, Sep 01, 2021 at 09:50:56AM +0100, Daniel P. Berrangé wrote: > > On Tue, Aug 31, 2021 at 04:27:04PM -0400, Peter Xu wrote: > > > On Tue, Aug 31, 2021 at 01:57:33PM +0100, Daniel P. Berrangé wrote: > > > > On Tue, Aug 31, 2021 at

[PATCH v2 2/3] monitor/hmp: add support for flag argument with value

2021-09-01 Thread Stefan Reiter
Adds support for the "-xS" parameter type, where "-x" denotes a flag name and the "S" suffix indicates that this flag is supposed to take an arbitrary string parameter. These parameters are always optional, the entry in the qdict will be omitted if the flag is not given. Signed-off-by: Stefan

[PULL 46/56] iotests/222: fix pylint and mypy complains

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Here: - long line - move to new interface of vm.qmp() (direct passing dict), to avoid mypy false-positive, as it thinks that unpacked dict is a positional argument. - extra parenthesis - handle event_wait possible None value Signed-off-by: Vladimir

[PULL 49/56] iotests.py: hmp_qemu_io: support qdev

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow Message-Id: <20210824083856.17408-30-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 5 +++-- 1 file changed, 3

[PULL 56/56] block/file-win32: add reopen handlers

2021-09-01 Thread Hanna Reitz
From: Viktor Prutyanov Make 'qemu-img commit' work on Windows. Command 'commit' requires reopening backing file in RW mode. So, add reopen prepare/commit/abort handlers and change dwShareMode for CreateFile call in order to allow further read/write reopening. Resolves:

[PULL 45/56] python:QEMUMachine: template typing for self returning methods

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy mypy thinks that return value of these methods in subclusses is QEMUMachine, which is wrong. So, make typing smarter. Suggested-by: John Snow Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210824083856.17408-26-vsement...@virtuozzo.com>

Re: [PATCH v2 0/1] hw/arm/aspeed: Allow machine to set UART default

2021-09-01 Thread Philippe Mathieu-Daudé
On 9/1/21 5:36 PM, p...@fb.com wrote: > From: Peter Delevoryas > > v1: https://lore.kernel.org/qemu-devel/20210831233140.2659116-1-p...@fb.com/ Hint for patchew: Supersedes: <20210831233140.2659116-1-p...@fb.com>

[PULL 54/56] block/block-copy: block_copy_state_new(): drop extra arguments

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy The only caller pass copy_range and compress both false. Let's just drop these arguments. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210824083856.17408-35-vsement...@virtuozzo.com> Reviewed-by: Hanna Reitz Signed-off-by: Hanna Reitz ---

[PULL 42/56] qapi: publish copy-before-write filter

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Acked-by: Markus Armbruster Message-Id: <20210824083856.17408-23-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz --- qapi/block-core.json | 25 +++-- 1 file

[PULL 39/56] block/copy-before-write: initialize block-copy bitmap

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to publish copy-before-write filter to be used in separate of backup. Future step would support bitmap for the filter. But let's start from full set bitmap. We have to modify backup, as bitmap is first initialized by copy-before-write filter, and

[PULL 43/56] python/qemu/machine.py: refactor _qemu_args()

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy - use shorter construction - don't create new dict if not needed - drop extra unpacking key-val arguments - drop extra default values Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow Message-Id:

[PULL 53/56] iotests/image-fleecing: add test-case for copy-before-write filter

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy New fleecing method becomes available: copy-before-write filter. Actually we don't need backup job to setup image fleecing. Add test for new recommended way of image fleecing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id:

[PULL 31/56] block/copy-before-write: drop extra bdrv_unref on failure path

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy bdrv_attach_child() do bdrv_unref() on failure, so we shouldn't do it by hand here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210824083856.17408-12-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz ---

[PULL 44/56] python/qemu/machine: QEMUMachine: improve qmp() method

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it thinks that passed unpacked dict is a positional argument and complains that it type should be bool (because second argument of qmp() is conv_keys: bool). Allow

[PULL 41/56] block/copy-before-write: make public block driver

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Finally, copy-before-write gets own .bdrv_open and .bdrv_close handlers, block_init() call and becomes available through bdrv_open(). To achieve this: - cbw_init gets unused flags argument and becomes cbw_open - block_copy_state_free() call moved to new

[PATCH v2 0/1] hw/arm/aspeed: Allow machine to set UART default

2021-09-01 Thread pdel
From: Peter Delevoryas v1: https://lore.kernel.org/qemu-devel/20210831233140.2659116-1-p...@fb.com/ v2: - Replaced AspeedMachineClass "serial_hd0" with "uart_default" - Removed "qdev_get_machine()" usage - Removed unnecessary aspeed.h (machine class) includes in device files - Added "uint32_t

[PULL 40/56] block/block-copy: make setting progress optional

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Now block-copy will crash if user don't set progress meter by block_copy_set_progress_meter(). copy-before-write filter will be used in separate of backup job, and it doesn't want any progress meter (for now). So, allow not setting it. Signed-off-by: Vladimir

[PULL 29/56] block/backup: move cluster size calculation to block-copy

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy The main consumer of cluster-size is block-copy. Let's calculate it here instead of passing through backup-top. We are going to publish copy-before-write filter soon, so it will be created through options. But we don't want for now to make explicit option for

[PULL 37/56] block/copy-before-write: bdrv_cbw_append(): drop unused compress arg

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20210824083856.17408-18-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz --- block/copy-before-write.h | 1 - block/backup.c| 2 +- block/copy-before-write.c |

[PULL 38/56] block/copy-before-write: cbw_init(): use options

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy One more step closer to .bdrv_open(): use options instead of plain arguments. Move to bdrv_open_child() calls, native for drive open handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id:

[PULL 25/56] block: rename backup-top to copy-before-write

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to convert backup_top to full featured public filter, which can be used in separate of backup job. Start from renaming from "how it used" to "what it does". While updating comments in 283 iotest, drop and rephrase also things about ".active", as

[PULL 34/56] block/copy-before-write: introduce cbw_init()

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Move part of bdrv_cbw_append() to new function cbw_open(). It's an intermediate step for adding normal .bdrv_open() handler to the filter. With this commit no logic is changed, but we have a function which will be turned into .bdrv_open() handler in future

[PULL 33/56] block/copy-before-write: bdrv_cbw_append(): replace child at last

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Refactor the function to replace child at last. Thus we don't need to revert it and code is simplified. block-copy state initialization being done before replacing the child doesn't need any drained section. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH] gitlab: Escape git-describe match pattern on Windows hosts

2021-09-01 Thread Daniel P . Berrangé
On Wed, Sep 01, 2021 at 04:17:48PM +0100, Peter Maydell wrote: > On Wed, 1 Sept 2021 at 15:59, Daniel P. Berrangé wrote: > > > > On Wed, Sep 01, 2021 at 04:52:29PM +0200, Philippe Mathieu-Daudé wrote: > > > Properly escape git-describe 'match' pattern to avoid (MinGW): > > > > > > $ if grep -q

[PULL 26/56] block-copy: move detecting fleecing scheme to block-copy

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We want to simplify initialization interface of copy-before-write filter as we are going to make it public. So, let's detect fleecing scheme exactly in block-copy code, to not pass this information through extra levels. Why not just set BDRV_REQ_SERIALISING

[PULL 24/56] qdev: allow setting drive property for realized device

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We need an ability to insert filters above top block node, attached to block device. It can't be achieved with blockdev-reopen command. So, we want do it with help of qom-set. Intended usage: Assume there is a node A that is attached to some guest device. 1.

[PULL 36/56] block/copy-before-write: cbw_init(): use file child after attaching

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy In the next commit we'll get rid of source argument of cbw_init(). Prepare to it now, to make next commit simpler: move the code block that uses source below attaching the child and use bs->file->bs instead of source variable. Signed-off-by: Vladimir

[PATCH v2 3/3] monitor: allow VNC related QMP and HMP commands to take a display ID

2021-09-01 Thread Stefan Reiter
It is possible to specify more than one VNC server on the command line, either with an explicit ID or the auto-generated ones à la "default", "vnc2", "vnc3", ... It is not possible to change the password on one of these extra VNC displays though. Fix this by adding a "display" parameter to the

[PULL 20/56] iotests: use subprocess.DEVNULL instead of open("/dev/null")

2021-09-01 Thread Hanna Reitz
From: John Snow Avoids a warning from pylint not to use open() outside of a with-statement, and is ... probably more portable anyway. Not that I think we care too much about running tests *on* Windows, but... eh. Signed-off-by: John Snow Message-Id: <20210720173336.1876937-3-js...@redhat.com>

[PULL 21/56] block: introduce bdrv_replace_child_bs()

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210824083856.17408-2-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz --- include/block/block.h | 2 ++

[PATCH v2 1/3] monitor/hmp: correctly invert password argument detection again

2021-09-01 Thread Stefan Reiter
Commit cfb5387a1d 'hmp: remove "change vnc TARGET" command' claims to remove the HMP "change vnc" command, but doesn't actually do that. Instead it rewires it to use 'qmp_change_vnc_password', and in the process inverts the argument detection - ignoring the first issue, this inversion is wrong, as

[PULL 32/56] block/copy-before-write: use file child instead of backing

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to publish copy-before-write filter, and there no public backing-child-based filter in Qemu. No reason to create a precedent, so let's refactor copy-before-write filter instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PULL 19/56] iotests: use with-statement for open() calls

2021-09-01 Thread Hanna Reitz
From: John Snow Silences a new pylint warning. The dangers of *not* doing this are somewhat unclear; I believe the file object gets garbage collected eventually, but possibly the way in which it happens is non-deterministic. Maybe this is a valid warning, but if there are consequences of not

[PULL 30/56] block/copy-before-write: relax permission requirements when no parents

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to publish copy-before-write filter. So, user should be able to create it with blockdev-add first, specifying both filtered and target children. And then do blockdev-reopen, to actually insert the filter where needed. Currently, filter unshares

[PULL 16/56] docs/devel/testing: add -p option to the debug section of QEMU iotests

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210809090114.64834-17-eespo...@redhat.com> Signed-off-by: Hanna Reitz --- docs/devel/testing.rst | 4 1 file changed, 4

[PULL 18/56] raw-format: drop WRITE and RESIZE child perms when possible

2021-09-01 Thread Hanna Reitz
From: Stefan Hajnoczi The following command-line fails due to a permissions conflict: $ qemu-storage-daemon \ --blockdev driver=nvme,node-name=nvme0,device=:08:00.0,namespace=1 \ --blockdev driver=raw,node-name=l1-1,file=nvme0,offset=0,size=1073741824 \ --blockdev

[PULL 35/56] block/copy-before-write: cbw_init(): rename variables

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy One more step closer to real .bdrv_open() handler: use more usual names for bs being initialized and its state. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210824083856.17408-16-vsement...@virtuozzo.com> Signed-off-by:

[PULL 15/56] qemu-iotests: add option to show qemu binary logs on stdout

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Using the flag -p, allow the qemu binary to print to stdout. Also create the common function _close_qemu_log_file() to avoid accessing machine.py private fields directly and have duplicate code. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir

[PULL 27/56] block/block-copy: introduce block_copy_set_copy_opts()

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We'll need a possibility to set compress and use_copy_range options after initialization of the state. So make corresponding part of block_copy_state_new() separate and public. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id:

[PULL 22/56] block: introduce blk_replace_bs

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Add function to change bs inside blk. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210824083856.17408-3-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz --- include/sysemu/block-backend.h | 1 +

[PULL 14/56] docs/devel/testing: add -valgrind option to the debug section of QEMU iotests

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210809090114.64834-15-eespo...@redhat.com> Signed-off-by: Hanna Reitz --- docs/devel/testing.rst | 6 ++ 1 file changed, 6

[PULL 12/56] qemu-iotests: allow valgrind to read/delete the generated log file

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito When using -valgrind on the script tests, it generates a log file in $TEST_DIR that is either read (if valgrind finds problems) or otherwise deleted. Provide the same exact behavior when using -valgrind on the python tests. Signed-off-by: Emanuele Giuseppe

[PULL 28/56] block/backup: set copy_range and compress after filter insertion

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to publish copy-before-write filter, so it would be initialized through options. Still we don't want to publish compress and copy-range options, as 1. Modern way to enable compression is to use compress filter. 2. For copy-range it's unclean how

[PULL 23/56] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-09-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Add field, so property can declare support for setting the property when device is realized. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210824083856.17408-4-vsement...@virtuozzo.com>

[PULL 09/56] docs/devel/testing: add -gdb option to the debugging section of QEMU iotests

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210809090114.64834-10-eespo...@redhat.com> Signed-off-by: Hanna Reitz --- docs/devel/testing.rst | 11 +++ 1 file changed, 11

[PULL 13/56] qemu-iotests: insert valgrind command line as wrapper for qemu binary

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito If -gdb and -valgrind are both defined, return an error. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210809090114.64834-14-eespo...@redhat.com> Signed-off-by: Hanna Reitz ---

[PULL 17/56] block/monitor: Consolidate hmp_handle_error calls to reduce redundant code

2021-09-01 Thread Hanna Reitz
From: Mao Zhongyi Signed-off-by: Mao Zhongyi Message-Id: <20210802062507.347555-1-maozhon...@cmss.chinamobile.com> Signed-off-by: Hanna Reitz --- block/monitor/block-hmp-cmds.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/monitor/block-hmp-cmds.c

[PULL 11/56] qemu-iotests: extend QMP socket timeout when using valgrind

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito As with gdbserver, valgrind delays the test execution, so the default QMP socket timeout and the generic class Timeout in iotests.py timeouts too soon. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PULL 06/56] qemu-iotests: delay QMP socket timers

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Attaching gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Max Reitz Message-Id: <20210809090114.64834-7-eespo...@redhat.com> Signed-off-by: Hanna Reitz ---

[PULL 05/56] qemu-iotests: add option to attach gdbserver

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Define -gdb flag and GDB_OPTIONS environment variable to python tests to attach a gdbserver to each qemu instance. This patch only adds and parses this flag, it does not yet add the implementation for it. if -gdb is not provided but $GDB_OPTIONS is set, ignore

[PULL 08/56] qemu-iotests: add gdbserver option to script tests too

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Remove read timer in test script when GDB_OPTIONS are set, so that the bash tests won't timeout while running gdb. The only limitation here is that running a script with gdbserver will make the test output mismatch with the expected results, making the test

[PULL 10/56] qemu-iotests: extend the check script to prepare supporting valgrind for python tests

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Currently, the check script only parses the option and sets the VALGRIND_QEMU environmental variable to "y". Add another local python variable that prepares the command line, identical to the one provided in the test scripts. Because the python script does not

[PULL 04/56] docs/devel/testing: add debug section to the QEMU iotests chapter

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Introduce the "Debugging a test case" section, in preparation to the additional flags that will be added in the next patches. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id:

[PULL 03/56] python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Max Reitz Acked-by: John Snow Message-Id: <20210809090114.64834-4-eespo...@redhat.com> Signed-off-by: Hanna Reitz ---

[PULL 07/56] qemu_iotests: insert gdbserver command line as wrapper for qemu binary

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210809090114.64834-8-eespo...@redhat.com> Signed-off-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2

[PULL 00/56] Block patches

2021-09-01 Thread Hanna Reitz
The following changes since commit ec397e90d21269037280633b6058d1f280e27667: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20210901-2' into staging (2021-09-01 08:33:02 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull

[PULL 01/56] python: qemu: add timer parameter for qmp.accept socket

2021-09-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito Also add a new _qmp_timer field to the QEMUMachine class. Let's change the default socket timeout to None, so that if a subclass needs to add a timer, it can be done by modifying this private field. At the same time, restore the timer to be 15 seconds in

[PULL 02/56] python: Reduce strictness of pylint's duplicate-code check

2021-09-01 Thread Hanna Reitz
From: John Snow Pylint prior to 2.8.3 (We pin at >= 2.8.0) includes function and method signatures as part of its duplicate checking algorithm. This check does not listen to pragmas, so the only way to disable it is to turn it off completely or increase the minimum duplicate lines so that it

Re: [PATCH] .mailmap: Fix more contributor entries

2021-09-01 Thread Philippe Mathieu-Daudé
On 8/20/21 10:04 AM, Philippe Mathieu-Daudé wrote: > These authors have some incorrect author email field. > For each of them, there is one commit with the replaced > entry. > > Cc: Alex Chen > Cc: Bibo Mao > Cc: Guoyi Tu > Cc: Haibin Zhang > Cc: Hyman Huang > Cc: Lichang Zhao > Cc: Yuanjun

Re: [PATCH] gitlab: Escape git-describe match pattern on Windows hosts

2021-09-01 Thread Daniel P . Berrangé
On Wed, Sep 01, 2021 at 04:52:29PM +0200, Philippe Mathieu-Daudé wrote: > Properly escape git-describe 'match' pattern to avoid (MinGW): > > $ if grep -q "EXESUF=.exe" config-host.mak; then make installer; > version="$(git describe --match v[0-9]*)"; > mv -v qemu-setup*.exe

[PATCH] gitlab: Escape git-describe match pattern on Windows hosts

2021-09-01 Thread Philippe Mathieu-Daudé
Properly escape git-describe 'match' pattern to avoid (MinGW): $ if grep -q "EXESUF=.exe" config-host.mak; then make installer; version="$(git describe --match v[0-9]*)"; mv -v qemu-setup*.exe qemu-setup-${version}.exe; fi fatal: No names found, cannot describe anything. ERROR: Job

[PATCH v1 7/8] virtio-blk: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the bits acknowledged by the guests Signed-off-by: Maxim Davydov --- hw/block/virtio-blk.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index f139cd7..552b86c 100644 ---

[PATCH v1 5/8] virtio-net: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the bits acknowledged by the guest Signed-off-by: Maxim Davydov --- hw/net/virtio-net.c | 118 1 file changed, 72 insertions(+), 46 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 16d20cd..2fd9171

[PATCH v1 6/8] scsi: Add tracking of the acknowledged feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the VIRTIO_SCSI_F_HOTPLUG, VIRTIO_SCSI_F_CHANGE and VIRTIO_SCSI_F_T10_PI bits acknowledged by the guest Signed-off-by: Maxim Davydov --- hw/scsi/vhost-scsi.c | 6 +++--- hw/scsi/vhost-user-scsi.c | 18 +- hw/scsi/virtio-scsi.c | 10 ++ 3 files

[PATCH] [PATCH] drivers/firmware/qemu_fw_cfg: add RISCV support

2021-09-01 Thread xiaoming
In the latest release of qemu (qemu 6.0.0 or higher) riscv virt already supports fw_cfg, but drivers/firmware/qemu_fw_cfg not support. Signed-off-by: xiaoming <2014500...@smail.xtu.edu.cn> --- drivers/firmware/Kconfig | 2 +- drivers/firmware/qemu_fw_cfg.c | 4 2 files changed, 5

[PATCH v1 2/8] virtio: Add tracking of the common virtio guest features

2021-09-01 Thread Maxim Davydov
It implements common virtio features via macros that, by defining the virtio guest feature bit and the virtio host feature bit, allow you to checks acknowledged virtio features by the guest. Signed-off-by: Maxim Davydov --- hw/virtio/virtio.c | 2 +- include/hw/virtio/virtio.h | 39

[PATCH v1 1/8] qdev-properties: Add read-only 64 bit property

2021-09-01 Thread Maxim Davydov
In some situations, we need a property that tracks the bit but can't change it (for instance, guest features of virtio device). Signed-off-by: Maxim Davydov --- hw/core/qdev-properties.c| 32 include/hw/qdev-properties.h | 5 + 2 files changed, 37

[PATCH v1 3/8] virtio-gpu: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the bits acknowledged by the guest Signed-off-by: Maxim Davydov --- hw/display/vhost-user-gpu.c| 3 ++- hw/display/virtio-gpu.c| 8 +--- include/hw/virtio/virtio-gpu.h | 10 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git

[PATCH v1 4/8] virtio-serial: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the VIRTIO_CONSOLE_F_EMERG_WRITE acknowledged by the guest. Signed-off-by: Maxim Davydov --- hw/char/virtio-serial-bus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index dd6bc27..b5f9f42

[PATCH v1 0/8] Virtio features acknowledged by guest

2021-09-01 Thread Maxim Davydov
In some situations (for instance, debug), we want to be able to see the features that were confirmed by the guest. At the same time, we would like to do this safely, without the possibility of setting bits of guest features from the outside. Maxim Davydov (8): qdev-properties: Add read-only 64

[PATCH v1 8/8] virtio-balloon: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the bits acknowledged by the guest Signed-off-by: Maxim Davydov --- hw/virtio/virtio-balloon.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 4b5d9e5..61575b7 100644 ---

[PATCH 1/2] elf2dmp: Check curl_easy_setopt() return value

2021-09-01 Thread Peter Maydell
Coverity points out that we aren't checking the return value from curl_easy_setopt(). Fixes: Coverity CID 1458895 Signed-off-by: Peter Maydell --- contrib/elf2dmp/download.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git

[PATCH 2/2] elf2dmp: Fail cleanly if PDB file specifies zero block_size

2021-09-01 Thread Peter Maydell
Coverity points out that if the PDB file we're trying to read has a header specifying a block_size of zero then we will end up trying to divide by zero in pdb_ds_read_file(). Check for this and fail cleanly instead. Fixes: Coverity CID 1458869 Signed-off-by: Peter Maydell ---

[PATCH 0/2] elf2dmp: Fix minor Coverity nits

2021-09-01 Thread Peter Maydell
Coverity complains about a couple of minor issues in elf2dmp: * we weren't checking the return value from curl_easy_setopt() * we might divide by zero if presented with a corrupt PDB file This patchseries fixes those. NB: I have only compile tested this as I don't have any files to test it

Re: [PATCH v3 0/4] iotests/297: Cover tests/

2021-09-01 Thread Hanna Reitz
On 01.09.21 15:34, Vladimir Sementsov-Ogievskiy wrote: A kind of ping:) Seems that never landed into master? Yes, that’s true… I was waiting for John (CC-ed) to send v3 of https://lists.nongnu.org/archive/html/qemu-block/2021-07/msg00611.html, because in

Re: [RFC 05/10] hw/mos6522: Don't clear T1 interrupt flag on latch write

2021-09-01 Thread Laurent Vivier
Le 26/08/2021 à 07:21, Finn Thain a écrit : > On Wed, 25 Aug 2021, Mark Cave-Ayland wrote: > >> On 24/08/2021 11:09, Finn Thain wrote: >> >>> The Synertek datasheet says, "A write to T1L-H loads an 8-bit count value >>> into the latch. A read of T1L-H transfers the contents of the latch to >>>

Re: 9pfs: Twalk crash

2021-09-01 Thread Christian Schoenebeck
On Mittwoch, 1. September 2021 14:49:37 CEST Christian Schoenebeck wrote: > > > And it triggered, however I am not sure if some of those functions I > > > asserted above are indeed allowed to be executed on a different thread > > > than main thread: > > > > > > Program terminated with signal

Re: [PULL 0/3] Audio 20210901 patches

2021-09-01 Thread Peter Maydell
in the Git repository at: > > git://git.kraxel.org/qemu tags/audio-20210901-pull-request > > for you to fetch changes up to 0ebe43ea6a5ceb30b4372038fefddc9e224438f8: > > MAINTAINERS: Split Audio backends sections (2021-09-01 06:34:30 +0200) > > ---

[PATCH v2] target/i386: Use assert() to sanity-check b1 in SSE decode

2021-09-01 Thread Peter Maydell
In the SSE decode function gen_sse(), we combine a byte 'b' and a value 'b1' which can be [0..3], and switch on them: b |= (b1 << 8); switch (b) { ... default: unknown_op: gen_unknown_opcode(env, s); return; } In three cases inside this switch, we were then also

Re: [PATCH 1/1] hw/arm/aspeed: Allow machine to set serial_hd(0)

2021-09-01 Thread Peter Delevoryas
> On Aug 31, 2021, at 11:34 PM, Cédric Le Goater wrote: > > Adding Peter Maydell and Joel. > > On 9/1/21 1:31 AM, p...@fb.com wrote: >> From: Peter Delevoryas >> >> When you run QEMU with an Aspeed machine and a single serial device >> using stdio like this: >> >>qemu -machine

Re: [PATCH] s390x: Replace PAGE_SIZE, PAGE_SHIFT and PAGE_MASK

2021-09-01 Thread Eric Farman
On Wed, 2021-09-01 at 14:58 +0200, Thomas Huth wrote: > The PAGE_SIZE macro is causing trouble on Alpine Linux since it > clashes with a macro from a system header there. We already have > the TARGET_PAGE_SIZE, TARGET_PAGE_MASK and TARGET_PAGE_BITS macros > in QEMU anyway, so let's simply replace

Re: [PATCH 0/2] s390x: ccw: A simple test device for virtio CCW

2021-09-01 Thread Pierre Morel
On 8/30/21 10:42 PM, Halil Pasic wrote: On Mon, 30 Aug 2021 11:51:51 +0200 Christian Borntraeger wrote: On 27.08.21 12:50, Pierre Morel wrote: Hello All, This series presents a VIRTIO test device which receives data on its input channel and sends back a simple checksum for the data it

Re: [PATCH v2 1/1] docs: add definitions of terms for CI/testing

2021-09-01 Thread Thomas Huth
On 31/08/2021 17.29, Willian Rampazzo wrote: To understand the current state of QEMU CI/testing and have a base to discuss the plans for the future, it is important to define some usual terms. This patch defines the terms for "Automated tests", "Unit testing", "Functional testing", "System

Re: [PATCH] libqtest: check for g_setenv() failure

2021-09-01 Thread Thomas Huth
On 20/08/2021 18.37, Peter Maydell wrote: g_setenv() can fail; check for it when starting a QEMU process when we set the QEMU_AUDIO_DRV environment variable. Because this happens after fork() reporting an exact message via printf() is a bad idea; just exit(1), as we already do for the case of

Re: [PATCH 2/2] Acceptance Tests: updates to the MAINTAINERS file

2021-09-01 Thread Thomas Huth
On 03/08/2021 21.34, Cleber Rosa wrote: The tests/acceptance directory is currently lacking a maintainer entry, even though I've been performing that role (of course with help from many others). Thus, its status is, even more now, Maintained. This also removes the currently broken Trello board

Re: [PATCH] s390x: Replace PAGE_SIZE, PAGE_SHIFT and PAGE_MASK

2021-09-01 Thread Matthew Rosato
On 9/1/21 8:58 AM, Thomas Huth wrote: The PAGE_SIZE macro is causing trouble on Alpine Linux since it clashes with a macro from a system header there. We already have the TARGET_PAGE_SIZE, TARGET_PAGE_MASK and TARGET_PAGE_BITS macros in QEMU anyway, so let's simply replace the PAGE_SIZE,

Re: [PATCH v3 00/10] qcow2 check: check some reserved bits and subcluster bitmaps

2021-09-01 Thread Vladimir Sementsov-Ogievskiy
Ping again:) Nothing changed: patches applies to master, 08 doesn't have r-b. 03.07.2021 14:17, Vladimir Sementsov-Ogievskiy wrote: Ping :) This still applies to master with no conflicts. All patches reviewed except for 08. 24.05.2021 17:20, Vladimir Sementsov-Ogievskiy wrote: Hi all!

Re: [PATCH v3 0/4] iotests/297: Cover tests/

2021-09-01 Thread Vladimir Sementsov-Ogievskiy
A kind of ping:) Seems that never landed into master? 14.05.2021 18:43, Max Reitz wrote: v1: https://lists.nongnu.org/archive/html/qemu-block/2021-03/msg01471.html v2: https://lists.nongnu.org/archive/html/qemu-block/2021-05/msg00492.html Hi, When reviewing Vladimir’s new addition to

<    1   2   3   4   >