Re: [PATCH v2 34/44] error: Eliminate error_propagate() with Coccinelle, part 1

2020-07-02 Thread Markus Armbruster
Eric Blake writes: > On 7/2/20 10:49 AM, Markus Armbruster wrote: >> When all we do with an Error we receive into a local variable is >> propagating to somewhere else, we can just as well receive it there >> right away. Convert >> >> if (!foo(..., &err)) { >> ... >> error_

Re: [PATCH v2 33/44] error: Avoid unnecessary error_propagate() after error_setg()

2020-07-02 Thread Markus Armbruster
Eric Blake writes: > On 7/2/20 10:49 AM, Markus Armbruster wrote: >> Replace >> >> error_setg(&err, ...); >> error_propagate(errp, err); >> >> by >> >> error_setg(errp, ...); >> > >> >> Candidates for conversion tracked down with this Coccinelle script: >> >> @@ >> identi

Re: [PATCH v2 14/44] block: Avoid error accumulation in bdrv_img_create()

2020-07-02 Thread Markus Armbruster
Eric Blake writes: > On 7/2/20 10:49 AM, Markus Armbruster wrote: >> When creating an image fails because the format doesn't support option >> "backing_file" or "backing_fmt", bdrv_img_create() first has >> qemu_opt_set() put a generic error into @local_err, then puts the real >> error into @errp

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

2020-07-02 Thread Klaus Jensen
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 | 4 1 file changed, 4 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 65c2fa3ac1f4..0dac7a41ddae 100644 ---

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

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen The SUBNQN field is mandatory in NVM Express 1.3. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 8138baa6fbd8..5bbb6aa0e

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

2020-07-02 Thread Klaus Jensen
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 | 39 +-- hw/block/nvme.h | 18 ++ hw/block/trace

[PATCH v2 18/18] hw/block/nvme: bump supported version to v1.3

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Bump the supported NVM Express version to v1.3. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 5bbb6aa0e

[PATCH v2 16/18] hw/block/nvme: enforce valid queue creation sequence

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Support returning Command Sequence Error if Set Features on Number of Queues is called after queues have been created. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 12 hw/block/nvme.h | 1 + 2 file

[PATCH v2 09/18] hw/block/nvme: flush write cache when disabled

2020-07-02 Thread Klaus Jensen
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 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 3eac1e231b

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

2020-07-02 Thread Klaus Jensen
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. Similarly, if the Select (SEL) field is set to request saved values

[PATCH v2 07/18] hw/block/nvme: add support for the asynchronous event request command

2020-07-02 Thread Klaus Jensen
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 qemu-nvme tree. Modified with a max number of queued events (controll

[PATCH v2 13/18] hw/block/nvme: make sure ncqr and nsqr is valid

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen 0x is not an allowed value for NCQR and NSQR in Set Features on Number of Queues. Signed-off-by: Klaus Jensen Acked-by: Keith Busch Reviewed-by: Maxim Levitsky Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 8 1 file changed, 8 insertions(+) diff --git a

[PATCH v2 10/18] hw/block/nvme: fix missing endian conversion

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Fix a missing cpu_to conversion. Signed-off-by: Klaus Jensen Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index f3a5b857bc92..ba523f6768bf 100644 --- a/hw/block/nvme.c

[PATCH v2 06/18] hw/block/nvme: add support for the get log page command

2020-07-02 Thread Klaus Jensen
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, the SMART / Health Information log page does not persist information ov

[PATCH v2 08/18] hw/block/nvme: move NvmeFeatureVal into hw/block/nvme.h

2020-07-02 Thread Klaus Jensen
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 specific header file as it is the only user of the structure. Also, re

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

2020-07-02 Thread Klaus Jensen
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. Signed-off-by: Klaus Jensen Reviewed-by: Dmitry Fomichev --- hw/bl

[PATCH v2 05/18] hw/block/nvme: mark fw slot 1 as read-only

2020-07-02 Thread Klaus Jensen
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, 6 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/n

[PATCH v2 01/18] hw/block/nvme: bump spec data structures to v1.3

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Add missing fields in the Identify Controller and Identify Namespace data structures to bring them in line with NVMe v1.3. This also adds data structures and defines for SGL support which requires a couple of trivial changes to the nvme block driver as well. Signed-off-by: Kl

[PATCH v2 04/18] hw/block/nvme: add temperature threshold feature

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen It might seem weird to implement this feature for an emulated device, but it is mandatory to support and the feature is useful for testing asynchronous event request support, which will be added in a later patch. Signed-off-by: Klaus Jensen Acked-by: Keith Busch Reviewed-by:

[PATCH v2 03/18] hw/block/nvme: add support for the abort command

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Required for compliance with NVMe revision 1.3d. See NVM Express 1.3d, Section 5.1 ("Abort command"). The Abort command is a best effort command; for now, the device always fails to abort the given command. Signed-off-by: Klaus Jensen Signed-off-by: Klaus Jensen Acked-by: K

[PATCH v2 02/18] hw/block/nvme: additional tracing

2020-07-02 Thread Klaus Jensen
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 Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 19 +++ hw

[PATCH v2 00/18] hw/block/nvme: bump to v1.3

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen This adds mandatory features of NVM Express v1.3 to the emulated NVMe device. v2: * hw/block/nvme: bump spec data structures to v1.3 - Shorten some constants. (Dmitry) * hw/block/nvme: add temperature threshold feature - Remove unused temp_thresh member. (Dmitry)

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

2020-07-02 Thread Klaus Jensen
On Jul 3 00:46, Dmitry Fomichev wrote: > On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Since the device does not have any persistance state storage, no > > features are "saveable" and setting the Save (SV) field in any Set > > Features command will result

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

2020-07-02 Thread Klaus Jensen
On Jul 3 00:46, Dmitry Fomichev wrote: > LGTM with one small nit (see below)... > > Reviewed-by: Dmitry Fomichev > > On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add support for any remaining mandatory controller operating parameters > > (features). >

Re: [PATCH 06/17] hw/block/nvme: add support for the get log page command

2020-07-02 Thread Klaus Jensen
On Jul 3 00:45, Dmitry Fomichev wrote: > On Mon, 2020-06-29 at 20:26 +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 l

Re: [PATCH 04/17] hw/block/nvme: add temperature threshold feature

2020-07-02 Thread Klaus Jensen
On Jul 3 00:44, Dmitry Fomichev wrote: > On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > It might seem weird to implement this feature for an emulated device, > > but it is mandatory to support and the feature is useful for testing > > asynchronous event req

Re: [PATCH 01/17] hw/block/nvme: bump spec data structures to v1.3

2020-07-02 Thread Klaus Jensen
On Jul 3 00:44, Dmitry Fomichev wrote: > On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add missing fields in the Identify Controller and Identify Namespace > > data structures to bring them in line with NVMe v1.3. > > > > This also adds data structures an

Re: [PATCH] softmmu/vl: Remove the check for colons in -accel parameters

2020-07-02 Thread Thomas Huth
On 18/06/2020 09.40, Thomas Huth wrote: The new -accel option does not accept colons in the parameters anymore (since it does not convert the parameters to -machine accel=... parameters anymore). Thus we can now remove the check for colons in -accel: $ qemu-system-x86_64 -accel kvm:tcg qemu-syst

Re: [PATCH] configure / util: Auto-detect the availability of openpty()

2020-07-02 Thread Thomas Huth
On 02/07/2020 23.33, Michele Denber wrote: On 07/02/20 13:34, Thomas Huth wrote: That's just the context, cut at three lines after the last change. Simply try to apply the patch with "patch -p1 -i ..." or "git am" in a separate git branch if you're using git. It should hopefully apply cleanl

[PATCH] hw/riscv: virt: Sort the SoC memmap table entries

2020-07-02 Thread Bin Meng
From: Bin Meng Adjust the PCIe memory maps to follow the order. Signed-off-by: Bin Meng --- hw/riscv/virt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 5ca49c5..aacfbda 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@

[PATCH v3 3/7] roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware

2020-07-02 Thread Bin Meng
From: Bin Meng The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently. Update our Makefile to build the ge

[PATCH v3 2/7] roms/opensbi: Upgrade from v0.7 to v0.8

2020-07-02 Thread Bin Meng
From: Bin Meng Upgrade OpenSBI from v0.7 to v0.8. The v0.8 release includes the following commits: 1bb00ab lib: No need to provide default PMP region using platform callbacks a9eac67 include: sbi_platform: Combine reboot and shutdown into one callback 6585fab lib: utils: Add SiFive test device

[PATCH v3 7/7] Makefile: Ship the generic platform bios images for RISC-V

2020-07-02 Thread Bin Meng
From: Bin Meng Update the install blob list to include the generic platform fw_dynamic bios images. Signed-off-by: Bin Meng --- Changes in v3: - change fw_jump to fw_dynamic in the Makefile Changes in v2: - new patch: Makefile: Ship the generic platform bios images for RISC-V Makefile | 4

[PATCH v3 1/7] configure: Create symbolic links for pc-bios/*.elf files

2020-07-02 Thread Bin Meng
From: Bin Meng Now we need to ship the OpenSBI fw_dynamic.elf image for the RISC-V Spike machine, it requires us to create symbolic links for pc-bios/*.elf files. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - new patch: configure: Create sy

[PATCH v3 6/7] gitlab-ci/opensbi: Update GitLab CI to build generic platform

2020-07-02 Thread Bin Meng
From: Bin Meng This updates the GitLab CI opensbi job to build opensbi bios images for the generic platform. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- Changes in v3: - Generate fw_dynamic images in the artifacts Changes in v2: - Include ELF images in the artifacts .gitlab-ci.d/o

[PATCH v3 0/7] riscv: Switch to use generic platform fw_dynamic type opensbi bios images

2020-07-02 Thread Bin Meng
From: Bin Meng The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently. This series updates QEMU to switch

[PATCH v3 4/7] hw/riscv: Use pre-built bios image of generic platform for virt & sifive_u

2020-07-02 Thread Bin Meng
From: Bin Meng Update virt and sifive_u machines to use the opensbi fw_dynamic bios image built for the generic FDT platform. Remove the out-of-date no longer used bios images. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- Changes in v3: - Change to fw_d

[PATCH v3 5/7] hw/riscv: spike: Change the default bios to use generic platform image

2020-07-02 Thread Bin Meng
From: Bin Meng To keep sync with other RISC-V machines, change the default bios to use generic platform fw_dynamic.elf image. While we are here, add some comments to mention that using ELF files for the Spike machine was intentional. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by

Re: Question about virtio-net: implement RX RSS processing

2020-07-02 Thread Jason Wang
On 2020/7/3 上午1:07, Vincent Li wrote: Hi, I noticed the [PULL V2 02/33] virtio-net: implement RX RSS processing https://marc.info/?l=qemu-devel&m=159248675403246&w=2 and cloned https://github.com/jasowang/qemu.git tags/net-pull-request for testing the RX RSS feature, but I am not clear how to

RE?? How to build QEMU plugin on Windows with mingw

2020-07-02 Thread casmac
Hi Alex, Thansk for looking on this . In the last message, the compilation command is a bit misleading. I am filling in more details. If I keep "-Wl,-soname,$@" in the command , I got similar linking errors. makefile: SONAMES := $(addsuffix .dll,$(addprefix lib,$(NAMES))) QEMU_CFLAGS

Re: [PATCH v1 3/3] target/riscv: Regen floating point rounding mode in dynamic mode

2020-07-02 Thread Bin Meng
On Wed, Jul 1, 2020 at 4:23 AM Alistair Francis wrote: > > When a guest specificies the the rounding mode should be dynamic 0b111 > then we want to re-caclulate the rounding mode on each instruction. The > gen_helper_set_rounding_mode() function will correctly check the > rounding mode and handle

Re: [PATCH v4 4/4] RISC-V: Support 64 bit start address

2020-07-02 Thread Bin Meng
On Thu, Jul 2, 2020 at 2:39 AM Atish Patra wrote: > > Even though the start address in ROM code is declared as a 64 bit address > for RV64, it can't be used as upper bits are set to zero in ROM code. > > Update the ROM code correctly to reflect the 64bit value. > > Signed-off-by: Atish Patra > --

Re: [PATCH 5/5] MAINTAINERS: Adjust MIPS maintainership (Add Huacai Chen & Jiaxun Yang)

2020-07-02 Thread chen huacai
Acked-by: Huacai Chen On Thu, Jul 2, 2020 at 10:23 PM Jiaxun Yang wrote: > > > 在 2020/7/2 下午9:37, Philippe Mathieu-Daudé 写道: > > From: Aleksandar Markovic > > > > Huacai Chen steps in as new energy [1]. > > > > Aurelien Jarno comment [2]: > > > >It happens that I known Huacai Chen from the

Re: [PATCH v4 3/4] riscv: Add opensbi firmware dynamic support

2020-07-02 Thread Bin Meng
On Thu, Jul 2, 2020 at 2:39 AM Atish Patra wrote: > > OpenSBI is the default firmware in Qemu and has various firmware loading > options. Currently, qemu loader uses fw_jump which has a compile time > pre-defined address where fdt & kernel image must reside. This puts a > constraint on image size

Re: [PATCH v4 2/4] RISC-V: Copy the fdt in dram instead of ROM

2020-07-02 Thread Bin Meng
On Thu, Jul 2, 2020 at 2:39 AM Atish Patra wrote: > > Currently, the fdt is copied to the ROM after the reset vector. The firmware > has to copy it to DRAM. Instead of this, directly copy the device tree to a > pre-computed dram address. The device tree load address should be as far as > possible

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

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The SUBNQN field is mandatory in NVM Express 1.3. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky > --- > hw/block/nvme.c | 3 +++ > 1 file changed, 3 inse

Re: [PATCH 15/17] hw/block/nvme: enforce valid queue creation sequence

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Support returning Command Sequence Error if Set Features on Number of > Queues is called after queues have been created. > > Signed-off-by: Klaus Jensen > Reviewed-by: Max

Re: [PATCH 13/17] hw/block/nvme: make sure ncqr and nsqr is valid

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > 0x is not an allowed value for NCQR and NSQR in Set Features on > Number of Queues. > > Signed-off-by: Klaus Jensen > Acked-by: Keith Busch > Reviewed-by: Maxim Levit

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

2020-07-02 Thread Dmitry Fomichev
On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Since the device does not have any persistance 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: [PATCH 17/17] hw/block/nvme: bump supported version to v1.3

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Bump the supported NVM Express version to v1.3. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky > --- > hw/block/nvme.c | 4 +++- > 1 file changed, 3 inser

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

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +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

[Bug 1869006] Re: PCIe cards passthrough to TCG guest works on 2GB of guest memory but fails on 4GB (vfio_dma_map invalid arg)

2020-07-02 Thread costinel
Alex, thanks for the quick answer, but sadly I still do not fully understand the implications, even if I read the pdf paper on RH website you mention, as well as the vendor advisory at https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-c04781229 When you say "qemu has no support", do you

Re: [PATCH 09/17] hw/block/nvme: flush write cache when disabled

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +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 > --- > hw/block/nvme.c | 4 > 1 file ch

Re: [PATCH 07/17] hw/block/nvme: add support for the asynchronous event request command

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +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 c

Re: [PATCH 06/17] hw/block/nvme: add support for the get log page command

2020-07-02 Thread Dmitry Fomichev
On Mon, 2020-06-29 at 20:26 +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 11/17] hw/block/nvme: add remaining mandatory controller parameters

2020-07-02 Thread Dmitry Fomichev
LGTM with one small nit (see below)... Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for any remaining mandatory controller operating parameters > (features). > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c

Re: [PATCH 08/17] hw/block/nvme: move NvmeFeatureVal into hw/block/nvme.h

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +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

Re: [PATCH 04/17] hw/block/nvme: add temperature threshold feature

2020-07-02 Thread Dmitry Fomichev
On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > It might seem weird to implement this feature for an emulated device, > but it is mandatory to support and the feature is useful for testing > asynchronous event request support, which will be added in a later > patch

Re: [PATCH 02/17] hw/block/nvme: additional tracing

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +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). > > S

Re: [PATCH 10/17] hw/block/nvme: fix missing endian conversion

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Fix a missing cpu_to conversion. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/bloc

Re: [PATCH 05/17] hw/block/nvme: mark fw slot 1 as read-only

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Mark firmware slot 1 as read-only and only support that slot. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 3 ++- > include/block/nvme.h | 4 > 2 f

Re: [PATCH 01/17] hw/block/nvme: bump spec data structures to v1.3

2020-07-02 Thread Dmitry Fomichev
On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add missing fields in the Identify Controller and Identify Namespace > data structures to bring them in line with NVMe v1.3. > > This also adds data structures and defines for SGL support which > requires a couple of

Re: [PATCH 03/17] hw/block/nvme: add support for the abort command

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Required for compliance with NVMe revision 1.3d. See NVM Express 1.3d, > Section 5.1 ("Abort command"). > > The Abort command is a best effort command; for now, the device

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-02 Thread Andrzej Jakowski
On 7/2/20 10:51 AM, Klaus Jensen wrote: > On Jul 2 08:07, Andrzej Jakowski wrote: >> On 7/2/20 3:31 AM, Klaus Jensen wrote: >>> Aight, an update here. This only happens when QEMU is run with a virtual >>> IOMMU. Otherwise, the kernel is happy. >>> >>> With the vIOMMU, qemu also craps out a bit: >>

Re: [PATCH v9 30/34] qcow2: Add prealloc field to QCowL2Meta

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 05:09:47 PM CEST, Max Reitz wrote: >> Without a backing file, there is no read required - writing to an >> unallocated subcluster within a preallocated cluster merely has to >> provide zeros to the rest of the write.  And depending on whether we >> can intelligently guarantee tha

Re: [PATCH v9 28/34] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 04:28:57 PM CEST, Max Reitz wrote: >> +/* For full clusters use zero_in_l2_slice() instead */ >> +assert(nb_subclusters > 0 && nb_subclusters < >> s->subclusters_per_cluster); >> +assert(sc + nb_subclusters <= s->subclusters_per_cluster); > > Maybe we should also ass

Re: [PATCH v3 01/19] .mailmap: Update Alexander Graf email address

2020-07-02 Thread Alexander Graf
> Am 02.07.2020 um 19:38 schrieb Philippe Mathieu-Daudé : > > Update Alexander Graf email address to avoid emails bouncing. > > Suggested-by: Alexander Graf > Signed-off-by: Philippe Mathieu-Daudé Thanks a lot! Reviewed-by: Alexander Graf Alex > --- > .mailmap | 1 + > 1 file changed, 1

Re: [PATCH v9 21/34] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 02:46:27 PM CEST, Max Reitz wrote: >> -/* must be allocated */ >> -assert(first_cluster_type == QCOW2_CLUSTER_NORMAL || >> - first_cluster_type == QCOW2_CLUSTER_ZERO_ALLOC); >> +assert(*l2_index + nb_clusters <= s->l2_size); > > Not l2_slice_size? Oh, indee

Re: [PATCH v9 14/34] qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 11:57:46 AM CEST, Max Reitz wrote: >> The reason why we would want to check it is, of course, because that >> bit does have a meaning in regular L2 entries. >> >> But that bit is ignored in images with subclusters so the only reason >> why we would check it is to report corrupti

Re: [PATCH] tcg: Fix do_nonatomic_op_* vs signed operations

2020-07-02 Thread Alistair Francis
On Wed, Jul 1, 2020 at 10:00 AM Richard Henderson wrote: > > The smin/smax/umin/umax operations require the operands to be > properly sign extended. Do not drop the MO_SIGN bit from the > load, and additionally extend the val input. > > Reported-by: LIU Zhiwei > Signed-off-by: Richard Henderson

Re: [PATCH] configure / util: Auto-detect the availability of openpty()

2020-07-02 Thread Michele Denber
On 07/02/20 13:34, Thomas Huth wrote: That's just the context, cut at three lines after the last change. Simply try to apply the patch with "patch -p1 -i ..." or "git am" in a separate git branch if you're using git. It should hopefully apply cleanly. Looks like it partly worked: root@heml

Re: [PATCH v4 00/21] microvm: add acpi support

2020-07-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200702204859.9876-1-kra...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v4 00/21] microvm: add acpi support Type: series Message-id: 20200702204859.9876-1-kra...@redhat.com

Re: nvme emulation merge process

2020-07-02 Thread Keith Busch
On Thu, Jul 02, 2020 at 01:29:26PM -0700, Andrzej Jakowski wrote: > > Thx! Of course I am interested in helping and I think it is actually great > idea to have couple of designated maintainers/reviewers as it would be easier > for folks to receive feedback vs requesting it in polling manner :) >

Re: [PATCH v4 00/21] microvm: add acpi support

2020-07-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200702204859.9876-1-kra...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v4 00/21] microvm: add acpi support Type: series Message-id: 20200702204859.9876-1-kra...@redhat.com

[PATCH v4 17/21] tests/acpi: clear bios-tables-test-allowed-diff.h

2020-07-02 Thread Gerd Hoffmann
Leftover from acpi cleanup series. Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 18 -- 1 file changed, 18 deletions(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index 8992f1f12b77..df

[PATCH v4 10/21] microvm/acpi: use GSI 16-23 for virtio

2020-07-02 Thread Gerd Hoffmann
With ACPI enabled and IO-APIC being properly declared in the ACPI tables we can use interrupt lines 16-23 for virtio and avoid shared interrupts. With acpi disabled we continue to use lines 5-12. Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez Reviewed-by: Igor Mammedov --- hw/i386/mic

[PATCH v4 06/21] acpi: move acpi_dsdt_add_power_button() to ged

2020-07-02 Thread Gerd Hoffmann
Allow reuse for microvm. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov --- include/hw/acpi/generic_event_device.h | 1 + hw/acpi/generic_event_device.c | 8 hw/arm/virt-acpi-build.c | 8 3 files changed, 9 in

[PATCH v4 11/21] microvm/acpi: use seabios with acpi=on

2020-07-02 Thread Gerd Hoffmann
With acpi=off continue to use qboot. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/i386/microvm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 1bcd57a6fd80..ac605d92b984 100644 --- a/hw/i386/microvm.c +++ b/

[Bug 1886097] [NEW] Error in user-mode calculation of ELF program's brk

2020-07-02 Thread Langston
Public bug reported: There's a discrepancy between the way QEMU user-mode and Linux calculate the initial program break for statically-linked binaries. I have a binary with the following segments: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align E

[PATCH v4 05/21] acpi: ged: add x86 device variant.

2020-07-02 Thread Gerd Hoffmann
Set AcpiDeviceIfClass->madt_cpu, otherwise identical to TYPE_ACPI_GED. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- include/hw/acpi/generic_event_device.h | 4 +++ hw/i386/generic_event_device_x86.c | 36 ++ hw/i386/Makefile.objs | 1

[PATCH v4 15/21] x86: move cpu plug from pc to x86

2020-07-02 Thread Gerd Hoffmann
The cpu hotplug code handles the initialization of coldplugged cpus too, so it is needed even in case cpu hotplug is not supported. Move the code from pc to x86, so microvm can use it. Signed-off-by: Gerd Hoffmann --- include/hw/i386/x86.h | 6 ++ hw/i386/pc.c | 234 ++---

[PATCH v4 00/21] microvm: add acpi support

2020-07-02 Thread Gerd Hoffmann
I know that not supporting ACPI in microvm is intentional. If you still don't want ACPI this is perfectly fine, you can use the usual -no-acpi switch to toggle ACPI support. These are the advantages you are going to loose then: (1) virtio-mmio device discovery without command line hacks (tweak

[PATCH v4 20/21] tests/acpi: add microvm test

2020-07-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 24b715dce780..b5b98d5c0742 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-

[PATCH v4 12/21] microvm/acpi: disable virtio-mmio cmdline hack

2020-07-02 Thread Gerd Hoffmann
... in case we are using ACPI. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/i386/microvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index ac605d92b984..fbda323f3b2a 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/

[PATCH v4 19/21] tests/acpi: allow override blkdev

2020-07-02 Thread Gerd Hoffmann
microvm needs virtio-blk instead of ide. Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index c315156858f4..24b715dce780 100644 --- a/tests/q

[PATCH v4 09/21] microvm/acpi: add acpi_dsdt_add_virtio() for x86

2020-07-02 Thread Gerd Hoffmann
Makes x86 linux kernel find virtio-mmio devices automatically. Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez Reviewed-by: Igor Mammedov --- hw/i386/acpi-microvm.c | 52 ++ 1 file changed, 52 insertions(+) diff --git a/hw/i386/acpi-microvm.c b/h

[PATCH v4 18/21] tests/acpi: allow microvm test data updates.

2020-07-02 Thread Gerd Hoffmann
Also add empty test data files. Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/data/acpi/microvm/APIC| 0 tests/data/acpi/microvm/DSDT| 0 tests/data/acpi/microvm/FACP| 0 4 files changed, 3 insertions(+

[PATCH v4 13/21] x86: constify x86_machine_is_*_enabled

2020-07-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/hw/i386/x86.h | 4 ++-- hw/i386/x86.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index b79f24e28545..a350ea3609f5 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x

[PATCH v4 16/21] microvm: wire up hotplug

2020-07-02 Thread Gerd Hoffmann
The cpu hotplug code handles the initialization of coldplugged cpus too, so it is needed even in case cpu hotplug is not supported. Wire cpu hotplug up for microvm. Without this we get a broken MADT table. Signed-off-by: Gerd Hoffmann --- hw/i386/microvm.c | 42 +

[PATCH v4 02/21] seabios: add microvm config, update build rules

2020-07-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- roms/Makefile | 5 - roms/config.seabios-microvm | 26 ++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 roms/config.seabios-microvm diff --git a/roms/Makefile b/roms/Makefile index b185c880541c..1a

[PATCH v4 14/21] x86: move acpi_dev from pc/microvm

2020-07-02 Thread Gerd Hoffmann
Both pc and microvm machine types have a acpi_dev field. Move it to the common base type. Signed-off-by: Gerd Hoffmann --- include/hw/i386/microvm.h | 1 - include/hw/i386/pc.h | 1 - include/hw/i386/x86.h | 1 + hw/i386/acpi-build.c | 2 +- hw/i386/acpi-microvm.c| 5 +++--

[PATCH v4 03/21] seabios: add bios-microvm.bin binary

2020-07-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- pc-bios/bios-microvm.bin | Bin 0 -> 131072 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pc-bios/bios-microvm.bin diff --git a/pc-bios/bios-microvm.bin b/pc-bios/bios-microvm.bin new file mode 100644 index 000

[PATCH v4 07/21] microvm: make virtio irq base runtime configurable

2020-07-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez --- include/hw/i386/microvm.h | 2 +- hw/i386/microvm.c | 11 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h index fd34b78e0d2a..03e735723726 100644 -

[PATCH v4 01/21] microvm: name qboot binary qboot.rom

2020-07-02 Thread Gerd Hoffmann
qboot isn't a bios and shouldnt be named that way. Signed-off-by: Gerd Hoffmann --- hw/i386/microvm.c | 4 ++-- pc-bios/{bios-microvm.bin => qboot.rom} | Bin roms/Makefile | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename pc

[PATCH v4 21/21] tests/acpi: update expected data files for microvm

2020-07-02 Thread Gerd Hoffmann
Also clear tests/qtest/bios-tables-test-allowed-diff.h Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 3 --- tests/data/acpi/microvm/APIC| Bin 0 -> 70 bytes tests/data/acpi/microvm/DSDT| Bin 0 -> 365 bytes tests/data/acpi/microv

[PATCH v4 08/21] microvm/acpi: add minimal acpi support

2020-07-02 Thread Gerd Hoffmann
$subject says all. Can be controlled using -M microvm,acpi=on/off. Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-microvm.h| 8 ++ include/hw/i386/microvm.h | 9 ++ hw/i386/acpi-microvm.c| 181 ++ hw/i386/microvm.c | 40 + hw/i386/

[PATCH v4 04/21] acpi: ged: add control regs

2020-07-02 Thread Gerd Hoffmann
Add control regs (sleep, reset) for hw-reduced acpi. Signed-off-by: Gerd Hoffmann --- include/hw/acpi/generic_event_device.h | 7 hw/acpi/generic_event_device.c | 44 ++ 2 files changed, 51 insertions(+) diff --git a/include/hw/acpi/generic_event_device.h

[PATCH 0/1] Add Loongson 2F disassembler

2020-07-02 Thread Stefan Brankovic
This patch adds disassembler for Loongson 2F instruction set. Stefan Brankovic (1): disas: mips: Add Loongson 2F disassembler MAINTAINERS |1 + configure |1 + disas/Makefile.objs |1 + disas/loongson2f.cpp| 8134 +++

[Bug 1873769] Re: SB16 audio playback freezes emulation in Windows 95 guest

2020-07-02 Thread Allan Peramaki
This is with GTK UI? Do you still have the same problem if you use Spice and remote-viewer instead? (GTK UI and Sound Blaster 16 emulation don't play well together. GTK UI does screen updates only when the main event loop becomes idle, but it never becomes idle when SB16 audio is playing due to th

Re: [PATCH] tests/acceptance: Add a test for the sun4u sparc64 machine

2020-07-02 Thread Mark Cave-Ayland
On 02/07/2020 15:10, Thomas Huth wrote: > We can use the image from the advent calendar 2018 to test the sun4u > machine. It's not using the "QEMU advent calendar" string, so we can > not use the do_test_advcal_2018() from boot_linux_console.py, thus > let's also put it into a separate file to als

  1   2   3   4   5   6   >