Re: [PATCH v3 11/11] qapi: Restrict code generated for user-mode

2020-09-30 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > A lot of QAPI generated code is never used by user-mode. > > Split out qapi_system_modules and qapi_system_or_tools_modules > from the qapi_all_modules array. We now have 3 groups: > - always used > - use by system-mode or tools (usually by the block layer) > -

Re: [PATCH v3 01/11] qapi: Restrict query-uuid command to block code

2020-09-30 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > In commit f68c01470b we restricted the query-uuid command to > machine code, but it is incorrect, as it is also used by the > tools. Therefore move this command again, but to block.json, > which is shared by machine code and tools. > > Fixes: f68c01470b ("qapi:

[PATCH] MAINTAINERS: Ignore bios-tables-test in the qtest section

2020-09-30 Thread Thomas Huth
I'm very often getting CC: on rather large patch series that modify the ACPI stuff of either ARM or x86, just because the bios-table-test is often slightly involved here. I can't say much about ACPI, and the bios-table-test is already covered by the ACPI section in MAINTAINERS, so I'd rather

Re: [PATCH 5/9] hw/block/nvme: support for admin-only command set

2020-09-30 Thread Klaus Jensen
On Sep 30 15:04, Keith Busch wrote: > Signed-off-by: Keith Busch > --- Reviewed-by: Klaus Jensen > hw/block/nvme.c | 1 + > include/block/nvme.h | 3 ++- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/block/nvme.c b/hw/block/nvme.c > index 6c582e6874..ec7363ea40

Re: [PATCH 4/9] hw/block/nvme: validate command set selected

2020-09-30 Thread Klaus Jensen
On Sep 30 15:04, Keith Busch wrote: > Fail to start the controller if the user requests a command set that the > controller does not support. > > Signed-off-by: Keith Busch Reviewed-by: Klaus Jensen > --- > hw/block/nvme.c | 6 +- > hw/block/trace-events | 1 + >

Re: [PATCH 3/9] hw/block/nvme: support per-namespace smart log

2020-09-30 Thread Klaus Jensen
On Sep 30 15:04, Keith Busch wrote: > Let the user specify a specific namespace if they want to get access > stats for a specific namespace. > I don't think this makes sense for v1.3+. NVM Express v1.3d, Section 5.14.1.2: "There is no namespace specific information defined in the SMART / Health

Re: [PATCH 1/9] hw/block/nvme: remove pointless rw indirection

2020-09-30 Thread Klaus Jensen
On Sep 30 15:04, Keith Busch wrote: > The code switches on the opcode to invoke a function specific to that > opcode. There's no point in consolidating back to a common function that > just switches on that same opcode without any actual common code. > Restore the opcode specific behavior without

Re: [PATCH 2/9] hw/block/nvme: fix log page offset check

2020-09-30 Thread Klaus Jensen
On Sep 30 15:04, Keith Busch wrote: > Return error if the requested offset starts after the size of the log > being returned. Also, move the check for earlier in the function so > we're not doing unnecessary calculations. > > Signed-off-by: Keith Busch Reviewed-by: Klaus Jensen > --- >

[PATCH v1 1/1] sheepdog driver patch: fixs the problem of qemu process become crashed when the sheepdog gateway break the IO and then recover

2020-09-30 Thread mingwei
this patch fixs the problem of qemu process become crashed when the sheepdog gateway break the IO for a few seconds and then recover. problem reproduce: 1.start a fio process in qemu to produce IOs to sheepdog gateway, whatever IO type you like. 2.kill the sheepdog gateway. 3.wait for a few

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

2020-09-30 Thread Dan Streetman
On Tue, Sep 22, 2020 at 12:34 PM Daniel P. Berrangé wrote: > > On Wed, Jul 29, 2020 at 03:58:29PM -0400, Dan Streetman wrote: > > The --disable-git-update configure param sets git_update=no, but > > some later checks only look for the .git dir. This changes the > > --enable-git-update to set

Re: [PATCH] hw/arm/aspeed: Map the UART5 device unconditionally

2020-09-30 Thread Andrew Jeffery
On Wed, 30 Sep 2020, at 19:37, Cédric Le Goater wrote: > On 9/30/20 7:29 AM, Andrew Jeffery wrote: > > > > > > On Fri, 18 Sep 2020, at 02:33, Cédric Le Goater wrote: > >> On 9/17/20 6:57 PM, Philippe Mathieu-Daudé wrote: > >>> On 9/16/20 7:51 AM, Cédric Le Goater wrote: > On 9/15/20 7:23

Re: [PATCH] target/riscv: raise exception to HS-mode at get_physical_address

2020-09-30 Thread Alistair Francis
On Sun, Sep 27, 2020 at 12:54 AM Jiangyifei wrote: > > > > > -Original Message- > > From: Alistair Francis [mailto:alistai...@gmail.com] > > Sent: Saturday, September 26, 2020 6:24 AM > > To: Jiangyifei > > Cc: qemu-devel@nongnu.org Developers ; open > > list:RISC-V ; Zhanghailiang > > ;

RE: [PATCH 5/9] hw/block/nvme: support for admin-only command set

2020-09-30 Thread Dmitry Fomichev
> -Original Message- > From: Keith Busch > Sent: Wednesday, September 30, 2020 6:04 PM > To: qemu-bl...@nongnu.org; qemu-devel@nongnu.org; Klaus Jensen > > Cc: Niklas Cassel ; Dmitry Fomichev > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Keith Busch > Subject: [PATCH 5/9] hw/block/nvme:

Re: [PATCH] ssi: Display chip select polarity in monitor 'info qtree'

2020-09-30 Thread Alistair Francis
On Sun, Sep 27, 2020 at 2:20 AM Philippe Mathieu-Daudé wrote: > > It is sometime useful to verify a device chip select polarity > on a SPI bus. Since we have this information available, display > it in the 'info qtree' monitor output: > > $ qemu-system-arm -M lm3s6965evb -monitor stdio -S >

Re: [PATCH 01/10] qdev: add "check if address free" callback for buses

2020-09-30 Thread Paolo Bonzini
On 30/09/20 16:27, Maxim Levitsky wrote: > My patch that switches the direction in scsi_device_find, is supposed to be > completely equavalent, > based on the following train of thought: > > If scsi_device_find finds an exact match it returns only it, as before. > > Otherwise scsi_device_find

RE: [PATCH 8/9] hw/block/nvme: add trace event for requests with non-zero status code

2020-09-30 Thread Dmitry Fomichev
> -Original Message- > From: Keith Busch > Sent: Wednesday, September 30, 2020 6:04 PM > To: qemu-bl...@nongnu.org; qemu-devel@nongnu.org; Klaus Jensen > > Cc: Niklas Cassel ; Dmitry Fomichev > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Keith Busch > Subject: [PATCH 8/9] hw/block/nvme:

RE: [PATCH 2/9] hw/block/nvme: fix log page offset check

2020-09-30 Thread Dmitry Fomichev
> -Original Message- > From: Keith Busch > Sent: Wednesday, September 30, 2020 6:04 PM > To: qemu-bl...@nongnu.org; qemu-devel@nongnu.org; Klaus Jensen > > Cc: Niklas Cassel ; Dmitry Fomichev > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Keith Busch > Subject: [PATCH 2/9] hw/block/nvme:

RE: [PATCH 6/9] hw/block/nvme: reject io commands if only admin command set selected

2020-09-30 Thread Dmitry Fomichev
> -Original Message- > From: Keith Busch > Sent: Wednesday, September 30, 2020 6:04 PM > To: qemu-bl...@nongnu.org; qemu-devel@nongnu.org; Klaus Jensen > > Cc: Niklas Cassel ; Dmitry Fomichev > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Keith Busch > Subject: [PATCH 6/9] hw/block/nvme:

[PATCH 9/9] hw/block/nvme: report actual LBA data shift in LBAF

2020-09-30 Thread Keith Busch
From: Dmitry Fomichev Calculate the data shift value to report based on the set value of logical_block_size device property. In the process, use a local variable to calculate the LBA format index instead of the hardcoded value 0. This makes the code more readable and it will make it easier to

[PATCH 7/9] hw/block/nvme: add nsid to get/setfeat trace events

2020-09-30 Thread Keith Busch
From: Klaus Jensen Include the namespace id in the pci_nvme_{get,set}feat trace events. Signed-off-by: Klaus Jensen Signed-off-by: Keith Busch --- hw/block/nvme.c | 4 ++-- hw/block/trace-events | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c

[PATCH 3/9] hw/block/nvme: support per-namespace smart log

2020-09-30 Thread Keith Busch
Let the user specify a specific namespace if they want to get access stats for a specific namespace. Signed-off-by: Keith Busch --- hw/block/nvme.c | 66 +++- include/block/nvme.h | 1 + 2 files changed, 41 insertions(+), 26 deletions(-) diff --git

[PATCH 6/9] hw/block/nvme: reject io commands if only admin command set selected

2020-09-30 Thread Keith Busch
From: Klaus Jensen If the host sets CC.CSS to 111b, all commands submitted to I/O queues should be completed with status Invalid Command Opcode. Note that this is technically a v1.4 feature, but it does not hurt to implement before we finally bump the reported version implemented.

[PATCH 8/9] hw/block/nvme: add trace event for requests with non-zero status code

2020-09-30 Thread Keith Busch
From: Klaus Jensen If a command results in a non-zero status code, trace it. Signed-off-by: Klaus Jensen Signed-off-by: Keith Busch --- hw/block/nvme.c | 6 ++ hw/block/trace-events | 1 + 2 files changed, 7 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index

[PATCH 1/9] hw/block/nvme: remove pointless rw indirection

2020-09-30 Thread Keith Busch
The code switches on the opcode to invoke a function specific to that opcode. There's no point in consolidating back to a common function that just switches on that same opcode without any actual common code. Restore the opcode specific behavior without going back through another level of

[PATCH 4/9] hw/block/nvme: validate command set selected

2020-09-30 Thread Keith Busch
Fail to start the controller if the user requests a command set that the controller does not support. Signed-off-by: Keith Busch --- hw/block/nvme.c | 6 +- hw/block/trace-events | 1 + include/block/nvme.h | 4 3 files changed, 10 insertions(+), 1 deletion(-) diff --git

[PATCH 5/9] hw/block/nvme: support for admin-only command set

2020-09-30 Thread Keith Busch
Signed-off-by: Keith Busch --- hw/block/nvme.c | 1 + include/block/nvme.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 6c582e6874..ec7363ea40 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -2755,6 +2755,7 @@ static

[PATCH 0/9] nvme qemu cleanups and fixes

2020-09-30 Thread Keith Busch
After going through the zns enabling, I notice the controller enabling is not correct. Then I just continued maked more stuff. The series, I think, contains some of the less controversial patches from the two conflicting zns series, preceeded by some cleanups and fixes from me. If this is all

[PATCH 2/9] hw/block/nvme: fix log page offset check

2020-09-30 Thread Keith Busch
Return error if the requested offset starts after the size of the log being returned. Also, move the check for earlier in the function so we're not doing unnecessary calculations. Signed-off-by: Keith Busch --- hw/block/nvme.c | 22 ++ 1 file changed, 10 insertions(+), 12

Re: [PATCH v4 1/2] Introduce (x86) CPU model deprecation API

2020-09-30 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 03:14:14PM +0800, Robert Hoo wrote: > Complement versioned CPU model framework with the ability of marking some > versions deprecated. When that CPU model is chosen, get some warning. The > warning message is customized, e.g. telling in which future QEMU version will > it

RE: [RFC PATCH v4 22/29] Hexagon (target/hexagon) macros

2020-09-30 Thread Taylor Simpson
> -Original Message- > From: Philippe Mathieu-Daudé On > Behalf Of Philippe Mathieu-Daudé > Sent: Tuesday, September 29, 2020 6:34 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; laur...@vivier.eu; riku.voi...@iki.fi; > aleksandar.m.m...@gmail.com;

Re: [PATCH V1 2/3] amd-iommu: Sync IOVA-to-GPA translation during page invalidation

2020-09-30 Thread Wei Huang
On 09/29 01:34, Alex Williamson wrote: > On Mon, 28 Sep 2020 15:05:05 -0500 > Wei Huang wrote: > > > Add support to sync the IOVA-to-GPA translation at the time of IOMMU > > page invalidation. This function is called when two IOMMU commands, > > AMDVI_CMD_INVAL_AMDVI_PAGES and

RE: [RFC PATCH v4 27/29] Hexagon (linux-user/hexagon) Linux user emulation

2020-09-30 Thread Taylor Simpson
> -Original Message- > From: Laurent Vivier > Sent: Monday, September 28, 2020 3:03 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@redhat.com; riku.voi...@iki.fi; > aleksandar.m.m...@gmail.com; a...@rev.ng > Subject: Re: [RFC PATCH v4 27/29]

[PATCH 13/14] arc: Add support for ARCv2

2020-09-30 Thread cupertinomiranda
From: Shahab Vahedi Add remaining bits of the Synopsys ARCv2 (EM/HS) support into QEMU, configure bits, arch_init and configuration files for softmmu (hardware emulation). Signed-off-by: Shahab Vahedi --- configure | 5 + default-configs/arc-softmmu.mak | 5 +

[PATCH 12/14] arc: Add Synopsys ARC emulation boards

2020-09-30 Thread cupertinomiranda
From: Claudiu Zissulescu Add the Synopsys ARC boards, arc_sim for testing, sim-hs main emulation board using standard UART and nsim which includes a Synopsys ARC specific UART implementation. Signed-off-by: Claudiu Zissulescu --- hw/arc/Makefile.objs | 21 +++ hw/arc/arc_sim.c

[PATCH 11/14] arc: Add gdbstub and XML for debugging support

2020-09-30 Thread cupertinomiranda
From: Shahab Vahedi Register layout for the target and the mechanisms to read and set them. Signed-off-by: Shahab Vahedi --- gdb-xml/arc-aux-minimal.xml | 32 +++ gdb-xml/arc-aux-other.xml | 235 gdb-xml/arc-core-v2.xml | 45 target/arc/gdbstub.c| 421

[PATCH 07/14] arc: Add BCR and AUX registers implementation

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Add the infrastructure to define build configuration (BCR) and auxiliary registers allowing independent modules (MMU, MPU, etc.) to use and extend them. Signed-off-by: Cupertino Miranda --- target/arc/cache.c | 180 target/arc/cache.h | 42

[PATCH 08/14] arc: Add IRQ and timer subsystem support

2020-09-30 Thread cupertinomiranda
From: Claudiu Zissulescu Signed-off-by: Claudiu Zissulescu --- target/arc/irq.c | 658 + target/arc/irq.h | 37 +++ target/arc/timer.c | 456 +++ target/arc/timer.h | 32 +++ 4 files changed, 1183 insertions(+)

[PATCH 09/14] arc: Add memory management unit (MMU) support

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Add Synopsys ARC MMU version 4 support. The implementation is restricted to 8K page size support. Signed-off-by: Cupertino Miranda --- target/arc/mmu.c | 775 +++ target/arc/mmu.h | 165 ++ 2 files changed, 940

[PATCH 10/14] arc: Add memory protection unit (MPU) support

2020-09-30 Thread cupertinomiranda
From: Shahab Vahedi Add memory implementation for Synopsys MPU unit version 3. Synopsys MPU allows to create memory regions against unauthorized execution/read/writes accesses. Signed-off-by: Shahab Vahedi --- target/arc/mpu.c | 653 +++

[PATCH 04/14] arc: TCG and decoder glue code and helpers

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Signed-off-by: Cupertino Miranda --- target/arc/extra_mapping.def | 40 ++ target/arc/helper.c| 293 + target/arc/helper.h| 46 ++ target/arc/op_helper.c | 749 +

[PATCH 05/14] arc: TCG instruction generator and hand-definitions

2020-09-30 Thread cupertinomiranda
From: Shahab Vahedi Add the most generic parts of TCG constructions. It contains the basic infrastructure for fundamental ARC features, such as ZOL (zero overhead loops) and delay-slots. Also includes hand crafted TCG for more intricate instructions, such as vector instructions. Signed-off-by:

[PATCH 02/14] arc: Decoder code

2020-09-30 Thread cupertinomiranda
From: Claudiu Zissulescu The decoder and the disassembler inspired by ARC GNU binutils. Signed-off-by: Claudiu Zissulescu --- disas/arc.c | 460 ++ target/arc/decoder.c| 1276 +++ target/arc/decoder.h| 350 +++

[PATCH 01/14] arc: Add initial core cpu files

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Signed-off-by: Cupertino Miranda --- target/arc/Makefile.objs | 34 +++ target/arc/arc-common.h | 55 target/arc/cpu-param.h | 20 ++ target/arc/cpu-qom.h | 53 target/arc/cpu.c | 468 ++ target/arc/cpu.h

[PATCH 00/14] *** ARC port for review ***

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Hello everyone, It is with utmost pleasure that on behalf of Synopsys I initiate the upstream process for our ARCv2 architecture QEMU port. I am one of the main contributors to this port and member of the Synopsys GNU toolchain team, together with Claudiu Zissulescu and

[PULL v8 00/86] Misc QEMU patches for 2020-09-24

2020-09-30 Thread Paolo Bonzini
The following changes since commit cbba3dc6ea3fc9aa66e9f9eb41051536e3ad7cd0: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-09-30 11:40:38 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch

[PULL 30/86] meson: move libmpathpersist test

2020-09-30 Thread Paolo Bonzini
This is the first compiler/linker test that has been moved to Meson. Add more section headings to keep things clearer. This also fixes static linking to libmpathpersist, which has a dependency on libmultipath but no pkg-config file to describe it. Signed-off-by: Paolo Bonzini --- configure

[PULL 31/86] meson: extend libmpathpersist test for static linking

2020-09-30 Thread Paolo Bonzini
libmultipath has a dependency on libdevmapper, so include it as well when static linking. It seems that the rabbit hole ends there. Signed-off-by: Paolo Bonzini --- meson.build | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/meson.build

[PULL 29/86] meson: move libudev test

2020-09-30 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 14 -- meson.build | 7 --- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/configure b/configure index f9e2f3de65..6f2599f99f 100755 --- a/configure +++ b/configure @@ -908,7 +908,6 @@ Linux) linux_user="yes"

Re: [PATCH v4 41/46] qapi/introspect.py: create a typed 'Node' data structure

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 02:58:04PM -0400, John Snow wrote: > On 9/30/20 2:39 PM, Eduardo Habkost wrote: > > On Wed, Sep 30, 2020 at 12:31:45AM -0400, John Snow wrote: > > > This replaces _make_tree with Node.__init__(), effectively. By creating > > > it as a generic container, we can more

Re: [Bug 1896096] Re: Git version: Build process is broken in block_curl.c.o

2020-09-30 Thread Paolo Bonzini
Yes, of course. Il mer 30 set 2020, 21:25 Frederic Bezies <1896...@bugs.launchpad.net> ha scritto: > Just asking: any hope to see this patch added to qemu git source code? > > -- > You received this bug notification because you are subscribed to the bug > report. >

[Bug 1896096] Re: Git version: Build process is broken in block_curl.c.o

2020-09-30 Thread Frederic Bezies
Just asking: any hope to see this patch added to qemu git source code? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1896096 Title: Git version: Build process is broken in block_curl.c.o Status

Re: [PATCH v3 00/11] user-mode: Prune build dependencies (part 3)

2020-09-30 Thread Paolo Bonzini
Il mer 30 set 2020, 20:57 Alex Bennée ha scritto: > > 1-8 is fine, but I think 9-11 is too much complication (especially not > > really future-proof) for the benefit. > > Isn't qdev considered an internal API for our object and device lifetime > handling (which should be shared) versus QAPI

Re: [PATCH v4 39/46] qapi/introspect.py: Unify return type of _make_tree()

2020-09-30 Thread John Snow
On 9/30/20 2:57 PM, Eduardo Habkost wrote: On Wed, Sep 30, 2020 at 02:32:49PM -0400, John Snow wrote: On 9/30/20 2:24 PM, Eduardo Habkost wrote: On Wed, Sep 30, 2020 at 12:31:43AM -0400, John Snow wrote: Returning a *something* or a Tuple of *something* is hard to accurately type. Let's just

Re: [PATCH v4 41/46] qapi/introspect.py: create a typed 'Node' data structure

2020-09-30 Thread John Snow
On 9/30/20 2:39 PM, Eduardo Habkost wrote: On Wed, Sep 30, 2020 at 12:31:45AM -0400, John Snow wrote: This replaces _make_tree with Node.__init__(), effectively. By creating it as a generic container, we can more accurately describe the exact nature of this particular Node. Signed-off-by: John

Re: [PATCH v4 39/46] qapi/introspect.py: Unify return type of _make_tree()

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 02:32:49PM -0400, John Snow wrote: > On 9/30/20 2:24 PM, Eduardo Habkost wrote: > > On Wed, Sep 30, 2020 at 12:31:43AM -0400, John Snow wrote: > > > Returning a *something* or a Tuple of *something* is hard to accurately > > > type. Let's just always return a tuple for

Re: [PATCH v3 00/11] user-mode: Prune build dependencies (part 3)

2020-09-30 Thread Alex Bennée
Paolo Bonzini writes: > On 30/09/20 19:15, Eduardo Habkost wrote: >> On Wed, Sep 30, 2020 at 06:49:38PM +0200, Philippe Mathieu-Daudé wrote: >>> This is the third part of a series reducing user-mode >>> dependencies. By stripping out unused code, the build >>> and testing time is reduced (as

Re: [PATCH v4 41/46] qapi/introspect.py: create a typed 'Node' data structure

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 12:31:45AM -0400, John Snow wrote: > This replaces _make_tree with Node.__init__(), effectively. By creating > it as a generic container, we can more accurately describe the exact > nature of this particular Node. > > Signed-off-by: John Snow > --- >

[Bug 1894804] Re: Second DEVICE_DELETED event missing during virtio-blk disk device detach

2020-09-30 Thread Lee Yarwood
@Christian Yes we can test this in OpenStack CI with PPAs if you could provide Bionic based builds. Better yet I could even try to setup a git bisect locally if you have steps to build from a source tree somewhere? @James Did you try using OpenStack CI sized hosts (8 vCPUs, 8GB of RAM) and the

Re: [PATCH v4 39/46] qapi/introspect.py: Unify return type of _make_tree()

2020-09-30 Thread John Snow
On 9/30/20 2:24 PM, Eduardo Habkost wrote: On Wed, Sep 30, 2020 at 12:31:43AM -0400, John Snow wrote: Returning a *something* or a Tuple of *something* is hard to accurately type. Let's just always return a tuple for structural consistency. Instances of the 'TreeNode' type can be replaced with

Re: [PATCH v4 37/46] qapi/instrospect.py: add preliminary type hint annotations

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 12:31:41AM -0400, John Snow wrote: > From: Eduardo Habkost > > The typing of _make_tree and friends is a bit involved, but it can be > done with some stubbed out types and a bit of elbow grease. The > forthcoming patches attempt to make some simplifications, but having

Re: [PATCH v4 40/46] qapi/introspect.py: replace 'extra' dict with 'comment' argument

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 12:31:44AM -0400, John Snow wrote: > This is only used to pass in a dictionary with a comment already set, so > skip the runaround and just accept the comment. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v5 09/14] hw/block/nvme: Support Zoned Namespace Command Set

2020-09-30 Thread Klaus Jensen
On Sep 30 14:50, Niklas Cassel wrote: > On Mon, Sep 28, 2020 at 11:35:23AM +0900, Dmitry Fomichev wrote: > > The emulation code has been changed to advertise NVM Command Set when > > "zoned" device property is not set (default) and Zoned Namespace > > Command Set otherwise. > > > > Handlers for

Re: [PATCH v4 39/46] qapi/introspect.py: Unify return type of _make_tree()

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 12:31:43AM -0400, John Snow wrote: > Returning a *something* or a Tuple of *something* is hard to accurately > type. Let's just always return a tuple for structural consistency. > > Instances of the 'TreeNode' type can be replaced with the slightly more > specific

Re: [PATCH 0/4] assorted gcc 10/fedora32 compile warning fixes

2020-09-30 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200930155859.303148-1-borntrae...@de.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200930155859.303148-1-borntrae...@de.ibm.com Subject: [PATCH 0/4] assorted gcc

Re: [PATCH 03/16] target/mips/cp0_timer: Explicit unit in variable name

2020-09-30 Thread Aleksandar Markovic
On Monday, September 28, 2020, Philippe Mathieu-Daudé wrote: > Name variables holding nanoseconds with the '_ns' suffix. > > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Aleksandar Markovic > target/mips/cp0_timer.c | 19 ++- > 1 file changed, 10 insertions(+),

Re: [PATCH 02/16] target/mips: Move cpu_mips_get_random() with CP0 helpers

2020-09-30 Thread Aleksandar Markovic
On Monday, September 28, 2020, Philippe Mathieu-Daudé wrote: > The get_random() helper uses the CP0_Wired register, which is > unrelated to the CP0_Count register use as timer. > Commit e16fe40c872 ("Move the MIPS CPU timer in a separate file") > incorrectly moved this get_random() helper with

Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get

2020-09-30 Thread Maxim Levitsky
On Wed, 2020-09-30 at 19:46 +0200, Paolo Bonzini wrote: > On 30/09/20 16:32, Maxim Levitsky wrote: > > > Compared to Maxim's patch, I am avoiding the extra argument > > > to do_scsi_device_find by moving the RCU_READ_LOCK_GUARD() > > > out of do_scsi_device_find itself. > > Which is a good

Re: [PATCH 06/10] device-core: use atomic_set on .realized property

2020-09-30 Thread Maxim Levitsky
On Wed, 2020-09-30 at 19:44 +0200, Paolo Bonzini wrote: > On 30/09/20 16:31, Maxim Levitsky wrote: > > > + > > > +qatomic_set(>realized, value); > > > +/* > > > + * Ensure that concurrent users see this update prior to > > > + * any other changes done by unrealize.

[PULL 10/12] tests/acpi: add microvm pcie test

2020-09-30 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-11-kra...@redhat.com --- tests/qtest/bios-tables-test.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index

[PULL 06/12] microvm/pcie: add 64bit mmio window

2020-09-30 Thread Gerd Hoffmann
Place the 64bit window at the top of the physical address space, assign 25% of the avaiable address space. Force cpu.host-phys-bits=on for microvm machine typs so this actually works reliable. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id:

[PULL 11/12] acpi/gpex: no reason to use a method for _CRS

2020-09-30 Thread Gerd Hoffmann
... just to return something which is constant anyway. -Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings -{ -Return (ResourceTemplate () -{ -WordBusNumber (ResourceProducer, MinFixed, MaxFixed,

[PULL 08/12] tests/acpi: add empty tests/data/acpi/microvm/DSDT.pcie file

2020-09-30 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-9-kra...@redhat.com --- tests/data/acpi/microvm/DSDT.pcie | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/data/acpi/microvm/DSDT.pcie diff --git

[PULL 04/12] microvm: add irq table

2020-09-30 Thread Gerd Hoffmann
Add a comment with a table listing the IRQs, both legacy pc and microvm side-by-side. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-5-kra...@redhat.com --- include/hw/i386/microvm.h | 22 ++ 1 file changed, 22 insertions(+)

[PULL 05/12] microvm: add pcie support

2020-09-30 Thread Gerd Hoffmann
Uses the existing gpex device which is also used as pcie host bridge on arm/aarch64. For now only a 32bit mmio window and no ioport support. It is disabled by default, use "-machine microvm,pcie=on" to enable. ACPI support must be enabled too because the bus is declared in the DSDT table.

[PULL 02/12] acpi: add acpi_dsdt_add_gpex

2020-09-30 Thread Gerd Hoffmann
Add helper function to generate dsdt aml code for the gpex pci host. Largely copied from arm/virt. Configuration is handled by passing a config struct instead of looked up from memory map. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id:

[PULL 00/12] Microvm 20200930 patches

2020-09-30 Thread Gerd Hoffmann
The following changes since commit b150cb8f67bf491a49a1cb1c7da151eeacbdbcc9: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-09-29 13:18:54 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/microvm-20200930-pull-request for you

[PULL 01/12] move MemMapEntry

2020-09-30 Thread Gerd Hoffmann
It is defined twice already. Move to a common header file to remove duplication and make it available to everybody. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-2-kra...@redhat.com --- include/exec/hwaddr.h | 5 + include/hw/arm/virt.h | 5

[PULL 12/12] tests/acpi: update expected data files

2020-09-30 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-13-kra...@redhat.com --- tests/qtest/bios-tables-test-allowed-diff.h | 5 - tests/data/acpi/microvm/DSDT.pcie | Bin 0 -> 3023 bytes tests/data/acpi/virt/DSDT | Bin

[PULL 09/12] tests/acpi: factor out common microvm test setup

2020-09-30 Thread Gerd Hoffmann
... into new test_acpi_microvm_prepare helper Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-10-kra...@redhat.com --- tests/qtest/bios-tables-test.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PULL 07/12] tests/acpi: allow updates for expected data files

2020-09-30 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-8-kra...@redhat.com --- tests/qtest/bios-tables-test-allowed-diff.h | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h

[PULL 03/12] arm: use acpi_dsdt_add_gpex

2020-09-30 Thread Gerd Hoffmann
Fill gpex config struct from memory map, then call the new acpi_dsdt_add_gpex helper function. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-4-kra...@redhat.com --- hw/arm/virt-acpi-build.c | 175

Re: [PATCH 01/10] qdev: add "check if address free" callback for buses

2020-09-30 Thread Paolo Bonzini
On 28/09/20 11:30, Stefan Hajnoczi wrote: >> +bool (*check_address)(BusState *bus, DeviceState *dev, Error **errp); > Please document this function. I will add this: /* * Return whether the device can be added to @bus, * based on the address that was set (via device

Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get

2020-09-30 Thread Paolo Bonzini
On 30/09/20 16:32, Maxim Levitsky wrote: >> Compared to Maxim's patch, I am avoiding the extra argument >> to do_scsi_device_find by moving the RCU_READ_LOCK_GUARD() >> out of do_scsi_device_find itself. > Which is a good idea, although my mindset was like, I got a device, > lets

Re: [PATCH 06/10] device-core: use atomic_set on .realized property

2020-09-30 Thread Paolo Bonzini
On 30/09/20 16:31, Maxim Levitsky wrote: >> + >> +qatomic_set(>realized, value); >> +/* >> + * Ensure that concurrent users see this update prior to >> + * any other changes done by unrealize. >> + */ >> +smp_wmb(); > > I''l probably never fully

Re: [PATCH v4 04/46] qapi: modify docstrings to be sphinx-compatible

2020-09-30 Thread John Snow
On 9/30/20 4:47 AM, Markus Armbruster wrote: Sadly, the fact that start_if() and end_if() are functions isn't immediately obvious anymore. I've seen :func:`start_if` elsewhere. Is this something we should or want to use? Looks like `start_if()` works just fine too. If you are hard-set in

Re: [PATCH v3 00/11] user-mode: Prune build dependencies (part 3)

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 07:24:24PM +0200, Paolo Bonzini wrote: > On 30/09/20 19:15, Eduardo Habkost wrote: > > On Wed, Sep 30, 2020 at 06:49:38PM +0200, Philippe Mathieu-Daudé wrote: > >> This is the third part of a series reducing user-mode > >> dependencies. By stripping out unused code, the

Re: [PATCH v3 00/11] user-mode: Prune build dependencies (part 3)

2020-09-30 Thread Paolo Bonzini
On 30/09/20 19:15, Eduardo Habkost wrote: > On Wed, Sep 30, 2020 at 06:49:38PM +0200, Philippe Mathieu-Daudé wrote: >> This is the third part of a series reducing user-mode >> dependencies. By stripping out unused code, the build >> and testing time is reduced (as is space used by objects). > I'm

Re: [PATCH v4 38/46] qapi/introspect.py: add _gen_features helper

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 12:31:42AM -0400, John Snow wrote: > _make_tree might receive a dict or some other type. Adding features > information should arguably be performed by the caller at such a time > when we know the type of the object and don't have to re-interrogate it. > > Signed-off-by:

Re: [PATCH v4 04/46] qapi: modify docstrings to be sphinx-compatible

2020-09-30 Thread John Snow
On 9/30/20 4:47 AM, Markus Armbruster wrote: John Snow writes: I did not say "sphinx beautiful", just "sphinx compatible". They will not throw errors when parsed and interpreted as ReST. "Bang on the keyboard until Sphinx doesn't throw errors anymore" might be good enough for a certain kind

Re: [PATCH v7 06/13] qmp: Call monitor_set_cur() only in qmp_dispatch()

2020-09-30 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > Am 30.09.2020 um 15:14 hat Markus Armbruster geschrieben: > > Kevin Wolf writes: > > > > > Am 30.09.2020 um 11:26 hat Markus Armbruster geschrieben: > > >> Kevin Wolf writes: > > >> > > >> > Am 28.09.2020 um 13:42 hat Markus Armbruster geschrieben: > >

Re: [PATCH 2/4] nbd: silence maybe-uninitialized warnings

2020-09-30 Thread Eric Blake
On 9/30/20 10:58 AM, Christian Borntraeger wrote: > gcc 10 from Fedora 32 gives me: > > Compiling C object libblock.fa.p/nbd_server.c.o > ../nbd/server.c: In function ‘nbd_co_client_start’: > ../nbd/server.c:625:14: error: ‘namelen’ may be used uninitialized in this > function

Re: [PATCH] linux-user: correct errno returned from accept4() syscall

2020-09-30 Thread Laurent Vivier
Le 30/09/2020 à 17:16, Matus Kysel a écrit : > accept4() returned wrong errno, that did not match current linux > > Signed-off-by: Matus Kysel > --- > linux-user/syscall.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c

Re: [PATCH v3 10/11] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 06:49:48PM +0200, Philippe Mathieu-Daudé wrote: > Only qemu-system-FOO and qemu-storage-daemon provide QMP > monitors, therefore such declarations and definitions are > irrelevant for user-mode emulation. > > Restricting the x86-specific commands to machine-target.json >

Re: [PATCH v3 00/11] user-mode: Prune build dependencies (part 3)

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 06:49:38PM +0200, Philippe Mathieu-Daudé wrote: > This is the third part of a series reducing user-mode > dependencies. By stripping out unused code, the build > and testing time is reduced (as is space used by objects). I'm queueing patches 2-9 on machine-next. Thanks!

Re: [PATCH v1 1/1] riscv: Convert interrupt logs to use qemu_log_mask()

2020-09-30 Thread Alistair Francis
On Sun, Sep 27, 2020 at 9:22 AM Philippe Mathieu-Daudé wrote: > > On 9/27/20 3:47 PM, Alistair Francis wrote: > > Currently we log interrupts and exceptions using the trace backed in > > s/backed/backend/ > > > riscv_cpu_do_interrupt(). We also log execptions using the interrupt log > > Typo

[PATCH v3 07/11] hw/core/qdev-properties: Export some integer-related functions

2020-09-30 Thread Philippe Mathieu-Daudé
We are going to split this file and reuse these static functions. Declare them in the local "qdev-prop-internal.h" header. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- v3: Also export qdev_propinfo_get_size32 introduced in commits 914e74cda9 ("qdev-properties: add

[PATCH v3 05/11] hw/core/qdev-properties: Export enum-related functions

2020-09-30 Thread Philippe Mathieu-Daudé
We are going to split this file and reuse these static functions. Add the local "qdev-prop-internal.h" header declaring them. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-prop-internal.h | 19 hw/core/qdev-properties.c| 58

[PATCH v3 02/11] hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

2020-09-30 Thread Philippe Mathieu-Daudé
The MACAddr structure contains an array of uint8_t. Previously if a value was out of the [0..255] range, it was silently casted and no input validation was done. Replace strtol() by qemu_strtol() -- so checkpatch.pl won't complain if we move this code later -- and return EINVAL if the input is

[PATCH v3 04/11] hw/core/qdev-properties: Fix code style

2020-09-30 Thread Philippe Mathieu-Daudé
We will soon move this code, fix its style to avoid checkpatch.pl to complain. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/core/qdev-properties.c

[PATCH v3 09/11] hw/core: Add qdev stub for user-mode

2020-09-30 Thread Philippe Mathieu-Daudé
While user-mode does not use peripherals (devices), it uses a CPU which is a device. In the next commit we will reduce the QAPI generated code for user-mode. Since qdev.c calls qapi_event_send_device_deleted() in device_finalize, let's add a stub for it. Suggested-by: Paolo Bonzini Reviewed-by:

  1   2   3   4   >