[PATCH v2 21/26] s390x/tcg: Implement 32/128 bit for VECTOR FP MULTIPLY AND (ADD|SUBTRACT)

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 4 +++ target/s390x/translate_vx.c.inc | 47 - target/s390x/vec_fpu_helper.c | 44 +- 3 files changed, 87 insertions(+), 8 deletions(-) diff --git

[PATCH v2 09/26] s390x/tcg: Simplify vflr64() handling

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 - target/s390x/translate_vx.c.inc | 3 +-- target/s390x/vec_fpu_helper.c | 29 +++-- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/target/s390x/helper.h b/target/s390x/helper.h

[PATCH v2 04/26] s390x/tcg: Simplify vop64_2() handling

2021-05-17 Thread David Hildenbrand
Let's rework our macros and simplify. We still need helper functions in most cases due to the different parameters types. Next, we'll only have 32/128bit variants for vfi and vfsq, so special case the others. Note that for vfsq, the XxC and erm passed in the simd_data() will never be set,

[PATCH v2 00/26] s390x/tcg: Implement Vector enhancements facility and switch to z14

2021-05-17 Thread David Hildenbrand
This series adds support for the "Vector enhancements facility" and bumps the qemu CPU model to a stripped-down z14. I tested most vector FP instructions by generating random instructions and vectors, comparing the result with results on actual hardware. I did not test instructions/instruction

Re: [ANNOUNCE] libblkio v0.1.0 preview release

2021-05-17 Thread Stefan Hajnoczi
On Fri, May 14, 2021 at 05:55:13PM +0200, Kevin Wolf wrote: > Am 13.05.2021 um 11:47 hat Stefan Hajnoczi geschrieben: > > On Thu, May 06, 2021 at 12:33:24PM +0200, Kevin Wolf wrote: > > > Am 06.05.2021 um 10:46 hat Stefan Hajnoczi geschrieben: > > > > What do you think about this: > > > > > > > >

Re: [PATCH v12 1/8] arm64: mte: Handle race when synchronising tags

2021-05-17 Thread Marc Zyngier
Hi Steven, On Mon, 17 May 2021 13:32:32 +0100, Steven Price wrote: > > mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag > before restoring/zeroing the MTE tags. However if another thread were to > race and attempt to sync the tags on the same page before the first > thread

Re: [PATCH v1] softfloat: Silence signaling NaN when converting to/from float128

2021-05-17 Thread David Hildenbrand
On 05.05.21 12:49, David Hildenbrand wrote: We forgot to silence the NaN, just as we already do for the other conversions. Found by comparing the result of running randomly generated FP instructions under s390x/tcg and comparing against the result on real HW. Unfortunately, test cases like

Re: [PATCH qemu v19] spapr: Implement Open Firmware client interface

2021-05-17 Thread BALATON Zoltan
On Mon, 17 May 2021, Alexey Kardashevskiy wrote: On 5/17/21 09:34, BALATON Zoltan wrote: On Sat, 15 May 2021, BALATON Zoltan wrote: On Sat, 15 May 2021, BALATON Zoltan wrote: On Thu, 22 Apr 2021, Alexey Kardashevskiy wrote: [snip] vof_claim virt=0x0 size=0xc38 align=0x0 => 0x0 vof_claim

Re: [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality

2021-05-17 Thread Stefan Hajnoczi
On Mon, May 17, 2021 at 11:47:11AM +0100, Alex Bennée wrote: > > Daniel P. Berrangé writes: > > > On Wed, May 05, 2021 at 11:41:46AM +0100, Alex Bennée wrote: > >> > >> Alex Bennée writes: > >> > >> > Daniel P. Berrangé writes: > >> > > >> >> On Wed, May 05, 2021 at 10:22:57AM +0100, Alex

Re: [RFC PATCH v3 8/9] hw/arm/virt-acpi-build: Generate PPTT table

2021-05-17 Thread wangyanan (Y)
Hi Drew, On 2021/5/17 16:02, Andrew Jones wrote: On Sun, May 16, 2021 at 06:28:59PM +0800, Yanan Wang wrote: From: Andrew Jones Add the Processor Properties Topology Table (PPTT) to expose CPU topology information defined by users to ACPI guests. Note, a DT-boot Linux guest with a non-flat

Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to helper.c

2021-05-17 Thread Philippe Mathieu-Daudé
On 5/17/21 3:10 PM, Philippe Mathieu-Daudé wrote: > On 5/17/21 2:11 PM, Max Filippov wrote: >> On Mon, May 17, 2021 at 4:50 AM Max Filippov wrote: >>> >>> Hi Philippe, >>> >>> On Sun, May 16, 2021 at 10:05 PM Philippe Mathieu-Daudé >>> wrote: Hi Max, On Mon, Jan 14, 2019 at

Re: [PATCH] include/qemu/bswap.h: using atomic memory load/store for word access

2021-05-17 Thread maobibo
PMM, Thanks for kindly response. I reply inline. 在 2021年05月17日 17:23, Peter Maydell 写道: > On Mon, 17 May 2021 at 03:54, Bibo Mao wrote: >> >> virtio ring buffer has lockless ring buffer scheme. When guest vcpu >> reads the memory, qemu io thread may is writing the same address. >> It requiires

Re: [PATCH v2 0/4] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-05-17 Thread Stefan Hajnoczi
On Mon, May 17, 2021 at 10:32:59AM +0200, Greg Kurz wrote: > On Wed, 12 May 2021 17:05:53 +0100 > Stefan Hajnoczi wrote: > > > On Fri, May 07, 2021 at 06:59:01PM +0200, Greg Kurz wrote: > > > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > > > a serious slow down may be

[PATCH] Signed-off-by: Dmitry Voronetskiy

2021-05-17 Thread Dmitry Voronetskiy
From: Dmitry Voronetskiy the value passed to strerror should be positive --- hw/i386/kvm/apic.c | 2 +- hw/i386/kvm/clock.c | 4 ++-- hw/i386/kvm/i8254.c | 10 +- hw/i386/kvm/i8259.c | 4 ++-- hw/i386/kvm/ioapic.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-)

Re: [PATCH] replication: move include out of root directory

2021-05-17 Thread Philippe Mathieu-Daudé
On 5/17/21 2:19 PM, Paolo Bonzini wrote: > The replication.h file is included from migration/colo.c and > tests/unit/test-replication.c, > so it should be in include/. > > Signed-off-by: Paolo Bonzini > --- > block/replication.c | 2 +- > replication.h =>

[PATCH] virtio: Clarify MR transaction optimization

2021-05-17 Thread Greg Kurz
The device model batching its ioeventfds in a single MR transaction is an optimization. Clarify this in virtio-scsi, virtio-blk and generic virtio code. Also clarify that the transaction must commit before closing ioeventfds so that no one is tempted to merge the loops in the start functions error

Re: [RFC PATCH v3 2/9] device_tree: Add qemu_fdt_add_path

2021-05-17 Thread wangyanan (Y)
On 2021/5/17 14:27, Andrew Jones wrote: On Sun, May 16, 2021 at 06:28:53PM +0800, Yanan Wang wrote: From: Andrew Jones Hi Yanan, This looks good, but the authorship is no longer correct. You've completely rewritten it, so I think the most I deserve is a Co-developed-by and maybe even just

Re: [RFC PATCH v3 2/9] device_tree: Add qemu_fdt_add_path

2021-05-17 Thread wangyanan (Y)
On 2021/5/17 11:11, David Gibson wrote: On Sun, May 16, 2021 at 06:28:53PM +0800, Yanan Wang wrote: From: Andrew Jones qemu_fdt_add_path() works like qemu_fdt_add_subnode(), except it also adds all missing subnodes from the given path. We'll use it in a coming patch where we will add cpu-map

Re: [PATCH 50/72] softfloat: Move minmax_flags to softfloat-parts.c.inc

2021-05-17 Thread David Hildenbrand
On 08.05.21 03:47, Richard Henderson wrote: Rename to parts$N_minmax. Combine 3 bool arguments to a bitmask, return a tri-state value to indicate nan vs unchanged operand. Introduce ftype_minmax functions as a common optimization point. Fold bfloat16 expansions into the same macro as the other

Re: [PATCH] 9pfs: simplify v9fs_walk()

2021-05-17 Thread Christian Schoenebeck
On Montag, 17. Mai 2021 13:35:09 CEST Greg Kurz wrote: > On Sun, 16 May 2021 17:55:34 +0200 > > Christian Schoenebeck wrote: > > There is only one comparison between nwnames and P9_MAXWELEM required. > > > > Signed-off-by: Christian Schoenebeck > > --- > > Nice catch. It's been there for a

Re: [PATCH v2] vhost-vdpa: Remove redundant declaration of address_space_memory

2021-05-17 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 5/17/21 2:32 PM, Xie Yongji wrote: > The symbol address_space_memory are already declared in > include/exec/address-spaces.h. So let's add this header file > and remove the redundant declaration in include/hw/virtio/vhost-vdpa.h. > > Signed-off-by: Xie Yongji >

Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to helper.c

2021-05-17 Thread Philippe Mathieu-Daudé
On 5/17/21 2:11 PM, Max Filippov wrote: > On Mon, May 17, 2021 at 4:50 AM Max Filippov wrote: >> >> Hi Philippe, >> >> On Sun, May 16, 2021 at 10:05 PM Philippe Mathieu-Daudé >> wrote: >>> >>> Hi Max, >>> >>> On Mon, Jan 14, 2019 at 8:52 AM Max Filippov wrote: Move remaining

Re: [Virtio-fs] [PATCH 0/7] virtiofsd: Few cleanups in virtio_send_data_iov()

2021-05-17 Thread Vivek Goyal
On Thu, May 13, 2021 at 03:50:33PM -0500, Connor Kuehl wrote: > On 5/11/21 4:37 PM, Vivek Goyal wrote: > > Hi, > > > > Code in virtio_send_data_iov() little twisted and complicated. This > > patch series just tries to simplify it a bit to make it little easier > > to read this piece of code. > >

Re: [Virtio-fs] [PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply

2021-05-17 Thread Vivek Goyal
On Thu, May 13, 2021 at 03:50:13PM -0500, Connor Kuehl wrote: > On 5/11/21 4:37 PM, Vivek Goyal wrote: > > There is no reason to set it in label "err". We should be able to set > > it right after sending reply. It is easier to read. > > > > Signed-off-by: Vivek Goyal > > --- > >

[PATCH] virtio: disable ioeventfd for record/replay

2021-05-17 Thread Pavel Dovgalyuk
virtio devices support separate iothreads waiting for events from file descriptors. These are asynchronous events that can't be recorded and replayed, therefore this patch disables ioeventfd for all devices when record or replay is enabled. Signed-off-by: Pavel Dovgalyuk ---

[PATCH] replay: fix event queue flush for qemu shutdown

2021-05-17 Thread Pavel Dovgalyuk
This patch fixes event queue flush in the case of emulator shutdown. replay_finish_events should be called when replay_mode is not cleared. Signed-off-by: Pavel Dovgalyuk --- replay/replay.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/replay/replay.c

[PATCH] replay: improve determinism of virtio-net

2021-05-17 Thread Pavel Dovgalyuk
virtio-net device uses bottom halves for callbacks. These callbacks should be deterministic, because they affect VM state. This patch replaces BH invocations with corresponding replay functions, making them deterministic in record/replay mode. This patch also disables guest announce timers for

Re: [PULL 00/19] Block patches

2021-05-17 Thread Peter Maydell
On Fri, 14 May 2021 at 17:45, Max Reitz wrote: > > The following changes since commit 96662996eda78c48aa4e76d8615c7eb72d80: > > Merge remote-tracking branch > 'remotes/dgilbert/tags/pull-migration-20210513a' into staging (2021-05-14 > 12:03:47 +0100) > > are available in the Git

Re: [PATCH 2/2] tests/tcg/x86_64: add vsyscall smoke test

2021-05-17 Thread Cornelia Huck
On Wed, 12 May 2021 06:02:50 +0200 Ilya Leoshkevich wrote: > Having a small test will prevent trivial regressions in the future. > > Signed-off-by: Ilya Leoshkevich > --- > tests/tcg/x86_64/Makefile.target | 6 +- > tests/tcg/x86_64/vsyscall.c | 11 +++ > 2 files changed, 16

Qemu block filter insertion/removal API

2021-05-17 Thread Vladimir Sementsov-Ogievskiy
Hi all! I'd like to be sure that we know where we are going to. In blockdev-era where qemu user is aware about block nodes, all nodes have good names and controlled by user we can efficiently use block filters. We already have some useful filters: copy-on-read, throttling, compress. In my

Re: [PATCH] Add missing coroutine_fn function signature to functions

2021-05-17 Thread cennedee
Focusing on a single file at a time now, this particular revised patch adds missing function signature `coroutine_fn` to definitions in scsi/qemu-pr-helper.c Intend to do more files in a separate patch series once I get the full flow of this. Compared to my previous e-mail, have also confirmed

[PATCH v12 7/8] KVM: arm64: ioctl to fetch/store tags in a guest

2021-05-17 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

[PATCH v12 6/8] arm64: kvm: Expose KVM_ARM_CAP_MTE

2021-05-17 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

Re: [PATCH 03/21] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add field, so property can declare support for setting the property when device is realized. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/hw/qdev-properties.h | 1 +

[PATCH v2] vhost-vdpa: Remove redundant declaration of address_space_memory

2021-05-17 Thread Xie Yongji
The symbol address_space_memory are already declared in include/exec/address-spaces.h. So let's add this header file and remove the redundant declaration in include/hw/virtio/vhost-vdpa.h. Signed-off-by: Xie Yongji Reviewed-by: Philippe Mathieu-Daudé --- hw/virtio/vhost-vdpa.c | 1 +

[PATCH v12 8/8] KVM: arm64: Document MTE capability and ioctl

2021-05-17 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

[PATCH v12 3/8] arm64: mte: Sync tags for pages where PTE is untagged

2021-05-17 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 for which pte_access_permitted() returns false as these will not

[PATCH v12 5/8] arm64: kvm: Save/restore MTE registers

2021-05-17 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 |

[PATCH v12 2/8] arm64: Handle MTE tags zeroing in __alloc_zeroed_user_highpage()

2021-05-17 Thread Steven Price
From: Catalin Marinas Currently, on an anonymous page fault, the kernel allocates a zeroed page and maps it in user space. If the mapping is tagged (PROT_MTE), set_pte_at() additionally clears the tags under a spinlock to avoid a race on the page->flags. In order to optimise the lock, clear the

[PATCH v12 1/8] arm64: mte: Handle race when synchronising tags

2021-05-17 Thread Steven Price
mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag before restoring/zeroing the MTE tags. However if another thread were to race and attempt to sync the tags on the same page before the first thread had completed restoring/zeroing then it would see the flag is already set and

[PATCH v12 4/8] arm64: kvm: Introduce MTE VM feature

2021-05-17 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

Re: [PULL 00/20] Misc patches for 2020-05-17

2021-05-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210517112001.2564006-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210517112001.2564006-1-pbonz...@redhat.com Subject: [PULL 00/20] Misc patches for

[PATCH v12 0/8] MTE support for KVM guest

2021-05-17 Thread Steven Price
This series adds support for using the Arm Memory Tagging Extensions (MTE) in a KVM guest. Changes since v11[1]: * Series is prefixed with a bug fix for a potential race synchronising tags. This is basically race as was recently[2] fixed for PG_dcache_clean where the update of the page

Re: [PATCH 02/21] block: introduce blk_replace_bs

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add function to change bs inside blk. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 1 + block/block-backend.c | 8 2 files changed, 9 insertions(+) diff --git

RFC: Qemu backup interface plans

2021-05-17 Thread Vladimir Sementsov-Ogievskiy
Hi all! I'd like to share and discuss some plans on Qemu backup interface I have. (actually, most of this I've presented on KVM Forum long ago.. But now I'm a lot closer to realization:) I'd start with a reminder about image fleecing: We have image fleecing scheme to export point-in-time

Re: [PATCH] remove qemu-options* from root directory

2021-05-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210517121908.2624991-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210517121908.2624991-1-pbonz...@redhat.com Subject: [PATCH] remove qemu-options*

[RFC PATCH 08/15] softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header

2021-05-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- softmmu/cpu-timers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/cpu-timers.c b/softmmu/cpu-timers.c index 34ddfa02f1e..204d946a172 100644 --- a/softmmu/cpu-timers.c +++ b/softmmu/cpu-timers.c @@ -28,7 +28,6 @@ #include

[RFC PATCH 05/15] accel/kvm: Simplify user-mode #ifdef'ry

2021-05-17 Thread Philippe Mathieu-Daudé
Now than we only build this stub with system emulation, remove the user-mode #ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/kvm-stub.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index 6bda6c8c925..6ae1ff62607 100644

[RFC PATCH 04/15] accel: Only use TCG when building user-mode emulation

2021-05-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/meson.build | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accel/meson.build b/accel/meson.build index b44ba30c864..0e296911aea 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -2,11 +2,13 @@

[RFC PATCH 02/15] accel/whpx: Simplify #ifdef'ry

2021-05-17 Thread Philippe Mathieu-Daudé
whpx_apic_in_platform() is called from: - pic_irq_request() in hw/i386/x86.c - cpu_thread_is_idle() softmmu/cpus.c - apic_get_class() in target/i386/cpu-sysemu.c whpx_enabled() is called from: - cpu_report_tpr_access() in target/i386/helper.c By converting macros to a function, we can remove

[PATCH] replication: move include out of root directory

2021-05-17 Thread Paolo Bonzini
The replication.h file is included from migration/colo.c and tests/unit/test-replication.c, so it should be in include/. Signed-off-by: Paolo Bonzini --- block/replication.c | 2 +- replication.h => include/block/replication.h | 4 ++-- migration/colo.c

[PATCH] remove qemu-options* from root directory

2021-05-17 Thread Paolo Bonzini
These headers are also included from softmmu/vl.c, so they should be in include/. Removing qemu-options-wrapper.h, since elsewhere we include "template" headers directly and #define the parameters in the including file, and move qemu-options.h to include/. Signed-off-by: Paolo Bonzini ---

[RFC PATCH 00/15] softmmu: Make various objects target agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
Few changes to speed up builds, removing 330 objects. RFC because of: - accel hax/whpx changes - sysemu/memory_mapping target_ulong -> hwaddr which i'm not sure of the impacts. Philippe Mathieu-Daudé (15): accel/kvm: Add more stubs accel/whpx: Simplify #ifdef'ry accel/hax: Simplify

Re: [PATCH qemu v19] spapr: Implement Open Firmware client interface

2021-05-17 Thread BALATON Zoltan
On Mon, 17 May 2021, Alexey Kardashevskiy wrote: On 5/16/21 01:04, BALATON Zoltan wrote: On Thu, 22 Apr 2021, Alexey Kardashevskiy wrote: [snip] +/* Defined as Big Endian */ +struct prom_args { +    uint32_t service; +    uint32_t nargs; +    uint32_t nret; +    uint32_t args[10]; +}

Re: [PATCH V3 00/22] Live Update

2021-05-17 Thread Stefan Hajnoczi
On Fri, May 14, 2021 at 11:15:18AM -0400, Steven Sistare wrote: > On 5/14/2021 7:53 AM, Stefan Hajnoczi wrote: > > On Thu, May 13, 2021 at 04:21:15PM -0400, Steven Sistare wrote: > >> On 5/12/2021 12:42 PM, Stefan Hajnoczi wrote: > >>> On Fri, May 07, 2021 at 05:24:58AM -0700, Steve Sistare wrote:

Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to helper.c

2021-05-17 Thread Max Filippov
On Mon, May 17, 2021 at 4:50 AM Max Filippov wrote: > > Hi Philippe, > > On Sun, May 16, 2021 at 10:05 PM Philippe Mathieu-Daudé > wrote: > > > > Hi Max, > > > > On Mon, Jan 14, 2019 at 8:52 AM Max Filippov wrote: > > > > > > Move remaining non-HELPER functions from op_helper.c to helper.c. > >

Re: [PATCH] target/riscv: Remove obsolete 'CPU unmigratable' comment

2021-05-17 Thread Bin Meng
On Mon, May 17, 2021 at 3:08 PM Philippe Mathieu-Daudé wrote: > > The RISCV CPU is migratable since commit f7697f0e629 > ("target/riscv: Add basic vmstate description of CPU"), > so remove an obsolete comment which is now incorrect. > > Reported-by: Richard Henderson > Signed-off-by: Philippe

Re: [PATCH 01/21] block: introduce bdrv_replace_child_bs()

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 2 ++ block.c | 36 2 files changed, 38

[PULL 20/20] KVM: Dirty ring support

2021-05-17 Thread Paolo Bonzini
From: Peter Xu KVM dirty ring is a new interface to pass over dirty bits from kernel to the userspace. Instead of using a bitmap for each memory region, the dirty ring contains an array of dirtied GPAs to fetch (in the form of offset in slots). For each vcpu there will be one dirty ring that

[RFC PATCH 14/15] softmmu/cpus: Extract QMP command handlers to cpus-qmp.c

2021-05-17 Thread Philippe Mathieu-Daudé
qmp_memsave() and qmp_pmemsave() call cpu_memory_rw_debug() and cpu_physical_memory_read(), which are target specific prototypes. To be able to build softmmu/cpus.c once for all targets, extract the QMP commands handlers to a new file which will be built per target. Signed-off-by: Philippe

[RFC PATCH 15/15] softmmu: Build target-agnostic objects once

2021-05-17 Thread Philippe Mathieu-Daudé
Various softmmu objects aren't target specific. Move them to the generic softmmu source set. For our 31 softmmu targets, this is in total 330 objects less to build! Signed-off-by: Philippe Mathieu-Daudé --- softmmu/meson.build | 24 1 file changed, 12 insertions(+), 12

[PULL 19/20] KVM: Disable manual dirty log when dirty ring enabled

2021-05-17 Thread Paolo Bonzini
From: Peter Xu KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is for KVM_CLEAR_DIRTY_LOG, which is only useful for KVM_GET_DIRTY_LOG. Skip enabling it for kvm dirty ring. More importantly, KVM_DIRTY_LOG_INITIALLY_SET will not wr-protect all the pages initially, which is against how kvm dirty ring is used -

[RFC PATCH 12/15] sysemu/kvm: Make kvm_on_sigbus() / kvm_on_sigbus_vcpu() target agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
kvm_on_sigbus() and kvm_on_sigbus_vcpu() prototypes don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c once for all targets. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PULL 18/20] KVM: Add dirty-ring-size property

2021-05-17 Thread Paolo Bonzini
From: Peter Xu Add a parameter for dirty gfn count for dirty rings. If zero, dirty ring is disabled. Otherwise dirty ring will be enabled with the per-vcpu gfn count as specified. If dirty ring cannot be enabled due to unsupported kernel or illegal parameter, it'll fallback to dirty logging.

[RFC PATCH 13/15] sysemu/memory_mapping: Become target-agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
target_ulong is target-specific, while hwaddr isn't. memory_mapping_list_add_merge_sorted() uses hwaddr arguments anyway, so use the hwaddr type for MemoryMapping::virt_addr. Remove the unnecessary "exec/cpu-defs.h" target-speficic header from "memory_mapping.h" and use the target-agnostic

[RFC PATCH 11/15] exec/cpu: Make address_space_init/reloading_memory_map target agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
cpu_address_space_init() and cpu_reloading_memory_map() don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c once for all targets. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 23 +++ include/exec/exec-all.h |

[RFC PATCH 10/15] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
gdb_exit() and gdb_set_stop_cpu() prototypes don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c and softmmu/runstate.c once for all targets. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/gdbstub.h | 23 --- 1 file changed, 12

[RFC PATCH 06/15] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header

2021-05-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/acpi/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index af378894235..104c1abd4eb 100644 --- a/hw/acpi/memory_hotplug.c +++ b/hw/acpi/memory_hotplug.c @@ -1,6 +1,5 @@ #include

[RFC PATCH 09/15] softmmu/runstate: Clean headers

2021-05-17 Thread Philippe Mathieu-Daudé
Add the missing 'qemu/log.h' header and remove the unused 'exec/exec-all.h' one. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/runstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index ce8977c6a29..ffd8ddf1341 100644 ---

[PULL 15/20] KVM: Provide helper to sync dirty bitmap from slot to ramblock

2021-05-17 Thread Paolo Bonzini
From: Peter Xu kvm_physical_sync_dirty_bitmap() calculates the ramblock offset in an awkward way from the MemoryRegionSection that passed in from the caller. The truth is for each KVMSlot the ramblock offset never change for the lifecycle. Cache the ramblock offset for each KVMSlot into the

[RFC PATCH 07/15] softmmu/globals: Remove unused 'hw/i386/*' headers

2021-05-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- softmmu/globals.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/softmmu/globals.c b/softmmu/globals.c index 7d0fc811835..3ebd718e35d 100644 --- a/softmmu/globals.c +++ b/softmmu/globals.c @@ -25,8 +25,6 @@ #include "qemu/osdep.h" #include

[RFC PATCH 03/15] accel/hax: Simplify #ifdef'ry

2021-05-17 Thread Philippe Mathieu-Daudé
hax_enabled() is called from: - qemu_init_board() in softmmu/vl.c - qemu_wait_io_event() in softmmu/cpus.c - apic_common_realize() in hw/intc/apic_common.c By converting macros to a function, we can remove the NEED_CPU_H dependency and build softmmu/cpus.c once for all targets. Signed-off-by:

[RFC PATCH 01/15] accel/kvm: Add more stubs

2021-05-17 Thread Philippe Mathieu-Daudé
To be able to make softmmu/cpus.c not target-specific, we need to add two more KVM stubs, to avoid: /usr/bin/ld: libcommon.fa.p/softmmu_cpus.c.o: in function `cpu_thread_is_idle': softmmu/cpus.c:85: undefined reference to `kvm_halt_in_kernel_allowed' /usr/bin/ld:

[PULL 13/20] KVM: Create the KVMSlot dirty bitmap on flag changes

2021-05-17 Thread Paolo Bonzini
From: Peter Xu Previously we have two places that will create the per KVMSlot dirty bitmap: 1. When a newly created KVMSlot has dirty logging enabled, 2. When the first log_sync() happens for a memory slot. The 2nd case is lazy-init, while the 1st case is not (which is a fix of what the

[PULL 09/20] qtest: add a QOM object for qtest

2021-05-17 Thread Paolo Bonzini
The qtest server right now can only be created using the -qtest and -qtest-log options. Allow an alternative way to create it using "-object qtest,chardev=...,log=...". This is part of the long term plan to make more (or all) of QEMU configurable through QMP and preconfig mode. Signed-off-by:

[PULL 08/20] object: add more commands to preconfig mode

2021-05-17 Thread Paolo Bonzini
Creating and destroying QOM objects does not require a fully constructed machine. Allow running object-add and object-del before machine initialization has concluded. Signed-off-by: Paolo Bonzini --- hmp-commands.hx | 2 ++ qapi/qom.json | 6 -- 2 files changed, 6 insertions(+), 2

Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to helper.c

2021-05-17 Thread Max Filippov
Hi Philippe, On Sun, May 16, 2021 at 10:05 PM Philippe Mathieu-Daudé wrote: > > Hi Max, > > On Mon, Jan 14, 2019 at 8:52 AM Max Filippov wrote: > > > > Move remaining non-HELPER functions from op_helper.c to helper.c. > > No functional changes. > > > > Signed-off-by: Max Filippov > > --- > >

[PULL 03/20] configure: simplify assignment to GIT_SUBMODULES

2021-05-17 Thread Paolo Bonzini
Do not guard each assignment with a check for --with-git-submodules=ignore. To avoid a confusing "GIT" line from the Makefile, guard the git-submodule-update recipe so that it is empty when --with-git-submodules=ignore. Signed-off-by: Paolo Bonzini --- Makefile | 2 ++ configure | 20

Re: [PATCH] fdc: check drive block device before usage (CVE-2021-20196)

2021-05-17 Thread P J P
+-- On Sat, 15 May 2021, Philippe Mathieu-Daudé wrote --+ | This patch misses the qtest companion with the reproducer | provided by Alexander. Do we need a revised patch[-series] including a qtest? OR it can be done at merge time? Thank you. -- - P J P 8685 545E B54C 486B C6EB 271E E285 8B5A

Re: [PATCH] meson: Set implicit_include_directories to false

2021-05-17 Thread Paolo Bonzini
On 01/05/21 04:08, Katsuhiro Ueno wrote: 2021-04-30 16:48 Paolo Bonzini : On 29/04/21 04:43, Katsuhiro Ueno wrote: Without this, libvixl cannot be compiled with macOS 11.3 SDK due to include file name conflict (usr/include/c++/v1/version conflicts with VERSION). Signed-off-by: Katsuhiro Ueno

[PATCH 10/11] exec: Restrict ramblock.h to sysemu/

2021-05-17 Thread Philippe Mathieu-Daudé
To make it clearer the ramblock.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/ramblock.h,sysemu/ramblock.h, $(git grep -l exec/ramblock.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error.

[PATCH 07/11] exec: Extract CPU I/O instructions to "cpu-io.h"

2021-05-17 Thread Philippe Mathieu-Daudé
Not all architectures use an I/O bus. Extract the CPU I/O instruction helpers into a specific unit named cpu-io.c (and its equivalent "cpu-io.h" header). Since what is left in ioport.c is no more target specific, build the file with the other softmmu objects by moving the file to the softmmu_ss

[PULL 14/20] KVM: Provide helper to get kvm dirty log

2021-05-17 Thread Paolo Bonzini
From: Peter Xu Provide a helper kvm_slot_get_dirty_log() to make the function kvm_physical_sync_dirty_bitmap() clearer. We can even cache the as_id into KVMSlot when it is created, so that we don't even need to pass it down every time. Since at it, remove return value of

[PULL 06/20] i386/cpu: Expose AVX_VNNI instruction to guest

2021-05-17 Thread Paolo Bonzini
From: Yang Zhong Expose AVX (VEX-encoded) versions of the Vector Neural Network Instructions to guest. The bit definition: CPUID.(EAX=7,ECX=1):EAX[bit 4] AVX_VNNI The following instructions are available when this feature is present in the guest. 1. VPDPBUS: Multiply and Add Unsigned and

Re: [SPAM] [PATCH] 9pfs: simplify v9fs_walk()

2021-05-17 Thread Greg Kurz
On Sun, 16 May 2021 17:55:34 +0200 Christian Schoenebeck wrote: > There is only one comparison between nwnames and P9_MAXWELEM required. > > Signed-off-by: Christian Schoenebeck > --- Nice catch. It's been there for a decade :) Reviewed-by: Greg Kurz > hw/9pfs/9p.c | 9 + > 1 file

[PATCH 04/11] exec: Restrict memory.h to sysemu/

2021-05-17 Thread Philippe Mathieu-Daudé
To make it clearer the memory.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/memory.h,exec/sysemu/memory.h, $(git grep -l exec/memory.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error.

[PULL 07/20] meson: bump submodule to 0.57.2

2021-05-17 Thread Paolo Bonzini
The main advantage of 0.57 is that it fixes https://github.com/mesonbuild/meson/pull/7900, thus avoiding unnecessary rebuilds after running meson. Signed-off-by: Paolo Bonzini --- meson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson b/meson index

[PATCH 03/11] exec: Restrict cputlb.h to sysemu/

2021-05-17 Thread Philippe Mathieu-Daudé
To make it clearer the cputlb.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/cputlb.h,exec/sysemu/cputlb.h, $(git grep -l exec/cputlb.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error.

[PULL 17/20] KVM: Cache kvm slot dirty bitmap size

2021-05-17 Thread Paolo Bonzini
From: Peter Xu Cache it too because we'll reference it more frequently in the future. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20210506160549.130416-8-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 1 + include/sysemu/kvm_int.h

[PULL 05/20] backends/tpm: Replace qemu_mutex_lock calls with QEMU_LOCK_GUARD

2021-05-17 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Simplify the tpm_emulator_ctrlcmd() handler by replacing a pair of qemu_mutex_lock/qemu_mutex_unlock calls by the WITH_QEMU_LOCK_GUARD macro. Reviewed-by: Stefan Berger Reviewed-by: Christophe de Dinechin Signed-off-by: Philippe Mathieu-Daudé Message-Id:

[PULL 02/20] configure: check for submodules if --with-git-submodules=ignore

2021-05-17 Thread Paolo Bonzini
Right now --with-git-submodules=ignore has a subtle difference from just running without a .git directory, in that it does not check that submodule sources actually exist. Move the check for ui/keycodemapdb/README so that it happens even if the user specified --with-git-submodules=ignore, with a

[PULL 16/20] KVM: Simplify dirty log sync in kvm_set_phys_mem

2021-05-17 Thread Paolo Bonzini
From: Peter Xu kvm_physical_sync_dirty_bitmap() on the whole section is inaccurate, because the section can be a superset of the memslot that we're working on. The result is that if the section covers multiple kvm memslots, we could be doing the synchronization for multiple times for each

Re: [PATCH 09/11] include/exec: added functions to the stubs in exec-all.h

2021-05-17 Thread Bruno Piazera Larsen
On 17/05/2021 00:55, David Gibson wrote: On Thu, May 13, 2021 at 11:03:24AM -0300, Lucas Mateus Martins Araujo e Castro wrote: On 12/05/2021 15:34, Richard Henderson wrote: On 5/12/21 9:08 AM, Bruno Larsen (billionai) wrote: From: "Lucas Mateus Castro (alqotel)" Added tlb_set_page and

[PULL 12/20] KVM: Use a big lock to replace per-kml slots_lock

2021-05-17 Thread Paolo Bonzini
From: Peter Xu Per-kml slots_lock will bring some trouble if we want to take all slots_lock of all the KMLs, especially when we're in a context that we could have taken some of the KML slots_lock, then we even need to figure out what we've taken and what we need to take. Make this simple by

[PULL 11/20] memory: Introduce log_sync_global() to memory listener

2021-05-17 Thread Paolo Bonzini
From: Peter Xu Some of the memory listener may want to do log synchronization without being able to specify a range of memory to sync but always globally. Such a memory listener should provide this new method instead of the log_sync() method. Obviously we can also achieve similar thing when we

Re: [PATCH v3 6/9] qapi: normalize 'if' condition to IfPredicate tree

2021-05-17 Thread Marc-André Lureau
Hi On Thu, May 13, 2021 at 3:47 AM John Snow wrote: > On 4/29/21 9:40 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Modify check_if() to build an IfPredicate tree (the schema > > documentation is updated in a following patch). > > > > I'm wondering if check_if() is

[PULL 01/20] configure: Only clone softfloat-3 repositories if TCG is enabled

2021-05-17 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210512045821.3257963-1-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 0e4233fd8a..1bb29fcda1

Re: [PATCH v3 7/9] qapi: convert 'if' C-expressions to the new syntax tree

2021-05-17 Thread Marc-André Lureau
Hi On Thu, May 13, 2021 at 3:51 AM John Snow wrote: > On 4/29/21 9:40 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Signed-off-by: Marc-André Lureau > > --- > > qapi/machine-target.json | 20 > > qapi/misc-target.json| 13 -

Re: [PULL v9 00/13] Cgs patches

2021-05-17 Thread Philippe Mathieu-Daudé
Hi David, On 2/8/21 7:05 AM, David Gibson wrote: > > Generalize memory encryption models ... > create mode 100644 backends/confidential-guest-support.c > create mode 100644 docs/confidential-guest-support.txt > create mode

Re: [PATCH v3 3/9] qapi: start building an 'if' predicate tree

2021-05-17 Thread Marc-André Lureau
Hi On Thu, May 13, 2021 at 1:39 AM John Snow wrote: > On 4/29/21 9:40 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > The following patches are going to express schema 'if' conditions in a > > target language agnostic way. For that, let's start building a predicate >

<    1   2   3   4   5   6   7   >