Re: [PATCH v3 10/17] qapi/gen: Combine ._add_[user|system]_module

2021-01-20 Thread Markus Armbruster
John Snow writes: > On 1/20/21 9:20 AM, Markus Armbruster wrote: >> John Snow writes: [...] >>> diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py >>> index 55acd7e080d..b5505685e6e 100644 >>> --- a/scripts/qapi/gen.py >>> +++ b/scripts/qapi/gen.py [...] >>> @@ -313,7 +306,8 @@ def visit_mod

Re: [PATCH] tcg: Increase the static number of temporaries

2021-01-20 Thread Philippe Mathieu-Daudé
On 1/21/21 3:54 AM, Richard Henderson wrote: > This isn't a total or permanent solution to the problem of running > out of temporaries, but it puts off the issue for a bit. > > Make the assert in tcg_temp_alloc unconditional. If we do run out > of temps, this can fail much later as a weird SIGSEG

Re: [PATCH v6 02/11] hvf: x86: Remove unused definitions

2021-01-20 Thread Philippe Mathieu-Daudé
On 1/20/21 11:44 PM, Alexander Graf wrote: > The hvf i386 has a few struct and cpp definitions that are never > used. Remove them. > > Suggested-by: Roman Bolshakov > Signed-off-by: Alexander Graf > Reviewed-by: Roman Bolshakov > Tested-by: Roman Bolshakov > --- > target/i386/hvf/hvf-i386.h |

Re: [PATCH v6 03/11] hvf: Move common code out

2021-01-20 Thread Philippe Mathieu-Daudé
Hi Alexander, On 1/20/21 11:44 PM, Alexander Graf wrote: > Until now, Hypervisor.framework has only been available on x86_64 systems. > With Apple Silicon shipping now, it extends its reach to aarch64. To > prepare for support for multiple architectures, let's move common code out > into its own a

Re: [PATCH v3 05/17] qapi: pass QAPISchemaModule to visit_module instead of str

2021-01-20 Thread Markus Armbruster
John Snow writes: > On 1/20/21 11:02 AM, Eric Blake wrote: >> On 1/20/21 6:07 AM, Markus Armbruster wrote: >>> John Snow writes: >>> Modify visit_module to pass the module itself instead of just its name. This allows for future patches to centralize some module-interrogation behav

Re: [PATCH v3 05/17] qapi: pass QAPISchemaModule to visit_module instead of str

2021-01-20 Thread Markus Armbruster
John Snow writes: > On 1/20/21 7:07 AM, Markus Armbruster wrote: >> John Snow writes: [...] >>> diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py >>> index e03abcbb959..f754f675d66 100644 >>> --- a/docs/sphinx/qapidoc.py >>> +++ b/docs/sphinx/qapidoc.py >>> @@ -463,11 +463,11 @@ def _

Re: [PATCH v2 2/2] net/eth: Fix stack-buffer-overflow in _eth_get_rss_ex_dst_addr()

2021-01-20 Thread Thomas Huth
On 15/01/2021 16.11, Philippe Mathieu-Daudé wrote: QEMU fuzzer reported a buffer overflow in _eth_get_rss_ex_dst_addr() reproducible as: $ cat << EOF | ./qemu-system-i386 -M pc-q35-5.0 \ -accel qtest -monitor none \ -serial none -nographic -qtest stdio outl 0xcf8 0x80001010 ou

Re: [RFC PATCH 6/6] softmmu: Restrict watchpoint handlers to TCG accelerator

2021-01-20 Thread Richard Henderson
On 1/17/21 6:48 AM, Philippe Mathieu-Daudé wrote: > Watchpoint funtions use cpu_restore_state() which is only > available when TCG accelerator is built. Restrict them > to TCG. > > Signed-off-by: Philippe Mathieu-Daudé > --- > RFC because we could keep that code by adding an empty > stub for

Re: [RFC PATCH 5/6] accel/tcg: Restrict cpu_io_recompile() from other accelerators

2021-01-20 Thread Richard Henderson
On 1/17/21 6:48 AM, Philippe Mathieu-Daudé wrote: > As cpu_io_recompile() is only called within TCG accelerator > in cputlb.c, declare it locally. > > Signed-off-by: Philippe Mathieu-Daudé > --- > RFC because not sure if other accelerator could implement this. > --- > accel/tcg/internal.h| 2

Re: [PATCH 4/6] accel/tcg: Declare missing cpu_loop_exit*() stubs

2021-01-20 Thread Richard Henderson
On 1/17/21 6:48 AM, Philippe Mathieu-Daudé wrote: > cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c, > and are not available when TCG accelerator is not built. Add stubs so > linking without TCG succeed. > > Problematic files: > > - hw/semihosting/console.c in qemu_semihost

Re: [PATCH 3/6] accel/tcg: Restrict tb_gen_code() from other accelerators

2021-01-20 Thread Richard Henderson
On 1/17/21 11:12 PM, Claudio Fontana wrote: > On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote: >> tb_gen_code() is only called within TCG accelerator, >> declare it locally. > > Is this used only in accel/tcg/cpu-exec.c ? Should it be a static function > there? Possibly, but there's a *lot* of

Re: [PATCH v2 0/4] nbd/server: Quiesce coroutines on context switch

2021-01-20 Thread Sergio Lopez
On Wed, Jan 20, 2021 at 02:49:14PM -0600, Eric Blake wrote: > On 12/14/20 11:05 AM, Sergio Lopez wrote: > > This series allows the NBD server to properly switch between AIO contexts, > > having quiesced recv_coroutine and send_coroutine before doing the > > transition. > > > > We need this becaus

Re: [PATCH 2/6] accel/tcg: Restrict tb_flush_jmp_cache() from other accelerators

2021-01-20 Thread Richard Henderson
On 1/17/21 6:48 AM, Philippe Mathieu-Daudé wrote: > tb_flush_jmp_cache() is only called within TCG accelerator, > declare it locally. > > Signed-off-by: Philippe Mathieu-Daudé > --- > We could also inline it in cputlb.c, the single user. > --- Yes, I think we should move it to cputlb.c. I have q

Re: [PATCH 1/6] accel/tcg: Make cpu_gen_init() static

2021-01-20 Thread Richard Henderson
On 1/17/21 6:48 AM, Philippe Mathieu-Daudé wrote: > cpu_gen_init() is TCG specific, only used in tcg/translate-all.c. > No need to export it to other accelerators, declare it statically. > > Signed-off-by: Philippe Mathieu-Daudé > --- > We could also inline the 1-line call.. > --- > include/exec

Re: [PATCH 0/4] Introduce a battery, AC adapter, and lid button

2021-01-20 Thread Leonid Bloch
Hi Phil, Thanks for your feedback! Please see below. On Wed, Jan 20, 2021 at 11:52 PM Philippe Mathieu-Daudé wrote: > > Hi Leonid, Marcel, > > On 1/20/21 9:54 PM, Leonid Bloch wrote: > > This series introduces the following ACPI devices: > > > > * Battery > > * AC adapter > > * Laptop lid button

[Bug 1756728] Re: virtio-scsi virtio-scsi-single and virtio-blk on raw image, games are not starting

2021-01-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1756728 Title: virtio-scsi

[Bug 1757323] Re: blue screen running windows 10 install DVD on qemu

2021-01-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1757323 Title: blue screen

[Bug 1843151] Re: Regression: QEMU 4.1.0 qxl and KMS resoluiton only 4x10

2021-01-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1843151 Title: Regression:

[Bug 1750899] Re: Mouse cursor sometimes can't pass the invisible border on the right side of the screen

2021-01-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1750899 Title: Mouse curso

[Bug 1843073] Re: Network loose connection for long time under light load guest winxp64 with virtio on i5-8350U

2021-01-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1843073 Title: Network loo

[Bug 1756538] Re: Minimal Ubuntu vs. Debian differences

2021-01-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1756538 Title: Minimal Ubu

Re: [PATCH V4 4/4] bsd-user: space required after semicolon

2021-01-20 Thread shiliyang
Hi Warner: I might misunderstood it before. So, what should I do is to make a new pull request for bsd-user-rebase-3.1 branch. Am I right? I have submitted a pull request: https://github.com/qemu-bsd-user/qemu-bsd-user/pull/4 Please review it. Thanks. Best regards. On 2021/1/18 10:3

[PATCH] tcg: Increase the static number of temporaries

2021-01-20 Thread Richard Henderson
This isn't a total or permanent solution to the problem of running out of temporaries, but it puts off the issue for a bit. Make the assert in tcg_temp_alloc unconditional. If we do run out of temps, this can fail much later as a weird SIGSEGV, due to the buffer overrun of the temp array. Remove

[PULL 10/13] iotests: define group in each iotest

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are going to drop group file. Define group in tests as a preparatory step. The patch is generated by cd tests/qemu-iotests grep '^[0-9]\{3\} ' group | while read line; do file=$(awk '{print $1}' <<< "$line"); groups=$(sed -e 's/^...

[PULL 08/13] iotests: make tests executable

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy All other test files are executable. Fix these. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20210116134424.82867-5-vsement...@virtuozzo.com> Signed-off-by: Eric Blake --- tests/qemu-iotests/283 | 0 tests/qemu-iotests/29

[PULL 12/13] iotests.py: fix qemu_tool_pipe_and_status()

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy qemu_img_args variable is unrelated here. We should print just args. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201130134024.19212-4-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- tests/qemu-iotests/iotests.p

[PULL 13/13] iotests.py: qemu_io(): reuse qemu_tool_pipe_and_status()

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Just drop code duplication. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201130134024.19212-5-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- tests/qemu-iotests/iotests.py | 9 + 1 file changed, 1 insert

[PULL 09/13] iotests/294: add shebang line

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20210116134424.82867-6-vsement...@virtuozzo.com> Signed-off-by: Eric Blake --- tests/qemu-iotests/294 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/294

[PULL 07/13] iotests: fix some whitespaces in test output files

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are going to be stricter about comparing test result with .out files. So, fix some whitespaces now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20210116134424.82867-4-vsement...@virtuozzo.com> Signed-off-by: Eric Blake

[PULL 11/13] iotests/264: fix style

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Fix long line, extra import and one mypy complaint about incompatible int and float. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201118180433.11931-7-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- tests/qemu-i

[PULL 02/13] qemu-nbd: Fix a memleak in nbd_client_thread()

2021-01-20 Thread Eric Blake
From: Alex Chen When the qio_channel_socket_connect_sync() fails we should goto 'out_socket' label to free the 'sioc' instead of goto 'out' label. In addition, there's a lot of redundant code in the successful branch and the error branch, optimize it. Reported-by: Euler Robot Signed-off-by: Ale

[PULL 03/13] block: Honor blk_set_aio_context() context requirements

2021-01-20 Thread Eric Blake
From: Sergio Lopez The documentation for bdrv_set_aio_context_ignore() states this: * The caller must own the AioContext lock for the old AioContext of bs, but it * must not own the AioContext lock for new_context (unless new_context is the * same as the current context of bs). As blk_set_ai

[PULL 04/13] nbd/server: Quiesce coroutines on context switch

2021-01-20 Thread Eric Blake
From: Sergio Lopez When switching between AIO contexts we need to me make sure that both recv_coroutine and send_coroutine are not scheduled to run. Otherwise, QEMU may crash while attaching the new context with an error like this one: aio_co_schedule: Co-routine was already scheduled in 'aio_co

[PULL 06/13] iotests/303: use dot slash for qcow2.py running

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy If you run './check 303', check includes common.config which adjusts $PATH to include '.' first, and therefore finds qcow2.py on PATH. But if you run './303' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by other means, the t

[PULL 01/13] qemu-nbd: Fix a memleak in qemu_nbd_client_list()

2021-01-20 Thread Eric Blake
From: Alex Chen When the qio_channel_socket_connect_sync() fails we should goto 'out' label to free the 'sioc' instead of return. Reported-by: Euler Robot Signed-off-by: Alex Chen Message-Id: <20201130123651.17543-1-alex.c...@huawei.com> Reviewed-by: Alberto Garcia Signed-off-by: Eric Blake

[PULL 05/13] iotests/277: use dot slash for nbd-fault-injector.py running

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy If you run './check 277', check includes common.config which adjusts $PATH to include '.' first, and therefore finds nbd-fault-injector.py on PATH. But if you run './277' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by other

[PULL 00/13] NBD patches through 2021-01-20

2021-01-20 Thread Eric Blake
The following changes since commit 48202c712412c803ddb56365c7bca322aa4e7506: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210119-1' into staging (2021-01-19 15:47:23 +) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2021

Re: [PATCH 11/11] iotests/264: add backup-cancel test-case

2021-01-20 Thread Eric Blake
On 1/20/21 7:28 PM, Eric Blake wrote: > On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: >> Check that cancel doesn't wait for 10s of nbd reconnect timeout. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> tests/qemu-iotests/264 | 21 ++--- >> 1 file changed, 1

Re: [PATCH v2 for-6.0 0/8] nbd reconnect on open

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! There is a new feature: reconnect on open. It is useful when > start of vm and start of nbd server are not simple to sync. > > v2: rebase on master. > Also, I've discovered that I've sent downstream version of test which > doesn't

Re: [PATCH 00/11] mirror: cancel nbd reconnect

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > The problem > > Assume we have mirror job with nbd target node with enabled reconnect. > Connection failed. So, all current requests to nbd node are waiting for > nbd driver to reconnect. And they will wait for reconnect-dela

Re: [PATCH v2 4/8] iotests.py: qemu_io(): reuse qemu_tool_pipe_and_status()

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > Just drop code duplication. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 9 + > 1 file changed, 1 insertion(+), 8 deletions(-) Reviewed-by: Eric Blake > > diff --git a/tests/qemu-iot

Re: [PATCH v2 3/8] iotests.py: fix qemu_tool_pipe_and_status()

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > qemu_img_args variable is unrelated here. We should print just args. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Eric Bl

RE: [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough

2021-01-20 Thread Zhang, Chen
> -Original Message- > From: Eric Blake > Sent: Wednesday, January 20, 2021 3:33 AM > To: Zhang, Chen ; Jason Wang > ; qemu-dev ; Dr. David > Alan Gilbert ; Markus Armbruster > > Cc: Zhang Chen > Subject: Re: [PATCH 1/3] qapi/net: Add new QMP command for COLO > passthrough > > On 12/2

RE: [PATCH 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-01-20 Thread Rao, Lei
The Primary VM can be shut down when it is in COLO state, which may trigger this bug. About 'shutdown' -> 'colo' -> 'running', I think you are right, I did have the problems you said. For 'shutdown'->'colo', The fixed patch(5647051f432b7c9b57525470b0a79a31339062d2) have been merged. Recently, I

Re: [PATCH v2 2/8] nbd: allow reconnect on open, with corresponding new options

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > Note: currently, using new option with long timeout in qmp command > blockdev-add is not good idea, as qmp interface is blocking, so, > don't add it now, let's add it later after > "monitor: Optionally run handlers in coroutines" series mer

Re: [PATCH 09/11] iotests/264: add mirror-cancel test-case

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Check that cancel doesn't wait for 10s of nbd reconnect timeout. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/264 | 38 ++ > tests/qemu-iotests/264.out | 4 ++-- > 2

Re: [PATCH 11/11] iotests/264: add backup-cancel test-case

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Check that cancel doesn't wait for 10s of nbd reconnect timeout. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/264 | 21 ++--- > 1 file changed, 14 insertions(+), 7 deletions(-) > Reviewed-

Re: [PATCH 10/11] block/backup: implement .cancel job handler

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Cancel in-flight io on target to not waste the time. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/backup.c | 10 ++ > 1 file changed, 10 insertions(+) > Reviewed-by: Eric Blake -- Eric Blake, Principal Soft

Re: [PATCH v7 02/13] confidential guest support: Introduce new confidential guest support class

2021-01-20 Thread David Gibson
On Mon, Jan 18, 2021 at 06:51:24PM +, Dr. David Alan Gilbert wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > Several architectures have mechanisms which are designed to protect guest > > memory from interference or eavesdropping by a compromised hypervisor. AMD > > SEV does th

Re: [PATCH 08/11] iotests.py: qemu_nbd_popen: remove pid file after use

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > To note interfere with other qemu_nbd_popen() calls in same test. not > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > Reviewed-by:

Re: [PATCH 07/11] iotests/264: move to python unittest

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > We are going to add more test cases, so use the library supporting test > cases. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/264 | 93 ++ > tests/qemu-iotests/264.ou

Re: [PATCH 06/11] iotests/264: fix style

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Fix long line, extra import and one mypy complaint about incompatible > int and float. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/264 | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) >

Re: [PATCH 05/11] block/mirror: implement .cancel job handler

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Cancel in-flight io on target to not waste the time. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/mirror.c | 9 + > 1 file changed, 9 insertions(+) > Reviewed-by: Eric Blake -- Eric Blake, Principal Softwar

RE: [PATCH 03/10] Optimize the function of filter_send

2021-01-20 Thread Rao, Lei
OK, you are right, I will change it in V2. Thanks, Lei. -Original Message- From: Lukas Straub Sent: Thursday, January 21, 2021 3:21 AM To: Rao, Lei Cc: Zhang, Chen ; lizhij...@cn.fujitsu.com; jasow...@redhat.com; zhang.zhanghaili...@huawei.com; quint...@redhat.com; dgilb...@redhat.c

Re: [PATCH v1 2/2] spapr.c: add 'name' property for hotplugged CPUs nodes

2021-01-20 Thread David Gibson
On Wed, Jan 20, 2021 at 08:23:05PM -0300, Daniel Henrique Barboza wrote: > In the CPU hotunplug bug [1] the guest kernel throws a scary > message in dmesg: > > pseries-hotplug-cpu: Failed to offline CPU , rc: -16 > > The reason isn't related to the bug though. This happens because the > kernel fi

Re: [PATCH v1 1/2] spapr.c: use g_auto* with 'nodename' in CPU DT functions

2021-01-20 Thread David Gibson
On Wed, Jan 20, 2021 at 08:23:04PM -0300, Daniel Henrique Barboza wrote: > Next patch will use the 'nodename' string in spapr_core_dt_populate() > after the point it's being freed today. > > Instead of moving 'g_free(nodename)' around, let's do a QoL change in > both CPU DT functions where 'nodena

[PATCH v1 2/2] spapr.c: add 'name' property for hotplugged CPUs nodes

2021-01-20 Thread Daniel Henrique Barboza
In the CPU hotunplug bug [1] the guest kernel throws a scary message in dmesg: pseries-hotplug-cpu: Failed to offline CPU , rc: -16 The reason isn't related to the bug though. This happens because the kernel file arch/powerpc/platform/pseries/hotplug-cpu.c, function dlpar_cpu_remove(), is not fin

[PATCH v1 1/2] spapr.c: use g_auto* with 'nodename' in CPU DT functions

2021-01-20 Thread Daniel Henrique Barboza
Next patch will use the 'nodename' string in spapr_core_dt_populate() after the point it's being freed today. Instead of moving 'g_free(nodename)' around, let's do a QoL change in both CPU DT functions where 'nodename' is being freed, and use g_autofree to avoid the 'g_free()' call altogether. Si

[PATCH v1 0/2] spapr.c: add 'name' property for hotplugged CPUs nodes

2021-01-20 Thread Daniel Henrique Barboza
Hi, We're not adding the 'name' property in the hotplugged CPU nodes, and this is being reflected in the kernel in a CPU hotunplug bug. See patch 02 for more info. Daniel Henrique Barboza (2): spapr.c: use g_auto* with 'nodename' in CPU DT functions spapr.c: add 'name' property for hotplugg

Re: [PATCH 04/11] job: add .cancel handler for the driver

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > To be used in mirror in the following commit to cancel in-flight io on > target to not waste the time. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/qemu/job.h | 5 + > job.c | 3 +++ > 2 files changed

Re: [PATCH 03/11] block/raw-format: implement .bdrv_cancel_in_flight handler

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > We are going to cancel in-flight requests on mirror nbd target on job > cancel. Still nbd is often used not directly but as raw-format child. > So, add pass-through handler here. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > b

Re: [PATCH 02/11] block/nbd: implement .bdrv_cancel_in_flight

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Just stop waiting for connection in existing requests. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd.c | 15 +++ > 1 file changed, 15 insertions(+) > That turned out to be rather easy ;) Reviewed-by: E

Re: [PATCH v6 00/11] hvf: Implement Apple Silicon Support

2021-01-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/2021012022.71840-1-ag...@csgraf.de/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 2021012022.71840-1-ag...@csgraf.de Subject: [PATCH v6 00/11] hvf: Implement Apple Silicon

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-20 Thread Peter Lieven
 > Am 19.01.2021 um 15:20 schrieb Jason Dillaman : > > On Tue, Jan 19, 2021 at 4:36 AM Peter Lieven wrote: >>> Am 18.01.21 um 23:33 schrieb Jason Dillaman: >>> On Fri, Jan 15, 2021 at 10:39 AM Peter Lieven wrote: Am 15.01.21 um 16:27 schrieb Jason Dillaman: > On Thu, Jan 14, 2021 at 2

[PATCH v6 11/11] hvf: arm: Implement -cpu host

2021-01-20 Thread Alexander Graf
Now that we have working system register sync, we push more target CPU properties into the virtual machine. That might be useful in some situations, but is not the typical case that users want. So let's add a -cpu host option that allows them to explicitly pass all CPU capabilities of their host C

[PATCH v6 07/11] hvf: Add Apple Silicon support

2021-01-20 Thread Alexander Graf
With Apple Silicon available to the masses, it's a good time to add support for driving its virtualization extensions from QEMU. This patch adds all necessary architecture specific code to get basic VMs working. It's still pretty raw, but definitely functional. Known limitations: - Vtimer ackn

[PATCH v6 10/11] hvf: arm: Add support for GICv3

2021-01-20 Thread Alexander Graf
We currently only support GICv2 emulation. To also support GICv3, we will need to pass a few system registers into their respective handler functions. This patch adds handling for all of the required system registers, so that we can run with more than 8 vCPUs. Signed-off-by: Alexander Graf Acked

[PATCH v6 08/11] arm: Add Hypervisor.framework build target

2021-01-20 Thread Alexander Graf
Now that we have all logic in place that we need to handle Hypervisor.framework on Apple Silicon systems, let's add CONFIG_HVF for aarch64 as well so that we can build it. Signed-off-by: Alexander Graf Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov (x86 only) --- v1 -> v2: - Fix b

[PATCH v6 09/11] arm/hvf: Add a WFI handler

2021-01-20 Thread Alexander Graf
From: Peter Collingbourne Sleep on WFI until the VTIMER is due but allow ourselves to be woken up on IPI. In this implementation IPI is blocked on the CPU thread at startup and pselect() is used to atomically unblock the signal and begin sleeping. The signal is sent unconditionally so there's no

[PATCH v6 06/11] hvf: Simplify post reset/init/loadvm hooks

2021-01-20 Thread Alexander Graf
The hooks we have that call us after reset, init and loadvm really all just want to say "The reference of all register state is in the QEMU vcpu struct, please push it". We already have a working pushing mechanism though called cpu->vcpu_dirty, so we can just reuse that for all of the above, synci

[PATCH v6 03/11] hvf: Move common code out

2021-01-20 Thread Alexander Graf
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To prepare for support for multiple architectures, let's move common code out into its own accel directory. Signed-off-by: Alexander Graf Reviewed-by: Roman

[PATCH v6 04/11] hvf: Introduce hvf vcpu struct

2021-01-20 Thread Alexander Graf
We will need more than a single field for hvf going forward. To keep the global vcpu struct uncluttered, let's allocate a special hvf vcpu struct, similar to how hax does it. Signed-off-by: Alexander Graf Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Reviewed-by: Alex Bennée --- v4

[PATCH v6 01/11] hvf: Add hypervisor entitlement to output binaries

2021-01-20 Thread Alexander Graf
In macOS 11, QEMU only gets access to Hypervisor.framework if it has the respective entitlement. Add an entitlement template and automatically self sign and apply the entitlement in the build. Signed-off-by: Alexander Graf Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov --- v1 -> v2:

[PATCH v6 05/11] arm: Set PSCI to 0.2 for HVF

2021-01-20 Thread Alexander Graf
In Hypervisor.framework, we just pass PSCI calls straight on to the QEMU emulation of it. That means, if TCG is compatible with PSCI 0.2, so are we. Let's transpose that fact in code too. Signed-off-by: Alexander Graf Reviewed-by: Roman Bolshakov --- v3 -> v4: - Combine both if statements

[PATCH v6 00/11] hvf: Implement Apple Silicon Support

2021-01-20 Thread Alexander Graf
Now that Apple Silicon is widely available, people are obviously excited to try and run virtualized workloads on them, such as Linux and Windows. This patch set implements a fully functional version to get the ball going on that. With this applied, I can successfully run both Linux and Windows as

[PATCH v6 02/11] hvf: x86: Remove unused definitions

2021-01-20 Thread Alexander Graf
The hvf i386 has a few struct and cpp definitions that are never used. Remove them. Suggested-by: Roman Bolshakov Signed-off-by: Alexander Graf Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov --- target/i386/hvf/hvf-i386.h | 16 1 file changed, 16 deletions(-) diff -

Re: [PATCH v3 00/12] hw/block/nvme: misc cmb/pmr patches and bump to v1.4

2021-01-20 Thread Klaus Jensen
On Jan 19 11:14, Klaus Jensen wrote: > From: Klaus Jensen > > This is a resend of "hw/block/nvme: allow cmb and pmr to coexist" with > some more PMR work added (PMR RDS/WDS support). > > This includes a resurrection of Andrzej's series[1] from back July. > > Andrzej's main patch basically moved

Re: [PATCH 01/11] block: add new BlockDriver handler: bdrv_cancel_in_flight

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > It will be used to stop retrying NBD requests on mirror cancel. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block.h | 3 +++ > include/block/block_int.h | 9 + > block/io.c| 11 +++

Re: [PATCH v2 1/8] block/nbd: move initial connect to coroutine

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > We are going to implement reconnect-on-open. Let's reuse existing > reconnect loop. For this, do initial connect in connection coroutine. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd.c | 94 ++

Re: [PATCH v3 12/12] hw/block/nvme: lift cmb restrictions

2021-01-20 Thread Minwoo Im
Nice for codes much more clean. Reviewed-by: Minwoo Im

Re: [PATCH v3 07/12] hw/block/nvme: remove redundant zeroing of PMR registers

2021-01-20 Thread Minwoo Im
Reviewed-by: Minwoo Im

Re: [PATCH v3 10/12] hw/block/nvme: move cmb logic to v1.4

2021-01-20 Thread Minwoo Im
Reviewed-by: Minwoo Im

Re: [PATCH v4 01/16] block: refactor bdrv_check_request: add errp

2021-01-20 Thread Eric Blake
On 12/11/20 12:39 PM, Vladimir Sementsov-Ogievskiy wrote: > It's better to pass &error_abort than just assert that result is 0: on > crash, we'll immediately see the reason in the backtrace. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block_int.h| 2 +- > block/fil

Re: [RFC PATCH V3 8/8] hw/block/nvme: Add Identify Active Namespace ID List

2021-01-20 Thread Minwoo Im
> Hello Minwoo, > > By introducing a detached parameter, > you are also implicitly making the following > NVMe commands no longer be spec compliant: > > NVME_ID_CNS_NS, NVME_ID_CNS_CS_NS, > NVME_ID_CNS_NS_ACTIVE_LIST, NVME_ID_CNS_CS_NS_ACTIVE_LIST > > When these commands are called on a detached

Re: [PATCH 0/4] Introduce a battery, AC adapter, and lid button

2021-01-20 Thread Philippe Mathieu-Daudé
Hi Leonid, Marcel, On 1/20/21 9:54 PM, Leonid Bloch wrote: > This series introduces the following ACPI devices: > > * Battery > * AC adapter > * Laptop lid button > > When running QEMU on a laptop, these paravirtualized devices reflect the > state of these physical devices onto the guest. This f

Re: [PATCH] Deprecate pmem=on with non-DAX capable backend file

2021-01-20 Thread Philippe Mathieu-Daudé
Cc'ing MST. On 1/20/21 8:31 PM, Igor Mammedov wrote: > On Mon, 11 Jan 2021 15:33:32 -0500 > Igor Mammedov wrote: > >> It is not safe to pretend that emulated NVDIMM supports >> persistence while backend actually failed to enable it >> and used non-persistent mapping as fall back. >> Instead of f

[PATCH 3/4] hw/acpi: Introduce the QEMU AC adapter

2021-01-20 Thread Leonid Bloch
The AC adapter device communicates the host's AC adapter state to the guest. The probing of the host's AC adapter state occurs on guest ACPI requests, as well as on timed intervals. If a change of the host's AC adapter state is detected on one of the timed probes (connected/disconnected) an ACPI no

[PATCH 2/4] hw/acpi: Introduce the QEMU Battery

2021-01-20 Thread Leonid Bloch
The battery device communicates the host's battery state to the guest. The probing of the host's battery state occurs on guest ACPI requests, as well as on timed intervals. If a change of the host's battery state is detected on one of the timed probes (charging/discharging, rate, charge) an ACPI no

[PATCH 4/4] hw/acpi: Introduce the QEMU lid button

2021-01-20 Thread Leonid Bloch
The button device communicates the host's "lid button" state to the guest. The probing of the host's lid button state occurs on timed intervals. If a change of the host's lid button state is detected (open/closed) an ACPI notification is sent to the guest, so it will be able to act accordingly. Th

[PATCH 1/4] hw/acpi: Increase the number of possible ACPI interrupts

2021-01-20 Thread Leonid Bloch
Increase the number of possible ACPI interrupts from 8, to the maximum available: 64 by default. Signed-off-by: Leonid Bloch --- hw/acpi/core.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 7170bff657..71ba7c17b8 1006

[PATCH 0/4] Introduce a battery, AC adapter, and lid button

2021-01-20 Thread Leonid Bloch
This series introduces the following ACPI devices: * Battery * AC adapter * Laptop lid button When running QEMU on a laptop, these paravirtualized devices reflect the state of these physical devices onto the guest. This functionality is relevant not only for laptops, but also for any other device

Re: [PATCH v7 00/11] Rework iotests/check

2021-01-20 Thread Eric Blake
On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > These series has 3 goals: > > - get rid of group file (to forget about rebase and in-list conflicts) > - introduce human-readable names for tests > - rewrite check into python > > v7: > - fix wording and grammar > - sat

Re: [PATCH v2 0/4] nbd/server: Quiesce coroutines on context switch

2021-01-20 Thread Eric Blake
On 12/14/20 11:05 AM, Sergio Lopez wrote: > This series allows the NBD server to properly switch between AIO contexts, > having quiesced recv_coroutine and send_coroutine before doing the transition. > > We need this because we send back devices running in IO Thread owned contexts > to the main co

Re: [PATCH v3 18/19] i386: provide simple 'hv-default=on' option

2021-01-20 Thread Eduardo Habkost
On Wed, Jan 20, 2021 at 08:08:32PM +0100, Igor Mammedov wrote: > On Wed, 20 Jan 2021 15:38:33 +0100 > Vitaly Kuznetsov wrote: > > > Igor Mammedov writes: > > > > > On Fri, 15 Jan 2021 10:20:23 +0100 > > > Vitaly Kuznetsov wrote: > > > > > >> Igor Mammedov writes: > > >> > > >> > On Thu,

[PATCH v3] target/arm: Implement ID_PFR2

2021-01-20 Thread Richard Henderson
This was defined at some point before ARMv8.4, and will shortly be used by new processor descriptions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Update for isar changes v3: Add kvm lookup --- target/arm/cpu.h| 1 + target/arm/helper.c | 4 ++-- target/arm/kvm64.c

Re: [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support

2021-01-20 Thread Matthew Rosato
On 1/20/21 2:18 PM, Pierre Morel wrote: On 1/20/21 4:59 PM, Matthew Rosato wrote: On 1/20/21 9:45 AM, Pierre Morel wrote: On 1/20/21 3:03 PM, Matthew Rosato wrote: On 1/20/21 4:12 AM, Pierre Morel wrote: On 1/19/21 9:44 PM, Matthew Rosato wrote: Today, ISM devices are completely disallo

Re: [PATCH] docs/system: Deprecate `-cpu ..., +feature, -feature` syntax

2021-01-20 Thread David Edmondson
On Wednesday, 2021-01-20 at 15:12:41 -05, Eduardo Habkost wrote: > The ordering semantics of +feature/-feature is tricky and not > obvious, and it requires a custom option parser. Deprecate that > syntax so we can eventually remove the custom -cpu option parser > and plus_features/minus_features

[PATCH] docs/system: Deprecate `-cpu ...,+feature,-feature` syntax

2021-01-20 Thread Eduardo Habkost
The ordering semantics of +feature/-feature is tricky and not obvious, and it requires a custom option parser. Deprecate that syntax so we can eventually remove the custom -cpu option parser and plus_features/minus_features global variables in i386. Signed-off-by: Eduardo Habkost --- docs/syste

Re: [PATCH v2 1/1] linux-user/signal: Decode waitid si_code

2021-01-20 Thread Andreas K . Hüttel
> > This patch just passes the waitid status directly back to the guest. > This works at least as well as the previous versions, so ++ from me. Will do more testing over the next days to see if it maybe also improves the additional oddities I observed. Tested-by: Andreas K. Hüttel > Bugli

Re: [PATCH v3 18/19] i386: provide simple 'hv-default=on' option

2021-01-20 Thread Eduardo Habkost
On Wed, Jan 20, 2021 at 02:13:12PM +0100, Igor Mammedov wrote: > On Fri, 15 Jan 2021 10:20:23 +0100 > Vitaly Kuznetsov wrote: > > > Igor Mammedov writes: > > > > > On Thu, 7 Jan 2021 16:14:49 +0100 > > > Vitaly Kuznetsov wrote: [...] > > >> -No Hyper-V enlightenments are enabled by default by

  1   2   3   4   >