Re: [PATCH RFC 23/32] python//machine.py: reorder __init__

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: Put the init arg handling all at the top, and mostly in order (deviating when one is dependent on another), and put what is effectively runtime state declaration at the bottom. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 29

Re: [PATCH RFC 21/32] python//machine.py: remove logging configuration

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: Python 3.5 and above do not print a warning when logging is not configured. As a library, it's best practice to leave logging configuration to the client executable. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 3 --- 1 file changed, 3

[PATCH RFC 27/32] python//machine.py: Add _qmp access shim

2020-05-14 Thread John Snow
Like many other Optional[] types, it's not always a given that this object will be set. Wrap it in a type-shim that raises a meaningful error and will always return a concrete type. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 12 +--- 1 file changed, 9 insertions(+), 3

Re: [PATCH v3 03/10] iotests/283: make executable

2020-05-14 Thread Philippe Mathieu-Daudé
On 4/21/20 9:35 AM, Vladimir Sementsov-Ogievskiy wrote: All other test files are executable, except for this one. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/283 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755

Re: [PATCH v2 5/6] target/ppc: Fix arguments to ppc_radix64_partition_scoped_xlate()

2020-05-14 Thread Cédric Le Goater
On 5/14/20 12:57 AM, Greg Kurz wrote: > The last two arguments have the bool type. Also, we shouldn't raise an > exception when using gdbstub. > > This was found while reading the code. Since it only affects the powernv > machine, I didn't dig further to find an actual bug. > > Fixes:

Re: [PATCH v2 2/6] target/ppc: Pass const pointer to ppc_radix64_get_fully_qualified_addr()

2020-05-14 Thread Cédric Le Goater
On 5/14/20 12:56 AM, Greg Kurz wrote: > This doesn't require write access to the CPU registers. > > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > target/ppc/mmu-radix64.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target/ppc/mmu-radix64.c

Re: [PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Jason Wang
On 2020/5/14 下午3:33, Maxime Coquelin wrote: It is usefull for the Vhost-user backend to know about about the Virtio device status updates, especially when the driver sets the DRIVER_OK bit. With that information, no more need to do hazardous assumptions on when the driver is done with the

proposal: deprecate -readconfig/-writeconfig

2020-05-14 Thread Paolo Bonzini
IMHO configuration files are in general a failed experiment. In practice, they do not add much value over just a shell script because they don't allow configuring all QEMU options, they are very much fixed (by their nature). I think it's more or less agreed that they are not solving any problem

[PATCH RFC 29/32] python//qtest.py: Check before accessing _qtest

2020-05-14 Thread John Snow
It can be None; so add assertions or exceptions where appropriate to guard the access accordingly. Signed-off-by: John Snow --- python/qemu/lib/qtest.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/python/qemu/lib/qtest.py b/python/qemu/lib/qtest.py index

Re: [RESEND PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2

2020-05-14 Thread Cédric Le Goater
>> --- a/hw/ppc/spapr.c >> +++ b/hw/ppc/spapr.c >> @@ -446,7 +446,8 @@ static int spapr_dt_dynamic_memory_v2(SpaprMachineState >> *spapr, void *fdt, >> g_assert(drc); >> elem = spapr_get_drconf_cell(size / lmb_size, addr, >>

Re: [PATCH RFC 16/32] python//qmp.py: re-absorb MonitorResponseError

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: When I initially split this out, I considered this more of a machine error than a QMP protocol error, but I think that's misguided. Move this back to qmp.py and name it QMPResponseError. Convert qmp.command() to use this exception type. Signed-off-by: John

Re: [PATCH 0/4] target/i386: miscellaneous x87 fixes

2020-05-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/alpine.deb.2.21.2005132345100.11...@digraph.polyomino.org.uk/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: alpine.deb.2.21.2005132345100.11...@digraph.polyomino.org.uk Subject: [PATCH 0/4]

Re: [PATCH v4 5/9] blockdev: Split off basic bitmap operations for qemu-img

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: Upcoming patches want to add some basic bitmap manipulation abilities to qemu-img. But blockdev.o is too heavyweight to link into qemu-img (among other things, it would drag in block jobs and transaction support - qemu-img does offline manipulation, where

Re: [PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Raphael Pour
[...] introduced with e6df58a5, stderr won't get closed if the fork option is __not__ set. On 5/14/20 8:31 AM, Raphael Pour wrote: > introduced with e6df58a5, stderr won't get closed if the fork option is > set. -- Hetzner Online GmbH Am Datacenter-Park 1 08223 Falkenstein/Vogtland

[PATCH v2 1/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Raphael Pour
Close inherited stderr of the parent if fork_process is false. Otherwise no one will close it. (introduced by e6df58a5) --- qemu-nbd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 4aa005004e..a324d21c5e 100644 --- a/qemu-nbd.c +++

Re: [PATCH v2 3/6] target/ppc: Don't initialize some local variables in ppc_radix64_xlate()

2020-05-14 Thread Cédric Le Goater
On 5/14/20 12:57 AM, Greg Kurz wrote: > It is the job of the ppc_radix64_get_fully_qualified_addr() function > which is called at the beginning of ppc_radix64_xlate() to set both > lpid *and* pid. It doesn't buy us anything to initialize them first. > > Worse, a bug in

[PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Raphael Pour
Hello, introduced with e6df58a5, stderr won't get closed if the fork option is set. This causes other processes reading stderr to block infinietly or crash while relying on EOF. v2: - Instead of closing the inherited stderr in the child, avoid the dup in the parent if the fork option is

Re: [PATCH v4 6/9] qemu-img: Add bitmap sub-command

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: Include actions for --add, --remove, --clear, --enable, --disable, and --merge (note that --clear is a bit of fluff, because the same can be accomplished by removing a bitmap and then adding a new one in its place, but it matches what QMP commands exist).

[PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Maxime Coquelin
It is usefull for the Vhost-user backend to know about about the Virtio device status updates, especially when the driver sets the DRIVER_OK bit. With that information, no more need to do hazardous assumptions on when the driver is done with the device configuration. Signed-off-by: Maxime

[PATCH RFC 30/32] python/qemu/lib: make 'args' style arguments immutable

2020-05-14 Thread John Snow
These arguments don't need to be mutable and aren't really used as such. Clarify their types as immutable and adjust code to match where necessary. In general, It's probably best not to accept a user-defined mutable object and store it as internal object state unless there's a strong

[PATCH RFC 16/32] python//qmp.py: re-absorb MonitorResponseError

2020-05-14 Thread John Snow
When I initially split this out, I considered this more of a machine error than a QMP protocol error, but I think that's misguided. Move this back to qmp.py and name it QMPResponseError. Convert qmp.command() to use this exception type. Signed-off-by: John Snow --- python/qemu/lib/machine.py

[PATCH RFC 18/32] python//qmp.py: add casts to JSON deserialization

2020-05-14 Thread John Snow
mypy and python type hints are not powerful enough to properly describe JSON messages in Python 3.6. The best we can do, generally, is describe them as Dict[str, Any]. Add casts to coerce this type for static analysis; but do NOT enforce this type at runtime in any way. Note: Python 3.8 adds a

[PATCH RFC 20/32] python//qmp.py: assert sockfile is not None

2020-05-14 Thread John Snow
In truth, if you don't do this, you'll just get a TypeError exception. Now, you'll get an AssertionError. Is this tangibly better? No. Does mypy complain less? Yes. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/qemu/lib/qmp.py

[PATCH RFC 19/32] python//qmp.py: add QMPProtocolError

2020-05-14 Thread John Snow
In the case that we receive a reply but are unable to understand it, use this exception name to indicate that case. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index

[PATCH RFC 32/32] python/qemu/lib: Add mypy type annotations

2020-05-14 Thread John Snow
These should all be purely annotations with no changes in behavior at all. Signed-off-by: John Snow --- python/qemu/lib/accel.py | 8 ++-- python/qemu/lib/machine.py | 94 +- python/qemu/lib/qmp.py | 44 ++ python/qemu/lib/qtest.py |

[PATCH RFC 31/32] python/qemu: add mypy to Pipfile

2020-05-14 Thread John Snow
Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 37 - 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index e396e56e06..80bd6c3188 100644 --- a/python/Pipfile +++ b/python/Pipfile @@

Re: [PATCH RFC 19/32] python//qmp.py: add QMPProtocolError

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: In the case that we receive a reply but are unable to understand it, use this exception name to indicate that case. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python/qemu/lib/qmp.py

Re: [PATCH RFC 29/32] python//qtest.py: Check before accessing _qtest

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:54 AM, John Snow wrote: It can be None; so add assertions or exceptions where appropriate to guard the access accordingly. Signed-off-by: John Snow --- python/qemu/lib/qtest.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[Bug 1686980] Re: qemu is very slow when adding 16, 384 virtio-scsi drives

2020-05-14 Thread Thomas Huth
Is this faster nowadays if you use the new -blockdev parameter instead of -drive? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1686980 Title:

Re: [PATCH v5 00/12] Cadence GEM Fixes

2020-05-14 Thread Jason Wang
On 2020/5/12 下午10:54, Sai Pavan Boddu wrote: Hi, Following patch series fixes issues with priority queues, Adds JUMBO Frame support, Makes Debug statements compilable & Fixes related to multicast frames. Changes for V2: Fixed build failure on fedora docker machine Fix buggy

Re: [RESEND PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2

2020-05-14 Thread David Gibson
On Thu, May 14, 2020 at 08:05:17AM +0200, Cédric Le Goater wrote: > >> --- a/hw/ppc/spapr.c > >> +++ b/hw/ppc/spapr.c > >> @@ -446,7 +446,8 @@ static int > >> spapr_dt_dynamic_memory_v2(SpaprMachineState *spapr, void *fdt, > >> g_assert(drc); > >> elem =

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Max Reitz
On 13.05.20 22:09, Vladimir Sementsov-Ogievskiy wrote: > 13.05.2020 17:56, Max Reitz wrote: >> This command allows mapping block node names to aliases for the purpose >> of block dirty bitmap migration. >> >> This way, management tools can use different node names on the source >> and destination

Re: [PATCH v6 19/20] hw/block/nvme: do cmb/pmr init as part of pci init

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 6:46 AM, Klaus Jensen wrote: From: Klaus Jensen Having the patch subject duplicated ease review (not all email client display email subject close to email content): "Do cmb/pmr init as part of pci init." Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen

Re: [PATCH RFC 14/32] python//qmp.py: use True/False for non/blocking modes

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: The type system doesn't want integers. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index b91c9d5c1c..a634c4e26c 100644 ---

Re: [PATCH v10 14/14] iotests: use python logging for iotests.log()

2020-05-14 Thread John Snow
On 3/31/20 9:44 AM, Kevin Wolf wrote: > Am 31.03.2020 um 02:00 hat John Snow geschrieben: >> We can turn logging on/off globally instead of per-function. >> >> Remove use_log from run_job, and use python logging to turn on >> diffable output when we run through a script entry point. >> >>

Re: [PATCH] python: remove more instances of sys.version_info

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 5:52 AM, John Snow wrote: We guarantee 3.5+ everywhere; remove more dead checks. In general, try to avoid using version checks and instead prefer to attempt behavior when possible. Signed-off-by: John Snow --- scripts/analyze-migration.py | 5 -

Re: [PATCH v2 0/6] target/ppc: Various clean-up and fixes for radix64

2020-05-14 Thread David Gibson
On Thu, May 14, 2020 at 12:56:42AM +0200, Greg Kurz wrote: > First three patches of this series are simple cleanups. The other > ones fix some regressions introduced by Cedric's recent addition > of partition-scoped translation. Applied to ppc-for-5.1, thanks. > > Changes since v1: > - fix

[Bug 1878501] Re: qemu-i386 does not define AT_SYSINFO

2020-05-14 Thread Laurent Vivier
Richard, this problem seems related to the work you already done on vsyscalls: b26491b4d4f8 ("linux-user/i386: Emulate x86_64 vsyscalls") I don't know if we should support AT_SYSINFO or consider this as a bug of the target libc. -- You received this bug notification because you are a member

[PATCH RFC 28/32] python//machine.py: fix _popen access

2020-05-14 Thread John Snow
As always, Optional[T] causes problems with unchecked access. Add a helper that asserts the pipe is present before we attempt to talk with it. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git

[PATCH RFC 24/32] python//machine.py: Don't modify state in _base_args()

2020-05-14 Thread John Snow
Don't append to the _remove_files list during _base_args; instead do so during _launch. Rework _base_args as a @property to help facilitate this impression. This has the additional benefit of making the type of _console_address easier to analyze statically. Signed-off-by: John Snow ---

[PATCH RFC 12/32] python/qemu/lib: fix socket.makefile() typing

2020-05-14 Thread John Snow
Note: A bug in typeshed (https://github.com/python/typeshed/issues/3977) misinterprets the type of makefile(). Work around this by explicitly stating that we are opening a text-mode file. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 10 +++--- python/qemu/lib/qtest.py | 12

[PATCH RFC 25/32] python//machine.py: Handle None events in event_wait

2020-05-14 Thread John Snow
If the timeout is 0, we can get None back. Handle this explicitly. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/qemu/lib/machine.py b/python/qemu/lib/machine.py index 8548c7c32d..61ee3a0e81 100644 ---

Re: [PATCH v2 4/6] target/ppc: Add missing braces in ppc_radix64_partition_scoped_xlate()

2020-05-14 Thread Cédric Le Goater
On 5/14/20 12:57 AM, Greg Kurz wrote: > As per CODING_STYLE. > > Fixes: d04ea940c597 "target/ppc: Add support for Radix partition-scoped > translation" > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > target/ppc/mmu-radix64.c |3 ++- > 1 file changed, 2 insertions(+), 1

Re: [PATCH v2 6/6] target/ppc: Don't update radix PTE R/C bits with gdbstub

2020-05-14 Thread Cédric Le Goater
On 5/14/20 12:57 AM, Greg Kurz wrote: > gdbstub shouldn't silently change guest visible state when doing address > translation. Since the R/C bits can only be updated when handling a MMU > fault, let's reuse the cause_excp flag and rename it to guest_visible. > While here drop a not very useful

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Max Reitz
On 13.05.20 18:11, Eric Blake wrote: > On 5/13/20 9:56 AM, Max Reitz wrote: >> This command allows mapping block node names to aliases for the purpose >> of block dirty bitmap migration. >> >> This way, management tools can use different node names on the source >> and destination and pass the

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-14 Thread Jason Wang
On 2020/5/13 下午5:36, Dima Stepanov wrote: On Wed, May 13, 2020 at 11:00:38AM +0800, Jason Wang wrote: On 2020/5/12 下午5:08, Dima Stepanov wrote: On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: On 2020/5/11 下午5:11, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:05:58AM +0800,

[Bug 1805256] Re: qemu-img hangs on rcu_call_ready_event logic in Aarch64 when converting images

2020-05-14 Thread Andrew Cloke
** Changed in: kunpeng920 Status: Triaged => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1805256 Title: qemu-img hangs on rcu_call_ready_event logic in Aarch64 when

Re: Assertion failure through vring_split_desc_read

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 1:24 AM, John Snow wrote: On 5/10/20 11:51 PM, Alexander Bulekov wrote: Hello, While fuzzing, I found an input that triggers an assertion failure through virtio-rng -> vring_split_desc_read. Maybe this is related to: Message-ID: <20200511033001.dzvtbdhl3oz5p...@mozz.bu.edu>

[PATCH RFC 21/32] python//machine.py: remove logging configuration

2020-05-14 Thread John Snow
Python 3.5 and above do not print a warning when logging is not configured. As a library, it's best practice to leave logging configuration to the client executable. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH RFC 22/32] python//machine.py: Fix monitor address typing

2020-05-14 Thread John Snow
Prior to this, it's difficult for mypy to intuit what the concrete type of the monitor address is; it has difficulty inferring the type across two variables. Create _monitor_address as a property that always returns a valid address to simply static type analysis. To preserve our ability to clean

[PATCH RFC 17/32] python//qmp.py: Do not return None from cmd_obj

2020-05-14 Thread John Snow
This makes typing the qmp library difficult, as it necessitates wrapping Optional[] around the type for every return type up the stack. At some point, it becomes difficult to discern or remember why it's None instead of the expected object. Use the python exception system to tell us exactly why

[PATCH RFC 23/32] python//machine.py: reorder __init__

2020-05-14 Thread John Snow
Put the init arg handling all at the top, and mostly in order (deviating when one is dependent on another), and put what is effectively runtime state declaration at the bottom. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 29 + 1 file changed, 17

Re: [PATCH RFC 11/32] python/qemu/lib: remove Python2 style super() calls

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: Use the Python3 style instead. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/lib/machine.py | 2 +- python/qemu/lib/qtest.py | 15 +++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git

Re: [PATCH 0/3] s390x: improve documentation

2020-05-14 Thread Cornelia Huck
On Tue, 5 May 2020 15:50:22 +0200 Cornelia Huck wrote: > The documentation for the s390x system emulation target still has quite > a bit of room for improvement, so I started adding some device documentation. > > I'm not quite happy with the long command/output lines in the 3270 and > vfio-ccw

Re: [PATCH v2 1/6] target/ppc: Pass const pointer to ppc_radix64_get_prot_amr()

2020-05-14 Thread Cédric Le Goater
On 5/14/20 12:56 AM, Greg Kurz wrote: > This doesn't require write access to the CPU structure. > > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > target/ppc/mmu-radix64.h |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH v6 18/20] hw/block/nvme: factor out pmr setup

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 6:46 AM, Klaus Jensen wrote: From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 95 ++--- 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c

[PATCH RFC 15/32] python//qmp.py: Define common types

2020-05-14 Thread John Snow
Define some common types that we'll need to annotate a lot of other functions going forward. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index a634c4e26c..911da59888

[PATCH RFC 26/32] python//machine.py: use qmp.command

2020-05-14 Thread John Snow
machine.py and qmp.py both do the same thing here; refactor machine.py to use qmp.py's functionality more directly. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/python/qemu/lib/machine.py

[PATCH RFC 09/32] python/qemu: add pylint to Pipfile

2020-05-14 Thread John Snow
A bug in pylint 2.5.1 and 2.5.2 causes false positives for relative imports. This version is pinned at 2.5.0 until a fix is available. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 123 2 files changed, 124

[PATCH RFC 14/32] python//qmp.py: use True/False for non/blocking modes

2020-05-14 Thread John Snow
The type system doesn't want integers. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index b91c9d5c1c..a634c4e26c 100644 --- a/python/qemu/lib/qmp.py +++

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-14 Thread Jason Wang
On 2020/5/13 下午5:47, Dima Stepanov wrote: case CHR_EVENT_CLOSED: /* a close event may happen during a read/write, but vhost * code assumes the vhost_dev remains setup, so delay the * stop & clear to idle. * FIXME: better handle failure in vhost code,

Re: Questionable aspects of QEMU Error's design

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
28.04.2020 08:20, Vladimir Sementsov-Ogievskiy wrote: 27.04.2020 18:36, Markus Armbruster wrote: Markus Armbruster writes: Markus Armbruster writes: QEMU's Error was patterned after GLib's GError.  Differences include: [...] * Return value conventions    Common: non-void functions

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-14 Thread Alex Williamson
On Thu, 14 May 2020 09:32:15 -0700 John G Johnson wrote: > Thanos and I have made some changes to the doc in response to the > feedback we’ve received. The biggest difference is that it is less reliant > on the reader being familiar with the current VFIO implementation. We’d > appreciate

[PATCH v2 00/17] target/mips: FPU and other cleanups and improvements

2020-05-14 Thread Aleksandar Markovic
This series contains mostly cosmetic FPU cleanups aimed to make source code recognition easier for tools like gdb, gcov, calgrind, and others. There is also a patch that refactors conversion from ieee to mips fp exception flags. This refactoring will improve the performance of almost all

[PATCH Kernel v20 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu

2020-05-14 Thread Kirti Wankhede
Calculate and cache pgsize_bitmap when iommu->domain_list is updated and iommu->external_domain is set for mdev device. Add iommu->lock protection when cached pgsize_bitmap is accessed. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- drivers/vfio/vfio_iommu_type1.c | 88

[PATCH Kernel v20 8/8] vfio: Selective dirty page tracking if IOMMU backed device pins pages

2020-05-14 Thread Kirti Wankhede
Added a check such that only singleton IOMMU groups can pin pages. >From the point when vendor driver pins any pages, consider IOMMU group dirty page scope to be limited to pinned pages. To optimize to avoid walking list often, added flag pinned_page_dirty_scope to indicate if all of the

[PATCH Kernel v20 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-14 Thread Kirti Wankhede
DMA mapped pages, including those pinned by mdev vendor drivers, might get unpinned and unmapped while migration is active and device is still running. For example, in pre-copy phase while guest driver could access those pages, host device or vendor driver can dirty these mapped pages. Such pages

Re: [PATCH v2 0/9] pc-bios: s390x: Cleanup part 1

2020-05-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200514123729.156283-1-fran...@linux.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200514123729.156283-1-fran...@linux.ibm.com Subject: [PATCH v2 0/9] pc-bios: s390x: Cleanup part

Re: [PATCH] msix: allow qword MSI-X table accesses

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 5:16 PM, Michael S. Tsirkin wrote: PCI spec says: For all accesses to MSI-X Table and MSI-X PBA fields, software must use aligned full DWORD or aligned full QWORD transactions; otherwise, the result is undefined. However, since MSI-X was converted to use memory API, QEMU started

Re: [PATCH v2 4/5] migration/block-dirty-bitmap: fix bitmaps migration during mirror job

2020-05-14 Thread Eric Blake
On 12/19/19 2:51 AM, Vladimir Sementsov-Ogievskiy wrote: Important thing for bitmap migration is to select destination block node to obtain the migrated bitmap. Prepatch, on source we use bdrv_get_device_or_node_name() to identify the node, and on target we do bdrv_lookup_bs.

Re: [PATCH v2] bitmaps: Update maintainer

2020-05-14 Thread John Snow
On 5/14/20 2:00 PM, Eric Blake wrote: > Dirty bitmaps are important to incremental backups, including exposure > over NBD where I'm already maintainer. Also, I'm aware that lately I > have been doing as much code/review on bitmaps as John Snow who is > trying to scale back in order to focus

Re: [PATCH 1/1] virtio-9pfs: don't truncate response

2020-05-14 Thread Stefano Stabellini
On Thu, 14 May 2020, Christian Schoenebeck wrote: > Commit SHA-1 16724a173049ac29c7b5ade741da93a0f46edff7 introduced > truncating the response to the currently available transport buffer size, > which was supposed to fix an 9pfs error on Xen boot where transport buffer > might still be smaller

[PATCH 0/1] virtio-9pfs: don't truncate response

2020-05-14 Thread Christian Schoenebeck
The following patch reverts SHA-1 16724a173049ac29c7b5ade741da93a0f46edff for the virtio backend. Greg, it is intended as a quick fix for https://bugs.launchpad.net/bugs/1877688 at least for virtio, for the case the appropriate fix on Xen side might still take a while. Because this bug is too

[PATCH v2 09/17] target/mips: fpu: Demacro NMSUB.

2020-05-14 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git

[PATCH v2 17/17] hw/mips: Convert Malta "ifdef 0"-ed code to comments

2020-05-14 Thread Aleksandar Markovic
The checkpatch complain about "#ifdef 0". Convert corresponding dead code to comments. In future, these cases could be converted to some no-nonsense logging/tracing. Signed-off-by: Aleksandar Markovic CC: Philippe Mathieu-Daudé --- hw/mips/mips_malta.c | 20 1 file

[PATCH v4 2/2] Makefile: remove old compatibility gunks

2020-05-14 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- Makefile | 6 -- 1 file changed, 6 deletions(-) diff --git a/Makefile b/Makefile index 36a6454295..2873d59ea2 100644 --- a/Makefile +++ b/Makefile @@ -562,12 +562,6 @@ slirp/all:

Re: [PATCH v10 14/14] iotests: use python logging for iotests.log()

2020-05-14 Thread John Snow
On 5/14/20 6:06 AM, Kevin Wolf wrote: > Am 14.05.2020 um 08:24 hat John Snow geschrieben: >> On 3/31/20 9:44 AM, Kevin Wolf wrote: >>> Am 31.03.2020 um 02:00 hat John Snow geschrieben: We can turn logging on/off globally instead of per-function. Remove use_log from run_job, and

Re: [PATCH] hw/ide: Make IDEDMAOps handlers take a const IDEDMA pointer

2020-05-14 Thread John Snow
On 5/12/20 3:49 PM, Philippe Mathieu-Daudé wrote: > Handlers don't need to modify the IDEDMA structure. > Make it const. > > Signed-off-by: Philippe Mathieu-Daudé I'll trust your judgment. As long as it still compiles and passes qtests, I'm happy if you're happy. Acked-by: John Snow > ---

[PATCH Kernel v20 0/8] Add UAPIs to support migration for VFIO devices

2020-05-14 Thread Kirti Wankhede
Hi, This patch set adds: * IOCTL VFIO_IOMMU_DIRTY_PAGES to get dirty pages bitmap with respect to IOMMU container rather than per device. All pages pinned by vendor driver through vfio_pin_pages external API has to be marked as dirty during migration. When IOMMU capable device is present

[PATCH Kernel v20 1/8] vfio: UAPI for migration interface for device state

2020-05-14 Thread Kirti Wankhede
- Defined MIGRATION region type and sub-type. - Defined vfio_device_migration_info structure which will be placed at the 0th offset of migration region to get/set VFIO device related information. Defined members of structure and usage on read/write access. - Defined device states and state

RE: [PATCH 6/6] migration/colo.c: Move colo_notify_compares_event to the right place

2020-05-14 Thread Zhanghailiang
> -Original Message- > From: Lukas Straub [mailto:lukasstra...@web.de] > Sent: Thursday, May 14, 2020 10:31 PM > To: Zhanghailiang > Cc: qemu-devel ; Zhang Chen > ; Juan Quintela ; Dr. David > Alan Gilbert > Subject: Re: [PATCH 6/6] migration/colo.c: Move > colo_notify_compares_event to

Re: [RFC 16/18] use errp for gmpo kvm_init

2020-05-14 Thread David Gibson
On Thu, May 14, 2020 at 06:09:46PM +0100, Dr. David Alan Gilbert wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: [snip] > > @@ -649,20 +649,20 @@ static int sev_kvm_init(GuestMemoryProtection *gmpo) > > devname = object_property_get_str(OBJECT(sev), "sev-device", NULL); > >

Re: [RFC 16/18] use errp for gmpo kvm_init

2020-05-14 Thread David Gibson
On Thu, May 14, 2020 at 06:09:46PM +0100, Dr. David Alan Gilbert wrote: > Dave: > You've got some screwy mail headers here, the qemu-devel@nongnu.-rg is > the best one anmd the p...@us.redhat.com is weird as well. Yeah, apparently I forgot how to type when I entered my git-publish command line

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-14 Thread Jan Klos
The problem is that disabled cores are not taken into account.. ALL Zen2 CPUs have L3 cache group per CCX and every CCX has 4 cores, the problem is that some cores in each CCX (1 for 6 and 12-core CPUs, 2 for 3100) are disabled for some models, but they still use their core ids (as can be seen in

Re: [PATCH Kernel v20 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking

2020-05-14 Thread Alex Williamson
On Fri, 15 May 2020 02:07:44 +0530 Kirti Wankhede wrote: > VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: > - Start dirty pages tracking while migration is active > - Stop dirty pages tracking. > - Get dirty pages bitmap. Its user space application's responsibility to > copy content

Re: [PATCH v3 1/2] chardev: enable distinct input for -chardev file

2020-05-14 Thread Markus Armbruster
Alexander Bulekov writes: > char-file already supports distinct paths for input/output but it was > only possible to specify a distinct input through QMP. With this change, > we can also specify a distinct input with the -chardev file argument: > qemu -chardev

Re: [PATCH Kernel v20 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-14 Thread Alex Williamson
On Fri, 15 May 2020 02:07:45 +0530 Kirti Wankhede wrote: > DMA mapped pages, including those pinned by mdev vendor drivers, might > get unpinned and unmapped while migration is active and device is still > running. For example, in pre-copy phase while guest driver could access > those pages,

RE: About migration/colo issue

2020-05-14 Thread Zhanghailiang
Hi Zhang Chen, >From your tracing log, it seems to be hanged in colo_flush_ram_cache()? Does it come across a dead loop there ? I'll test it by using the new qemu. Thanks, Hailiang From: Zhang, Chen [mailto:chen.zh...@intel.com] Sent: Friday, May 15, 2020 11:16 AM To: Zhanghailiang ; Dr . David

RE: [PATCH 6/6] migration/colo.c: Move colo_notify_compares_event to the right place

2020-05-14 Thread Zhanghailiang
Reviewed-by: zhanghailiang > -Original Message- > From: Lukas Straub [mailto:lukasstra...@web.de] > Sent: Monday, May 11, 2020 7:11 PM > To: qemu-devel > Cc: Zhanghailiang ; Juan Quintela > ; Dr. David Alan Gilbert > Subject: [PATCH 6/6] migration/colo.c: Move

About migration/colo issue

2020-05-14 Thread Zhang, Chen
Hi Hailiang/Dave. I found a urgent problem in current upstream code, COLO will stuck on secondary checkpoint and later. The guest will stuck by this issue. I have bisect upstream code, this issue caused by Hailiang's optimize patch: >From 0393031a16735835a441b6d6e0495a1bd14adb90 Mon Sep 17

Re: [PATCH Kernel v20 0/8] Add UAPIs to support migration for VFIO devices

2020-05-14 Thread Alex Williamson
Hi Yan & Intel folks, I'm starting to run out of comments on this series, where are you with porting GVT-g migration to this API? Are there remaining blocking issues? Are we satisfied that the API is sufficient to support vIOMMU now? Thanks, Alex On Fri, 15 May 2020 02:07:39 +0530 Kirti

RE: About migration/colo issue

2020-05-14 Thread Zhang, Chen
From: Zhanghailiang Sent: Friday, May 15, 2020 11:29 AM To: Zhang, Chen ; Dr . David Alan Gilbert ; qemu-devel ; Li Zhijian Cc: Jason Wang ; Lukas Straub Subject: RE: About migration/colo issue Hi Zhang Chen, >From your tracing log, it seems to be hanged in colo_flush_ram_cache()? Does it

Re: [Virtio-fs] [PATCH] virtiofsd: remove symlink fallbacks

2020-05-14 Thread Liu Bo
On Thu, May 14, 2020 at 04:07:36PM +0200, Miklos Szeredi wrote: > Path lookup in the kernel has special rules for looking up magic symlinks > under /proc. If a filesystem operation is instructed to follow symlinks > (e.g. via AT_SYMLINK_FOLLOW or lack of AT_SYMLINK_NOFOLLOW), and the final >

Re: [PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Jason Wang
On 2020/5/14 下午6:14, Maxime Coquelin wrote: On 5/14/20 9:53 AM, Jason Wang wrote: On 2020/5/14 下午3:33, Maxime Coquelin wrote: It is usefull for the Vhost-user backend to know about about the Virtio device status updates, especially when the driver sets the DRIVER_OK bit. With that

[Bug 1877716] Re: Win10 guest unusable after a few minutes

2020-05-14 Thread Anatol Pomozov
Thank you Stefan for the fixes. Once these patches land the upstream repo I'll pull it into the Arch package and reenable io_uring. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1877716 Title:

[PATCH v2 14/17] target/mips: fpu: Remove now unused FLOAT_RINT macro

2020-05-14 Thread Aleksandar Markovic
After demacroing RINT., this macro is not needed anymore. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 13 - 1 file changed, 13 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index dae1331f23..56ba49104e 100644 ---

[PATCH v2 08/17] target/mips: fpu: Demacro NMADD.

2020-05-14 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git

[PATCH v2 15/17] target/mips: fpu: Name better paired-single variables

2020-05-14 Thread Aleksandar Markovic
Use consistently 'l' and 'h' for low and high halves. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 62 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index

Re: [PATCH for-5.1 V3 2/7] hw/mips: Implement the kvm_type() hook in MachineClass

2020-05-14 Thread Aleksandar Markovic
нед, 3. мај 2020. у 12:24 Huacai Chen је написао/ла: > > MIPS has two types of KVM: TE & VZ, and TE is the default type. Now we > can't create a VZ guest in QEMU because it lacks the kvm_type() hook in > MachineClass. Besides, libvirt uses a null-machine to detect the kvm > capability, so by

[PATCH] es1370: check total frame count against current frame

2020-05-14 Thread P J P
From: Prasad J Pandit A guest user may set channel frame count via es1370_write() such that, in es1370_transfer_audio(), total frame count 'size' is lesser than the number of frames that are processed 'cnt'. int cnt = d->frame_cnt >> 16; int size = d->frame_cnt & 0x; if (size <

  1   2   3   4   5   >