Re: ublk-qcow2: ublk-qcow2 is available

2022-10-04 Thread Ming Lei
On Tue, Oct 04, 2022 at 09:53:32AM -0400, Stefan Hajnoczi wrote: > On Tue, 4 Oct 2022 at 05:44, Ming Lei wrote: > > > > On Mon, Oct 03, 2022 at 03:53:41PM -0400, Stefan Hajnoczi wrote: > > > On Fri, Sep 30, 2022 at 05:24:11PM +0800, Ming Lei wrote: > > > > ublk-qcow2 is available now. > > > > > >

Re: [PATCH v2 1/2] file-posix: add the tracking of the zones wp

2022-10-04 Thread Damien Le Moal
On 10/5/22 10:44, Damien Le Moal wrote: > On 9/29/22 18:31, Sam Li wrote: >> Since Linux doesn't have a user API to issue zone append operations to >> zoned devices from user space, the file-posix driver is modified to add >> zone append emulation using regular writes. To do this, the file-posix >>

Re: [PATCH v2 2/2] block: introduce zone append write for zoned devices

2022-10-04 Thread Damien Le Moal
On 9/29/22 18:31, Sam Li wrote: > A zone append command is a write operation that specifies the first > logical block of a zone as the write position. When writing to a zoned > block device using zone append, the byte offset of the write is pointing > to the write pointer of that zone. Upon complet

Re: [PATCH v2 1/2] file-posix: add the tracking of the zones wp

2022-10-04 Thread Damien Le Moal
On 9/29/22 18:31, Sam Li wrote: > Since Linux doesn't have a user API to issue zone append operations to > zoned devices from user space, the file-posix driver is modified to add > zone append emulation using regular writes. To do this, the file-posix > driver tracks the wp location of all zones of

Re: [PATCH v4 6/6] hw/arm/virt: Add 'compact-highmem' property

2022-10-04 Thread Gavin Shan
Hi Marc, On 10/5/22 1:39 AM, Marc Zyngier wrote: On Tue, 04 Oct 2022 01:26:27 +0100, Gavin Shan wrote: After the improvement to high memory region address assignment is applied, the memory layout can be changed, introducing possible migration breakage. For example, VIRT_HIGH_PCIE_MMIO memory

Re: [PATCH v4 5/6] hw/arm/virt: Improve high memory region address

2022-10-04 Thread Gavin Shan
Hi Connie, On 10/4/22 6:53 PM, Cornelia Huck wrote: On Tue, Oct 04 2022, Gavin Shan wrote: There are three high memory regions, which are VIRT_HIGH_REDIST2, VIRT_HIGH_PCIE_ECAM and VIRT_HIGH_PCIE_MMIO. Their base addresses are floating on highest RAM address. However, they can be disabled in

[PATCH 2/3] i386: kvm: Add support for MSR filtering

2022-10-04 Thread Alexander Graf
KVM has grown support to deflect arbitrary MSRs to user space since Linux 5.10. For now we don't expect to make a lot of use of this feature, so let's expose it the easiest way possible: With up to 16 individually maskable MSRs. This patch adds a kvm_filter_msr() function that other code can call

[PATCH 3/3] KVM: x86: Implement MSR_CORE_THREAD_COUNT MSR

2022-10-04 Thread Alexander Graf
The MSR_CORE_THREAD_COUNT MSR describes CPU package topology, such as number of threads and cores for a given package. This is information that QEMU has readily available and can provide through the new user space MSR deflection interface. This patch propagates the existing hvf logic from patch 02

[PATCH 0/3] Add TCG & KVM support for MSR_CORE_THREAD_COUNT

2022-10-04 Thread Alexander Graf
Commit 027ac0cb516 ("target/i386/hvf: add rdmsr 35H MSR_CORE_THREAD_COUNT") added support for the MSR_CORE_THREAD_COUNT MSR to HVF. This MSR is mandatory to execute macOS when run with -cpu host,+hypervisor. This patch set adds support for the very same MSR to TCG as well as KVM - as long as host

[PATCH 1/3] x86: Implement MSR_CORE_THREAD_COUNT MSR

2022-10-04 Thread Alexander Graf
Intel CPUs starting with Haswell-E implement a new MSR called MSR_CORE_THREAD_COUNT which exposes the number of threads and cores inside of a package. This MSR is used by XNU to populate internal data structures and not implementing it prevents virtual machines with more than 1 vCPU from booting i

Re: [PATCH v2 13/13] hw/ppc/e500: Add Freescale eSDHC to e500 boards

2022-10-04 Thread Bernhard Beschow
Am 3. Oktober 2022 21:06:57 UTC schrieb "Philippe Mathieu-Daudé" : >On 3/10/22 22:31, Bernhard Beschow wrote: >> Adds missing functionality to emulated e500 SOCs which increases the >> chance of given "real" firmware images to access SD cards. >> >> Signed-off-by: Bernhard Beschow >> --- >> do

Re: [PATCH v4 4/6] hw/arm/virt: Introduce virt_get_high_memmap_enabled() helper

2022-10-04 Thread Gavin Shan
Hi Connie, On 10/4/22 6:41 PM, Cornelia Huck wrote: On Tue, Oct 04 2022, Gavin Shan wrote: This introduces virt_get_high_memmap_enabled() helper, which returns the pointer to vms->highmem_{redists, ecam, mmio}. The pointer will be used in the subsequent patches. No functional change intended

Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup

2022-10-04 Thread Si-Wei Liu
On 9/29/2022 12:13 AM, Michael S. Tsirkin wrote: On Wed, Sep 21, 2022 at 04:00:58PM -0700, Si-Wei Liu wrote: The spec doesn't explicitly say anything about that as far as I see. Here the spec is totally ruled by the (software artifact of) implementation rather than what a real device is e

Re: [PATCH v2 09/13] hw/ppc/e500: Implement pflash handling

2022-10-04 Thread Bernhard Beschow
Am 3. Oktober 2022 21:21:15 UTC schrieb "Philippe Mathieu-Daudé" : >On 3/10/22 22:31, Bernhard Beschow wrote: >> Allows e500 boards to have their root file system reside on flash using >> only builtin devices located in the eLBC memory region. >> >> Note that the flash memory area is only created

[PATCH 19/20] tests/9p: merge v9fs_tunlinkat() and do_unlinkat()

2022-10-04 Thread Christian Schoenebeck
As with previous patches, unify those 2 functions into a single function v9fs_tunlinkat() by using a declarative function arguments approach. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 37 +-- tests/qtest/libqos/virtio-9p-client.h | 2

[PATCH 16/20] tests/9p: merge v9fs_tlcreate() and do_lcreate()

2022-10-04 Thread Christian Schoenebeck
As with previous patches, unify those 2 functions into a single function v9fs_tlcreate() by using a declarative function arguments approach. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 45 +-- tests/qtest/libqos/virtio-9p-client.h | 39

[PATCH 18/20] tests/9p: merge v9fs_tlink() and do_hardlink()

2022-10-04 Thread Christian Schoenebeck
As with previous patches, unify those 2 functions into a single function v9fs_tlink() by using a declarative function arguments approach. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 43 ++- tests/qtest/libqos/virtio-9p-client.h | 31 ++

Re: [PATCH] spec: Add NBD_OPT_EXTENDED_HEADERS

2022-10-04 Thread Eric Blake
On Fri, Dec 03, 2021 at 05:14:34PM -0600, Eric Blake wrote: > Add a new negotiation feature where the client and server agree to use > larger packet headers on every packet sent during transmission phase. > This has two purposes: first, it makes it possible to perform > operations like trim, write

Re: [PATCH] vhost-vdpa: fix assert !virtio_net_get_subqueue(nc)->async_tx.elem in virtio_net_reset

2022-10-04 Thread Si-Wei Liu
Apologies, please disregard this email. Wrong target audience it was sent to, although the content of patch is correct. For those who want to review the patch, please reply to this thread: Message-Id: <1664913563-3351-1-git-send-email-si-wei@oracle.com> Thanks, -Siwei On 10/4/2022 12:58 P

[PATCH 17/20] tests/9p: merge v9fs_tsymlink() and do_symlink()

2022-10-04 Thread Christian Schoenebeck
As with previous patches, unify those 2 functions into a single function v9fs_tsymlink() by using a declarative function arguments approach. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 37 ++- tests/qtest/libqos/virtio-9p-client.h | 35

[PATCH 13/20] tests/9p: simplify callers of twrite()

2022-10-04 Thread Christian Schoenebeck
Now as twrite() is using a declarative approach, simplify the code of callers of this function. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-

[PATCH 08/20] tests/9p: convert v9fs_treaddir() to declarative arguments

2022-10-04 Thread Christian Schoenebeck
Use declarative function arguments for function v9fs_treaddir(). Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 32 -- tests/qtest/libqos/virtio-9p-client.h | 33 +-- tests/qtest/virtio-9p-test.c | 11

[PATCH 15/20] tests/9p: merge v9fs_tmkdir() and do_mkdir()

2022-10-04 Thread Christian Schoenebeck
As with previous patches, unify those 2 functions into a single function v9fs_tmkdir() by using a declarative function arguments approach. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 42 ++- tests/qtest/libqos/virtio-9p-client.h | 36 +

[PATCH 20/20] tests/9p: remove unnecessary g_strdup() calls

2022-10-04 Thread Christian Schoenebeck
This is a leftover from before the recent function merge and refactoring patches: As these functions do not return control to the caller in between, it is not necessary to duplicate strings passed to them. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 19 +

[PATCH 14/20] tests/9p: convert v9fs_tflush() to declarative arguments

2022-10-04 Thread Christian Schoenebeck
Use declarative function arguments for function v9fs_tflush(). Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 23 +++ tests/qtest/libqos/virtio-9p-client.h | 22 +- tests/qtest/virtio-9p-test.c | 9 +++-- 3 f

[PATCH 11/20] tests/9p: simplify callers of tlopen()

2022-10-04 Thread Christian Schoenebeck
Now as tlopen() is using a declarative approach, simplify the code of callers of this function. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 43 +--- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/tests/qtest/virtio-9p-t

[PATCH 10/20] tests/9p: convert v9fs_tlopen() to declarative arguments

2022-10-04 Thread Christian Schoenebeck
Use declarative function arguments for function v9fs_tlopen(). Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 28 +++-- tests/qtest/libqos/virtio-9p-client.h | 30 +-- tests/qtest/virtio-9p-test.c | 25 +++

[PATCH 12/20] tests/9p: convert v9fs_twrite() to declarative arguments

2022-10-04 Thread Christian Schoenebeck
Use declarative function arguments for function v9fs_twrite(). Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 38 --- tests/qtest/libqos/virtio-9p-client.h | 31 -- tests/qtest/virtio-9p-test.c | 18 ++

[PATCH 07/20] tests/9p: simplify callers of tgetattr()

2022-10-04 Thread Christian Schoenebeck
Now as tgetattr() is using a declarative approach, simplify the code of callers of this function. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c b/tests

[PATCH 03/20] tests/9p: merge v9fs_tversion() and do_version()

2022-10-04 Thread Christian Schoenebeck
As with previous patches, unify functions v9fs_tversion() and do_version() into a single function v9fs_tversion() by using a declarative function arguments approach. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 47 +++ tests/qtest/libqo

[PATCH 06/20] tests/9p: convert v9fs_tgetattr() to declarative arguments

2022-10-04 Thread Christian Schoenebeck
Use declarative function arguments for function v9fs_tgetattr(). Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 32 ++- tests/qtest/libqos/virtio-9p-client.h | 30 +++-- tests/qtest/virtio-9p-test.c | 11 +

[PATCH 05/20] tests/9p: simplify callers of tattach()

2022-10-04 Thread Christian Schoenebeck
Now as tattach() is using a declarative approach, simplify the code of callers of this function. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qte

[PATCH 09/20] tests/9p: simplify callers of treaddir()

2022-10-04 Thread Christian Schoenebeck
Now as treaddir() is using a declarative approach, simplify the code of callers of this function. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c b/tests

[PATCH 02/20] tests/9p: simplify callers of twalk()

2022-10-04 Thread Christian Schoenebeck
Now as twalk() is using a declarative approach, simplify the code of callers of this function. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 92 +--- 1 file changed, 32 insertions(+), 60 deletions(-) diff --git a/tests/qtest/virtio-9p-te

[PATCH 01/20] tests/9p: merge *walk*() functions

2022-10-04 Thread Christian Schoenebeck
Introduce declarative function calls. There are currently 4 different functions for sending a 9p 'Twalk' request: v9fs_twalk(), do_walk(), do_walk_rqids() and do_walk_expect_error(). They are all doing the same thing, just in a slightly different way and with slightly different function arguments.

[PATCH 04/20] tests/9p: merge v9fs_tattach(), do_attach(), do_attach_rqid()

2022-10-04 Thread Christian Schoenebeck
As with previous patches, unify those 3 functions into a single function v9fs_tattach() by using a declarative function arguments approach. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 40 ++--- tests/qtest/libqos/virtio-9p-client.h | 30 ++

[PATCH 00/20] tests/9p: introduce declarative function calls

2022-10-04 Thread Christian Schoenebeck
This series converts relevant 9p (test) client functions to use named function arguments. For instance do_walk_expect_error(v9p, "non-existent", ENOENT); becomes twalk({ .client = v9p, .path = "non-existent", .expectErr = ENOENT }); The intention is to make the actual 9p tes

[PATCH] vhost-vdpa: fix assert !virtio_net_get_subqueue(nc)->async_tx.elem in virtio_net_reset

2022-10-04 Thread Si-Wei Liu
The citing commit has incorrect code in vhost_vdpa_receive() that returns zero instead of full packet size to the caller. This renders pending packets unable to be freed so then get clogged in the tx queue forever. When device is being reset later on, below assertion failure ensues: 0 0x7f86d

Re: [PATCH v5 9/9] target/arm: Enable TARGET_TB_PCREL

2022-10-04 Thread Richard Henderson
On 10/4/22 12:27, Richard Henderson wrote: On 10/4/22 09:23, Peter Maydell wrote:   void arm_cpu_synchronize_from_tb(CPUState *cs,    const TranslationBlock *tb)   { -    ARMCPU *cpu = ARM_CPU(cs); -    CPUARMState *env = &cpu->env; - -    /* - * It's OK to lo

[PATCH] vhost-vdpa: allow passing opened vhostfd to vhost-vdpa

2022-10-04 Thread Si-Wei Liu
Similar to other vhost backends, vhostfd can be passed to vhost-vdpa backend as another parameter to instantiate vhost-vdpa net client. This would benefit the use case where only open fd's, as oppposed to raw vhost-vdpa device paths, are accessible from the QEMU process. (qemu) netdev_add type=vho

[PATCH] vhost-vdpa: fix assert !virtio_net_get_subqueue(nc)->async_tx.elem in virtio_net_reset

2022-10-04 Thread Si-Wei Liu
The citing commit has incorrect code in vhost_vdpa_receive() that returns zero instead of full packet size to the caller. This renders pending packets unable to be freed so then get clogged in the tx queue forever. When device is being reset later on, below assertion failure ensues: 0 0x7f86d

Re: [PATCH v5 6/9] target/arm: Change gen_jmp* to work on displacements

2022-10-04 Thread Richard Henderson
On 10/4/22 08:58, Peter Maydell wrote: On Fri, 30 Sept 2022 at 23:10, Richard Henderson wrote: In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Signed-off-by: Richard Henderson --- target/arm/translate.c | 37 + 1 file changed, 21

Re: [RFC PATCH 1/1] block: add vhost-blk backend

2022-10-04 Thread Stefan Hajnoczi
On Mon, Jul 25, 2022 at 11:55:27PM +0300, Andrey Zhadchenko wrote: > Although QEMU virtio is quite fast, there is still some room for > improvements. Disk latency can be reduced if we handle virito-blk requests > in host kernel istead of passing them to QEMU. The patch adds vhost-blk > backend whic

[PULL 17/20] accel/tcg: Introduce tb_pc and log_pc

2022-10-04 Thread Richard Henderson
The availability of tb->pc will shortly be conditional. Introduce accessor functions to minimize ifdefs. Pass around a known pc to places like tcg_gen_code, where the caller must already have the value. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/internal.h

[PULL 20/20] target/sh4: Fix TB_FLAG_UNALIGN

2022-10-04 Thread Richard Henderson
The value previously chosen overlaps GUSA_MASK. Rename all DELAY_SLOT_* and GUSA_* defines to emphasize that they are included in TB_FLAGs. Add aliases for the FPSCR and SR bits that are included in TB_FLAGS, so that we don't accidentally reassign those bits. Fixes: 4da06fb3062 ("target/sh4: Imp

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-04 Thread Stefan Hajnoczi
On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: > Although QEMU virtio-blk is quite fast, there is still some room for > improvements. Disk latency can be reduced if we handle virito-blk requests > in host kernel so we avoid a lot of syscalls and context switches. > > The bigges

[PULL 13/20] accel/tcg: Do not align tb->page_addr[0]

2022-10-04 Thread Richard Henderson
Let tb->page_addr[0] contain the address of the first byte of the translated block, rather than the address of the page containing the start of the translated block. We need to recover this value anyway at various points, and it is easier to discard a page offset when it is not needed, which happe

[PULL 19/20] tcg/ppc: Optimize 26-bit jumps

2022-10-04 Thread Richard Henderson
From: Leandro Lupori PowerPC64 processors handle direct branches better than indirect ones, resulting in less stalled cycles and branch misses. However, PPC's tb_target_set_jmp_target() was only using direct branches for 16-bit jumps, while PowerPC64's unconditional branch instructions are able

[PULL 18/20] accel/tcg: Introduce TARGET_TB_PCREL

2022-10-04 Thread Richard Henderson
Prepare for targets to be able to produce TBs that can run in more than one virtual context. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 4 +++ accel/tcg/tb-jmp-cache.h | 41 + include/exec/cpu-defs.h | 3 ++ include/exe

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-04 Thread Stefan Hajnoczi
On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: > Although QEMU virtio-blk is quite fast, there is still some room for > improvements. Disk latency can be reduced if we handle virito-blk requests > in host kernel so we avoid a lot of syscalls and context switches. > > The bigges

[PULL 14/20] accel/tcg: Inline tb_flush_jmp_cache

2022-10-04 Thread Richard Henderson
This function has two users, who use it incompatibly. In tlb_flush_page_by_mmuidx_async_0, when flushing a single page, we need to flush exactly two pages. In tlb_flush_range_by_mmuidx_async_0, when flushing a range of pages, we need to flush N+1 pages. This avoids double-flushing of jmp cache pag

[PULL 08/20] accel/tcg: Introduce tlb_set_page_full

2022-10-04 Thread Richard Henderson
Now that we have collected all of the page data into CPUTLBEntryFull, provide an interface to record that all in one go, instead of using 4 arguments. This interface allows CPUTLBEntryFull to be extended without having to change the number of arguments. Reviewed-by: Alex Bennée Reviewed-by: Pete

[PULL 15/20] include/hw/core: Create struct CPUJumpCache

2022-10-04 Thread Richard Henderson
Wrap the bare TranslationBlock pointer into a structure. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/tb-hash.h | 1 + accel/tcg/tb-jmp-cache.h | 24 include/exec/cpu-common.h | 1 + include/hw/cor

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-04 Thread Stefan Hajnoczi
On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: > Although QEMU virtio-blk is quite fast, there is still some room for > improvements. Disk latency can be reduced if we handle virito-blk requests > in host kernel so we avoid a lot of syscalls and context switches. > > The bigges

[PULL 12/20] accel/tcg: Use DisasContextBase in plugin_gen_tb_start

2022-10-04 Thread Richard Henderson
Use the pc coming from db->pc_first rather than the TB. Use the cached host_addr rather than re-computing for the first page. We still need a separate lookup for the second page because it won't be computed for DisasContextBase until the translator actually performs a read from the page. Reviewe

[PULL 16/20] hw/core: Add CPUClass.get_pc

2022-10-04 Thread Richard Henderson
Populate this new method for all targets. Always match the result that would be given by cpu_get_tb_cpu_state, as we will want these values to correspond in the logs. Reviewed-by: Taylor Simpson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland (target/sparc) Signed-off-by: Richard Hender

[PULL 11/20] accel/tcg: Use bool for page_find_alloc

2022-10-04 Thread Richard Henderson
Bool is more appropriate type for the alloc parameter. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/accel/tcg/translate-all.c b/acce

[PULL 07/20] accel/tcg: Introduce probe_access_full

2022-10-04 Thread Richard Henderson
Add an interface to return the CPUTLBEntryFull struct that goes with the lookup. The result is not intended to be valid across multiple lookups, so the user must use the results immediately. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by:

[PULL 05/20] accel/tcg: Drop addr member from SavedIOTLB

2022-10-04 Thread Richard Henderson
This field is only written, not read; remove it. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 1 - accel/tcg/cputlb.c| 7 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff

[PULL 10/20] accel/tcg: Remove PageDesc code_bitmap

2022-10-04 Thread Richard Henderson
This bitmap is created and discarded immediately. We gain nothing by its existence. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-Id: <20220822232338.1727934-2-richard.hender...@linaro.org> --- accel/tcg/translate-all.c | 78 ++- 1 file ch

[PULL 04/20] accel/tcg: Rename CPUIOTLBEntry to CPUTLBEntryFull

2022-10-04 Thread Richard Henderson
This structure will shortly contain more than just data for accessing MMIO. Rename the 'addr' member to 'xlat_section' to more clearly indicate its purpose. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/ex

[PULL 02/20] hw/core/cpu-sysemu: used cached class in cpu_asidx_from_attrs

2022-10-04 Thread Richard Henderson
From: Alex Bennée This is a heavily used function so lets avoid the cost of CPU_GET_CLASS. On the romulus-bmc run it has a modest effect: Before: 36.812 s ± 0.506 s After: 35.912 s ± 0.168 s Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220811151413.3350684-4

[PULL 09/20] include/exec: Introduce TARGET_PAGE_ENTRY_EXTRA

2022-10-04 Thread Richard Henderson
Allow the target to cache items from the guest page tables. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/exec/cpu-defs.h

[PULL 03/20] cputlb: used cached CPUClass in our hot-paths

2022-10-04 Thread Richard Henderson
From: Alex Bennée Before: 35.912 s ± 0.168 s After: 35.565 s ± 0.087 s Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220811151413.3350684-5-alex.ben...@linaro.org> Signed-off-by: Cédric Le Goater Message-Id: <20220923084803.498337-5-...@kaod.org> Signed-off-by:

[PULL 06/20] accel/tcg: Suppress auto-invalidate in probe_access_internal

2022-10-04 Thread Richard Henderson
When PAGE_WRITE_INV is set when calling tlb_set_page, we immediately set TLB_INVALID_MASK in order to force tlb_fill to be called on the next lookup. Here in probe_access_internal, we have just called tlb_fill and eliminated true misses, thus the lookup must be valid. This allows us to remove a w

[PULL 00/20] tcg patch queue

2022-10-04 Thread Richard Henderson
in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20221004 for you to fetch changes up to ab419fd8a035a65942de4e63effcd55ccbf1a9fe: target/sh4: Fix TB_FLAG_UNALIGN (2022-10-04 12:33:05 -0700) Cache CPUCla

[PULL 01/20] cpu: cache CPUClass in CPUState for hot code paths

2022-10-04 Thread Richard Henderson
From: Alex Bennée The class cast checkers are quite expensive and always on (unlike the dynamic case who's checks are gated by CONFIG_QOM_CAST_DEBUG). To avoid the overhead of repeatedly checking something which should never change we cache the CPUClass reference for use in the hot code paths. S

Re: [PATCH v5 9/9] target/arm: Enable TARGET_TB_PCREL

2022-10-04 Thread Richard Henderson
On 10/4/22 09:23, Peter Maydell wrote: void arm_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb) { -ARMCPU *cpu = ARM_CPU(cs); -CPUARMState *env = &cpu->env; - -/* - * It's OK to look at env for the current mode here, because

Re: [PATCH 06/14] migration: Use atomic ops properly for page accountings

2022-10-04 Thread Peter Xu
On Tue, Oct 04, 2022 at 05:59:36PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > To prepare for thread-safety on page accountings, at least below counters > > need to be accessed only atomically, they are: > > > > ram_counters.transferred > > ram_

Re: [PATCH v2] target/sh4: Fix TB_FLAG_UNALIGN

2022-10-04 Thread Richard Henderson
On 10/3/22 22:56, Yoshinori Sato wrote: On Mon, 03 Oct 2022 02:23:51 +0900, Richard Henderson wrote: Ping, or should I create a PR myself? r~ Sorry. I can't work this week, so please submit a PR. Ok, I will fold this into the tcg-next PR that I am preparing now. r~

Re: [PATCH 05/14] migration: Yield bitmap_mutex properly when sending/sleeping

2022-10-04 Thread Peter Xu
On Tue, Oct 04, 2022 at 02:55:10PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Don't take the bitmap mutex when sending pages, or when being throttled by > > migration_rate_limit() (which is a bit tricky to call it here in ram code, > > but seems still helpful).

[PATCH v2 0/5] migration: Bug fixes (prepare for preempt-full)

2022-10-04 Thread Peter Xu
v2: - Drop patch "migration: Disallow xbzrle with postcopy" [Dave] - Added patch "migration: Disable multifd explicitly with compression" (according to the comment in the other series) [Dave] - s/deadloop/infinite loop/ in patch 1 subject [Dave] v1: https://lore.kernel.org/qemu-devel/20220920223

[PATCH v2 2/5] migration: Fix race on qemu_file_shutdown()

2022-10-04 Thread Peter Xu
In qemu_file_shutdown(), there's a possible race if with current order of operation. There're two major things to do: (1) Do real shutdown() (e.g. shutdown() syscall on socket) (2) Update qemufile's last_error We must do (2) before (1) otherwise there can be a race condition like: pag

[PATCH v2 4/5] migration: Use non-atomic ops for clear log bitmap

2022-10-04 Thread Peter Xu
Since we already have bitmap_mutex to protect either the dirty bitmap or the clear log bitmap, we don't need atomic operations to set/clear/test on the clear log bitmap. Switching all ops from atomic to non-atomic versions, meanwhile touch up the comments to show which lock is in charge. Introduc

[PATCH v2 5/5] migration: Disable multifd explicitly with compression

2022-10-04 Thread Peter Xu
Multifd thread model does not work for compression, explicitly disable it. Note that previuosly even we can enable both of them, nothing will go wrong, because the compression code has higher priority so multifd feature will just be ignored. Now we'll fail even earlier at config time so the user

[PATCH v2 1/5] migration: Fix possible infinite loop of ram save process

2022-10-04 Thread Peter Xu
When starting ram saving procedure (especially at the completion phase), always set last_seen_block to non-NULL to make sure we can always correctly detect the case where "we've migrated all the dirty pages". Then we'll guarantee both last_seen_block and pss.block will be valid always before the l

[PATCH v2 3/5] migration: Disallow postcopy preempt to be used with compress

2022-10-04 Thread Peter Xu
The preempt mode requires the capability to assign channel for each of the page, while the compression logic will currently assign pages to different compress thread/local-channel so potentially they're incompatible. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/migr

Re: [PATCH v4 6/6] hw/arm/virt: Add 'compact-highmem' property

2022-10-04 Thread Marc Zyngier
On Tue, 04 Oct 2022 01:26:27 +0100, Gavin Shan wrote: > > After the improvement to high memory region address assignment is > applied, the memory layout can be changed, introducing possible > migration breakage. For example, VIRT_HIGH_PCIE_MMIO memory region > is disabled or enabled when the opti

Re: [PATCH v3 5/5] pci-ids: document modern virtio-pci ids in pci.h too

2022-10-04 Thread Eric Auger
Hi Gerd, On 10/4/22 13:21, Gerd Hoffmann wrote: > While being at it add a #define for the magic 0x1040 number. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Eric Auger Thanks Eric > --- > include/hw/pci/pci.h | 10 ++ > hw/virtio/virtio-pci.c | 2 +- > 2 files changed, 11 insertion

Re: [PATCH 06/14] migration: Use atomic ops properly for page accountings

2022-10-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > To prepare for thread-safety on page accountings, at least below counters > need to be accessed only atomically, they are: > > ram_counters.transferred > ram_counters.duplicate > ram_counters.normal > ram_counters.postcopy_byt

Re: [PATCH v5 7/9] target/arm: Introduce gen_pc_plus_diff for aarch64

2022-10-04 Thread Peter Maydell
On Fri, 30 Sept 2022 at 23:15, Richard Henderson wrote: > > In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. > > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 41 +++--- > 1 file changed, 29 insertions(+), 12 deletion

Re: [PATCH v5 9/9] target/arm: Enable TARGET_TB_PCREL

2022-10-04 Thread Peter Maydell
On Fri, 30 Sept 2022 at 23:10, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/cpu-param.h | 1 + > target/arm/translate.h | 19 > target/arm/cpu.c | 23 +++--- > target/arm/translate-a64.c | 37 ++- > t

Re: [PATCH v7 18/18] accel/tcg: Introduce TARGET_TB_PCREL

2022-10-04 Thread Alex Bennée
Richard Henderson writes: > Prepare for targets to be able to produce TBs that can > run in more than one virtual context. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v5 6/9] target/arm: Change gen_jmp* to work on displacements

2022-10-04 Thread Peter Maydell
On Fri, 30 Sept 2022 at 23:10, Richard Henderson wrote: > > In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 37 + > 1 file changed, 21 insertions(+), 16 deletions(-)

Re: [PATCH v7 13/18] accel/tcg: Do not align tb->page_addr[0]

2022-10-04 Thread Alex Bennée
Richard Henderson writes: > Let tb->page_addr[0] contain the address of the first byte of the > translated block, rather than the address of the page containing the > start of the translated block. We need to recover this value anyway > at various points, and it is easier to discard a page off

Re: [PATCH] docs/nuvoton: Update URL for images

2022-10-04 Thread Hao Wu
On Mon, Oct 3, 2022 at 10:01 PM Joel Stanley wrote: > openpower.xyz was retired some time ago. The OpenBMC Jenkins is where > images can be found these days. > > Signed-off-by: Joel Stanley > Reviewed-by: Hao Wu > --- > docs/system/arm/nuvoton.rst | 4 ++-- > 1 file changed, 2 insertions(+),

Re: [PULL 52/54] contrib/gitdm: add Simon to individual contributors

2022-10-04 Thread Simon Safar
On Tue, Oct 4, 2022, at 6:01 AM, Alex Bennée wrote: > Please confirm this is the correct mapping for you. Looks good to me, thank you!!! > Signed-off-by: Alex Bennée > Reviewed-by: Simon Safar > Message-Id: <20220926134609.3301945-2-alex.ben...@linaro.org> > > diff --git a/contrib/gitdm/group-

Re: [PATCH] ui/cocoa: Support hardware cursor interface

2022-10-04 Thread Peter Maydell
Ccing Akihiko to see if he wants to review this cocoa ui frontend patch. also available at: https://lore.kernel.org/qemu-devel/54930451-d85f-4ce0-9a45-b3478c5a6...@www.fastmail.com/ I can confirm that the patch does build, but I don't have any interesting graphics-using test images to hand to tes

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-04 Thread Fuad Tabba
Hi, On Mon, Oct 3, 2022 at 12:01 PM Kirill A. Shutemov wrote: > > On Mon, Oct 03, 2022 at 08:33:13AM +0100, Fuad Tabba wrote: > > > I think it is "don't do that" category. inaccessible_register_notifier() > > > caller has to know what file it operates on, no? > > > > The thing is, you could oops

Re: [PATCH v7 17/18] accel/tcg: Introduce tb_pc and log_pc

2022-10-04 Thread Alex Bennée
Richard Henderson writes: > The availability of tb->pc will shortly be conditional. > Introduce accessor functions to minimize ifdefs. > > Pass around a known pc to places like tcg_gen_code, > where the caller must already have the value. > > Signed-off-by: Richard Henderson Reviewed-by: Alex

Re: [PATCH 1/5] migration: Fix possible deadloop of ram save process

2022-10-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Sep 22, 2022 at 05:41:30PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Thu, Sep 22, 2022 at 03:49:38PM +0100, Dr. David Alan Gilbert wrote: > > > > * Peter Xu (pet...@redhat.com) wrote: > > > > > When starti

Re: [PATCH] target/arm: allow setting SCR_EL3.EnTP2 when FEAT_SME is implemented

2022-10-04 Thread Peter Maydell
On Tue, 4 Oct 2022 at 08:24, Jerome Forissier wrote: > > Updates write_scr() to allow setting SCR_EL3.EnTP2 when FEAT_SME is > implemented. SCR_EL3 being a 64-bit register, valid_mask is changed > to uint64_t and the SCR_* constants in target/arm/cpu.h are extended > to 64-bit so that masking and

Re: [PATCH] linux-user,bsd-user: re-exec with G_SLICE=always-malloc

2022-10-04 Thread Richard Henderson
On 10/4/22 05:00, Daniel P. Berrangé wrote: g_slice uses a one-time initializer to check the G_SLICE env variable making it hard for QEMU to set the env before any GLib API call has triggered the initializer. Even attribute((constructor)) is not sufficient as QEMU has many constructors and there

Re: [PATCH] target/arm: allow setting SCR_EL3.EnTP2 when FEAT_SME is implemented

2022-10-04 Thread Richard Henderson
On 10/4/22 00:23, Jerome Forissier wrote: Updates write_scr() to allow setting SCR_EL3.EnTP2 when FEAT_SME is implemented. SCR_EL3 being a 64-bit register, valid_mask is changed to uint64_t and the SCR_* constants in target/arm/cpu.h are extended to 64-bit so that masking and bitwise not (~) beha

Re: [PATCH v8 8/8] KVM: Enable and expose KVM_MEM_PRIVATE

2022-10-04 Thread Jarkko Sakkinen
On Thu, Sep 15, 2022 at 10:29:13PM +0800, Chao Peng wrote: > Expose KVM_MEM_PRIVATE and memslot fields private_fd/offset to > userspace. KVM will register/unregister private memslot to fd-based > memory backing store and response to invalidation event from > inaccessible_notifier to zap the existin

Re: [PATCH v3 01/15] hw: encode accessing CPU index in MemTxAttrs

2022-10-04 Thread Peter Maydell
On Tue, 4 Oct 2022 at 14:33, Alex Bennée wrote: > > > Peter Maydell writes: > > The MSC is in the address map like most other stuff, and thus there is > > no restriction on whether it can be accessed by other things than CPUs > > (DMAing to it would be silly but is perfectly possible). > > > > Th

Re: [PATCH 1/5] migration: Fix possible deadloop of ram save process

2022-10-04 Thread Peter Xu
On Thu, Sep 22, 2022 at 05:41:30PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Thu, Sep 22, 2022 at 03:49:38PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > When starting ram saving procedure (especially at the compl

Re: [PATCH 04/14] migration: Remove RAMState.f references in compression code

2022-10-04 Thread Peter Xu
On Tue, Oct 04, 2022 at 11:54:02AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Removing referencing to RAMState.f in compress_page_with_multi_thread() and > > flush_compressed_data(). > > > > Compression code by default isn't compatible with having >1 channels

Re: [PATCH] target/arm: Implement FEAT_E0PD

2022-10-04 Thread Richard Henderson
On 10/4/22 04:05, Peter Maydell wrote: FEAT_E0PD adds new bits E0PD0 and E0PD1 to TCR_EL1, which allow the OS to forbid EL0 access to half of the address space. Since this is an EL0-specific variation on the existing TCR_ELx.{EPD0,EPD1}, we can implement it entirely in aa64_va_parameters(). Thi

Re: [PATCH v3] tcg/ppc: Optimize 26-bit jumps

2022-10-04 Thread Richard Henderson
On 10/3/22 11:32, Leandro Lupori wrote: On 9/19/22 14:56, Leandro Lupori wrote: PowerPC64 processors handle direct branches better than indirect ones, resulting in less stalled cycles and branch misses. However, PPC's tb_target_set_jmp_target() was only using direct branches for 16-bit jumps, w

  1   2   3   >