Re: [PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-03-01 Thread Paolo Bonzini
On 01/03/21 12:54, Kevin Wolf wrote: Please add a check in object_property_add_child that the id is well formed (using the id_wellformed function). This is pre-existing, but it becomes a regression for -object later in the series. Are the conditions for internally called object_property_add_chi

Re: [PATCH v3 16/21] sd: emmc: Support boot area in emmc image

2021-03-01 Thread Cédric Le Goater
On 2/28/21 8:33 PM, Sai Pavan Boddu wrote: > From: Joel Stanley > > This assumes a specially constructued image: > > dd if=/dev/zero of=mmc-bootarea.img count=2 bs=1M > dd if=u-boot-spl.bin of=mmc-bootarea.img conv=notrunc > dd if=u-boot.bin of=mmc-bootarea.img conv=notrunc count=64 bs=1K

Re: [PATCH v3 15/21] sd: emmc: Update CID structure for eMMC

2021-03-01 Thread Cédric Le Goater
On 2/28/21 8:33 PM, Sai Pavan Boddu wrote: > CID structure is little different for eMMC, w.r.t to product name and > manufacturing date. > > Signed-off-by: Sai Pavan Boddu > Signed-off-by: Edgar E. Iglesias > --- > hw/sd/sd.c | 47 ++- > 1 file change

Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib

2021-03-01 Thread Marc-André Lureau
Hi On Mon, Mar 1, 2021 at 3:46 PM Philippe Mathieu-Daudé wrote: > Cc'ing Paolo/Marc-André/Daniel > > On 2/9/21 3:54 PM, Kostiantyn Kostiuk wrote: > > The current GLib version implements the DllMain function. DllMain is also > > present in the provider.cpp code. So in the case of static linking,

Re: block/throttle and burst bucket

2021-03-01 Thread Peter Lieven
Am 01.03.21 um 11:59 schrieb Kevin Wolf: > Am 26.02.2021 um 13:33 hat Peter Lieven geschrieben: >> Am 26.02.21 um 10:27 schrieb Alberto Garcia: >>> On Thu 25 Feb 2021 06:34:48 PM CET, Peter Lieven wrote: I was wondering if there is a way to check from outside (qmp etc.) if a throttled bl

Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib

2021-03-01 Thread Paolo Bonzini
On 01/03/21 13:10, Marc-André Lureau wrote: If I read the old Makefile right, it's a bug we introduced by commit 7272fc7 (meson: convert vss-win32), since glib was in the -shared list. So it's legitimate to revert it to me: Reviewed-by: Marc-André Lureau Queued, thanks. > > Sign

Re: [RFC PATCH v2 3/4] block: Support multiple reopening with x-blockdev-reopen

2021-03-01 Thread Peter Krempa
On Mon, Mar 01, 2021 at 12:07:26 +0100, Kevin Wolf wrote: > Am 25.02.2021 um 18:02 hat Vladimir Sementsov-Ogievskiy geschrieben: > > 24.02.2021 15:33, Kevin Wolf wrote: > > > Am 09.02.2021 um 09:03 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > > 08.02.2021 21:44, Alberto Garcia wrote: > > > >

Re: [PATCH v4 02/18] migration/rdma: judge whether or not the RDMA is used for migration

2021-03-01 Thread Zheng Chuan
On 2021/2/4 1:49, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Add enabled_rdma_migration into MigrationState to judge >> whether or not the RDMA is used for migration. >> >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng > Hi, Dave. Sorry for late

Re: [PATCH v4 06/18] migration/rdma: export MultiFDSendParams/MultiFDRecvParams

2021-03-01 Thread Zheng Chuan
On 2021/2/4 2:23, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> MultiFDSendParams and MultiFDRecvParams is need for rdma, export it >> >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng > > I think these become simpler if you just return a NULL on er

Re: [PATCH] storage-daemon: include current command line option in the errors

2021-03-01 Thread Kevin Wolf
Am 26.02.2021 um 12:03 hat Paolo Bonzini geschrieben: > Use the location management facilities that the emulator uses, so that > the current command line option appears in the error message. > > Before: > > $ storage-daemon/qemu-storage-daemon --nbd key..= > qemu-storage-daemon: Invalid param

Re: [PATCH v4 11/18] migration/rdma: record host_port for multifd RDMA

2021-03-01 Thread Zheng Chuan
On 2021/2/4 3:04, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Chuan Zheng >> --- >> migration/migration.c | 1 + >> migration/migration.h | 3 +++ >> migration/rdma.c | 3 +++ >> 3 files changed, 7 insertions(+) >> >> diff --git a/migrati

Re: [PATCH v4 08/18] migration/rdma: export getQIOChannel to get QIOchannel in rdma

2021-03-01 Thread Zheng Chuan
On 2021/2/4 2:49, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng >> --- >> migration/qemu-file.c | 5 + >> migration/qemu-file.h | 1 + >> 2 files changed, 6 insertions(+) >> >> diff --git a/migratio

Re: [PATCH v4 07/18] migration/rdma: add rdma field into multifd send/recv param

2021-03-01 Thread Zheng Chuan
On 2021/2/4 2:32, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Note we do want to export any rdma struct, take void * instead. > > You don't need to make this a void *; add a typedef struct RDMAContext > into include/qemu/typedefs.h and then you can use the r

Re: [PATCH v4 13/18] migration/rdma: Add the function for dynamic page registration

2021-03-01 Thread Zheng Chuan
On 2021/2/4 4:06, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Add the 'qemu_rdma_registration' function, multifd send threads >> call it to register memory. > > This function is a copy of the code out of qemu_rdma_registration_stop; > with some of the comment

Re: [PATCH v4 12/18] migration/rdma: Create the multifd send channels for RDMA

2021-03-01 Thread Zheng Chuan
On 2021/2/4 3:52, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Chuan Zheng >> --- >> migration/multifd.c | 4 ++-- >> migration/multifd.h | 2 ++ >> migration/rdma.c| 57 >> + >> 3 file

Re: [PATCH v4 16/18] migration/rdma: add rdma_channel into Migrationstate field

2021-03-01 Thread Zheng Chuan
On 2021/2/4 4:19, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Multifd RDMA is need to poll when we send data, record it. > > This looks like it's trying to be the equivalent of the 'static int > next_channel' in multifd_send_pages. > > If so, why not mkae th

[PATCH v2 0/1] qemu_timer.c: add timer_deadline_ms() helper

2021-03-01 Thread Daniel Henrique Barboza
Changes from v1: - Added Paolo's ACK - Changed the helper to get the clock via timer->timer_list->clock->type instead of assuming QEMU_CLOCK_VIRTUAL, as suggested by Greg - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg08097.html Daniel Henrique Barboza (1): qemu_timer.c:

[PATCH v2 1/1] qemu_timer.c: add timer_deadline_ms() helper

2021-03-01 Thread Daniel Henrique Barboza
The pSeries machine is using QEMUTimer internals to return the timeout in seconds for a timer object, in hw/ppc/spapr.c, function spapr_drc_unplug_timeout_remaining_sec(). Create a helper in qemu-timer.c to retrieve the deadline for a QEMUTimer object, in ms, to avoid exposing timer internals to t

Re: [PATCH] KVM: x86: do not fail if software breakpoint has already been removed

2021-03-01 Thread Maxim Levitsky
On Mon, 2021-03-01 at 12:17 +0100, Paolo Bonzini wrote: > If kvm_arch_remove_sw_breakpoint finds that a software breakpoint does not > have an INT3 instruction, it fails. This can happen if one sets a > software breakpoint in a kernel module and then reloads it. gdb then > thinks the breakpoint c

[Bug 1917161] Re: Parameter 'type' expects a netdev backend type

2021-03-01 Thread John Arbuckle
I did try './configure --target-list=i386-softmmu --enable-slirp' but it failed with this error message: Run-time dependency slirp found: NO (tried pkgconfig) ../meson.build:1498:4: ERROR: Dependency "slirp" not found, tried pkgconfig I thought slirp came with QEMU. I do see a slirp folder packa

Re: [PATCH v5 1/1] virtio-net: Add check for mac address while peer is vdpa

2021-03-01 Thread Sean Mooney
On Thu, 2021-02-25 at 14:14 -0500, Michael S. Tsirkin wrote: > On Fri, Feb 26, 2021 at 12:55:06AM +0800, Cindy Lu wrote: > > While peer is vdpa, sometime qemu get an all zero mac address from the > > hardware, > > This is not a legal value. Add the check for this.if we get an zero mac > > address

Re: [PATCH] KVM: x86: deprecate -M kernel-irqchip=off except for -M isapc

2021-03-01 Thread Maxim Levitsky
On Mon, 2021-03-01 at 12:17 +0100, Paolo Bonzini wrote: > The userspace local APIC is basically untested and does not support many > features such as TSC deadline timer, x2APIC or PV spinlocks. On the > other hand, the PIT and IOAPIC are okay as they are not tied to > the processor and are tested

[PATCH v6 0/5] hw/arm: zynqmp: Implement a CSU DMA model and connect it with GQSPI

2021-03-01 Thread Bin Meng
From: Bin Meng ZynqMP QSPI supports SPI transfer using DMA mode, but currently this is unimplemented. When QSPI is programmed to use DMA mode, QEMU will crash. This is observed when testing VxWorks 7. We added a Xilinx CSU DMA model and the implementation is based on https://github.com/Xilinx/qe

[PATCH v6 1/5] hw/dma: xlnx_csu_dma: Implement a Xilinx CSU DMA model

2021-03-01 Thread Bin Meng
From: Xuzhou Cheng ZynqMP QSPI supports SPI transfer using DMA mode, but currently this is unimplemented. When QSPI is programmed to use DMA mode, QEMU will crash. This is observed when testing VxWorks 7. This adds a Xilinx CSU DMA model and the implementation is based on https://github.com/Xili

[PATCH v6 2/5] hw/arm: xlnx-zynqmp: Clean up coding convention issues

2021-03-01 Thread Bin Meng
From: Xuzhou Cheng There are some coding convention warnings in xlnx-zynqmp.c and xlnx-zynqmp.h, as reported by: $ ./scripts/checkpatch.pl include/hw/arm/xlnx-zynqmp.h $ ./scripts/checkpatch.pl hw/arm/xlnx-zynqmp.c Let's clean them up. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng

[PATCH v6 5/5] hw/ssi: xilinx_spips: Remove DMA related dead codes from zynqmp_spips

2021-03-01 Thread Bin Meng
From: Xuzhou Cheng Now that the Xilinx CSU DMA model is implemented, the existing DMA related dead codes in the ZynqMP QSPI are useless and should be removed. The maximum register number is also updated to only include the QSPI registers. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Rev

[PATCH v6 3/5] hw/arm: xlnx-zynqmp: Connect a Xilinx CSU DMA module for QSPI

2021-03-01 Thread Bin Meng
From: Xuzhou Cheng Add a Xilinx CSU DMA module to ZynqMP SoC, and connent the stream link of GQSPI to CSU DMA. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Edgar E. Iglesias --- (no changes since v4) Changes in v4: - Rename "csu_dma" to "qspi_dma" Changes in v3: - new

[PATCH v6 4/5] hw/ssi: xilinx_spips: Clean up coding convention issues

2021-03-01 Thread Bin Meng
From: Xuzhou Cheng There are some coding convention warnings in xilinx_spips.c, as reported by: $ ./scripts/checkpatch.pl hw/ssi/xilinx_spips.c Let's clean them up. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed

Re: [PULL 27/29] vl: deprecate -writeconfig

2021-03-01 Thread Markus Armbruster
Paolo Bonzini writes: > On 01/03/21 09:00, Markus Armbruster wrote: >>> +warn_report("-writeconfig is deprecated. It will go >>> away in QEMU 6.2 with no replacement"); >>> if (strcmp(optarg, "-") == 0) { >>> fp = stdout; >>>

[PATCH RFC] hw/misc/pc-testdev: add support for ioregionfd testing

2021-03-01 Thread Elena Afanasova
Signed-off-by: Elena Afanasova --- hw/misc/pc-testdev.c | 74 +++ include/sysemu/kvm.h | 4 +-- linux-headers/linux/kvm.h | 24 + 3 files changed, 100 insertions(+), 2 deletions(-) diff --git a/hw/misc/pc-testdev.c b/hw/misc/pc-testdev.c

Re: [PATCH 0/4] hexagon: Add Docker image & testing to gitlab-ci

2021-03-01 Thread Alessandro Di Federico via
On Sun, 28 Feb 2021 23:23:10 +0100 Philippe Mathieu-Daudé wrote: > This series is a rework of the 'Add Dockerfile for hexagon' patch > from Alessandro/Brian that Taylor sent in v8: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg780330.html > but adapted to mainstream. All of this looks

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-03-01 Thread Igor Mammedov
On Sun, 28 Feb 2021 15:43:40 -0500 "Michael S. Tsirkin" wrote: > On Sat, Feb 27, 2021 at 08:41:11PM +0100, Thomas Lamprecht wrote: > > On 30.07.20 17:58, Michael S. Tsirkin wrote: > > > macOS uses ACPI UIDs to build the DevicePath for NVRAM boot options, > > > while OVMF firmware gets them via

Re: [PATCH] tests/acceptance: Use imgtec.com URL for Fedora 22 artifacts

2021-03-01 Thread Wainer dos Santos Moschetta
Hi, On 2/28/21 7:43 PM, Philippe Mathieu-Daudé wrote: Having artifacts stored in personal namespace is not ideal, as these might get closed and disappear. Use the original URL where these artifacts could be found. For more references: https://fedoraproject.org/wiki/Architectures/MIPS/2015Bootst

Re: [PATCH v2 1/1] qemu_timer.c: add timer_deadline_ms() helper

2021-03-01 Thread Greg Kurz
On Mon, 1 Mar 2021 09:41:33 -0300 Daniel Henrique Barboza wrote: > The pSeries machine is using QEMUTimer internals to return the timeout > in seconds for a timer object, in hw/ppc/spapr.c, function > spapr_drc_unplug_timeout_remaining_sec(). > > Create a helper in qemu-timer.c to retrieve the

Re: [PATCH 0/4] hexagon: Add Docker image & testing to gitlab-ci

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/1/21 2:25 PM, Alessandro Di Federico wrote: > On Sun, 28 Feb 2021 23:23:10 +0100 > Philippe Mathieu-Daudé wrote: > >> This series is a rework of the 'Add Dockerfile for hexagon' patch >> from Alessandro/Brian that Taylor sent in v8: >> https://www.mail-archive.com/qemu-devel@nongnu.org/msg78

Re: [PATCH 08/25] hmp: replace "O" parser with keyval

2021-03-01 Thread Markus Armbruster
Paolo Bonzini writes: > On 01/03/21 11:14, Markus Armbruster wrote: >> There is no reason to reject those IDs other than spoiling the fun we're >> having with setting traps for our users. >> >> Since QOM is treating '/' specially in paths, and uses IDs as path >> components, it should reject '/'

Re: [RFC PATCH 3/3] hw/block/pflash: use memory_region_init_rom_device_from_file()

2021-03-01 Thread David Edmondson
On Monday, 2021-03-01 at 12:50:33 +01, Philippe Mathieu-Daudé wrote: > On 2/26/21 9:23 AM, David Edmondson wrote: >> On Friday, 2021-02-26 at 00:02:38 +01, Philippe Mathieu-Daudé wrote: >> >>> If the block drive is read-only we will model a "protected" flash >>> device. We can thus use memory_reg

Re: [PULL 27/29] vl: deprecate -writeconfig

2021-03-01 Thread Paolo Bonzini
On 01/03/21 14:26, Markus Armbruster wrote: Didn't really forget; being pretty sure that there's no usage in the wild and having good reasons to remove the code, giving a firm removal date should encourage people to speak up sooner rather than later. Second thoughts after agreeing to change some

[PATCH v5 00/17] i386: KVM: expand Hyper-V features early and provide simple 'hv-default=on' option

2021-03-01 Thread Vitaly Kuznetsov
Changes since v4: - Temporary drop 'hv-evmcs' from the 'hv-default' set as handling it properly requires custom options parsers (we need to e.g distinguish between 'hv-default,-vmx' and 'hv-default,hv-evmcs,-vmx') but custom parsers are called evil. I'm not giving up on the idea, I just want to

[PATCH v5 03/17] i386: always fill Hyper-V CPUID feature leaves from X86CPU data

2021-03-01 Thread Vitaly Kuznetsov
We have all the required data in X86CPU already and as we are about to split hyperv_handle_properties() into hyperv_expand_features()/ hyperv_fill_cpuids() we can remove the blind copy. The functional change is that QEMU won't pass CPUID leaves it doesn't currently know about to the guest but argua

[PATCH v5 04/17] i386: stop using env->features[] for filling Hyper-V CPUIDs

2021-03-01 Thread Vitaly Kuznetsov
As a preparatory patch to dropping Hyper-V CPUID leaves from feature_word_info[] stop using env->features[] as a temporary storage of Hyper-V CPUIDs, just build Hyper-V CPUID leaves directly from kvm_hyperv_properties[] data. Signed-off-by: Vitaly Kuznetsov --- target/i386/cpu.h | 1 + targ

[PATCH v5 05/17] i386: introduce hyperv_feature_supported()

2021-03-01 Thread Vitaly Kuznetsov
Clean up hv_cpuid_check_and_set() by separating hyperv_feature_supported() off it. No functional change intended. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 49 ++- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/target/i38

[PATCH v5 01/17] i386: keep hyperv_vendor string up-to-date

2021-03-01 Thread Vitaly Kuznetsov
When cpu->hyperv_vendor is not set manually we default to "Microsoft Hv" and in 'hv_passthrough' mode we get the information from the host. This information is stored in cpu->hyperv_vendor_id[] array but we don't update cpu->hyperv_vendor string so e.g. QMP's query-cpu-model-expansion output is inc

[PATCH v5 09/17] i386: split hyperv_handle_properties() into hyperv_expand_features()/hyperv_fill_cpuids()

2021-03-01 Thread Vitaly Kuznetsov
The intention is to call hyperv_expand_features() early, before vCPUs are created and use the acquired data later when we set guest visible CPUID data. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 34 -- 1 file changed, 24 insertions(+), 10 deletion

[PATCH v5 06/17] i386: introduce hv_cpuid_get_host()

2021-03-01 Thread Vitaly Kuznetsov
As a preparation to implementing hv_cpuid_cache intro introduce hv_cpuid_get_host(). No functional change intended. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 102 +++--- 1 file changed, 57 insertions(+), 45 deletions(-) diff --git a/target/i

[PATCH v5 07/17] i386: drop FEAT_HYPERV feature leaves

2021-03-01 Thread Vitaly Kuznetsov
Hyper-V feature leaves are weird. We have some of them in feature_word_info[] array but we don't use feature_word_info magic to enable them. Neither do we use feature_dependencies[] mechanism to validate the configuration as it doesn't allign well with Hyper-V's many-to-many dependency chains. Some

[PATCH v5 02/17] i386: invert hyperv_spinlock_attempts setting logic with hv_passthrough

2021-03-01 Thread Vitaly Kuznetsov
There is no need to have this special case: like all other Hyper-V enlightenments we can just use kernel's supplied value in hv_passthrough mode. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/i386/kvm/kvm

[PATCH v5 10/17] i386: move eVMCS enablement to hyperv_init_vcpu()

2021-03-01 Thread Vitaly Kuznetsov
hyperv_expand_features() will be called before we create vCPU so evmcs enablement should go away. hyperv_init_vcpu() looks like the right place. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 60 ++- 1 file changed, 37 insertions(+), 23 deleti

[PATCH v5 12/17] i386: adjust the expected KVM_GET_SUPPORTED_HV_CPUID array size

2021-03-01 Thread Vitaly Kuznetsov
SYNDBG leaves were recently (Linux-5.8) added to KVM but we haven't updated the expected size of KVM_GET_SUPPORTED_HV_CPUID output in KVM so we now make serveral tries before succeeding. Update the default. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 3 ++- 1 file changed, 2 inse

[PATCH v5 08/17] i386: introduce hv_cpuid_cache

2021-03-01 Thread Vitaly Kuznetsov
Just like with cpuid_cache, it makes no sense to call KVM_GET_SUPPORTED_HV_CPUID more than once and instead of (ab)using env->features[] and/or trying to keep all the code in one place, it is better to introduce persistent hv_cpuid_cache and hv_cpuid_get_host() accessor to it. Note, hv_cpuid_get_f

[PATCH v5 13/17] i386: prefer system KVM_GET_SUPPORTED_HV_CPUID ioctl over vCPU's one

2021-03-01 Thread Vitaly Kuznetsov
KVM_GET_SUPPORTED_HV_CPUID was made a system wide ioctl which can be called prior to creating vCPUs and we are going to use that to expand Hyper-V cpu features early. Use it when it is supported by KVM. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 17 + 1 file chan

[PATCH v5 11/17] i386: switch hyperv_expand_features() to using error_setg()

2021-03-01 Thread Vitaly Kuznetsov
Use standard error_setg() mechanism in hyperv_expand_features(). Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 101 +- 1 file changed, 61 insertions(+), 40 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 34820c3

[PATCH v5 14/17] i386: use global kvm_state in hyperv_enabled() check

2021-03-01 Thread Vitaly Kuznetsov
There is no need to use vCPU-specific kvm state in hyperv_enabled() check and we need to do that when feature expansion happens early, before vCPU specific KVM state is created. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) dif

[PATCH v4 03/12] hw/block/nvme: fix strerror printing

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen Fix missing sign inversion. Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im Reviewed-by: Keith Busch --- 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 8244909562a2..ed6068d1306d 100644 --- a/h

[PATCH v4 02/12] hw/block/nvme: remove block accounting for write zeroes

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen A Write Zeroes commands should not be counted in either the 'Data Units Written' or in 'Host Write Commands' SMART/Health Information Log page. Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im Reviewed-by: Keith Busch --- hw/block/nvme.c | 1 - 1 file changed, 1 deletion

[PATCH v5 16/17] i386: provide simple 'hv-default=on' option

2021-03-01 Thread Vitaly Kuznetsov
Enabling Hyper-V emulation for a Windows VM is a tiring experience as it requires listing all currently supported enlightenments ("hv-*" CPU features) explicitly. We do have 'hv-passthrough' mode enabling everything but it can't be used in production as it prevents migration. Introduce a simple 'h

[PATCH v5 15/17] i386: expand Hyper-V features during CPU feature expansion time

2021-03-01 Thread Vitaly Kuznetsov
To make Hyper-V features appear in e.g. QMP query-cpu-model-expansion we need to expand and set the corresponding CPUID leaves early. Modify x86_cpu_get_supported_feature_word() to call newly intoduced Hyper-V specific kvm_hv_get_supported_cpuid() instead of kvm_arch_get_supported_cpuid(). We can't

Re: [RFC PATCH 3/3] hw/block/pflash: use memory_region_init_rom_device_from_file()

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/1/21 2:38 PM, David Edmondson wrote: > On Monday, 2021-03-01 at 12:50:33 +01, Philippe Mathieu-Daudé wrote: > >> On 2/26/21 9:23 AM, David Edmondson wrote: >>> On Friday, 2021-02-26 at 00:02:38 +01, Philippe Mathieu-Daudé wrote: >>> If the block drive is read-only we will model a "protec

[PATCH v5 17/17] qtest/hyperv: Introduce a simple hyper-v test

2021-03-01 Thread Vitaly Kuznetsov
For the beginning, just test 'hv-default', 'hv-passthrough' and a couple of custom Hyper-V enlightenments configurations through QMP. Later, it would be great to complement this by checking CPUID values from within the guest. Signed-off-by: Vitaly Kuznetsov --- MAINTAINERS | 1 +

[PATCH v4 00/12] hw/block/nvme: metadata and end-to-end data protection support

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen This is v4 (RFC removed) of a series that adds support for metadata and end-to-end data protection. First, on the subject of metadata, in v1, support was restricted to extended logical blocks, which was pretty trivial to implement, but required special initialization and broke

Re: [PATCH] tests/acceptance: Use imgtec.com URL for Fedora 22 artifacts

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/1/21 2:30 PM, Wainer dos Santos Moschetta wrote: > Hi, > > On 2/28/21 7:43 PM, Philippe Mathieu-Daudé wrote: >> Having artifacts stored in personal namespace is not ideal, >> as these might get closed and disappear. Use the original URL >> where these artifacts could be found. >> >> For more

[PATCH v4 04/12] hw/block/nvme: try to deal with the iov/qsg duality

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen Introduce NvmeSg and try to deal with that pesky qsg/iov duality that haunts all the memory-related functions. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- hw/block/nvme.h | 17 - hw/block/nvme.c | 191 ++-- 2 fil

[PATCH v4 06/12] hw/block/nvme: refactor nvme_dma

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen The nvme_dma function doesn't just do DMA (QEMUSGList-based) memory transfers; it also handles QEMUIOVector copies. Introduce the NvmeTxDirection enum and rename to nvme_tx. Remove mapping of PRPs/SGLs from nvme_tx and instead assert that they have been mapped previously. This

Re: [PATCH 2/5] spapr.c: check unplug_request flag in spapr_memory_unplug_request()

2021-03-01 Thread Greg Kurz
On Fri, 26 Feb 2021 13:32:58 -0300 Daniel Henrique Barboza wrote: > Now that we're asserting the first DRC LMB earlier, use it to query if > the DRC is already pending unplug and, in this case, issue the same > error we already do. > > The previous check was introduced in commit 2a129767ebb1 and

[PATCH v4 01/12] hw/block/nvme: remove redundant len member in compare context

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen The 'len' member of the nvme_compare_ctx struct is redundant since the same information is available in the 'iov' member. Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im Reviewed-by: Keith Busch --- hw/block/nvme.c | 10 -- 1 file changed, 4 insertions(+), 6 del

[PATCH v4 05/12] hw/block/nvme: remove the req dependency in map functions

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen The PRP and SGL mapping functions does not have any particular need for the entire NvmeRequest as a parameter. Clean it up. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- hw/block/nvme.c | 61 ++- hw/block/trace-events

[PATCH v4 08/12] hw/block/nvme: end-to-end data protection

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen Add support for namespaces formatted with protection information. The type of end-to-end data protection (i.e. Type 1, Type 2 or Type 3) is selected with the `pi` nvme-ns device parameter. If the number of metadata bytes is larger than 8, the `pil` nvme-ns device parameter may

[PATCH v9 0/6] MTE support for KVM guest

2021-03-01 Thread Steven Price
This series adds support for using the Arm Memory Tagging Extensions (MTE) in a KVM guest. This version is rebased on v5.12-rc1 and added a documentation patch, but is otherwise unchanged from the v8[1] posting. Changes since v8[1]: * Rebased on v5.12-rc1 (note new CAP number) * New documentati

[PATCH v4 07/12] hw/block/nvme: add metadata support

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen Add support for metadata in the form of extended logical blocks as well as a separate buffer of data. The new `ms` nvme-ns device parameter specifies the size of metadata per logical block in bytes. The `mset` nvme-ns device parameter controls whether metadata is transfered as

[PATCH v9 1/6] arm64: mte: Sync tags for pages where PTE is untagged

2021-03-01 Thread Steven Price
A KVM guest could store tags in a page even if the VMM hasn't mapped the page with PROT_MTE. So when restoring pages from swap we will need to check to see if there are any saved tags even if !pte_tagged(). However don't check pages which are !pte_valid_user() as these will not have been swapped o

[PATCH v4 09/12] hw/block/nvme: add verify command

2021-03-01 Thread Klaus Jensen
From: Gollu Appalanaidu See NVM Express 1.4, section 6.14 ("Verify Command"). Signed-off-by: Gollu Appalanaidu [k.jensen: rebased, refactored for e2e] Signed-off-by: Klaus Jensen --- hw/block/nvme-dif.h | 2 + hw/block/nvme.h | 1 + include/block/nvme.h | 2 + hw/block/nvme-dif

[PATCH v4 11/12] hw/block/nvme: support multiple lba formats

2021-03-01 Thread Klaus Jensen
From: Minwoo Im This patch introduces multiple LBA formats supported with the typical logical block sizes of 512 bytes and 4096 bytes as well as metadata sizes of 0, 8, 16 and 64 bytes. The format will be chosed based on the lbads and ms parameters of the nvme-ns device. Signed-off-by: Minwoo Im

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-03-01 Thread Thomas Lamprecht
On 01.03.21 15:20, Igor Mammedov wrote: > On Mon, 1 Mar 2021 08:45:53 +0100 > Thomas Lamprecht wrote: >> On 01.03.21 08:20, Michael S. Tsirkin wrote: >>> There are various testing efforts the reason this got undetected is >>> because it does not affect linux guests, and even for windows >>> they k

[PATCH v4 12/12] hw/block/nvme: add support for the format nvm command

2021-03-01 Thread Klaus Jensen
From: Minwoo Im Format NVM admin command can make a namespace or namespaces to be with different LBA size and metadata size with protection information types. This patch introduces Format NVM command with LBA format, Metadata, and Protection Information for the device. The secure erase operation

[PATCH v4 10/12] hw/block/nvme: add non-mdts command size limit for verify

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen Verify is not subject to MDTS, so a single Verify command may result in excessive amounts of allocated memory. Impose a limit on the data size by adding support for TP 4040 ("Non-MDTS Command Size Limits"). Signed-off-by: Klaus Jensen --- hw/block/nvme.h | 1 + include

Re: [PATCH 1/5] spapr.c: assert first DRC LMB earlier in spapr_memory_unplug_request()

2021-03-01 Thread Greg Kurz
On Fri, 26 Feb 2021 13:32:57 -0300 Daniel Henrique Barboza wrote: > We are asserting the existence of the first DRC LMB after sending unplug > requests to all LMBs of the DIMM, where every DRC is being asserted > inside the loop. This means that the first DRC is being asserted twice. > > We will

[PATCH v9 3/6] arm64: kvm: Save/restore MTE registers

2021-03-01 Thread Steven Price
Define the new system registers that MTE introduces and context switch them. The MTE feature is still hidden from the ID register as it isn't supported in a VM yet. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_host.h | 6 ++ arch/arm64/include/asm/kvm_mte.h | 66

[PATCH v9 5/6] KVM: arm64: ioctl to fetch/store tags in a guest

2021-03-01 Thread Steven Price
The VMM may not wish to have it's own mapping of guest memory mapped with PROT_MTE because this causes problems if the VMM has tag checking enabled (the guest controls the tags in physical RAM and it's unlikely the tags are correct for the VMM). Instead add a new ioctl which allows the VMM to easi

CI with --enable-debug?

2021-03-01 Thread Markus Armbruster
Today I debugged why Paolo couldn't reproduce an assertion failure I found in review. Turns out compiling with optimization masks it for both of us. This made me wonder whether our CI tests with and without optimization. I quick grep finds --enable-debug in .travis.yml, but not in .gitlab*. Is th

Re: [PATCH 4/5] spapr_pci.c: add 'unplug already in progress' message for PCI unplug

2021-03-01 Thread Greg Kurz
On Fri, 26 Feb 2021 13:33:00 -0300 Daniel Henrique Barboza wrote: > Hotunplug for all other devices are warning the user when the hotunplug > is already in progress. Do the same for PCI devices in > spapr_pci_unplug_request(). > > Signed-off-by: Daniel Henrique Barboza > --- Reviewed-by: Greg

Re: [PATCH 3/5] spapr.c: add 'unplug already in progress' message for PHB unplug

2021-03-01 Thread Greg Kurz
On Fri, 26 Feb 2021 13:32:59 -0300 Daniel Henrique Barboza wrote: > Both CPU hotunplug and PC_DIMM unplug reports an user warning, > mentioning that the hotunplug is in progress, if consecutive > 'device_del' are issued in quick succession. > > Do the same for PHBs in spapr_phb_unplug_request().

Re: [PATCH v2 1/3] target/arm: Add support for FEAT_SSBS, Speculative Store Bypass Safe

2021-03-01 Thread Rebecca Cran
On 2/16/21 8:45 PM, Richard Henderson wrote: On 2/16/21 2:45 PM, Rebecca Cran wrote: Add support for FEAT_SSBS. SSBS (Speculative Store Bypass Safe) is an optional feature in ARMv8.0, and mandatory in ARMv8.5. Signed-off-by: Rebecca Cran --- target/arm/cpu.h | 15 +++- target/

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-03-01 Thread Igor Mammedov
On Mon, 1 Mar 2021 08:45:53 +0100 Thomas Lamprecht wrote: > On 01.03.21 08:20, Michael S. Tsirkin wrote: > > On Mon, Mar 01, 2021 at 08:12:35AM +0100, Thomas Lamprecht wrote: > >> On 28.02.21 21:43, Michael S. Tsirkin wrote: > >>> Sure. The way to do that is to tie old behaviour to old machin

Re: [PATCH 5/5] spapr.c: send QAPI event when memory hotunplug fails

2021-03-01 Thread Greg Kurz
On Fri, 26 Feb 2021 13:33:01 -0300 Daniel Henrique Barboza wrote: > Recent changes allowed the pSeries machine to rollback the hotunplug > process for the DIMM when the guest kernel signals, via a > reconfiguration of the DR connector, that it's not going to release the > LMBs. > > Let's also wa

[PATCH v9 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-01 Thread Steven Price
Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging for a VM. This will expose the feature to the guest and automatically tag memory pages touched by the VM as PG_mte_tagged (and clear the tag storage) to ensure that the guest cannot see stale tags, and so that the tags are correctl

[PATCH v9 4/6] arm64: kvm: Expose KVM_ARM_CAP_MTE

2021-03-01 Thread Steven Price
It's now safe for the VMM to enable MTE in a guest, so expose the capability to user space. Signed-off-by: Steven Price --- arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/sys_regs.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c inde

[PATCH v9 6/6] KVM: arm64: Document MTE capability and ioctl

2021-03-01 Thread Steven Price
A new capability (KVM_CAP_ARM_MTE) identifies that the kernel supports granting a guest access to the tags, and provides a mechanism for the VMM to enable it. A new ioctl (KVM_ARM_MTE_COPY_TAGS) provides a simple way for a VMM to access the tags of a guest without having to maintain a PROT_MTE map

Re: [PATCH v2 09/10] target/hexagon: call idef-parser functions

2021-03-01 Thread Alessandro Di Federico via
On Thu, 25 Feb 2021 19:47:04 -0800 Richard Henderson wrote: > On 2/25/21 7:18 AM, Alessandro Di Federico wrote: > > +elif hex_common.is_new_val(regtype, regid, tag): > > +declared.append("%s%sN" % (regtype,regid)) > > +else: > > +print("Bad

Re: [PATCH v2 02/10] target/hexagon: import README for idef-parser

2021-03-01 Thread Alessandro Di Federico via
On Thu, 25 Feb 2021 12:20:53 -0800 Richard Henderson wrote: > This is odd, as is the description of why. Yes, if RdV is read > without initialization, TCG middle-end will abort (at least with > --enable-debug-tcg enabling the assertions). But you've just said > that "no reading" was found. When

Re: [PATCH v2 08/10] target/hexagon: import parser for idef-parser

2021-03-01 Thread Alessandro Di Federico via
On Thu, 25 Feb 2021 19:30:14 -0800 Richard Henderson wrote: > > +} > > +} > > +code > > +{ > > +if (c->inst.error_count != 0) { > > +fprintf(stderr, > > +"Parsing of instruction %s generated %d errors!\n", > > +c->inst.name, > > +c->

Re: [PULL 27/29] vl: deprecate -writeconfig

2021-03-01 Thread Markus Armbruster
Paolo Bonzini writes: > On 01/03/21 14:26, Markus Armbruster wrote: >>> Didn't really forget; being pretty sure that there's no usage in the >>> wild and having good reasons to remove the code, giving a firm removal >>> date should encourage people to speak up sooner rather than later. >> Second

[PATCH] net: validate that ids are well formed

2021-03-01 Thread Paolo Bonzini
When a network or network device is created from the command line or HMP, QemuOpts ensures that the id passes the id_wellformed check. However, QMP skips this: $ qemu-system-x86_64 -qmp stdio -S -nic user,id=123/456 qemu-system-x86_64: -nic user,id=123/456: Parameter id expects an identifie

Re: [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI

2021-03-01 Thread Daniele Buono
Hi Daniel, On 3/1/2021 5:06 AM, Daniel P. Berrangé wrote: On Fri, Feb 26, 2021 at 10:21:06AM -0500, Daniele Buono wrote: Build jobs are on the longer side (about 2h and 20m), but I thought it would be better to just have 6 large jobs than tens of smaller ones. IMHO that is a not viable. Our

Re: [PULL 27/29] vl: deprecate -writeconfig

2021-03-01 Thread Paolo Bonzini
On 01/03/21 15:54, Markus Armbruster wrote: warning: -writeconfig foo: -writeconfig is deprecated without replacement warning: -writeconfig foo: option is deprecated; there is no replacement Hmm I don't know. I like the brevity, but I find it to be less user-friendly. And the "it"

Re: [PATCH] net: validate that ids are well formed

2021-03-01 Thread Eric Blake
On 3/1/21 8:56 AM, Paolo Bonzini wrote: > When a network or network device is created from the command line or HMP, > QemuOpts ensures that the id passes the id_wellformed check. However, > QMP skips this: > >$ qemu-system-x86_64 -qmp stdio -S -nic user,id=123/456 >qemu-system-x86_64: -ni

Re: [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI

2021-03-01 Thread Daniel P . Berrangé
On Mon, Mar 01, 2021 at 09:59:22AM -0500, Daniele Buono wrote: > Hi Daniel, > > On 3/1/2021 5:06 AM, Daniel P. Berrangé wrote: > > On Fri, Feb 26, 2021 at 10:21:06AM -0500, Daniele Buono wrote: > > > Build jobs are on the longer side (about 2h and 20m), but I thought it > > > would be better to ju

Re: [PATCH] storage-daemon: include current command line option in the errors

2021-03-01 Thread Paolo Bonzini
On 01/03/21 13:26, Kevin Wolf wrote: This save_index approach isn't perfect because getopt may skip non-option arguments and they will be included in the help text: $ build/storage-daemon/qemu-storage-daemon foo --object iothread qemu-storage-daemon: foo --object iothread: Parameter 'i

[RFC]migration: stop/start device at the end of live migration concurrently

2021-03-01 Thread Wangxin (Alexander)
Hi all, We found that the downtime of migration will reach a few seconds when live migrating a huge VM with 224vCPU/180GiB/16 vhost-user nics (x32 queues)/ 24 vhost-user-blk disks(x4 queues), most of the time is spent in the position of stopping the device at src and starting device at dst. Our i

[PATCH v2 0/2] storage-daemon: include current command line option in the errors

2021-03-01 Thread Paolo Bonzini
Use the location management facilities that the emulator uses, so that the current command line option appears in the error message. Before: $ storage-daemon/qemu-storage-daemon --nbd key..= qemu-storage-daemon: Invalid parameter 'key..' After: $ storage-daemon/qemu-storage-daemon --nbd k

[PATCH v2 2/2] storage-daemon: include current command line option in the errors

2021-03-01 Thread Paolo Bonzini
Use the location management facilities that the emulator uses, so that the current command line option appears in the error message. Before: $ storage-daemon/qemu-storage-daemon --nbd key..= qemu-storage-daemon: Invalid parameter 'key..' After: $ storage-daemon/qemu-storage-daemon --nbd k

<    1   2   3   4   5   >