Re: [PATCH] tests/vm: update openbsd to release 6.8

2020-11-06 Thread Brad Smith
ping. On 10/27/2020 6:22 AM, Brad Smith wrote: On Tue, Oct 27, 2020 at 11:05:20AM +0100, Philippe Mathieu-Daud?? wrote: On 10/27/20 6:30 AM, Brad Smith wrote: tests/vm: update openbsd to release 6.8 A double dash at the end of a package name removes ambiguity when the intent is to install a n

Re: [PATCH v2 11/11] qapi/introspect.py: Add docstring to _tree_to_qlit

2020-11-06 Thread Cleber Rosa
On Mon, Oct 26, 2020 at 03:42:51PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- Not a big deal, but maybe move this to an earlier position in the series? IMO it'd make other reviewer's life easier. Either way: Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 10/11] qapi/introspect.py: improve readability of _tree_to_qlit

2020-11-06 Thread Cleber Rosa
On Mon, Oct 26, 2020 at 03:42:50PM -0400, John Snow wrote: > Subjective, but I find getting rid of the comprehensions helps. Also, > divide the sections into scalar and non-scalar sections, and remove > old-style string formatting. > It's certainly a matter of picking your favorite poison... but f

Re: [PATCH v2 09/11] qapi/introspect.py: create a typed 'Annotated' data strutcure

2020-11-06 Thread Cleber Rosa
On Mon, Oct 26, 2020 at 03:42:49PM -0400, John Snow wrote: > This replaces _make_tree with Annotated(). By creating it as a generic > container, we can more accurately describe the exact nature of this > particular value. i.e., each Annotated object is actually an > Annotated, describing its contai

Re: [PATCH v2 08/11] qapi/introspect.py: replace 'extra' dict with 'comment' argument

2020-11-06 Thread Cleber Rosa
On Mon, Oct 26, 2020 at 03:42:48PM -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: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 07/11] qapi/introspect.py: Unify return type of _make_tree()

2020-11-06 Thread Cleber Rosa
On Mon, Oct 26, 2020 at 03:42:47PM -0400, John Snow wrote: > Returning two different types conditionally can be complicated to > type. Let's always return a tuple for consistency. This seems like a standalone change. > Prohibit the use of > annotations with dict-values in this circumstance. It ca

Re: [PATCH v2 06/11] qapi/introspect.py: add _gen_features helper

2020-11-06 Thread Cleber Rosa
On Mon, Oct 26, 2020 at 03:42:46PM -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: Joh

Re: [PATCH v2 05/11] qapi/introspect.py: add preliminary type hint annotations

2020-11-06 Thread Cleber Rosa
On Mon, Oct 26, 2020 at 03:42:45PM -0400, John Snow wrote: > 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 the > type hints in advance may

Re: [Virtio-fs] [qemu-web PATCH v2] Add virtio-fs in OSv overview blog post

2020-11-06 Thread Fotis Xenakis
From: Dr. David Alan Gilbert * Fotis Xenakis (fo...@windowslive.com) wrote: > This post briefly goes over the main points of virtio-fs and OSv, a > unikernel running under QEMU/KVM and taking advantage of its virtio-fs > implementation. > > Changes since v1: > - Fixed wording and links, as suggest

[PATCH v9 1/1] audio/jack: fix use after free segfault

2020-11-06 Thread Geoffrey McRae
This change registers a bottom handler to close the JACK client connection when a server shutdown signal is recieved. Without this libjack2 attempts to "clean up" old clients and causes a use after free segfault. Signed-off-by: Geoffrey McRae --- audio/jackaudio.c | 50 ++

[PATCH v8 0/1] audio/jack: fix use after free segfault

2020-11-06 Thread Geoffrey McRae
v9: * switch to using a global shutdown mutex Geoffrey McRae (1): audio/jack: fix use after free segfault audio/jackaudio.c | 50 +++ 1 file changed, 37 insertions(+), 13 deletions(-) -- 2.20.1

[PATCH] hw/core/qdev-properties-system: allow bus addresses > 0x1f

2020-11-06 Thread Geoffrey McRae
The commit bccb20c49df1bd683248a366021973901c11982f introduced an error in the checking logic that validates the bus addresses for PCI device addresses preventing usage of devices via vfio-pci that sit at a bus address of 0x20 or higher. This patch resolves this by reverting the checking logic to t

[PATCH v10 10/12] hw/block/nvme: Support Zone Descriptor Extensions

2020-11-06 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, "zoned.descr_ext_size". Its value must be a multiple of 64 bytes. If this value is non-zero, it become

[PATCH v10 09/12] hw/block/nvme: Introduce max active and open zone limits

2020-11-06 Thread Dmitry Fomichev
Add two module properties, "zoned.max_active" and "zoned.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 e

[PATCH v10 08/12] hw/block/nvme: Support Zoned Namespace Command Set

2020-11-06 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. Define values and structures that are needed to support Zoned Namespace Command Set (NVMe TP 4053) in PCI NVMe controller emulator. Define t

[PATCH v10 07/12] block/nvme: Make ZNS-related definitions

2020-11-06 Thread Dmitry Fomichev
Define values and structures that are needed to support Zoned Namespace Command Set (NVMe TP 4053). Signed-off-by: Dmitry Fomichev --- include/block/nvme.h | 114 ++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/include/block/nvme.h b/inc

[PATCH 1/2] hw/m68k/q800: Don't connect two qemu_irqs directly to the same input

2020-11-06 Thread Peter Maydell
The q800 board code connects both of the IRQ outputs of the ESCC to the same pic[3] qemu_irq. Connecting two qemu_irqs outputs directly to the same input is not valid as it produces subtly wrong behaviour (for instance if both the IRQ lines are high, and then one goes low, the PIC input will see th

[PATCH 2/2] hw/m68k/q800.c: Make the GLUE chip an actual QOM device

2020-11-06 Thread Peter Maydell
The handling of the GLUE (General Logic Unit) device is currently open-coded. Make this into a proper QOM device. This minor piece of modernisation gets rid of the free floating qemu_irq array 'pic', which Coverity points out is technically leaked when we exit the machine init function. (The repla

[PATCH 0/2] m68k/q800: make the GLUE chip a QOM device

2020-11-06 Thread Peter Maydell
This series is 6.0 material really I think. It's a bit of cleanup prompted by a Coverity issue, CID 1421883. There are another half dozen or so similar issues, where Coverity is complaining that we allocate an array of qemu_irqs with qemu_allocate_irqs() in a board init function -- in this case t

[PATCH v10 05/12] hw/block/nvme: Add support for Namespace Types

2020-11-06 Thread Dmitry Fomichev
From: Niklas Cassel Define the structures and constants required to implement Namespace Types support. 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

[PATCH v10 04/12] hw/block/nvme: Merge nvme_write_zeroes() with nvme_write()

2020-11-06 Thread Dmitry Fomichev
nvme_write() now handles WRITE, WRITE ZEROES and ZONE_APPEND. Signed-off-by: Dmitry Fomichev Reviewed-by: Niklas Cassel Acked-by: Klaus Jensen --- hw/block/nvme.c | 72 +-- hw/block/trace-events | 1 - 2 files changed, 28 insertions(+), 45 deletio

[PATCH v10 02/12] hw/block/nvme: Generate namespace UUIDs

2020-11-06 Thread Dmitry Fomichev
In NVMe 1.4, a namespace must report an ID descriptor of UUID type if it doesn't support EUI64 or NGUID. Add a new namespace property, "uuid", that provides the user the option to either specify the UUID explicitly or have a UUID generated automatically every time a namespace is initialized. Sugge

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

2020-11-06 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, "offl

[PATCH v10 01/12] hw/block/nvme: Add Commands Supported and Effects log

2020-11-06 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. All incoming

[PATCH v10 12/12] hw/block/nvme: Document zoned parameters in usage text

2020-11-06 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 Reviewed-by: Niklas Cassel --- hw/block/nvme

[PATCH v10 06/12] hw/block/nvme: Support allocated CNS command variants

2020-11-06 Thread Dmitry Fomichev
From: Niklas Cassel Many CNS commands have "allocated" command variants. These include a namespace as long as it is allocated, that is a namespace is included regardless if it is active (attached) or not. While these commands are optional (they are mandatory for controllers supporting the namesp

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

2020-11-06 Thread Dmitry Fomichev
v9 -> v10: - Correctly check for MDTS in Zone Management Receive handler. - Change Klaus' "Reviewed-by" email in UUID patch. v8 -> v9: - Move the modifications to "include/block/nvme.h" made to introduce ZNS-related definitions to a separate patch. - Add a new struct, NvmeZonedResult, a

[PATCH v10 03/12] hw/block/nvme: Separate read and write handlers

2020-11-06 Thread Dmitry Fomichev
With ZNS support in place, the majority of code in nvme_rw() has become read- or write-specific. Move these parts to two separate handlers, nvme_read() and nvme_write() to make the code more readable and to remove multiple is_write checks that so far existed in the i/o path. This is a refactoring

RE: [PATCH v9 08/12] hw/block/nvme: Support Zoned Namespace Command Set

2020-11-06 Thread Dmitry Fomichev
> -Original Message- > From: Niklas Cassel > Sent: Friday, November 6, 2020 6:59 AM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Max Reitz ; > Maxim Levitsky ; Fam Zheng ; > Alistair Francis ; Matias Bjorling > ; Damien Le Moal ; > qem

Re: nbd: bitmap_to_extents() calls nbd_extent_array_add() without checking return value: coverity false positive?

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 20:36, Eric Blake wrote: > > On 11/6/20 11:22 AM, Peter Maydell wrote: > > Hi; Coverity's "you usually check the return value of this function > > but you didn't do that here" heuristic has fired on the code in > > nbd/server.c:bitmap_to_extents() -- the function nbd_extent_a

Re: [PATCH v3 01/41] tcg: Enhance flush_icache_range with separate data pointer

2020-11-06 Thread Richard Henderson
On 11/6/20 12:31 PM, Alex Bennée wrote: >> +/* Flush the dcache at RW, and the icache at RX, as necessary. */ >> +static inline void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t >> len) >> { >> -__builtin___clear_cache((char *)start, (char *)stop); >> +/* TODO: Copy this from gc

Re: [Virtio-fs] [PATCH] virtiofsd: Use --thread-pool-size=0 to mean no thread pool

2020-11-06 Thread Vivek Goyal
On Fri, Nov 06, 2020 at 08:33:50PM +, Venegas Munoz, Jose Carlos wrote: > Hi Vivek, > > I have tested with Kata 1.12-apha0, the results seems that are better for the > use fio config I am tracking. > > The fio config does randrw: > > fio --direct=1 --gtod_reduce=1 --name=test --filename=r

Re: [PATCH v2 00/44] Make qdev static property API usable by any QOM type

2020-11-06 Thread Eduardo Habkost
On Fri, Nov 06, 2020 at 10:50:19AM -0500, Eduardo Habkost wrote: > On Fri, Nov 06, 2020 at 10:45:11AM +0100, Kevin Wolf wrote: > > Am 04.11.2020 um 16:59 hat Eduardo Habkost geschrieben: > > > This series refactor the qdev property code so the static > > > property system can be used by any QOM typ

[PATCH] meson: always include contrib/libvhost-user

2020-11-06 Thread Stefan Hajnoczi
libvhost-user is needed when CONFIG_LINUX is set. The CONFIG_VHOST_USER check in meson.build is incorrect. In fact, no explicit check is needed since this dependency is not built by default. If something declares a dependency on libvhost-user then it will be built, otherwise it won't be built (i.e

Re: nbd: bitmap_to_extents() calls nbd_extent_array_add() without checking return value: coverity false positive?

2020-11-06 Thread Eric Blake
On 11/6/20 11:22 AM, Peter Maydell wrote: > Hi; Coverity's "you usually check the return value of this function > but you didn't do that here" heuristic has fired on the code in > nbd/server.c:bitmap_to_extents() -- the function nbd_extent_array_add() > is called five times in server.c, and the ret

Re: [Virtio-fs] [PATCH] virtiofsd: Use --thread-pool-size=0 to mean no thread pool

2020-11-06 Thread Venegas Munoz, Jose Carlos
Hi Vivek, I have tested with Kata 1.12-apha0, the results seems that are better for the use fio config I am tracking. The fio config does randrw: fio --direct=1 --gtod_reduce=1 --name=test --filename=random_read_write.fio --bs=4k --iodepth=64 --size=200M --readwrite=randrw --rwmixread=75 -

Re: [PATCH v3 01/41] tcg: Enhance flush_icache_range with separate data pointer

2020-11-06 Thread Alex Bennée
Richard Henderson writes: > We are shortly going to have a split rw/rx jit buffer. Depending > on the host, we need to flush the dcache at the rw data pointer and > flush the icache at the rx code pointer. > > For now, the two passed pointers are identical, so there is no > effective change in

Re: [PULL 33/43] target/ppc: convert xxspltw to vector operations

2020-11-06 Thread Richard Henderson
On 11/6/20 10:47 AM, Peter Maydell wrote: >> +#ifndef HOST_WORDS_BIG_ENDIAN >> +bofs ^= 8 | 4; >> +#endif > > The ifdef is HOST_WORDS_BIGENDIAN without the > third underscore, so this XOR operation will be > done on both little and big-endian hosts. Ho hum. > Should the ifndef line be fixed.

Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-11-06 Thread Alex Williamson
On Sat, 7 Nov 2020 00:27:46 +0530 Kirti Wankhede wrote: > On 11/6/2020 2:56 AM, Alex Williamson wrote: > > On Fri, 6 Nov 2020 02:22:11 +0530 > > Kirti Wankhede wrote: > > > >> On 11/6/2020 12:41 AM, Alex Williamson wrote: > >>> On Fri, 6 Nov 2020 00:29:36 +0530 > >>> Kirti Wankhede wrote:

[PATCH-for-5.2] configure: Check vhost-user is available to build vhost-user-blk-server

2020-11-06 Thread Philippe Mathieu-Daudé
Check vhost-user is available to build vhost-user-blk-server to fix: $ ../configure \ --disable-vhost-user --enable-vhost-user-blk-server && \ make qemu-nbd ... [505/505] Linking target qemu-nbd FAILED: qemu-nbd cc -o qemu-nbd qemu-nbd.p/qemu-nbd.c.o -Wl,--as-needed -Wl,--no-undefin

Re: [PATCH v2 04/11] qapi/introspect.py: add assertions and casts

2020-11-06 Thread Cleber Rosa
On Mon, Oct 26, 2020 at 03:42:44PM -0400, John Snow wrote: > This is necessary to keep mypy passing in the next patch when we add > preliminary type hints. It will be removed shortly. > > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-11-06 Thread Kirti Wankhede
On 11/6/2020 2:56 AM, Alex Williamson wrote: On Fri, 6 Nov 2020 02:22:11 +0530 Kirti Wankhede wrote: On 11/6/2020 12:41 AM, Alex Williamson wrote: On Fri, 6 Nov 2020 00:29:36 +0530 Kirti Wankhede wrote: On 11/4/2020 6:15 PM, Alex Williamson wrote: On Wed, 4 Nov 2020 13:25:40 +0530 K

Re: [PULL 33/43] target/ppc: convert xxspltw to vector operations

2020-11-06 Thread Peter Maydell
On Mon, 18 Feb 2019 at 14:31, David Gibson wrote: > > From: Richard Henderson > > Signed-off-by: Richard Henderson > Acked-by: David Gibson > Message-Id: <20190215100058.20015-8-mark.cave-ayl...@ilande.co.uk> > Signed-off-by: David Gibson So this is a commit from 18 months back, but I happene

Re: [PATCH for-5.2 3/4] hw/net/can/ctucan_core: Handle big-endian hosts

2020-11-06 Thread Pavel Pisa
On Friday 06 of November 2020 19:29:27 Philippe Mathieu-Daudé wrote: > On 11/6/20 6:11 PM, Peter Maydell wrote: > > The ctucan driver defines types for its registers which are a union > > of a uint32_t with a struct with bitfields for the individual > > fields within that register. This is a bad id

Re: [PATCH for-5.2 4/4] hw/net/ctucan_core: Use stl_le_p to write to tx_buffers

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 18:31, Philippe Mathieu-Daudé wrote: > > On 11/6/20 6:11 PM, Peter Maydell wrote: > > Instead of casting an address within a uint8_t array to a > > uint32_t*, use stl_le_p(). This handles possibly misaligned > > addresses which would otherwise crash on some hosts. > > > > Sig

Re: [PATCH for-5.2] hw/mips/boston.c: Fix memory leak in boston_fdt_filter() error-handling paths

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 6:58 PM, Peter Maydell wrote: > Coverity points out that the error-handling paths in the > boston_fdt_filter() function don't free the fdt that was allocated. > Fix the leak by using g_autofree. > > Fixes: Coverity CID 1432275 > > Signed-off-by: Peter Maydell > --- > hw/mips/boston.c

Re: [PATCH for-5.2 4/4] hw/net/ctucan_core: Use stl_le_p to write to tx_buffers

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 7:31 PM, Philippe Mathieu-Daudé wrote: > On 11/6/20 6:11 PM, Peter Maydell wrote: >> Instead of casting an address within a uint8_t array to a >> uint32_t*, use stl_le_p(). This handles possibly misaligned >> addresses which would otherwise crash on some hosts. >> >> Signed-off-by: Peter

Re: [PATCH for-5.2 4/4] hw/net/ctucan_core: Use stl_le_p to write to tx_buffers

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 18:19, Pavel Pisa wrote: > On Friday 06 of November 2020 18:11:53 Peter Maydell wrote: > > Instead of casting an address within a uint8_t array to a > > uint32_t*, use stl_le_p(). This handles possibly misaligned > > addresses which would otherwise crash on some hosts. > > >

[PATCH v2 1/1] Fix use after free in vfio_migration_probe

2020-11-06 Thread Kirti Wankhede
Fixes Coverity issue: CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize function") Signed-off-by: Kirti Wankhede Reviewed-by: David Edmondson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé ---

Re: [PATCH for-5.2 1/4] hw/net/can/ctucan: Don't allow guest to write off end of tx_buffer

2020-11-06 Thread Pavel Pisa
Hello Peter, On Friday 06 of November 2020 19:04:38 Peter Maydell wrote: > On Fri, 6 Nov 2020 at 17:48, Pavel Pisa wrote: > > Hello Peter, > > > > thanks much for the catching the problem and investing time into > > fixing. I hope to find time for more review of remarks and Xilinx > > patches nex

Re: [PATCH for-5.2 4/4] hw/net/ctucan_core: Use stl_le_p to write to tx_buffers

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 6:11 PM, Peter Maydell wrote: > Instead of casting an address within a uint8_t array to a > uint32_t*, use stl_le_p(). This handles possibly misaligned > addresses which would otherwise crash on some hosts. > > Signed-off-by: Peter Maydell > --- > hw/net/can/ctucan_core.c | 3 +-- > 1

Re: [PATCH for-5.2 3/4] hw/net/can/ctucan_core: Handle big-endian hosts

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 6:11 PM, Peter Maydell wrote: > The ctucan driver defines types for its registers which are a union > of a uint32_t with a struct with bitfields for the individual > fields within that register. This is a bad idea, because bitfields > aren't portable. The ctu_can_fd_regs.h header works a

Re: [PATCH 2/2] qemu-option: warn for short-form boolean options

2020-11-06 Thread Paolo Bonzini
On 06/11/20 17:49, Markus Armbruster wrote: Deprecate all this, except for -chardev and -spice where it is in wide use. I consider this a misuse of deprecation, to be frank. If something is known to be unused, we just remove it. Deprecation is precisely for things that are used. I'm with Dani

Re: [PATCH for-5.2 4/4] hw/net/ctucan_core: Use stl_le_p to write to tx_buffers

2020-11-06 Thread Pavel Pisa
On Friday 06 of November 2020 18:11:53 Peter Maydell wrote: > Instead of casting an address within a uint8_t array to a > uint32_t*, use stl_le_p(). This handles possibly misaligned > addresses which would otherwise crash on some hosts. > > Signed-off-by: Peter Maydell > --- > hw/net/can/ctuca

Re: [PATCH for-5.2 2/4] hw/net/can/ctucan: Avoid unused value in ctucan_send_ready_buffers()

2020-11-06 Thread Pavel Pisa
Hello Peter, this one is a little problematic. I understand that you want to have clean code and no warnings reports from coverity. On Friday 06 of November 2020 18:11:51 Peter Maydell wrote: > Coverity points out that in ctucan_send_ready_buffers() we > set buff_st_mask = 0xf << (i * 4) inside t

Re: [Virtio-fs] [qemu-web PATCH v2] Add virtio-fs in OSv overview blog post

2020-11-06 Thread Dr. David Alan Gilbert
* Fotis Xenakis (fo...@windowslive.com) wrote: > This post briefly goes over the main points of virtio-fs and OSv, a > unikernel running under QEMU/KVM and taking advantage of its virtio-fs > implementation. > > Changes since v1: > - Fixed wording and links, as suggested by Thomas Huth. > - Added

[PATCH 1/2] docs/fuzz: rST-ify the fuzzing documentation

2020-11-06 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- MAINTAINERS| 2 +- docs/devel/fuzzing.rst | 236 + docs/devel/fuzzing.txt | 214 - docs/devel/index.rst | 1 + 4 files changed, 238 insertions(+), 215 deletions(-) c

[PATCH 0/2] Fuzzing Documentation Updates

2020-11-06 Thread Alexander Bulekov
I converted the docuemntation to markdown and updated build instructions that changed after meson. Alexander Bulekov (2): docs/fuzz: rST-ify the fuzzing documentation docs/fuzz: update fuzzing documentation post-meson MAINTAINERS| 2 +- docs/devel/fuzzing.rst | 236

[PATCH 2/2] docs/fuzz: update fuzzing documentation post-meson

2020-11-06 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst index f19d75ceff..6096242d99 100644 --- a/docs/devel/fuzzing.rst +++ b/docs/devel/fuzzing.rst @@ -34,16 +34,16 @@ s

Re: [PATCH for-5.2 1/4] hw/net/can/ctucan: Don't allow guest to write off end of tx_buffer

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 17:48, Pavel Pisa wrote: > > Hello Peter, > > thanks much for the catching the problem and investing time into > fixing. I hope to find time for more review of remarks and Xilinx > patches next week. I do not find reasonable time slot till Sunday. > Excuse me. To not block up

[PATCH for-5.2] hw/mips/boston.c: Fix memory leak in boston_fdt_filter() error-handling paths

2020-11-06 Thread Peter Maydell
Coverity points out that the error-handling paths in the boston_fdt_filter() function don't free the fdt that was allocated. Fix the leak by using g_autofree. Fixes: Coverity CID 1432275 Signed-off-by: Peter Maydell --- hw/mips/boston.c | 10 -- 1 file changed, 4 insertions(+), 6 deleti

Re: [PATCH for-5.2 1/4] hw/net/can/ctucan: Don't allow guest to write off end of tx_buffer

2020-11-06 Thread Pavel Pisa
Hello Peter, thanks much for the catching the problem and investing time into fixing. I hope to find time for more review of remarks and Xilinx patches next week. I do not find reasonable time slot till Sunday. Excuse me. To not block updates, I confirm your changes. On Friday 06 of November 2020

[PATCH v2 1/2] quorum: Implement bdrv_co_block_status()

2020-11-06 Thread Alberto Garcia
The quorum driver does not implement bdrv_co_block_status() and because of that it always reports to contain data even if all its children are known to be empty. One consequence of this is that if we for example create a quorum with a size of 10GB and we mirror it to a new image the operation will

[PATCH v2 2/2] quorum: Implement bdrv_co_pwrite_zeroes()

2020-11-06 Thread Alberto Garcia
This simply calls bdrv_co_pwrite_zeroes() in all children Signed-off-by: Alberto Garcia --- block/quorum.c | 18 -- tests/qemu-iotests/312 | 7 +++ tests/qemu-iotests/312.out | 4 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/block/quo

[PATCH v2 0/2] quorum: Implement bdrv_co_block_status()

2020-11-06 Thread Alberto Garcia
Hi, The first patch is the same as in v1, but now that we're at it I decided to also implement bdrv_co_pwrite_zeroes() Berto v2: - Implement bdrv_co_pwrite_zeroes() for quorum v1: https://lists.gnu.org/archive/html/qemu-block/2020-11/msg00163.html Alberto Garcia (2): quorum: Implement bdrv_c

Re: [PATCH v2 4/4] linux-user/sparc: Handle tstate in sparc64_get/set_context()

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > +#ifdef TARGET_SPARC64 > +/* win_helper.c */ > +target_ulong cpu_get_ccr(CPUSPARCState *env1); > +void cpu_put_ccr(CPUSPARCState *env1, target_ulong val); > +target_ulong cpu_get_cwp64(CPUSPARCState *env1); > +void cpu_put_cwp64(CPUSPARCState *env1, int cw

nbd: bitmap_to_extents() calls nbd_extent_array_add() without checking return value: coverity false positive?

2020-11-06 Thread Peter Maydell
Hi; Coverity's "you usually check the return value of this function but you didn't do that here" heuristic has fired on the code in nbd/server.c:bitmap_to_extents() -- the function nbd_extent_array_add() is called five times in server.c, and the return value is checked in four of those, but not in

[PATCH for-5.2 3/4] hw/net/can/ctucan_core: Handle big-endian hosts

2020-11-06 Thread Peter Maydell
The ctucan driver defines types for its registers which are a union of a uint32_t with a struct with bitfields for the individual fields within that register. This is a bad idea, because bitfields aren't portable. The ctu_can_fd_regs.h header works around the most glaring of the portability issues

Re: [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 17:09, Richard Henderson wrote: > > On 11/6/20 7:27 AM, Peter Maydell wrote: > > +if (fprs & FPRS_DU) { > > +for (i = 16; i < 31; i++) { > > 32. Derp. Lucky this code basically never gets run, eh ? :-) -- PMM

[PATCH for-5.2 0/4] hw/net/can/ctucan: fix Coverity and other issues

2020-11-06 Thread Peter Maydell
This patchset fixes a couple of issues spotted by Coverity: * incorrect address checks meant the guest could write off the end of the tx_buffer arrays * we had an unused value in ctucan_send_ready_buffers() and also some I noticed while reading the code: * we don't adjust the device's non-por

[PATCH for-5.2 2/4] hw/net/can/ctucan: Avoid unused value in ctucan_send_ready_buffers()

2020-11-06 Thread Peter Maydell
Coverity points out that in ctucan_send_ready_buffers() we set buff_st_mask = 0xf << (i * 4) inside the loop, but then we never use it before overwriting it later. The only thing we use the mask for is as part of the code that is inserting the new buff_st field into tx_status. That is more compre

[PATCH for-5.2 4/4] hw/net/ctucan_core: Use stl_le_p to write to tx_buffers

2020-11-06 Thread Peter Maydell
Instead of casting an address within a uint8_t array to a uint32_t*, use stl_le_p(). This handles possibly misaligned addresses which would otherwise crash on some hosts. Signed-off-by: Peter Maydell --- hw/net/can/ctucan_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context()

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > Unlike the kernel macros, our __get_user() and __put_user() do not > return a failure code. Kernel code typically has a style of > err |= __get_user(...); err |= __get_user(...); > and then checking err at the end. In sparc64_get_context() our > versio

[PATCH for-5.2 1/4] hw/net/can/ctucan: Don't allow guest to write off end of tx_buffer

2020-11-06 Thread Peter Maydell
The ctucan device has 4 CAN bus cores, each of which has a set of 20 32-bit registers for writing the transmitted data. The registers are however not contiguous; each core's buffers is 0x100 bytes after the last. We got the checks on the address wrong in the ctucan_mem_write() function: * the fir

Re: [PATCH v2 3/4] linux-user/sparc: Don't restore %g7 in sparc64_set_context()

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > The kernel does not restore the g7 register in sparc64_set_context(); > neither should we. (We still save it in sparc64_get_context().) > > Signed-off-by: Peter Maydell > --- > linux-user/sparc/signal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: Question on UEFI ACPI tables setup and probing on arm64

2020-11-06 Thread Laszlo Ersek
On 11/05/20 05:30, Ying Fang wrote: > I see it in Qemu the *loader_start* is fixed at 1 GiB on the > physical address space which points to the DRAM base. In ArmVirtQemu.dsc > PcdDeviceTreeInitialBaseAddress is set 0x4000 with correspondence. > > Here I also see the discussion about DRAM base

Re: [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > +if (fprs & FPRS_DU) { > +for (i = 16; i < 31; i++) { 32. Otherwise, Reviewed-by: Richard Henderson r~

[PATCH-for-6.0 1/2] hw/scsi/scsi-disk: Rename type as TYPE_SCSI_DISK

2020-11-06 Thread Philippe Mathieu-Daudé
Rename TYPE_SCSI_DISK without the '_BASE' suffix to match the other abstract types in the codebase. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-disk.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index

[PATCH-for-6.0 2/2] hw/scsi/scsi-disk: Use SCSI_DISK_GET_CLASS() macro

2020-11-06 Thread Philippe Mathieu-Daudé
Use the SCSI_DISK_GET_CLASS() macro to match the rest of the codebase. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-disk.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index d2b9cb28da1..deb51ec8e7d 100644 --- a/h

[PATCH-for-6.0 0/2] hw/scsi/scsi-disk: QOM style change

2020-11-06 Thread Philippe Mathieu-Daudé
Some QOM style changes in TYPE_SCSI_DISK to follow the rest of the codebase style. No logical change. Philippe Mathieu-Daudé (2): hw/scsi/scsi-disk: Rename type as TYPE_SCSI_DISK hw/scsi/scsi-disk: Use SCSI_DISK_GET_CLASS() macro hw/scsi/scsi-disk.c | 26 +- 1 file ch

Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 4:59 PM, David Edmondson wrote: > On Friday, 2020-11-06 at 19:09:24 +0530, Kirti Wankhede wrote: > >> Fixes Coverity issue: >> CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) >> >> Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize >> function") >> >>

Re: [PATCH 1/2] qemu-option: move help handling to get_opt_name_value

2020-11-06 Thread Markus Armbruster
One more thought... Markus Armbruster writes: > Paolo Bonzini writes: [...] >> diff --git a/util/qemu-option.c b/util/qemu-option.c [...] >> @@ -767,16 +763,18 @@ void qemu_opts_print(QemuOpts *opts, const char >> *separator) >> >> static const char *get_opt_name_value(const char *params, >

Re: [PATCH] migration/dirtyrate: simplify inlcudes in dirtyrate.c

2020-11-06 Thread Dr. David Alan Gilbert
* Zheng Chuan (zhengch...@huawei.com) wrote: > Kindly ping for not forgetting this trivial fix:) Yes but it's too late for the merge window, so it'll happen on the next one, no rush! Dave > On 2020/10/30 22:09, Mark Kanda wrote: > > On 10/29/2020 10:58 PM, Chuan Zheng wrote: > >> Remove redundan

Re: [PATCH 2/2] qemu-option: warn for short-form boolean options

2020-11-06 Thread Markus Armbruster
Paolo Bonzini writes: > Options such as "server" or "nowait", that are commonly found in -chardev, > are sugar for "server=on" and "wait=off". This is quite surprising and > also does not have any notion of typing attached. It is even possible to > do "-device e1000,noid" and get a device with

Re: [PATCH] CODING_STYLE.rst: Be less strict about 80 character limit

2020-11-06 Thread Michael S. Tsirkin
On Fri, Nov 06, 2020 at 11:29:40AM +, Peter Maydell wrote: > Relax the wording about line lengths a little bit; this goes with the > checkpatch changes to warn at 100 characters rather than 80. > > (Compare the Linux kernel commit bdc48fa11e46f8; our coding style is > not theirs, but the ratio

Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint

2020-11-06 Thread Alex Bennée
Kirti Wankhede writes: > Fixes Coverity issue: > CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) > > Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize > function") > > Signed-off-by: Kirti Wankhede Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 16:08, Markus Armbruster wrote: > Peter Maydell writes: > > Personally I just don't think checkpatch should be nudging people > > into folding 85-character lines, especially when there are > > multiple very similar lines in a row and only one would get > > folded, eg the pro

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 6 Nov 2020 at 14:08, Philippe Mathieu-Daudé wrote: >> Can we keep the error please? Maybe 132 is the next display logical >> limit once we increased the warning from 80 to 100. >> >> I understand hardware evolved, we have larger displays with better >> resolution

Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint

2020-11-06 Thread David Edmondson
On Friday, 2020-11-06 at 19:09:24 +0530, Kirti Wankhede wrote: > Fixes Coverity issue: > CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) > > Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize > function") > > Signed-off-by: Kirti Wankhede Maybe "fix use after

Re: [PATCH v2 00/44] Make qdev static property API usable by any QOM type

2020-11-06 Thread Eduardo Habkost
On Fri, Nov 06, 2020 at 10:45:11AM +0100, Kevin Wolf wrote: > Am 04.11.2020 um 16:59 hat Eduardo Habkost geschrieben: > > This series refactor the qdev property code so the static > > property system can be used by any QOM type. As an example, at > > the end of the series some properties in TYPE_M

Re: [PATCH] qtest: Fix bad printf format specifiers

2020-11-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 11/6/20 7:33 AM, Markus Armbruster wrote: [...] >> In other words "%" PRIu32 is just a less legible alias for "%u" in all >> cases that matter. > > Can we add a checkpatch rule to avoid using 'PRI[dux]32' format, > so it is clear for everyone? I guess we could

Re: Migrating to the gitlab issue tracker

2020-11-06 Thread Laszlo Ersek
On 11/04/20 18:19, Daniel P. Berrangé wrote: > This just sounds like fairly niche requirements for which directly > subscribing to the project issue tracker will satisfy 99% of the time. OK. Laszlo

Re: [PATCH for-5.2 3/4] qtest: escape device name in device-introspect-test

2020-11-06 Thread Markus Armbruster
Paolo Bonzini writes: > On 06/11/20 14:15, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> device-introspect-test uses HMP, so it should escape the device name >>> properly. Because of this, a few devices that had commas in their >>> names were escaping testing. >>> Signed-off-by: Pao

Re: [PATCH 0/2] Increase amount of data for monitor to read

2020-11-06 Thread Andrey Shinkevich
Please exclude this address when reply: jc...@redhat.com Andrey

Re: [PATCH v2 2/7] block: add bdrv_replace_node_common()

2020-11-06 Thread Alberto Garcia
On Fri 06 Nov 2020 01:42:36 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Add new parameter to bdrv_replace_node(): auto_skip. With > auto_skip=false we'll have stricter behavior: update _all_ from > parents or fail. New behaviour will be used in the following commit in > block.c, so keep original

Re: [PATCH v2 0/4] linux/sparc: more get/set_context fixes

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 15:27, Peter Maydell wrote: > > Based-on: 20201105212314.9628-1-peter.mayd...@linaro.org > ("[PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs") > > This series fixes a few more issues with our sparc linux-user > sparc64_get_context() and sparc64_set_context() im

[PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context()

2020-11-06 Thread Peter Maydell
Unlike the kernel macros, our __get_user() and __put_user() do not return a failure code. Kernel code typically has a style of err |= __get_user(...); err |= __get_user(...); and then checking err at the end. In sparc64_get_context() our version of the code dropped the accumulating into err but

[PATCH v2 3/4] linux-user/sparc: Don't restore %g7 in sparc64_set_context()

2020-11-06 Thread Peter Maydell
The kernel does not restore the g7 register in sparc64_set_context(); neither should we. (We still save it in sparc64_get_context().) Signed-off-by: Peter Maydell --- linux-user/sparc/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/sparc/signal.c b/linux-u

[PATCH v2 4/4] linux-user/sparc: Handle tstate in sparc64_get/set_context()

2020-11-06 Thread Peter Maydell
Correctly implement save/restore of the tstate field in sparc64_get_context() and sparc64_set_context(): * Don't use the CWP value from the guest in set_context * Construct and save a tstate value rather than leaving it as zero in get_context To do this we factor out the "calculate TSTATE val

[PATCH v2 0/4] linux/sparc: more get/set_context fixes

2020-11-06 Thread Peter Maydell
Based-on: 20201105212314.9628-1-peter.mayd...@linaro.org ("[PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs") This series fixes a few more issues with our sparc linux-user sparc64_get_context() and sparc64_set_context() implementation: * we weren't handling FPU regs correctly, and a

  1   2   >