Re: Adding VHOST_USER_PROTOCOL_F_CONFIG_MEM_SLOTS to 5.1 release notes

2020-07-29 Thread Marc-André Lureau
Hi On Wed, Jul 29, 2020 at 7:16 AM Raphael Norwitz wrote: > > Hi mst, > > Looking at the current changelog > https://wiki.qemu.org/ChangeLog/5.1#virtio, I don't see any mention of > the VHOST_USER_PROTOCOL_F_CONFIG_MEM_SLOTS protocol feature. It is a > user visible change so shouldn't we add a no

Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness

2020-07-29 Thread Markus Armbruster
Paolo Bonzini writes: > On 28/07/20 09:44, Markus Armbruster wrote: >>> -assert(!DEVICE_GET_CLASS(dev)->bus_type); >>> +} else if (DEVICE_GET_CLASS(dev)->bus_type) { >>> +error_setg(errp, "Unexpected bus '%s' for bus-less device '%s'", >>> + DEVICE_GET_CLASS(

Re: sysbus_create_simple Vs qdev_create

2020-07-29 Thread Markus Armbruster
Paolo Bonzini writes: > On 28/07/20 09:19, Markus Armbruster wrote: >>> the composition tree generally mirrors things that are born and die >>> at the same time, and creating children is generally reserved to the >>> object itself. >> >> Yes. Notable exceptions: containers /machine/peripheral, >

Re: [PATCH v2 3/3] virtiofsd: probe unshare(CLONE_FS) and print an error

2020-07-29 Thread Roman Mohr
On Tue, Jul 28, 2020 at 3:13 PM Vivek Goyal wrote: > On Tue, Jul 28, 2020 at 12:00:20PM +0200, Roman Mohr wrote: > > On Tue, Jul 28, 2020 at 3:07 AM misono.tomoh...@fujitsu.com < > > misono.tomoh...@fujitsu.com> wrote: > > > > > > Subject: [PATCH v2 3/3] virtiofsd: probe unshare(CLONE_FS) and pri

Re: device compatibility interface for live migration with assigned devices

2020-07-29 Thread Yan Zhao
On Mon, Jul 27, 2020 at 04:23:21PM -0600, Alex Williamson wrote: > On Mon, 27 Jul 2020 15:24:40 +0800 > Yan Zhao wrote: > > > > > As you indicate, the vendor driver is responsible for checking version > > > > information embedded within the migration stream. Therefore a > > > > migration should

Re: Missing qapi_free_Type in error case for qapi generated code?

2020-07-29 Thread Markus Armbruster
Eric Blake writes: > On 7/28/20 10:26 AM, Christophe de Dinechin wrote: >> The qapi generated code for qmp_marshal_query_spice seems to be missing a >> resource deallocation for "retval". For example, for SpiceInfo: >> > >> retval = qmp_query_spice(&err); >> error_propagate(errp, err);

Re: [PATCH for-5.2 1/6] pc-bios/s390-ccw/Makefile: Compile with -std=gnu99, -fwrapv and -fno-common

2020-07-29 Thread Cornelia Huck
On Tue, 28 Jul 2020 20:37:29 +0200 Thomas Huth wrote: > The main QEMU code is compiled with -std=gnu99, -fwrapv and -fno-common. > We should use the same flags for the s390-ccw bios, too, to avoid that > we get different behavior with different compiler versions that changed > their default setti

Re: [PATCH for-5.2 2/6] pc-bios/s390-ccw: Move ipl-related code from main() into a separate function

2020-07-29 Thread Cornelia Huck
On Tue, 28 Jul 2020 20:37:30 +0200 Thomas Huth wrote: > Let's move this part of the code into a separate function to be able > to use it from multiple spots later. > > Signed-off-by: Thomas Huth > --- > pc-bios/s390-ccw/main.c | 20 > 1 file changed, 12 insertions(+), 8 de

Re: [PATCH 3/3] cpu-timers, icount: new modules

2020-07-29 Thread Claudio Fontana
Hi Paolo, now that things exposed by my patch are fixed, back on this topic :-) On 7/11/20 2:19 PM, Paolo Bonzini wrote: > On 11/07/20 13:49, Claudio Fontana wrote: >>> Apart from the name, icount is more like deterministic execution than >> >> Maybe we should start choosing names more carefully

Re: [PATCH 0/2] assertion failure in net_tx_pkt_add_raw_fragment() in hw/net/net_tx_pkt.c

2020-07-29 Thread Dmitry Fleytman
Reviewed-by: Dmitry Fleytman The idea looks good to me. I believe it makes sense to do the check in net_tx_pkt_add_raw_fragment() as suggested by Jason. > On 27 Jul 2020, at 20:29, Alexander Bulekov wrote: > > I sent a reproducer for the to the list some time ago, but never created > a Launch

Re: [PATCH v3 02/18] hw/block/nvme: fix missing endian conversion

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Fix a missing cpu_to conversion by moving conversion to just before > returning instead. > > Signed-off-by: Klaus Jensen > Suggested-by: Philippe Mathieu-Daudé > --- > hw/block/nvme.c | 6 +++--- > 1 file changed,

Re: Missing qapi_free_Type in error case for qapi generated code?

2020-07-29 Thread Christophe de Dinechin
On 2020-07-29 at 10:34 CEST, Markus Armbruster wrote... > Eric Blake writes: > >> On 7/28/20 10:26 AM, Christophe de Dinechin wrote: >>> The qapi generated code for qmp_marshal_query_spice seems to be missing a >>> resource deallocation for "retval". For example, for SpiceInfo: >>> >> >>> r

Re: [PATCH v3 03/18] hw/block/nvme: additional tracing

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add various additional tracing and streamline nvme_identify_ns and > nvme_identify_nslist (they do not need to repeat the command, it is > already in the trace name). > > Signed-off-by: Klaus Jensen > --- > hw/bloc

Re: [PATCH for-5.2 3/6] pc-bios/s390-ccw: Move the inner logic of find_subch() to a separate function

2020-07-29 Thread Cornelia Huck
On Tue, 28 Jul 2020 20:37:31 +0200 Thomas Huth wrote: > Move the code to a separate function to be able to re-use it from a > different spot later. > > Signed-off-by: Thomas Huth > --- > pc-bios/s390-ccw/main.c | 99 - > 1 file changed, 57 insertions(+),

Re: [PATCH RFCv3 6/9] s390x/diag: subcode to query device memory region

2020-07-29 Thread David Hildenbrand
On 28.07.20 09:10, Cornelia Huck wrote: > On Mon, 27 Jul 2020 14:02:47 +0200 > David Hildenbrand wrote: > >> On 27.07.20 13:15, Heiko Carstens wrote: >>> On Mon, Jul 27, 2020 at 12:12:02PM +0200, David Hildenbrand wrote: +#define DIAG500_DEVICE_MEMORY_REGION 4 >>> >>> Reg

Re: [PATCH v3 06/18] hw/block/nvme: mark fw slot 1 as read-only

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Mark firmware slot 1 as read-only and only support that slot. > > Signed-off-by: Klaus Jensen > Reviewed-by: Dmitry Fomichev > --- > hw/block/nvme.c | 3 ++- > include/block/nvme.h | 4 > 2 files changed

Re: [PATCH for-5.2 1/6] pc-bios/s390-ccw/Makefile: Compile with -std=gnu99, -fwrapv and -fno-common

2020-07-29 Thread Claudio Imbrenda
On Tue, 28 Jul 2020 20:37:29 +0200 Thomas Huth wrote: > The main QEMU code is compiled with -std=gnu99, -fwrapv and > -fno-common. We should use the same flags for the s390-ccw bios, too, > to avoid that we get different behavior with different compiler > versions that changed their default setti

Re: [PATCH for-5.1?] qapi/block-core.json: Remove stale description of 'blockdev-add'

2020-07-29 Thread Kashyap Chamarthy
On Tue, Jul 28, 2020 at 09:50:39AM -0500, Eric Blake wrote: > On 7/28/20 9:32 AM, Kashyap Chamarthy wrote: [...] > > [1] https://lists.nongnu.org/archive/html/qemu-discuss/2020-07/msg00071.html > > -- equivalent to "-drive if=ide,id=disk0." > > > > Signed-off-by: Kashyap Chamarthy > >

Re: [PATCH for-5.2 2/6] pc-bios/s390-ccw: Move ipl-related code from main() into a separate function

2020-07-29 Thread Claudio Imbrenda
On Tue, 28 Jul 2020 20:37:30 +0200 Thomas Huth wrote: > Let's move this part of the code into a separate function to be able > to use it from multiple spots later. > > Signed-off-by: Thomas Huth > --- > pc-bios/s390-ccw/main.c | 20 > 1 file changed, 12 insertions(+), 8 de

Re: [PATCH RFCv3 6/9] s390x/diag: subcode to query device memory region

2020-07-29 Thread Cornelia Huck
On Wed, 29 Jul 2020 10:57:58 +0200 David Hildenbrand wrote: > On 28.07.20 09:10, Cornelia Huck wrote: > > However, I think we really need a central place for definitions that > > are not just a Linux/QEMU interface, but can potentially also be used > > by other hypervisors/guests. Nothing as com

Re: [RFC 0/2] virtio-rng: add a control queue

2020-07-29 Thread Stefan Hajnoczi
On Tue, Jul 28, 2020 at 03:45:26PM +0200, Laurent Vivier wrote: > On 29/01/2020 16:43, Stefan Hajnoczi wrote: > > On Fri, Jan 24, 2020 at 03:05:18PM +0100, Laurent Vivier wrote: > >> On 24/01/2020 12:02, Stefan Hajnoczi wrote: > >>> On Thu, Jan 23, 2020 at 04:16:58PM +0100, Laurent Vivier wrote: >

[PATCH v8 2/7] 9pfs: make v9fs_readdir_response_size() public

2020-07-29 Thread Christian Schoenebeck
Rename function v9fs_readdir_data_size() -> v9fs_readdir_response_size() and make it callable from other units. So far this function is only used by 9p.c, however subsequent patches require the function to be callable from another 9pfs unit. And as we're at it; also make it clear for what this func

[PATCH v8 5/7] 9pfs: T_readdir latency optimization

2020-07-29 Thread Christian Schoenebeck
Make top half really top half and bottom half really bottom half: Each T_readdir request handling is hopping between threads (main I/O thread and background I/O driver threads) several times for every individual directory entry, which sums up to huge latencies for handling just a single T_readdir

[PATCH v8 0/7] 9pfs: readdir optimization

2020-07-29 Thread Christian Schoenebeck
As previously mentioned, I was investigating performance issues with 9pfs. Raw file read/write of 9pfs is actually quite good, provided that client picked a reasonable high msize (maximum message size). I would recommend to log a warning on 9p server side if a client attached with a small msize tha

[PATCH v8 6/7] 9pfs: differentiate readdir lock between 9P2000.u vs. 9P2000.L

2020-07-29 Thread Christian Schoenebeck
Previous patch suggests that it might make sense to use a different mutex type now while handling readdir requests, depending on the precise protocol variant, as v9fs_do_readdir_with_stat() (used by 9P2000.u) uses a CoMutex to avoid deadlocks that might happen with QemuMutex otherwise, whereas do_r

[PATCH v8 1/7] tests/virtio-9p: added split readdir tests

2020-07-29 Thread Christian Schoenebeck
The previous, already existing 'basic' readdir test simply used a 'count' parameter big enough to retrieve all directory entries with a single Treaddir request. In the 3 new 'split' readdir tests added by this patch, directory entries are retrieved, split over several Treaddir requests by picking

[PATCH v8 4/7] 9pfs: add new function v9fs_co_readdir_many()

2020-07-29 Thread Christian Schoenebeck
The newly added function v9fs_co_readdir_many() retrieves multiple directory entries with a single fs driver request. It is intended to replace uses of v9fs_co_readdir(), the latter only retrives a single directory entry per fs driver request instead. The reason for this planned replacement is tha

[PATCH v8 3/7] 9pfs: split out fs driver core of v9fs_co_readdir()

2020-07-29 Thread Christian Schoenebeck
The implementation of v9fs_co_readdir() has two parts: the outer part is executed by main I/O thread, whereas the inner part is executed by fs driver on a background I/O thread. Move the inner part to its own new, private function do_readdir(), so it can be shared by another upcoming new function.

[PATCH v8 7/7] 9pfs: clarify latency of v9fs_co_run_in_worker()

2020-07-29 Thread Christian Schoenebeck
As we just fixed a severe performance issue with Treaddir request handling, clarify this overall issue as a comment on v9fs_co_run_in_worker() with the intention to hopefully prevent such performance mistakes in future (and fixing other yet outstanding ones). Signed-off-by: Christian Schoenebeck

Re: sysbus_create_simple Vs qdev_create

2020-07-29 Thread Paolo Bonzini
On 29/07/20 00:47, Eduardo Habkost wrote: > On Tue, Jul 28, 2020 at 07:38:27PM +0200, Paolo Bonzini wrote: >> On 28/07/20 09:19, Markus Armbruster wrote: the composition tree generally mirrors things that are born and die at the same time, and creating children is generally reserved to th

Re: [PATCH RFCv3 6/9] s390x/diag: subcode to query device memory region

2020-07-29 Thread David Hildenbrand
On 29.07.20 11:37, Cornelia Huck wrote: > On Wed, 29 Jul 2020 10:57:58 +0200 > David Hildenbrand wrote: > >> On 28.07.20 09:10, Cornelia Huck wrote: > >>> However, I think we really need a central place for definitions that >>> are not just a Linux/QEMU interface, but can potentially also be use

Re: [PATCH 3/3] cpu-timers, icount: new modules

2020-07-29 Thread Paolo Bonzini
On 29/07/20 10:48, Claudio Fontana wrote: >> If you want you can add to your accelerator ops series one for >> qemu_get_clock_ns(QEMU_CLOCK_VIRTUAL), cpu_get_ticks() and >> qemu_start_warp_timer(), that would certainly work for me; > > The problem I see here is, as usual, one of meaning. > > Are

Re: [PATCH for-5.2 4/6] pc-bios/s390-ccw: Do not bail out early if not finding a SCSI disk

2020-07-29 Thread Cornelia Huck
On Tue, 28 Jul 2020 20:37:32 +0200 Thomas Huth wrote: > In case the user did not specify a boot device, we want to continue > looking for other devices if there are no valid SCSI disks on a virtio- > scsi controller. As a first step, do not panic in this case and let > the control flow carry the

Re: [PATCH for-5.2 0/6] Continue booting in case the first device is not bootable

2020-07-29 Thread Cornelia Huck
On Tue, 28 Jul 2020 20:37:28 +0200 Thomas Huth wrote: > If the user did not specify a "bootindex" property, the s390-ccw bios > tries to find a bootable device on its own. Unfortunately, it alwasy > stops at the very first device that it can find, no matter whether it's > bootable or not. That ca

Re: [PATCH RFCv3 6/9] s390x/diag: subcode to query device memory region

2020-07-29 Thread Cornelia Huck
On Wed, 29 Jul 2020 11:57:04 +0200 David Hildenbrand wrote: > On 29.07.20 11:37, Cornelia Huck wrote: > > On Wed, 29 Jul 2020 10:57:58 +0200 > > David Hildenbrand wrote: > > > >> On 28.07.20 09:10, Cornelia Huck wrote: > > > >>> However, I think we really need a central place for definit

Re: [PATCH v2 2/2] GitLab Gating CI: initial set of jobs, documentation and scripts

2020-07-29 Thread Stefan Hajnoczi
On Wed, Jul 08, 2020 at 10:46:57PM -0400, Cleber Rosa wrote: Awesome, thanks for creating this stuff! Minor suggestions: > diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst > index c1ff24370b..f8dab788ea 100644 > --- a/docs/devel/testing.rst > +++ b/docs/devel/testing.rst > @@ -1003,3

Re: [PATCH v3 07/18] hw/block/nvme: add support for the get log page command

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for the Get Log Page command and basic implementations of > the mandatory Error Information, SMART / Health Information and Firmware > Slot Information log pages. > > In violation of the specification, th

Re: [PATCH 2/2] block: add logging facility for long standing IO requests

2020-07-29 Thread Stefan Hajnoczi
On Fri, Jul 10, 2020 at 08:27:11PM +0300, Denis V. Lunev wrote: > +static void block_acct_report_long(BlockAcctStats *stats, > + BlockAcctCookie *cookie, int64_t > latency_ns) > +{ > +unsigned latency_ms = latency_ns / 100; Please use SCALE_MS. > +in

Re: [PATCH 0/2] block: add logging facility for long standing IO requests

2020-07-29 Thread Stefan Hajnoczi
On Fri, Jul 10, 2020 at 08:27:09PM +0300, Denis V. Lunev wrote: > There are severe delays with IO requests processing if QEMU is running in > virtual machine or over software defined storage. Such delays potentially > results in unpredictable guest behavior. For example, guests over IDE or > SATA d

Re: [PATCH for 5.1] docs: fix trace docs build with sphinx 3.1.1

2020-07-29 Thread Stefan Hajnoczi
On Tue, Jul 14, 2020 at 05:26:59PM +0100, Daniel P. Berrangé wrote: > In Fedora 33 rawhide, we now have sphinx 3.1.1, as opposed > to previous 2.2.2. This new version generates a warning on > the source: > > docs/qemu-option-trace.rst.inc:4:Malformed option description > '[enable=]PATTERN', shou

Re: [PATCH v3 08/18] hw/block/nvme: add support for the asynchronous event request command

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for the Asynchronous Event Request command. Required for > compliance with NVMe revision 1.3d. See NVM Express 1.3d, Section 5.2 > ("Asynchronous Event Request command"). > > Mostly imported from Keith's

Re: [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file

2020-07-29 Thread Stefan Hajnoczi
On Wed, Jul 15, 2020 at 10:54:29AM +0800, Jingqi Liu wrote: > At the end of live migration, QEMU uses msync() to flush the data to > the backend storage. When the backend file is a character device dax, > the pages explicitly avoid the page cache. It will return failure from > msync(). > The follo

Re: [PATCH v3 09/18] hw/block/nvme: move NvmeFeatureVal into hw/block/nvme.h

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The NvmeFeatureVal does not belong with the spec-related data structures > in include/block/nvme.h that is shared between the block-level nvme > driver and the emulated nvme device. > > Move it into the nvme device s

Re: qemu-img convert asserts while converting from vhdx to raw

2020-07-29 Thread Max Reitz
On 28.07.20 18:53, Swapnil Ingle wrote: > Hey Guys, > >   > > We are seeing following assert when trying to convert disk image from > vhdx to raw.  > > This issue is seen only for disk with 4k logical sector size. Honestly, looking at the vhdx code, it just can’t work for 4k logical sectors wit

Re: [PATCH v3 10/18] hw/block/nvme: flush write cache when disabled

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > If the write cache is disabled with a Set Features command, flush it if > currently enabled. > > Signed-off-by: Klaus Jensen > Reviewed-by: Dmitry Fomichev > --- > hw/block/nvme.c | 4 > 1 file changed, 4 ins

Re: [PATCH for-5.2 2/6] pc-bios/s390-ccw: Move ipl-related code from main() into a separate function

2020-07-29 Thread Thomas Huth
On 29/07/2020 10.47, Cornelia Huck wrote: > On Tue, 28 Jul 2020 20:37:30 +0200 > Thomas Huth wrote: > >> Let's move this part of the code into a separate function to be able >> to use it from multiple spots later. >> >> Signed-off-by: Thomas Huth >> --- >> pc-bios/s390-ccw/main.c | 20 +

Re: [PATCH 2/2] block: add logging facility for long standing IO requests

2020-07-29 Thread Denis V. Lunev
On 7/29/20 1:30 PM, Stefan Hajnoczi wrote: > On Fri, Jul 10, 2020 at 08:27:11PM +0300, Denis V. Lunev wrote: >> +static void block_acct_report_long(BlockAcctStats *stats, >> + BlockAcctCookie *cookie, int64_t >> latency_ns) >> +{ >> +unsigned latency_ms = late

Re: [PATCH for-5.2 3/6] pc-bios/s390-ccw: Move the inner logic of find_subch() to a separate function

2020-07-29 Thread Thomas Huth
On 29/07/2020 10.54, Cornelia Huck wrote: > On Tue, 28 Jul 2020 20:37:31 +0200 > Thomas Huth wrote: > >> Move the code to a separate function to be able to re-use it from a >> different spot later. >> >> Signed-off-by: Thomas Huth >> --- >> pc-bios/s390-ccw/main.c | 99 -

[PATCH 0/3] Trapped instruction encoding support

2020-07-29 Thread Anup Patel
With RISC-V H-extension support, a RISC-V implementation can provide trapped instruction encoding for almost all traps/exceptions. For illegal/virtual instruction traps, the instruction encoding is available in STVAL/MTVAL CSR. For load/store faults, a transformed encoding of the trapped instruct

[PATCH 1/3] target/riscv: Optional feature to provide trapped instruction in CSRs

2020-07-29 Thread Anup Patel
The RISC-V spec allows implementations to provide trapped instruction opcode in MTVAL/STVAL CSR for illegal/virtual instruction traps. This is totally optional and most RISC-V implementations always set zero in the MTVAL/STVAL CSR for illegal/virtual instruction traps. When trapped instruction opc

[PATCH 2/3] target/riscv: Fix write_htinst() implementation

2020-07-29 Thread Anup Patel
The htinst CSR is writeable from M-mode and HS-mode so we should not ignore writes to htinst CSR. Signed-off-by: Anup Patel --- target/riscv/csr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index f985b85de4..99fcb7f67d 100644 --- a/target/riscv/cs

Re: device compatibility interface for live migration with assigned devices

2020-07-29 Thread Sean Mooney
On Wed, 2020-07-29 at 16:05 +0800, Yan Zhao wrote: > On Mon, Jul 27, 2020 at 04:23:21PM -0600, Alex Williamson wrote: > > On Mon, 27 Jul 2020 15:24:40 +0800 > > Yan Zhao wrote: > > > > > > > As you indicate, the vendor driver is responsible for checking version > > > > > information embedded with

[PATCH 3/3] target/riscv: Update MTINST/HTINST CSR in riscv_cpu_do_interrupt()

2020-07-29 Thread Anup Patel
When RISCV_FEATURE_TINST feature is enabled, we should write transformed instruction encoding of the trapped instruction in MTINST/HTINST CSR at time of taking trap. We update riscv_cpu_do_interrupt() as-per above. Signed-off-by: Anup Patel --- target/riscv/cpu_helper.c | 166 ++

Re: [PATCH v3 11/18] hw/block/nvme: add remaining mandatory controller parameters

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for any remaining mandatory controller operating parameters > (features). > > Signed-off-by: Klaus Jensen > Reviewed-by: Dmitry Fomichev > --- > hw/block/nvme.c | 56 +

Re: [PATCH for 5.1] docs: fix trace docs build with sphinx 3.1.1

2020-07-29 Thread Daniel P . Berrangé
On Wed, Jul 29, 2020 at 11:37:19AM +0100, Stefan Hajnoczi wrote: > On Tue, Jul 14, 2020 at 05:26:59PM +0100, Daniel P. Berrangé wrote: > > In Fedora 33 rawhide, we now have sphinx 3.1.1, as opposed > > to previous 2.2.2. This new version generates a warning on > > the source: > > > > docs/qemu-opt

Re: [PATCH for-5.2 0/6] Continue booting in case the first device is not bootable

2020-07-29 Thread Viktor Mihajlovski
On 7/28/20 8:37 PM, Thomas Huth wrote: If the user did not specify a "bootindex" property, the s390-ccw bios tries to find a bootable device on its own. Unfortunately, it alwasy stops at the very first device that it can find, no matter whether it's bootable or not. That causes some weird beha

Re: [PATCH v3 07/18] hw/block/nvme: add support for the get log page command

2020-07-29 Thread Klaus Jensen
On Jul 29 13:24, Maxim Levitsky wrote: > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add support for the Get Log Page command and basic implementations of > > the mandatory Error Information, SMART / Health Information and Firmware > > Slot Information lo

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-07-29 Thread Markus Armbruster
Christophe de Dinechin writes: > On 2020-07-27 at 10:23 CEST, Markus Armbruster wrote... >> Christophe de Dinechin writes: >> >>> On 2020-07-23 at 16:06 CEST, Markus Armbruster wrote... Christophe de Dinechin writes: [...] > I'm certainly not against adding a command-line option to act

Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness

2020-07-29 Thread Philippe Mathieu-Daudé
On 7/29/20 9:39 AM, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 28/07/20 09:44, Markus Armbruster wrote: -assert(!DEVICE_GET_CLASS(dev)->bus_type); +} else if (DEVICE_GET_CLASS(dev)->bus_type) { +error_setg(errp, "Unexpected bus '%s' for bus-less de

Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness

2020-07-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/29/20 9:39 AM, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> On 28/07/20 09:44, Markus Armbruster wrote: > -assert(!DEVICE_GET_CLASS(dev)->bus_type); > +} else if (DEVICE_GET_CLASS(dev)->bus_type) { > +error_setg(e

Re: [PATCH v2 4/4] net/colo: Match is-enabled probe to tracepoint

2020-07-29 Thread Roman Bolshakov
On Tue, Jul 21, 2020 at 03:06:57PM +0100, Daniel P. Berrangé wrote: > On Sat, Jul 18, 2020 at 05:58:56PM +, Zhang, Chen wrote: > > > > > > > -Original Message- > > > From: Roman Bolshakov > > > Sent: Friday, July 17, 2020 5:35 PM > > > To: qemu-devel@nongnu.org > > > Cc: Daniel P. Be

Re: [PATCH v2 4/4] net/colo: Match is-enabled probe to tracepoint

2020-07-29 Thread Daniel P . Berrangé
On Wed, Jul 29, 2020 at 03:33:22PM +0300, Roman Bolshakov wrote: > On Tue, Jul 21, 2020 at 03:06:57PM +0100, Daniel P. Berrangé wrote: > > On Sat, Jul 18, 2020 at 05:58:56PM +, Zhang, Chen wrote: > > > > > > > > > > -Original Message- > > > > From: Roman Bolshakov > > > > Sent: Frida

Re: [PATCH v0 3/4] migration: add background snapshot

2020-07-29 Thread Denis Plotnikov
On 24.07.2020 01:15, Peter Xu wrote: On Wed, Jul 22, 2020 at 11:11:32AM +0300, Denis Plotnikov wrote: +static void *background_snapshot_thread(void *opaque) +{ +MigrationState *m = opaque; +QIOChannelBuffer *bioc; +QEMUFile *fb; +int res = 0; + +rcu_register_thread(); + +

Re: Missing qapi_free_Type in error case for qapi generated code?

2020-07-29 Thread Markus Armbruster
Christophe de Dinechin writes: > On 2020-07-29 at 10:34 CEST, Markus Armbruster wrote... >> Eric Blake writes: >> >>> On 7/28/20 10:26 AM, Christophe de Dinechin wrote: The qapi generated code for qmp_marshal_query_spice seems to be missing a resource deallocation for "retval". For exa

Re: [PATCH] introduce VFIO-over-socket protocol specificaion

2020-07-29 Thread Stefan Hajnoczi
On Wed, Jul 22, 2020 at 11:42:26AM +, Thanos Makatos wrote: > > > diff --git a/docs/devel/vfio-over-socket.rst b/docs/devel/vfio-over- > > socket.rst > > > new file mode 100644 > > > index 000..723b944 > > > --- /dev/null > > > +++ b/docs/devel/vfio-over-socket.rst > > > @@ -0,0 +1,1135 @@

Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness

2020-07-29 Thread Philippe Mathieu-Daudé
On 7/29/20 2:32 PM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 7/29/20 9:39 AM, Markus Armbruster wrote: >>> Paolo Bonzini writes: >>> On 28/07/20 09:44, Markus Armbruster wrote: >> -assert(!DEVICE_GET_CLASS(dev)->bus_type); >> +} else if (DEVICE_G

Re: hw-display-qxl.so: undefined symbol: qemu_qxl_io_log_semaphore

2020-07-29 Thread Stefan Hajnoczi
On Thu, Jul 16, 2020 at 05:10:26PM -0400, Cole Robinson wrote: > I'm trying to build qemu 5.1.0-rc0 in Fedora. I'm hitting some issues. For anyone else reading this email thread, this was fixed in QEMU 5.1.0-rc1: commit d97df4b84bc42613cf9a03619de453ebd0be30b7 Author: Gerd Hoffmann Date:

Re: [PATCH v0 3/4] migration: add background snapshot

2020-07-29 Thread Denis Plotnikov
On 24.07.2020 03:08, Peter Xu wrote: On Wed, Jul 22, 2020 at 11:11:32AM +0300, Denis Plotnikov wrote: +/** + * ram_copy_page: make a page copy + * + * Used in the background snapshot to make a copy of a memeory page. + * Ensures that the memeory page is copied only once. + * When a page copy

[Bug 1889411] [NEW] RISC-V: Unable to unwind the stack upon signals

2020-07-29 Thread Bernhard Urban-Forster
Public bug reported: Consider the following program: === #include #include #define NOINLINE __attribute__ ((noinline)) void NOINLINE abort_me(void) { abort(); /* trigger SIGABRT */ } void NOINLINE level1(void) { abort_me(); } void

[PATCH 1/1] docs: adding NUMA documentation for pseries

2020-07-29 Thread Daniel Henrique Barboza
This patch adds a new documentation file, ppc-spapr-numa.rst, informing what developers and user can expect of the NUMA distance support for the pseries machine, up to QEMU 5.1. In the (hopefully soon) future, when we rework the NUMA mechanics of the pseries machine to at least attempt to contempl

Re: Disk cache defaults

2020-07-29 Thread Stefan Hajnoczi
On Wed, Jul 22, 2020 at 07:14:59AM +0100, anthony smith wrote: > Appreciate any assistance even if the answer is just "Not possible" so I > can at least drop this search for answers. You can create an /etc/qemu/qemu.conf file but I don't remember if there is syntax to set -drive cache=none. CCing

[PATCH 1/1] s390x/s390-virtio-ccw: fix off-by-one in loadparm getter

2020-07-29 Thread Halil Pasic
As pointed out by Peter, g_memdup(ms->loadparm, sizeof(ms->loadparm) + 1) reads one past of the end of ms->loadparm, so g_memdup() can not be used here. Let's use malloc and memcpy instead! Fixes: d664548328 ("s390x/s390-virtio-ccw: fix loadparm property getter") Fixes: Coverity CID 1431058 Repor

Re: [PATCH] trace/simple: Allow enabling simple traces from command line

2020-07-29 Thread Stefan Hajnoczi
On Thu, Jul 23, 2020 at 12:33:59AM -0500, Josh DuBois wrote: > The simple trace backend is enabled / disabled with a call > to st_set_trace_file_enabled(). When initializing tracing > from the command-line, this must be enabled on startup. > (Prior to db25d56c014aa1a9, command-line initialization

Re: [PATCH v4 0/2] trace: Add a trace backend for the recorder library

2020-07-29 Thread Stefan Hajnoczi
On Thu, Jul 23, 2020 at 03:29:01PM +0200, Christophe de Dinechin wrote: > The recorder library implements low-cost always-on tracing, with three > usage models: > > 1. Flight recorder: Dump information on recent events in case of crash > 2. Tracing: Individual traces can be enabled using environme

[PATCH v4] i386: hvf: Implement CPU kick

2020-07-29 Thread Roman Bolshakov
HVF doesn't have a CPU kick and without it it's not possible to perform an action on CPU thread until a VMEXIT happens. The kick is also needed for timely interrupt delivery. Existing implementation of CPU kick sends SIG_IPI (aka SIGUSR1) to vCPU thread, but it's different from what hv_vcpu_interr

Re: [PATCH v3 12/18] hw/block/nvme: support the get/set features select and save fields

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Since the device does not have any persistent state storage, no > features are "saveable" and setting the Save (SV) field in any Set > Features command will result in a Feature Identifier Not Saveable status > code. >

Re: sysbus_create_simple Vs qdev_create

2020-07-29 Thread Markus Armbruster
Paolo Bonzini writes: > On 29/07/20 00:47, Eduardo Habkost wrote: >> On Tue, Jul 28, 2020 at 07:38:27PM +0200, Paolo Bonzini wrote: >>> On 28/07/20 09:19, Markus Armbruster wrote: > the composition tree generally mirrors things that are born and die > at the same time, and creating childr

Re: [PATCH v3 14/18] hw/block/nvme: support identify namespace descriptor list

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Since we are not providing the NGUID or EUI64 fields, we must support > the Namespace UUID. We do not have any way of storing a persistent > unique identifier, so conjure up a UUID that is just the namespace id. > >

Re: [PATCH v3 15/18] hw/block/nvme: reject invalid nsid values in active namespace id list

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:13 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Reject the nsid broadcast value (0x) and 0xfffe in the > Active Namespace ID list. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff -

Re: [PATCH v0 3/4] migration: add background snapshot

2020-07-29 Thread Dr. David Alan Gilbert
* Denis Plotnikov (dplotni...@virtuozzo.com) wrote: > > > On 27.07.2020 19:48, Dr. David Alan Gilbert wrote: > > * Denis Plotnikov (dplotni...@virtuozzo.com) wrote: > ... > > > +static void page_fault_thread_stop(void) > > > +{ > > > +if (page_fault_fd) { > > > +close(page_fault_fd);

Re: [PATCH v3 17/18] hw/block/nvme: provide the mandatory subnqn field

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-06 at 08:13 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The SUBNQN field is mandatory in NVM Express 1.3. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/block/nvme.c b/hw/block/nvme.c > index 07d

Re: [PATCH v3 08/18] hw/block/nvme: add support for the asynchronous event request command

2020-07-29 Thread Klaus Jensen
On Jul 29 13:43, Maxim Levitsky wrote: > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add support for the Asynchronous Event Request command. Required for > > compliance with NVMe revision 1.3d. See NVM Express 1.3d, Section 5.2 > > ("Asynchronous Event Re

Re: [PATCH v3 12/18] hw/block/nvme: support the get/set features select and save fields

2020-07-29 Thread Klaus Jensen
On Jul 29 16:17, Maxim Levitsky wrote: > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Since the device does not have any persistent state storage, no > > features are "saveable" and setting the Save (SV) field in any Set > > Features command will result in

Re: [PATCH 2/3] hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init

2020-07-29 Thread Andrew Jones
On Tue, Jul 21, 2020 at 11:02:30AM +0100, Peter Maydell wrote: > On Sat, 11 Jul 2020 at 11:10, Andrew Jones wrote: > > > > Move the KVM PMU setup part of fdt_add_pmu_nodes() to > > virt_cpu_post_init(), which is a more appropriate location. Now > > fdt_add_pmu_nodes() is also named more appropriat

[Bug 1889421] [NEW] VVFAT is not writable from Windows NT 3.5, 3.51 and 4.0

2020-07-29 Thread pts
Public bug reported: I'm running Windows NT 3.5, 3.51 and 4.0 in QEMU 4.2.0 on Linux. I'm using a VVFAT filesystem. Command lines: $ qemu-system-i386 -L pc -cpu 486 -m 64 -vga cirrus -drive file=nt351.img,format=raw -net nic,model=pcnet -net user -soundhw sb16,pcspk -drive file=fat:rw:drived,form

Re: [PATCH v0 3/4] migration: add background snapshot

2020-07-29 Thread Denis Plotnikov
On 29.07.2020 16:27, Dr. David Alan Gilbert wrote: ... /** * ram_find_and_save_block: finds a dirty page and sends it to f * @@ -1782,6 +2274,7 @@ static int ram_find_and_save_block(RAMState *rs, bool last_stage) pss.block = rs->last_seen_block; pss.page = rs->last_p

Re: [PATCH 02/16] hw/block/nvme: add mapping helpers

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and > use them in nvme_map_prp. > > This fixes a bug where in the case of a CMB transfer, the device would > map to the buffer with a wrong length. >

Re: [PATCH] virtio-pci: fix virtio_pci_queue_enabled()

2020-07-29 Thread Michael S. Tsirkin
On Tue, Jul 28, 2020 at 11:55:16AM +0800, Jason Wang wrote: > > On 2020/7/27 下午11:33, Laurent Vivier wrote: > > In legacy mode, virtio_pci_queue_enabled() falls back to > > virtio_queue_enabled() to know if the queue is enabled. > > > > But virtio_queue_enabled() calls again virtio_pci_queue_enab

Re: [PATCH v5] hw/pci-host: save/restore pci host config register for old ones

2020-07-29 Thread Michael S. Tsirkin
On Tue, Jul 28, 2020 at 11:27:09AM +0800, Hogan Wang wrote: > The i440fx and q35 machines integrate i440FX or MCH PCI device by default. > Refer to i440FX and ICH9-LPC spcifications, there are some reserved > configuration registers can used to save/restore PCIHostState.config_reg. > It's nasty but

Re: [PATCH] hw: add compat machines for 5.2

2020-07-29 Thread Michael S. Tsirkin
On Tue, Jul 28, 2020 at 11:46:45AM +0200, Cornelia Huck wrote: > Add 5.2 machine types for arm/i440fx/q35/s390x/spapr. > > Signed-off-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin We merge this kind of thing after the release, right? > --- > hw/arm/virt.c | 9 - >

Re: [PATCH v2 1/3] hw/i386: Initialize topo_ids from CpuInstanceProperties

2020-07-29 Thread Igor Mammedov
On Mon, 27 Jul 2020 18:59:42 -0500 Babu Moger wrote: > > -Original Message- > > From: Igor Mammedov > > Sent: Monday, July 27, 2020 12:14 PM > > To: Moger, Babu > > Cc: qemu-devel@nongnu.org; pbonz...@redhat.com; ehabk...@redhat.com; > > r...@twiddle.net > > Subject: Re: [PATCH v2 1/3]

Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness

2020-07-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/29/20 2:32 PM, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 7/29/20 9:39 AM, Markus Armbruster wrote: Paolo Bonzini writes: > On 28/07/20 09:44, Markus Armbruster wrote: >>> -assert(!DEVICE_GET_CLASS(dev)->

Re: [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spec

2020-07-29 Thread Michael S. Tsirkin
On Tue, Jul 28, 2020 at 12:52:11PM +0200, Marc Hartmayer wrote: > On Tue, Jul 21, 2020 at 06:44 PM +0200, Halil Pasic > wrote: > > On Tue, 21 Jul 2020 09:40:10 -0400 > > "Michael S. Tsirkin" wrote: > > > >> On Fri, Jul 17, 2020 at 11:29:28AM +0200, Marc Hartmayer wrote: > >> > Since virtio exist

Re: [RFC 0/2] virtio-rng: add a control queue

2020-07-29 Thread Michael S. Tsirkin
On Tue, Jul 28, 2020 at 03:45:26PM +0200, Laurent Vivier wrote: > On 29/01/2020 16:43, Stefan Hajnoczi wrote: > > On Fri, Jan 24, 2020 at 03:05:18PM +0100, Laurent Vivier wrote: > >> On 24/01/2020 12:02, Stefan Hajnoczi wrote: > >>> On Thu, Jan 23, 2020 at 04:16:58PM +0100, Laurent Vivier wrote: >

Re: [PATCH v5 2/2] hw: hyperv: vmbus: Fix 32bit compilation

2020-07-29 Thread Igor Mammedov
On Sat, 25 Jul 2020 14:16:08 +0200 Aleksandar Markovic wrote: > On Wednesday, July 15, 2020, Jon Doron wrote: Michael, could you merge it via your tree please? > > > Signed-off-by: Jon Doron > > --- > > hw/hyperv/vmbus.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > d

Re: Adding VHOST_USER_PROTOCOL_F_CONFIG_MEM_SLOTS to 5.1 release notes

2020-07-29 Thread Michael S. Tsirkin
On Tue, Jul 28, 2020 at 09:16:10PM -0600, Raphael Norwitz wrote: > Hi mst, > > Looking at the current changelog > https://wiki.qemu.org/ChangeLog/5.1#virtio, I don't see any mention of > the VHOST_USER_PROTOCOL_F_CONFIG_MEM_SLOTS protocol feature. It is a > user visible change so shouldn't we add

Re: [PATCH] hw: add compat machines for 5.2

2020-07-29 Thread Cornelia Huck
On Wed, 29 Jul 2020 10:10:56 -0400 "Michael S. Tsirkin" wrote: > On Tue, Jul 28, 2020 at 11:46:45AM +0200, Cornelia Huck wrote: > > Add 5.2 machine types for arm/i440fx/q35/s390x/spapr. > > > > Signed-off-by: Cornelia Huck > > Reviewed-by: Michael S. Tsirkin > > > We merge this kind of th

What this mean "dead: 1" and "dead: 0 1" on each tb block start?

2020-07-29 Thread tugouxp
HI folks: on each tb block start, there are following ir code, and the most confusing me is that the postfix of each line "dead:" flag, what it is represent precisely? i guess it may be related to the register or varible liveness for help generating tghe target machine code, but i cant get th

Re: [PATCH v2 3/3] virtiofsd: probe unshare(CLONE_FS) and print an error

2020-07-29 Thread Stefan Hajnoczi
On Tue, Jul 28, 2020 at 03:15:25PM -0400, Daniel Walsh wrote: > On 7/28/20 11:32, Stefan Hajnoczi wrote: > > On Tue, Jul 28, 2020 at 12:00:20PM +0200, Roman Mohr wrote: > >> On Tue, Jul 28, 2020 at 3:07 AM misono.tomoh...@fujitsu.com < > >> misono.tomoh...@fujitsu.com> wrote: > >> > Subject: [

Re: sysbus_create_simple Vs qdev_create

2020-07-29 Thread Eduardo Habkost
On Wed, Jul 29, 2020 at 11:54:35AM +0200, Paolo Bonzini wrote: > On 29/07/20 00:47, Eduardo Habkost wrote: [...] > > Do we really need need QOM children to be accessible using the QOM > > property API? > > > > Using the same code for both user-configurable properties and for > > the list of childr

  1   2   3   >