Re: [PATCH v3 00/17] hw/block/nvme: multiple namespaces support

2020-09-23 Thread Klaus Jensen
On Sep 22 10:45, Klaus Jensen wrote: > From: Klaus Jensen > > This is the next round of my patches for the nvme device. > > This includes a bit of cleanup and two new features: > > * support for scatter/gather lists > > * multiple namespaces support through a new nvme-ns device > >

Re: [PATCH v2 38/38] qapi/visit.py: add type hint annotations

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:01:01PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v2 37/38] qapi/visit.py: remove unused parameters from gen_visit_object

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:01:00PM -0400, John Snow wrote: > And this fixes the pylint report for this file, so make sure we check > this in the future, too. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v2 36/38] qapi/visit.py: assert tag_member contains a QAPISchemaEnumType

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:00:59PM -0400, John Snow wrote: > Signed-off-by: John Snow This for making mypy happy, correct? An explanation in the commit message would be nice. Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v2 35/38] qapi/types.py: remove one-letter variables

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:00:58PM -0400, John Snow wrote: > "John, if pylint told you to jump off a bridge, would you?" > Hey, if it looked like fun, I might. > > Now that this file is clean, enable pylint checks on this file. > > Signed-off-by: John Snow > --- [...] > @@ -148,11 +148,12 @@

Re: [PATCH v2 34/38] qapi/types.py: add type hint annotations

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:00:57PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v10 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-09-23 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 9/16/20 1:22 AM, Chuan Zheng wrote: > > Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be > > called > > > > Signed-off-by: Chuan Zheng > > --- > > > +++ b/qapi/migration.json > > @@ -1737,3 +1737,53 @@ > > ## > > {

Re: [PATCH] migration: increase max-bandwidth to 128 MiB/s (1 Gib/s)

2020-09-23 Thread Dr. David Alan Gilbert
* Laurent Vivier (lviv...@redhat.com) wrote: > max-bandwidth is set by default to 32 MiB/s (256 Mib/s) > since 2008 (5bb7910af031c). > > Most of the CPUs can dirty memory faster than that now, > and this is clearly a problem with POWER where the page > size is 64 kiB and not 4 KiB. > >

Re: [PATCH] migration: Truncate state file in xen-save-devices-state

2020-09-23 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Dov Murik (dovmu...@linux.vnet.ibm.com) wrote: > > When running the xen-save-devices-state QMP command, if the filename > > already exists it will be truncated before dumping the devices' state > > into it. > > > > Signed-off-by: Dov Murik

Re: [PATCH v4 0/2] qemu/atomic.h: rename atomic_ to qatomic_

2020-09-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200923151901.745277-1-phi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200923151901.745277-1-phi...@redhat.com Subject: [PATCH v4 0/2] qemu/atomic.h: rename

Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic

2020-09-23 Thread John Snow
On 9/23/20 11:26 AM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:51PM -0400, John Snow wrote: Make the file handling here just a tiny bit more idiomatic. (I realize this is heavily subjective.) Use exist_ok=True for os.makedirs and remove the exception, use fdopen() to wrap the file

Re: [PATCH v2 32/38] qapi/introspect.py: create a typed 'Node' data structure

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:00:55PM -0400, John Snow wrote: > Replacing the un-typed tuple, add a typed Node that we can add typed > metadata to. > > Signed-off-by: John Snow This is the most complex patch so far, and it's very hard to understand what it does without type annotations. Have you

Re: [PATCH v2 18/38] qapi/events.py: Move comments into docstrings

2020-09-23 Thread John Snow
On 9/23/20 10:48 AM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:41PM -0400, John Snow wrote: Signed-off-by: John Snow --- scripts/qapi/events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py index

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Eduardo Habkost
On Wed, Sep 23, 2020 at 02:29:28PM -0400, John Snow wrote: > On 9/23/20 11:17 AM, Eduardo Habkost wrote: > > This changes behavior if name=='', and I guess this is OK, but > > I'm not sure. I miss documentation on `visit_module()`, > > `visit_include()`, and `_is_user_module()`. I don't know

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread John Snow
On 9/23/20 11:17 AM, Eduardo Habkost wrote: This changes behavior if name=='', and I guess this is OK, but I'm not sure. I miss documentation on `visit_module()`, `visit_include()`, and `_is_user_module()`. I don't know what `name` means here, and what is a "user module". Good spot, I

[PATCH v4 12/14] hw/block/nvme: Add injection of Offline/Read-Only zones

2020-09-23 Thread Dmitry Fomichev
ZNS specification defines two zone conditions for the zones that no longer can function properly, possibly because of flash wear or other internal fault. It is useful to be able to "inject" a small number of such zones for testing purposes. This commit defines two optional device properties,

Re: [PATCH 11/11] block/export: convert vhost-user-blk server to block export API

2020-09-23 Thread Stefan Hajnoczi
On Wed, Sep 23, 2020 at 03:42:30PM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > Use the new QAPI block exports API instead of defining our own QOM > > objects. > > > > This is a large change because the lifecycle of VuBlockDev needs to > > follow BlockExportDriver. QOM

Re: [PATCH v2 29/38] qapi/gen.py: delint with pylint

2020-09-23 Thread John Snow
On 9/23/20 11:44 AM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:52PM -0400, John Snow wrote: 'fp' and 'fd' are self-evident in context, add them to the list of OK names. _top and _bottom also need to stay class methods because some users override the method and need to use `self`.

[PATCH v4 11/14] hw/block/nvme: Support Zone Descriptor Extensions

2020-09-23 Thread Dmitry Fomichev
Zone Descriptor Extension is a label that can be assigned to a zone. It can be set to an Empty zone and it stays assigned until the zone is reset. This commit adds a new optional module property, "zone_descr_ext_size". Its value must be a multiple of 64 bytes. If this value is non-zero, it

Re: [PATCH v2 20/38] qapi/commands.py: add notational type hints

2020-09-23 Thread John Snow
On 9/23/20 10:50 AM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:43PM -0400, John Snow wrote: Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Oops, I didn't use my consistent type hint commit message for this one. Changing that to avoid my invented word "notational".

Re: [PATCH v4 1/2] qemu/atomic: Update coding style to make checkpatch.pl happier

2020-09-23 Thread Stefan Hajnoczi
On Wed, Sep 23, 2020 at 05:19:00PM +0200, Philippe Mathieu-Daudé wrote: > To limit the number of checkpatch errors in the next commit, > clean coding style issues first. > > Signed-off-by: Philippe Mathieu-Daudé > --- > False positive: > > ERROR: Use of volatile is usually wrong, please add a

[PATCH v4 03/14] hw/block/nvme: Introduce the Namespace Types definitions

2020-09-23 Thread Dmitry Fomichev
From: Niklas Cassel Define the structures and constants required to implement Namespace Types support. Signed-off-by: Niklas Cassel Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 2 +- hw/block/nvme.h | 3 ++ include/block/nvme.h | 74

[PATCH v4 14/14] hw/block/nvme: Document zoned parameters in usage text

2020-09-23 Thread Dmitry Fomichev
Added brief descriptions of the new device properties that are now available to users to configure features of Zoned Namespace Command Set in the emulator. This patch is for documentation only, no functionality change. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 43

[PATCH v4 06/14] hw/block/nvme: Add support for active/inactive namespaces

2020-09-23 Thread Dmitry Fomichev
From: Niklas Cassel In NVMe, a namespace is active if it exists and is attached to the controller. CAP.CSS (together with the I/O Command Set data structure) defines what command sets are supported by the controller. CC.CSS (together with Set Profile) can be set to enable a subset of the

[PATCH v4 10/14] hw/block/nvme: Introduce max active and open zone limits

2020-09-23 Thread Dmitry Fomichev
Added two module properties, "max_active" and "max_open" to control the maximum number of zones that can be active or open. Once these variables are set to non-default values, these limits are checked during I/O and Too Many Active or Too Many Open command status is returned if they are exceeded.

[PATCH v4 02/14] hw/block/nvme: Add Commands Supported and Effects log

2020-09-23 Thread Dmitry Fomichev
This log page becomes necessary to implement to allow checking for Zone Append command support in Zoned Namespace Command Set. This commit adds the code to report this log page for NVM Command Set only. The parts that are specific to zoned operation will be added later in the series.

[PATCH v4 13/14] hw/block/nvme: Use zone metadata file for persistence

2020-09-23 Thread Dmitry Fomichev
A ZNS drive that is emulated by this module is currently initialized with all zones Empty upon startup. However, actual ZNS SSDs save the state and condition of all zones in their internal NVRAM in the event of power loss. When such a drive is powered up again, it closes or finishes all zones that

[PATCH v4 05/14] hw/block/nvme: Add support for Namespace Types

2020-09-23 Thread Dmitry Fomichev
From: Niklas Cassel Namespace Types introduce a new command set, "I/O Command Sets", that allows the host to retrieve the command sets associated with a namespace. Introduce support for the command set and enable detection for the NVM Command Set. The new workflows for identify commands rely

[PATCH v4 07/14] hw/block/nvme: Make Zoned NS Command Set definitions

2020-09-23 Thread Dmitry Fomichev
Define values and structures that are needed to support Zoned Namespace Command Set (NVMe TP 4053) in PCI NVMe controller emulator. All new protocol definitions are located in include/block/nvme.h and everything added that is specific to this implementation is kept in hw/block/nvme.h. In order

[PATCH v4 00/14] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-09-23 Thread Dmitry Fomichev
v3 -> v4 - Fix bugs introduced in v2/v3 for QD > 1 operation. Now, all writes to a zone happen at the new write pointer variable, zone->w_ptr, that is advanced right after submitting the backend i/o. The existing zone->d.wp variable is updated upon the successful write completion and

[PATCH v4 01/14] hw/block/nvme: Report actual LBA data shift in LBAF

2020-09-23 Thread 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 add support for multiple

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

2020-09-23 Thread Dmitry Fomichev
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 three new NVMe commands introduced in Zoned Namespace Command Set specification are added, namely for Zone Management Receive,

[PATCH v4 04/14] hw/block/nvme: Define trace events related to NS Types

2020-09-23 Thread Dmitry Fomichev
A few trace events are defined that are relevant to implementing Namespace Types (NVMe TP 4056). Signed-off-by: Dmitry Fomichev Reviewed-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé --- hw/block/trace-events | 10 ++ 1 file changed, 10 insertions(+) diff --git

Re: [PATCH v2 13/38] qapi/common.py: add type hint annotations

2020-09-23 Thread Eduardo Habkost
On Wed, Sep 23, 2020 at 01:57:25PM -0400, John Snow wrote: > On 9/22/20 6:44 PM, Eduardo Habkost wrote: > > Does this need to require a Sequence? It looks like it could be > > Iterable. > > > > I don't think this should block the patch, though, so: > > > > Reviewed-by: Eduardo Habkost > >

Re: [PATCH v10 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-09-23 Thread Eric Blake
On 9/16/20 1:22 AM, Chuan Zheng wrote: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be called Signed-off-by: Chuan Zheng --- +++ b/qapi/migration.json @@ -1737,3 +1737,53 @@ ## { 'enum': 'DirtyRateStatus', 'data': [ 'unstarted', 'measuring', 'measured']

[PATCH v4 08/14] hw/block/nvme: Define Zoned NS Command Set trace events

2020-09-23 Thread Dmitry Fomichev
The Zoned Namespace Command Set / Namespace Types implementation that is being introduced in this series adds a good number of trace events. Combine all tracepoint definitions into a separate patch to make reviewing more convenient. Signed-off-by: Dmitry Fomichev --- hw/block/trace-events | 26

Re: [PATCH v10 00/12] *** A Method for evaluating dirty page rate ***

2020-09-23 Thread Eric Blake
On 9/23/20 1:04 PM, Dr. David Alan Gilbert wrote: Queued * Chuan Zheng (zhengch...@huawei.com) wrote: v9 -> v10: rename find_page_matched as find_block_matched fix wrong termination condition in find_block_matched add review-by for patches Sorry for a late review, but I

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-23 Thread Alberto Garcia
On Fri 04 Sep 2020 10:25:13 AM CEST, Kevin Wolf wrote: >> Test 030 is still occasionally failing in the CI ... so for the >> time being, let's disable it in the "auto" group. We can add it >> back once it got more stable. >> >> Signed-off-by: Thomas Huth > > I would rather just disable this one

Re: [PATCH v2 7/7] hw/net/can: Correct Kconfig dependencies after switch to meson build.

2020-09-23 Thread Pavel Pisa
Hello Paolo, On Wednesday 23 of September 2020 20:11:08 Paolo Bonzini wrote: > On 23/09/20 19:44, Pavel Pisa wrote: > > If you have not pushed code to the mainline yet, > > consider v3 which should follow better actual > > mainline state. The list of updates to v3 follows. > > I actually queued

Re: [PATCH v2 7/7] hw/net/can: Correct Kconfig dependencies after switch to meson build.

2020-09-23 Thread Paolo Bonzini
On 23/09/20 19:44, Pavel Pisa wrote: > > If you have not pushed code to the mainline yet, > consider v3 which should follow better actual > mainline state. The list of updates to v3 follows. I actually queued v3 (I just use patchew to queue patches). Paolo

Re: [PATCH] virtio: vdpa: omit check return of g_malloc

2020-09-23 Thread Eric Blake
On 9/18/20 8:12 AM, Alex Bennée wrote: Li Qiang writes: Philippe Mathieu-Daudé 于2020年8月19日周三 下午11:07写道: On 8/19/20 4:43 PM, Li Qiang wrote: If g_malloc fails, the application will be terminated. Which we don't want... better to use g_try_malloc() instead? I don't think so. If

Re: [PATCH v10 00/12] *** A Method for evaluating dirty page rate ***

2020-09-23 Thread Dr. David Alan Gilbert
Queued * Chuan Zheng (zhengch...@huawei.com) wrote: > v9 -> v10: > rename find_page_matched as find_block_matched > fix wrong termination condition in find_block_matched > add review-by for patches > > v8 -> v9: > fix wrong index return of record_ramblock_hash_info > optimize

RE: [PATCH v8 3/7] usb/hcd-xhci: Split pci wrapper for xhci base model

2020-09-23 Thread Sai Pavan Boddu
Hi Gerd, > -Original Message- > From: Gerd Hoffmann > Sent: Wednesday, September 23, 2020 3:44 PM > To: Sai Pavan Boddu > Cc: Peter Maydell ; Markus Armbruster > ; 'Marc-André Lureau' > ; Paolo Bonzini ; > Edgar Iglesias ; Francisco Eduardo Iglesias > ; qemu-devel@nongnu.org; Alistair

Re: [PATCH v2 13/38] qapi/common.py: add type hint annotations

2020-09-23 Thread John Snow
On 9/22/20 6:44 PM, Eduardo Habkost wrote: Does this need to require a Sequence? It looks like it could be Iterable. I don't think this should block the patch, though, so: Reviewed-by: Eduardo Habkost gen_if can take an Iterator, gen_endif needs a Sequence because it uses reversed(). I

Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-09-23 Thread Alberto Garcia
On Wed 23 Sep 2020 07:11:57 PM CEST, Vladimir Sementsov-Ogievskiy wrote: >> BlockDriverState *last_bs = include_base ? base : backing_bs(base); > > hmm, in case when include_base is false, last bs is not > backing_bs(base) but the parent of base. Oops, yes, it should be the other way around

Re: Minix 1.1 with QEMU

2020-09-23 Thread Will Senn
On 9/23/20 11:53 AM, Philippe Mathieu-Daudé wrote: Hi Will, On 9/23/20 6:45 PM, Will Senn wrote: Long time user, first time poster :) So, I'd like to be able to run Minix 1.1 on my Macbook Pro mid-2012 w/16gb RAM (MacOS 10.14.6 Mojave). Qemu will run pretty ancient OS'es such as DOS 2.0,

[PATCH v9 6/7] usb: Add DWC3 model

2020-09-23 Thread Sai Pavan Boddu
From: Vikram Garhwal This patch adds skeleton model of dwc3 usb controller attached to xhci-sysbus device. It defines global register space of DWC3 controller, global registers control the AXI/AHB interfaces properties, external FIFO support and event count support. All of which are

[PATCH v9 2/7] usb/hcd-xhci: Move qemu-xhci device to hcd-xhci-pci.c

2020-09-23 Thread Sai Pavan Boddu
Move pci specific devices to new file. This set the environment to move all pci specific hooks in hcd-xhci.c to hcd-xhci-pci.c. Signed-off-by: Sai Pavan Boddu --- hw/usb/Kconfig| 6 + hw/usb/hcd-xhci-pci.c | 66 +++ hw/usb/hcd-xhci.c

[PATCH v9 5/7] misc: Add versal-usb2-ctrl-regs module

2020-09-23 Thread Sai Pavan Boddu
This module emulates control registers of versal usb2 controller, this is added just to make guest happy. In general this module would control the phy-reset signal from usb controller, data coherency of the transactions, signals the host system errors received from controller. Signed-off-by: Sai

[PATCH v9 3/7] usb/hcd-xhci: Split pci wrapper for xhci base model

2020-09-23 Thread Sai Pavan Boddu
This patch sets the base to use xhci as sysbus model, for which pci specific hooks are moved to hcd-xhci-pci.c. As a part of this requirment msi/msix interrupts handling is moved under XHCIPCIState. Made required changes for qemu-xhci-nec. Signed-off-by: Sai Pavan Boddu ---

[PATCH v9 0/7] Make hcd-xhci independent of pci hooks

2020-09-23 Thread Sai Pavan Boddu
This patch series attempts to make 'hcd-xhci' an independent model so it can be used by both pci and system-bus interface. Changes for V2: Make XHCIState non-qom Use container_of functions for retriving pci device instance Initialize the AddressSpace pointer in PATCH 1/3 itself

[PATCH v9 7/7] Versal: Connect DWC3 controller with virt-versal

2020-09-23 Thread Sai Pavan Boddu
From: Vikram Garhwal Connect dwc3 controller and usb2-reg module to xlnx-versal SOC, its placed in iou of lpd domain and configure it as dual port host controller. Add the respective guest dts nodes for "xlnx-versal-virt" machine. Signed-off-by: Vikram Garhwal Signed-off-by: Sai Pavan Boddu

Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-09-23 Thread Alberto Garcia
On Wed 16 Sep 2020 02:20:05 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > In order to reuse bdrv_common_block_status_above in > bdrv_is_allocated_above, let's support include_base parameter. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Berto

[PATCH v9 4/7] usb: hcd-xhci-sysbus: Attach xhci to sysbus device

2020-09-23 Thread Sai Pavan Boddu
Use XHCI as sysbus device, add memory region property to get the address space instance for dma read/write. Signed-off-by: Sai Pavan Boddu --- hw/usb/Kconfig | 5 +++ hw/usb/hcd-xhci-sysbus.c | 109 +++ hw/usb/hcd-xhci-sysbus.h | 32

[PATCH v9 1/7] usb/hcd-xhci: Make dma read/writes hooks pci free

2020-09-23 Thread Sai Pavan Boddu
This patch starts making the hcd-xhci.c pci free, as part of this restructuring dma read/writes are handled without passing pci object. Signed-off-by: Sai Pavan Boddu Reviewed-by: Edgar E. Iglesias --- hw/usb/hcd-xhci.c | 24 +++- hw/usb/hcd-xhci.h | 1 + 2 files changed,

Re: [PATCH v2 7/7] hw/net/can: Correct Kconfig dependencies after switch to meson build.

2020-09-23 Thread Pavel Pisa
Hello Paolo, On Wednesday 23 of September 2020 17:48:09 Paolo Bonzini wrote: > On 03/09/20 23:48, Pavel Pisa wrote: > > The original CAN_PCI config option enables multiple SJA1000 PCI boards > > emulation build. These boards bridge SJA1000 into I/O or memory > > address space of the host CPU and

Re: [PATCH v2 0/6] migration/postcopy: Sync faulted addresses after network recovered

2020-09-23 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > v2: Queued > - add r-bs for Dave > - add patch "migration: Properly destroy variables on incoming side" as patch > 1 > - destroy page_request_mutex in migration_incoming_state_destroy() too [Dave] > - use WITH_QEMU_LOCK_GUARD in two places where we can

Re: [PATCH v2 10/38] qapi/common.py: delint with pylint

2020-09-23 Thread John Snow
On 9/23/20 12:01 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:33PM -0400, John Snow wrote: At this point, that just means using a consistent strategy for constant names. constants get UPPER_CASE and names not used externally get a leading underscore. As a preference, while renaming

Re: [PATCH v2 09/38] qapi/common.py: Add indent manager

2020-09-23 Thread John Snow
On 9/23/20 10:55 AM, Cleber Rosa wrote: Do you have a use case for returning the level? If not, I'd go without it, and add a "level" property instead, as it'd serve more cases. __int__ is doing that lifting. I can remove the return. --js

Re: [PATCH v2 09/38] qapi/common.py: Add indent manager

2020-09-23 Thread John Snow
On 9/22/20 6:22 PM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:32PM -0400, John Snow wrote: Code style tools really dislike the use of global keywords, because it generally involves re-binding the name at runtime which can have strange effects depending on when and how that global

Re: [PATCH v2 07/38] qapi: add pylintrc

2020-09-23 Thread John Snow
On 9/23/20 9:42 AM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:30PM -0400, John Snow wrote: Using `pylint --generate-rcfile > pylintrc`, generate a skeleton pylintrc file. Sections that are not presently relevant (by the end of this series) are removed leaving just the empty section as a

Re: [PATCH v2 05/38] qapi: Remove wildcard includes

2020-09-23 Thread John Snow
On 9/23/20 9:27 AM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:28PM -0400, John Snow wrote: Wildcard includes become hard to manage when refactoring and dealing with circular dependencies with strictly typed mypy. flake8 also flags each one as a warning, as it is not smart enough to know

Re: [PATCH] docs/system/deprecated: Move lm32 and unicore32 to the right section

2020-09-23 Thread Laurent Vivier
Le 23/09/2020 à 10:00, Thomas Huth a écrit : > lm32 and unicore32 are softmmut targets, and not linux-user targets. > > Signed-off-by: Thomas Huth > --- > docs/system/deprecated.rst | 32 > 1 file changed, 16 insertions(+), 16 deletions(-) > > diff --git

[PATCH] docs/system/deprecated: Mark the 'moxie' CPU as deprecated

2020-09-23 Thread Thomas Huth
It is currently unclear whether anybody is still using the 'moxie' CPU, and there are no images for testing available this CPU, so the code has likely bit-rotten in the course of time. When I asked the maintainer for information, I did not get a reply within four weeks yet (see

Re: [PATCH v6 02/11] x86: cpuhp: prevent guest crash on CPU hotplug when broadcast SMI is in use

2020-09-23 Thread Laszlo Ersek
On 09/23/20 11:46, Igor Mammedov wrote: > There were reports of guest crash on CPU hotplug, when using q35 machine > type and OVMF with SMM, due to hotplugged CPU trying to process SMI at > default SMI handler location without it being relocated by firmware first. > > Fix it by refusing hotplug

Re: [PATCH] vhost-vdpa: remove useless variable

2020-09-23 Thread Laurent Vivier
Le 20/09/2020 à 17:59, Philippe Mathieu-Daudé a écrit : > Cc'ing qemu-trivial@ > > On 9/20/20 5:20 PM, Laurent Vivier wrote: >> in vhost_vdpa_listener_region_del(), try_unmap is always true and so, >> vhost_vdpa_dma_unmap() is always called. We can remove the variable >> >> Signed-off-by: Laurent

Re: [PATCH] migration/multifd: Remove superfluous semicolons

2020-09-23 Thread Laurent Vivier
Le 21/09/2020 à 06:02, Philippe Mathieu-Daudé a écrit : > checkpatch.pl report superfluous semicolons since commit > ee0f3c09e01, but this one was missed: > > scripts/checkpatch.pl d32ca5ad798~..d32ca5ad798 > ERROR: superfluous trailing semicolon > #498: FILE: migration/multifd.c:308: > +

Re: [PATCH] timer: Fix timer_mod_anticipate() documentation

2020-09-23 Thread Laurent Vivier
Le 20/09/2020 à 17:50, Philippe Mathieu-Daudé a écrit : > timer_mod_anticipate() will be scaled to the timer unit, > which is not always nanosecond. Fix the documentation. > > Fixes: add40e9777d ("timer: add timer_mod_anticipate*") > Signed-off-by: Philippe Mathieu-Daudé > --- >

Re: [PATCH v2 03/38] qapi: move generator entrypoint into module

2020-09-23 Thread John Snow
On 9/22/20 5:23 PM, Eduardo Habkost wrote: +from qapi.commands import gen_commands +from qapi.doc import gen_doc +from qapi.error import QAPIError +from qapi.events import gen_events +from qapi.introspect import gen_introspect +from qapi.schema import QAPISchema +from qapi.types import gen_types

Re: [PATCH v2 04/38] qapi: Prefer explicit relative imports

2020-09-23 Thread John Snow
On 9/23/20 9:18 AM, Cleber Rosa wrote: Relative imports are a source of heated debates, but when properly used in a self contained module like here, they are very posititive IMO. Still? I know they were loathed pre-3.5, but in my subjective experience they behave the nicest overall in the

Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-09-23 Thread Vladimir Sementsov-Ogievskiy
23.09.2020 19:18, Alberto Garcia wrote: On Wed 16 Sep 2020 02:20:05 PM CEST, Vladimir Sementsov-Ogievskiy wrote: -for (p = backing_bs(bs); p != base; p = backing_bs(p)) { +for (p = backing_bs(bs); include_base || p != base; p = backing_bs(p)) { ret = bdrv_co_block_status(p,

Re: [PATCH] Add *.pyc back to the .gitignore file

2020-09-23 Thread Laurent Vivier
Le 19/09/2020 à 12:18, Thomas Huth a écrit : > Python still dumps its bytecode into the source directory, so > we should continue to ignore the *.pyc files. > > Fixes: 0e72b7df4d ("Simplify the .gitignore file") > Reported-by: Peter Maydell > Signed-off-by: Thomas Huth > --- > .gitignore | 1 +

Re: [PATCH] virtio: vdpa: omit check return of g_malloc

2020-09-23 Thread Laurent Vivier
Le 18/09/2020 à 14:53, Laurent Vivier a écrit : > On 19/08/2020 16:43, Li Qiang wrote: >> If g_malloc fails, the application will be terminated. >> No need to check the return value of g_malloc. >> >> Signed-off-by: Li Qiang >> --- >> hw/virtio/vhost-vdpa.c | 7 +-- >> 1 file changed, 1

Re: [PATCH] vhost-vdpa: fix indentation in vdpa_ops

2020-09-23 Thread Laurent Vivier
Le 16/09/2020 à 17:48, Laurent Vivier a écrit : > Le 16/09/2020 à 17:26, Stefano Garzarella a écrit : >> This patch fixes wrong indentation of some vdpa_ops fields introduced >> with the initial commit 108a64818e ("vhost-vdpa: introduce vhost-vdpa >> backend") >> >> Signed-off-by: Stefano

Re: [PATCH] meson: fix static flag summary

2020-09-23 Thread Laurent Vivier
Le 17/09/2020 à 16:07, Laurent Vivier a écrit : > 'static build:' must display value of CONFIG_STATIC rather than value of > CONFIG_TOOLS. > > Signed-off-by: Laurent Vivier > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meson.build b/meson.build >

Re: [PATCH v2 02/38] qapi-gen: Separate arg-parsing from generation

2020-09-23 Thread John Snow
On 9/22/20 8:00 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:25PM -0400, John Snow wrote: This is a minor re-work of the entrypoint script. It isolates a generate() method from the actual command-line mechanism. Signed-off-by: John Snow --- scripts/qapi-gen.py | 87

Re: [PATCH 3/7] hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE

2020-09-23 Thread Philippe Mathieu-Daudé
On 9/23/20 4:53 PM, John Snow wrote: > On 8/17/20 7:17 AM, Kevin Wolf wrote: >> Am 14.08.2020 um 10:28 hat Philippe Mathieu-Daudé geschrieben: >>> Use self-explicit definitions instead of magic '512' value. >>> >>> Signed-off-by: Philippe Mathieu-Daudé >> >> BDRV_SECTOR_SIZE is the arbitrary unit

Re: Minix 1.1 with QEMU

2020-09-23 Thread Philippe Mathieu-Daudé
Hi Will, On 9/23/20 6:45 PM, Will Senn wrote: > Long time user, first time poster :) > > So, I'd like to be able to run Minix 1.1 on my Macbook Pro mid-2012 > w/16gb RAM (MacOS 10.14.6 Mojave). Qemu will run pretty ancient OS'es > such as DOS 2.0, which I use all of the time. However, I'm having

Re: [PATCH v2 1/1] MAINTAINERS: Add Python library stanza

2020-09-23 Thread Philippe Mathieu-Daudé
On 9/23/20 5:37 PM, Eduardo Habkost wrote: > On Wed, Sep 23, 2020 at 11:17:01AM -0400, John Snow wrote: >> On 9/23/20 11:14 AM, Markus Armbruster wrote: >>> John Snow writes: >>> I'm proposing that I split the actual Python library off from the other miscellaneous python scripts we have

Re: [PATCH v2 01/38] [DO-NOT-MERGE] qapi: add debugging tools

2020-09-23 Thread John Snow
On 9/22/20 7:43 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:24PM -0400, John Snow wrote: This adds some really childishly simple debugging tools. Maybe they're interesting for someone else, too? Signed-off-by: John Snow --- scripts/qapi/debug.py | 78

Re: [PATCH 00/13] dma: Let the DMA API take MemTxAttrs argument and propagate MemTxResult

2020-09-23 Thread Philippe Mathieu-Daudé
On 9/23/20 5:24 PM, John Snow wrote: > On 9/4/20 11:44 AM, Philippe Mathieu-Daudé wrote: >> Salvaging cleanups patches from the RFC series "Forbid DMA write >> accesses to MMIO regions" [*], propagating MemTxResult and >> adding documentation. >> >> [*]

Re: [PATCH v2 7/7] configure: Bump the minimum required Python version to 3.6

2020-09-23 Thread Thomas Huth
On 23/09/2020 18.34, 罗勇刚(Yonggang Luo) wrote: > Should we also warning it in meson.build, cause configure finally shoud > be removed. Sounds like a good idea for a separate patch (let's do one issue at a time...). Thomas

Re: [PATCH v6 00/11] x86: fix cpu hotplug with secure boot

2020-09-23 Thread Laszlo Ersek
On 09/23/20 11:46, Igor Mammedov wrote: > v6: > - [9/10] Add comment explaining why while_ctx2 restarts from the last > processed CPU. > - rebase on top of current master, due to non trivial conflict > caused by microvm series, which moved/renamed pc_cpu_pre_plug() So, I went back to my

Re: [PATCH v2 7/7] configure: Bump the minimum required Python version to 3.6

2020-09-23 Thread Yonggang Luo
Should we also warning it in meson.build, cause configure finally shoud be removed. On Thu, Sep 24, 2020 at 12:32 AM Thomas Huth wrote: > > All our supported build platforms have Python 3.6 or newer nowadays, and > there are some useful features in Python 3.6 which are not available in > 3.5 yet

Re: [PATCH v2 31/38] qapi/introspect.py: add _gen_features helper

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:00:54PM -0400, John Snow wrote: > _make_tree doesn't know if it is receiving an object or some other type; > adding features information should arguably be performed by the caller. > > This will help us refactor _make_tree more gracefully in the next patch. > >

Re: [PATCH] travis: remove TCI test

2020-09-23 Thread Thomas Huth
On 23/09/2020 18.26, Paolo Bonzini wrote: > On 23/09/20 18:04, Thomas Huth wrote: >> On 23/09/2020 17.10, Paolo Bonzini wrote: >>> The TCI test is already performed on gitlab CI, and it fails because >>> Travis tests (generally) disable tools and therefore do not have >>> "make check-qtest". Just

Re: [PATCH v2 12/38] qapi/common.py: check with pylint

2020-09-23 Thread John Snow
On 9/23/20 12:18 PM, Cleber Rosa wrote: I still think we should record (and maybe I'm missing it) the pylint version used though. Anyway: Cover letter for all six parts mentions pylint 2.6.0! In the future this will be pinned in the CI mechanisms. --js

Re: [PATCH] docs: Document the throttle block filter

2020-09-23 Thread Kevin Wolf
Am 23.09.2020 um 17:59 hat Alberto Garcia geschrieben: > On Wed 23 Sep 2020 05:55:22 PM CEST, Kevin Wolf wrote: > >> +A throttle-group can also be created with the -object command line > >> +option but at the moment there is no way to pass a 'limits' parameter > >> +that contains a ThrottleLimits

Re: [PATCH v6 3/5] block/io: bdrv_common_block_status_above: support bs == base

2020-09-23 Thread Alberto Garcia
On Wed 16 Sep 2020 02:20:06 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > We are going to reuse bdrv_common_block_status_above in > bdrv_is_allocated_above. bdrv_is_allocated_above may be called with > include_base == false and still bs == base (for ex. from img_rebase()). > > So, support this

[PATCH v2 7/7] configure: Bump the minimum required Python version to 3.6

2020-09-23 Thread Thomas Huth
All our supported build platforms have Python 3.6 or newer nowadays, and there are some useful features in Python 3.6 which are not available in 3.5 yet (e.g. the type hint annotations which will allow us to statically type the QAPI parser), so let's bump the minimum Python version to 3.6 now.

Re: [PATCH v2 12/38] qapi/common.py: check with pylint

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:35PM -0400, John Snow wrote: > Remove qapi/common.py from the pylintrc ignore list. > > Signed-off-by: John Snow $ pylint scripts/qapi/ --rcfile=scripts/qapi/pylintrc Your code has been

Re: [PATCH] travis: remove TCI test

2020-09-23 Thread Paolo Bonzini
On 23/09/20 18:04, Thomas Huth wrote: > On 23/09/2020 17.10, Paolo Bonzini wrote: >> The TCI test is already performed on gitlab CI, and it fails because >> Travis tests (generally) disable tools and therefore do not have >> "make check-qtest". Just remove it. > Huh? Where is it failing? It

Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-09-23 Thread Alberto Garcia
On Wed 16 Sep 2020 02:20:05 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > -for (p = backing_bs(bs); p != base; p = backing_bs(p)) { > +for (p = backing_bs(bs); include_base || p != base; p = backing_bs(p)) { > ret = bdrv_co_block_status(p, want_zero, offset, bytes, pnum, map, >

Re: [PATCH 27/29] nbd: Deprecate nbd-server-add/remove

2020-09-23 Thread Kevin Wolf
Am 10.09.2020 um 17:34 hat Max Reitz geschrieben: > On 07.09.20 20:20, Kevin Wolf wrote: > > These QMP commands are replaced by block-export-add/del. > > > > Signed-off-by: Kevin Wolf > > --- > > qapi/block-export.json | 11 +-- > > docs/system/deprecated.rst | 8 > > 2

Re: [PATCH v2 30/38] qapi/introspect.py: Add a typed 'extra' structure

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:00:53PM -0400, John Snow wrote: > Typing arbitrarily shaped dicts with mypy is difficult prior to Python > 3.8; using explicit structures is nicer. > > Since we always define an Extra type now, the return type of _make_tree > simplifies and always returns the tuple. >

Re: [PATCH v2 11/38] qapi/common.py: Replace one-letter 'c' variable

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:34PM -0400, John Snow wrote: > Signed-off-by: John Snow Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

[PULL 11/13] fdmon-poll: reset npfd when upgrading to fdmon-epoll

2020-09-23 Thread Stefan Hajnoczi
npfd keeps track of how many pollfds are currently being monitored. It must be reset to 0 when fdmon_poll_wait() returns. When npfd reaches a treshold we switch to fdmon-epoll because it scales better. This patch resets npfd in the case where we switch to fdmon-epoll. Forgetting to do so results

[PULL 04/13] util/iov: add iov_discard_undo()

2020-09-23 Thread Stefan Hajnoczi
The iov_discard_front/back() operations are useful for parsing iovecs but they modify the array elements. If the original array is needed after parsing finishes there is currently no way to restore it. Although g_memdup() can be used before performing destructive iov_discard_front/back()

[PULL 12/13] tests: add test-fdmon-epoll

2020-09-23 Thread Stefan Hajnoczi
Test aio_disable_external(), which switches from fdmon-epoll back to fdmon-poll. This resulted in an assertion failure that was fixed in the previous patch. Signed-off-by: Stefan Hajnoczi Message-Id: <20200915120339.702938-3-stefa...@redhat.com> --- MAINTAINERS | 1 +

[PULL 10/13] gitmodules: add qemu.org vbootrom submodule

2020-09-23 Thread Stefan Hajnoczi
The vbootrom module is needed for the new NPCM7xx ARM SoCs. The vbootrom.git repo is now mirrored on qemu.org. QEMU mirrors third-party code to ensure that users can always build QEMU even if the dependency goes offline and so QEMU meets its responsibilities to provide full source code under

<    1   2   3   4   5   >