Re: [RFC PATCH] migration: reduce time of loading non-iterable vmstate

2022-12-08 Thread Chuang Xu
On 2022/12/9 上午12:00, Peter Xu wrote: On Thu, Dec 08, 2022 at 10:39:11PM +0800, Chuang Xu wrote: On 2022/12/8 上午6:08, Peter Xu wrote: On Thu, Dec 08, 2022 at 12:07:03AM +0800, Chuang Xu wrote: On 2022/12/6 上午12:28, Peter Xu wrote: Chuang, No worry on the delay; you're faster than when I read

Re: [PATCH v3 7/8] accel/tcg: Move PageDesc tree into tb-maint.c for system

2022-12-08 Thread Philippe Mathieu-Daudé
On 9/12/22 06:19, Richard Henderson wrote: Now that PageDesc is not used for user-only, and for system it is only used for tb maintenance, move the implementation into tb-main.c appropriately ifdefed. We have not yet eliminated all references to PageDesc for user-only, so retain a typedef to the

Re: [PATCH v3 6/8] accel/tcg: Use interval tree for user-only page tracking

2022-12-08 Thread Philippe Mathieu-Daudé
On 9/12/22 06:19, Richard Henderson wrote: Finish weaning user-only away from PageDesc. Using an interval tree to track page permissions means that we can represent very large regions efficiently. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/290 Resolves: https://gitlab.com/qemu-proj

Re: [PATCH v3 5/8] accel/tcg: Move page_{get,set}_flags to user-exec.c

2022-12-08 Thread Philippe Mathieu-Daudé
On 9/12/22 06:19, Richard Henderson wrote: This page tracking implementation is specific to user-only, since the system softmmu version is in cputlb.c. Move it out of translate-all.c to user-exec.c. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 1

Re: [PATCH v3 7/8] target/i386/intel-pt: Define specific PT feature set for IceLake-server and Snowridge

2022-12-08 Thread Chenyi Qiang
On 12/8/2022 2:25 PM, Xiaoyao Li wrote: > For IceLake-server, it's just the same as using the default PT > feature set since the default one is exact taken from ICX. > > For Snowridge, define it according to real SNR silicon capabilities. > > Signed-off-by: Xiaoyao Li > --- > target/i386/cpu

Re: [PATCH v3 2/8] accel/tcg: Rename page_flush_tb

2022-12-08 Thread Philippe Mathieu-Daudé
On 9/12/22 06:19, Richard Henderson wrote: Rename to tb_remove_all, to remove the PageDesc "page" from the name, and to avoid suggesting a "flush" in the icache sense. Signed-off-by: Richard Henderson --- accel/tcg/tb-maint.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

Re: Target-dependent include path, why?

2022-12-08 Thread Philippe Mathieu-Daudé
On 9/12/22 06:24, Richard Henderson wrote: On 12/8/22 23:12, Markus Armbruster wrote: I stumbled over this: ../include/ui/qemu-pixman.h:12:10: fatal error: pixman.h: No such file or directory     12 | #include    |  ^~ Works when included into target-depende

Re: [PATCH v3 6/8] target/i386/intel-pt: Enable host pass through of Intel PT

2022-12-08 Thread Chenyi Qiang
On 12/8/2022 2:25 PM, Xiaoyao Li wrote: > commit e37a5c7fa459 ("i386: Add Intel Processor Trace feature support") > added the support of Intel PT by making CPUID[14] of PT as fixed feature > set (from ICX) for any CPU model on any host. This truly breaks the PT > exposure on Intel SPR platform b

Re: [PATCH v3 4/8] target/i386/intel-pt: print special message for INTEL_PT_ADDR_RANGES_NUM

2022-12-08 Thread Chenyi Qiang
On 12/8/2022 2:25 PM, Xiaoyao Li wrote: > Bit[2:0] of CPUID.14H_01H:EAX stands as a whole for the number of INTEL > PT ADDR RANGES. For unsupported value that exceeds what KVM reports, > report it as a whole in mark_unavailable_features() as well. > Maybe this patch can be put before 3/8. > S

Re: [PATCH v10 5/9] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-12-08 Thread Chao Peng
On Tue, Dec 06, 2022 at 03:48:50PM +, Fuad Tabba wrote: ... > > > > > > */ > > > > - if (unlikely(kvm->mmu_invalidate_in_progress) && > > > > - hva >= kvm->mmu_invalidate_range_start && > > > > - hva < kvm->mmu_invalidate_range_end) > > > > - re

[PATCH v2 1/2] target/ppc: Implement the DEXCR and HDEXCR

2022-12-08 Thread Nicholas Miehlbradt
Define the DEXCR and HDEXCR as special purpose registers. Each register occupies two SPR indicies, one which can be read in an unprivileged state and one which can be modified in the appropriate priviliged state, however both indicies refer to the same underlying value. Note that the ISA uses the

[PATCH v2 0/2] target/ppc: Implement Dynamic Execution Control Registers

2022-12-08 Thread Nicholas Miehlbradt
Implements the Dynamic Execution Control Register (DEXCR) and the Hypervisor Dynamic Execution Control Register (HDEXCR) in TCG as defined in Power ISA 3.1B. Only aspects 5 (Non-privileged hash instruction enable) and 6 (Privileged hash instruction enable) have architectural effects. Other aspects

[PATCH v2 2/2] target/ppc: Check DEXCR on hash{st, chk} instructions

2022-12-08 Thread Nicholas Miehlbradt
Adds checks to the hashst and hashchk instructions to only execute if enabled by the relevant aspect in the DEXCR and HDEXCR. This behaviour is guarded behind TARGET_PPC64 since Power10 is currently the only implementation which has the DEXCR. Reviewed-by: Daniel Henrique Barboza Signed-off-by:

Re: [PATCH v10 8/9] KVM: Handle page fault for private memory

2022-12-08 Thread Yuan Yao
On Thu, Dec 08, 2022 at 07:23:46PM +0800, Chao Peng wrote: > On Thu, Dec 08, 2022 at 10:29:18AM +0800, Yuan Yao wrote: > > On Fri, Dec 02, 2022 at 02:13:46PM +0800, Chao Peng wrote: > > > A KVM_MEM_PRIVATE memslot can include both fd-based private memory and > > > hva-based shared memory. Architect

Re: [PATCH v10 6/9] KVM: Unmap existing mappings when change the memory attributes

2022-12-08 Thread Yuan Yao
On Thu, Dec 08, 2022 at 07:20:43PM +0800, Chao Peng wrote: > On Wed, Dec 07, 2022 at 04:13:14PM +0800, Yuan Yao wrote: > > On Fri, Dec 02, 2022 at 02:13:44PM +0800, Chao Peng wrote: > > > Unmap the existing guest mappings when memory attribute is changed > > > between shared and private. This is ne

Re: Target-dependent include path, why?

2022-12-08 Thread Richard Henderson
On 12/8/22 23:12, Markus Armbruster wrote: I stumbled over this: ../include/ui/qemu-pixman.h:12:10: fatal error: pixman.h: No such file or directory 12 | #include | ^~ Works when included into target-dependent code. Running make -V=1 shows we're passi

[PATCH v3 0/8] accel/tcg: Rewrite user-only vma tracking

2022-12-08 Thread Richard Henderson
The primary motivator here are the numerous bug reports (e.g. #290) about not being able to handle very large memory allocations. I presume all or most of these are due to guest use of the clang address sanitizer, which allocates a massive shadow vma. This patch set copies the linux kernel code fo

[PATCH v3 2/8] accel/tcg: Rename page_flush_tb

2022-12-08 Thread Richard Henderson
Rename to tb_remove_all, to remove the PageDesc "page" from the name, and to avoid suggesting a "flush" in the icache sense. Signed-off-by: Richard Henderson --- accel/tcg/tb-maint.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/t

[PATCH v3 4/8] accel/tcg: Use interval tree for TARGET_PAGE_DATA_SIZE

2022-12-08 Thread Richard Henderson
Continue weaning user-only away from PageDesc. Use an interval tree to record target data. Chunk the data, to minimize allocation overhead. Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 1 - accel/tcg/user-exec.c | 99 --- 2 files changed,

[PATCH v3 6/8] accel/tcg: Use interval tree for user-only page tracking

2022-12-08 Thread Richard Henderson
Finish weaning user-only away from PageDesc. Using an interval tree to track page permissions means that we can represent very large regions efficiently. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/290 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/967 Resolves: https://gitla

[PATCH v3 1/8] util: Add interval-tree.c

2022-12-08 Thread Richard Henderson
Copy and simplify the Linux kernel's interval_tree_generic.h, instantiating for uint64_t. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/qemu/interval-tree.h| 99 tests/unit/test-interval-tree.c | 209 util/interval-tree.c| 882 +

[PATCH v3 5/8] accel/tcg: Move page_{get,set}_flags to user-exec.c

2022-12-08 Thread Richard Henderson
This page tracking implementation is specific to user-only, since the system softmmu version is in cputlb.c. Move it out of translate-all.c to user-exec.c. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 17 ++ accel/tcg/translate-all.c | 350

[PATCH v3 3/8] accel/tcg: Use interval tree for TBs in user-only mode

2022-12-08 Thread Richard Henderson
Begin weaning user-only away from PageDesc. Since, for user-only, all TB (and page) manipulation is done with a single mutex, and there is no virtual/physical discontinuity to split a TB across discontinuous pages, place all of the TBs into a single IntervalTree. This makes it trivial to find all

[PATCH v3 7/8] accel/tcg: Move PageDesc tree into tb-maint.c for system

2022-12-08 Thread Richard Henderson
Now that PageDesc is not used for user-only, and for system it is only used for tb maintenance, move the implementation into tb-main.c appropriately ifdefed. We have not yet eliminated all references to PageDesc for user-only, so retain a typedef to the structure without definition. Signed-off-by

[PATCH v3 8/8] accel/tcg: Move remainder of page locking to tb-maint.c

2022-12-08 Thread Richard Henderson
The only thing that still touches PageDesc in translate-all.c are some locking routines related to tb-maint.c which have not yet been moved. Do so now. Move some code up in tb-maint.c as well, to untangle the maze of ifdefs, and allow a sensible final ordering. Move some declarations from exec/t

Target-dependent include path, why?

2022-12-08 Thread Markus Armbruster
I stumbled over this: ../include/ui/qemu-pixman.h:12:10: fatal error: pixman.h: No such file or directory 12 | #include | ^~ Works when included into target-dependent code. Running make -V=1 shows we're passing a number of -I only when compiling target-dep

Re: [PATCH RESEND v3 00/10] migration: introduce dirtylimit capability

2022-12-08 Thread Hyman
Ping ? 在 2022/12/4 1:09, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) v3(resend): - fix the syntax error of the topic. v3: This version make some modifications inspired by Peter and Markus as following: 1. Do the code clean up in [PATCH v2 02/11] suggested by Markus 2. Replace the [PATC

Re: [RFC PATCH] RISC-V: Save mmu_idx using FIELD_DP32 not OR

2022-12-08 Thread LIU Zhiwei
On 2022/12/8 23:11, Christoph Muellner wrote: From: Christoph Müllner Setting flags using OR might work, but is not optimal for a couple of reasons: * No way grep for stores to the field MEM_IDX. * The return value of cpu_mmu_index() is not masked (not a real problem as long as cpu_mmu_ind

Re: [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2022-12-08 Thread Fan Ni
On Mon, Nov 28, 2022 at 10:01:57AM -0500, Gregory Price wrote: > From: Gregory Price > > This commit enables each CXL Type-3 device to contain one volatile > memory region and one persistent region. > > Two new properties have been added to cxl-type3 device initialization: > [volatile-memde

Re: [PATCH] blockdev: add 'media=cdrom' argument to support usb cdrom emulated as cdrom

2022-12-08 Thread Zhipeng Lu
Thanks. -device usb-bot,id=bot0 -device scsi-{cd,hd},bus=bot0.0,drive=drive0 Qemu implements virtio scsi to emulate scsi controller, but if the virtual machine(for example windows guest os) don't install the virtio scsi driver, it don't work i need the function: emulate cdrom in guest, suppo

[PATCH v4 12/27] tcg/s390x: Distinguish RRF-a and RRF-c formats

2022-12-08 Thread Richard Henderson
One has 3 register arguments; the other has 2 plus an m3 field. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 57 +- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b

[PATCH v4 13/27] tcg/s390x: Distinguish RIE formats

2022-12-08 Thread Richard Henderson
There are multiple variations, with different fields. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 47 +- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x

[PATCH v4 27/27] tcg/s390x: Avoid the constant pool in tcg_out_movi

2022-12-08 Thread Richard Henderson
Load constants in no more than two insns, which turns out to be faster than using the constant pool. Suggested-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tcg/s3

[PATCH v4 03/27] tcg/s390x: Always set TCG_TARGET_HAS_direct_jump

2022-12-08 Thread Richard Henderson
Since USE_REG_TB is removed, there is no need to load the target TB address into a register. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 2 +- tcg/s390x/tcg-target.c.inc | 48 +++--- 2 files changed, 10 insertions(+), 40 deletions(-) diff -

[PATCH v4 11/27] tcg/s390x: Use LARL+AGHI for odd addresses

2022-12-08 Thread Richard Henderson
Add one instead of dropping odd addresses to the constant pool. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.i

[PATCH v4 14/27] tcg/s390x: Support MIE2 multiply single instructions

2022-12-08 Thread Richard Henderson
The MIE2 facility adds 3-operand versions of multiply. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 1 + tcg/s390x/tcg-target.h | 1 + tcg/s390x/tcg-target.c.inc | 34 -- 3 files changed, 26 ins

[PATCH v4 15/27] tcg/s390x: Support MIE2 MGRK instruction

2022-12-08 Thread Richard Henderson
The MIE2 facility adds a 3-operand signed 64x64->128 multiply. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 1 + tcg/s390x/tcg-target.h | 2 +- tcg/s390x/tcg-target.c.inc | 8 3 files changed, 10 insertions(+), 1 deleti

[PATCH v4 24/27] tcg/s390x: Implement ctpop operation

2022-12-08 Thread Richard Henderson
There is an older form that produces per-byte results, and a newer form that produces per-register results. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 4 ++-- tcg/s390x/tcg-target.c.inc | 36 2 files chan

[PATCH v4 04/27] tcg/s390x: Remove USE_LONG_BRANCHES

2022-12-08 Thread Richard Henderson
The size of a compiled TB is limited by the uint16_t used by gen_insn_end_off[] -- there is no need for a 32-bit branch. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 9 - 1 file changed, 9 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c

[PATCH v4 16/27] tcg/s390x: Issue XILF directly for xor_i32

2022-12-08 Thread Richard Henderson
There is only one instruction that is applicable to a 32-bit immediate xor. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index 871fcb7683..fc304327fc 100

[PATCH v4 02/27] tcg/s390x: Remove TCG_REG_TB

2022-12-08 Thread Richard Henderson
This reverts 829e1376d940 ("tcg/s390: Introduce TCG_REG_TB"), and several follow-up patches. The primary motivation is to reduce the less-tested code paths, pre-z10. Secondarily, this allows the unconditional use of TCG_TARGET_HAS_direct_jump, which might be more important for performance than an

[PATCH v4 10/27] tcg/s390x: Remove DISTINCT_OPERANDS facility check

2022-12-08 Thread Richard Henderson
The distinct-operands facility is bundled into facility 45, along with load-on-condition. We are checking this at startup. Remove the a0 == a1 checks for 64-bit sub, and, or, xor, as there is no space savings for avoiding the distinct-operands insn. Signed-off-by: Richard Henderson --- tcg/s390

[PATCH v4 18/27] tcg/s390x: Tighten constraints for and_i64

2022-12-08 Thread Richard Henderson
Let the register allocator handle such immediates by matching only what one insn can achieve. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 1 + tcg/s390x/tcg-target-con-str.h | 2 + tcg/s390x/tcg-target.c.inc | 114 + 3 files chang

[PATCH v4 26/27] tcg/s390x: Cleanup tcg_out_movi

2022-12-08 Thread Richard Henderson
Merge maybe_out_small_movi, as it no longer has additional users. Use is_const_p{16,32}. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 52 -- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s

[PATCH v4 20/27] tcg/s390x: Create tgen_cmp2 to simplify movcond

2022-12-08 Thread Richard Henderson
Return both regular and inverted condition codes from tgen_cmp2. This lets us choose after the fact which comparision we want. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-)

[PATCH v4 01/27] tcg/s390x: Use register pair allocation for div and mulu2

2022-12-08 Thread Richard Henderson
Previously we hard-coded R2 and R3. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 4 ++-- tcg/s390x/tcg-target-con-str.h | 8 +-- tcg/s390x/tcg-target.c.inc | 43 +- 3 files changed, 35 insertions(+)

[PATCH v4 25/27] tcg/s390x: Tighten constraints for 64-bit compare

2022-12-08 Thread Richard Henderson
Give 64-bit comparison second operand a signed 33-bit immediate. This is the smallest superset of uint32_t and int32_t, as used by CLGFI and CGFI respectively. The rest of the 33-bit space can be loaded into TCG_TMP0. Drop use of the constant pool. Signed-off-by: Richard Henderson --- tcg/s390

[PATCH v4 07/27] tcg/s390x: Check for general-instruction-extension facility at startup

2022-12-08 Thread Richard Henderson
The general-instruction-extension facility was introduced in z10, which itself was end-of-life in 2019. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 10 ++-- tcg/s390x/tcg-target.c.inc | 100 - 2 files changed, 49 insertions(+), 61 deleti

[PATCH v4 21/27] tcg/s390x: Generalize movcond implementation

2022-12-08 Thread Richard Henderson
Generalize movcond to support pre-computed conditions, and the same set of arguments at all times. This will be assumed by a following patch, which needs to reuse tgen_movcond_int. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 3 +- tcg/s3

[PATCH v4 17/27] tcg/s390x: Tighten constraints for or_i64 and xor_i64

2022-12-08 Thread Richard Henderson
Drop support for sequential OR and XOR, as the serial dependency is slower than loading the constant first. Let the register allocator handle such immediates by matching only what one insn can achieve. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 1 + tcg/s390x/tcg-ta

[PATCH v4 19/27] tcg/s390x: Support MIE3 logical operations

2022-12-08 Thread Richard Henderson
This is andc, orc, nand, nor, eqv. We can use nor for implementing not. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 3 + tcg/s390x/tcg-target.h | 25 tcg/s390x/tcg-target.c.inc | 102

[PATCH v4 00/27] tcg/s390x: misc patches

2022-12-08 Thread Richard Henderson
Based-on: 20221202053958.223890-1-richard.hender...@linaro.org ("[PATCH for-8.0 v3 00/34] tcg misc patches") Changes from v3: * Require z196 as minimum cpu -- 6 new patches removing checks. * Tighten constraints on AND, OR, XOR, CMP, trying get the register allocator to hoist things that c

[PATCH v4 08/27] tcg/s390x: Check for load-on-condition facility at startup

2022-12-08 Thread Richard Henderson
The general-instruction-extension facility was introduced in z196, which itself was end-of-life in 2021. In addition, z196 is the minimum CPU supported by our set of supported operating systems: RHEL 7 (z196), SLES 12 (z196) and Ubuntu 16.04 (zEC12). Check for facility number 45, which will be th

[PATCH v4 22/27] tcg/s390x: Support SELGR instruction in movcond

2022-12-08 Thread Richard Henderson
The new select instruction provides two separate register inputs, whereas the old load-on-condition instruction overlaps one of the register inputs with the destination. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 15 +++ 1 file ch

[PATCH v4 06/27] tcg/s390x: Check for extended-immediate facility at startup

2022-12-08 Thread Richard Henderson
The extended-immediate facility was introduced in z9-109, which itself was end-of-life in 2017. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 4 +- tcg/s390x/tcg-target.c.inc | 231 +++-- 2 files changed, 72 insertions(+), 163 deletions(-) d

[PATCH v4 23/27] tcg/s390x: Use tgen_movcond_int in tgen_clz

2022-12-08 Thread Richard Henderson
Reuse code from movcond to conditionally copy a2 to dest, based on the condition codes produced by FLOGR. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 1 + tcg/s390x/tcg-target.c.inc | 20 +++- 2 files changed, 12 inser

[PATCH v4 09/27] tcg/s390x: Remove FAST_BCR_SER facility check

2022-12-08 Thread Richard Henderson
The fast-bcr-serialization facility is bundled into facility 45, along with load-on-condition. We are checking this at startup. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 1 - tcg/s390x/tcg-target.c.inc | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v4 05/27] tcg/s390x: Check for long-displacement facility at startup

2022-12-08 Thread Richard Henderson
We are already assuming the existance of long-displacement, but were not being explicit about it. This has been present since z990. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 6 -- tcg/s390x/tcg-target.c.inc | 15 +++ 2 files changed, 19 insertions(+), 2

Re: [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2022-12-08 Thread Gregory Price
On Thu, Dec 08, 2022 at 10:55:58PM +, Fan Ni wrote: > On Mon, Nov 28, 2022 at 10:01:57AM -0500, Gregory Price wrote: > > > > -if (cxl_dstate->pmem_size < CXL_CAPACITY_MULTIPLIER) { > > +if ((cxl_dstate->vmem_size < CXL_CAPACITY_MULTIPLIER) || > > +(cxl_dstate->pmem_size < CXL_

Re: [PATCH v2 14/16] hw/intc: sifive_plic: Change "priority-base" to start from interrupt source 0

2022-12-08 Thread Wilfred Mallawa
On Wed, 2022-12-07 at 18:03 +0800, Bin Meng wrote: > At present the SiFive PLIC model "priority-base" expects interrupt > priority register base starting from source 1 instead source 0, > that's why on most platforms "priority-base" is set to 0x04 except > 'opentitan' machine. 'opentitan' should ha

Re: [PATCH v2 01/16] hw/riscv: Select MSI_NONBROKEN in SIFIVE_PLIC

2022-12-08 Thread Wilfred Mallawa
On Wed, 2022-12-07 at 18:03 +0800, Bin Meng wrote: > hw/pci/Kconfig says MSI_NONBROKEN should be selected by interrupt > controllers regardless of how MSI is implemented. msi_nonbroken is > initialized to true in sifive_plic_realize(). > > Let SIFIVE_PLIC select MSI_NONBROKEN and drop the selectio

Re: [PATCH v2 04/16] hw/riscv: Sort machines Kconfig options in alphabetical order

2022-12-08 Thread Wilfred Mallawa
On Wed, 2022-12-07 at 18:03 +0800, Bin Meng wrote: > SHAKTI_C machine Kconfig option was inserted in disorder. Fix it. > > Signed-off-by: Bin Meng > Reviewed-by: Alistair Francis Reviewed-by: Wilfred Mallawa Wilfred > --- > > (no changes since v1) > >  hw/riscv/Kconfig | 16 +---

Re: [PATCH 1/2] target/riscv: Simplify helper_sret() a little bit

2022-12-08 Thread Wilfred Mallawa
On Wed, 2022-12-07 at 17:00 +0800, Bin Meng wrote: > There are 2 paths in helper_sret() and the same mstatus update codes > are replicated. Extract the common parts to simplify it a little bit. > > Signed-off-by: Bin Meng Reviewed-by: Wilfred Mallawa Wilfred > --- > >  target/riscv/op_helper.c

Re: CVMSEG Emulation

2022-12-08 Thread Jiaxun Yang
Hi, This address range is located in KSEG3… Doesn’t seems to be a good location for userspace program. I think you have two options to make target_mmap work, the first would be rising TARGET_VIRT_ADDR_SPACE_BITS to 64 bit. That may break some user space applications storing pointer tags on high

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Guenter Roeck
On 12/8/22 12:28, Keith Busch wrote: When the request times out, the kernel should be printing the command ID. What does that say? The driver thinks the 0 is invalid, so I'm just curious what value it's expecting. After some time I see the following. ... [ 88.071197] nvme nvme0: invalid i

Re: [PATCH] mailmap: Fix Stefan Weil author email

2022-12-08 Thread Stefan Weil via
Am 08.12.22 um 16:55 schrieb Philippe Mathieu-Daudé: Fix authorship of commits 266aaedc37~..ac14949821. See commit 3bd2608db7 ("maint: Add .mailmap entries for patches claiming list authorship") for rationale. Signed-off-by: Philippe Mathieu-Daudé --- .mailmap | 1 + 1 file changed, 1 inser

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > > > A cq head doorbell mmio is skipped... And it is not the fault of the > > > kernel. The kernel is in it's good right to skip the mmio since the cq > > > eventi

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Keith Busch
When the request times out, the kernel should be printing the command ID. What does that say? The driver thinks the 0 is invalid, so I'm just curious what value it's expecting. On Thu, Dec 8, 2022, 8:13 PM Guenter Roeck wrote: > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > >

Re: [PATCH 0/6] Enable Cubieboard A10 boot SPL from SD card

2022-12-08 Thread Niek Linnenbank
Hi Strahinja, On Thu, Dec 8, 2022 at 8:24 PM Strahinja Jankovic < strahinjapjanko...@gmail.com> wrote: > Hi Niek, > > On Wed, Dec 7, 2022 at 9:25 PM Niek Linnenbank > wrote: > > > > Hello Strahinja, > > > > Thanks for contribution these patches, and also taking the H3 into > account :-) > > Than

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > A cq head doorbell mmio is skipped... And it is not the fault of the > > kernel. The kernel is in it's good right to skip the mmio since the cq > > eventidx is not properly updated. > > > > Adding that and it boots properly on

Re: [PATCH 0/6] Enable Cubieboard A10 boot SPL from SD card

2022-12-08 Thread Strahinja Jankovic
Hi Niek, On Wed, Dec 7, 2022 at 9:25 PM Niek Linnenbank wrote: > > Hello Strahinja, > > Thanks for contribution these patches, and also taking the H3 into account :-) Thank you for looking into these patches and all of the comments. I will try to submit V2 of this patch set in the following days

Re: [PATCH 6/6] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-08 Thread Strahinja Jankovic
On Wed, Dec 7, 2022 at 11:39 PM Niek Linnenbank wrote: > > Hi Strahinja, > > > On Sun, Dec 4, 2022 at 12:19 AM Strahinja Jankovic > wrote: >> >> This patch enables copying of SPL from MMC if `-kernel` parameter is not >> passed when starting QEMU. SPL is copied to SRAM_A. >> >> The approach is r

Re: [PATCH 3/6] hw/i2c: Allwinner TWI/I2C Emulation

2022-12-08 Thread Strahinja Jankovic
Hi Niek, On Wed, Dec 7, 2022 at 11:06 PM Niek Linnenbank wrote: > > Hi Strahinja, > > On Sun, Dec 4, 2022 at 12:19 AM Strahinja Jankovic > wrote: >> >> This patch implements Allwinner TWI/I2C controller emulation. Only >> master-mode functionality is implemented. >> >> The SPL boot for Cubieboa

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 09:08:12AM +0100, Klaus Jensen wrote: > On Dec 8 08:16, Klaus Jensen wrote: > > On Dec 7 09:49, Guenter Roeck wrote: > > > Hi, > > > > > > On Thu, Jun 16, 2022 at 08:34:07PM +0800, Jinhao Fan wrote: > > > > Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec

Re: [PATCH] FreeBSD: Upgrade to 12.4 release

2022-12-08 Thread Warner Losh
On Thu, Dec 8, 2022 at 12:47 AM Philippe Mathieu-Daudé wrote: > On 8/12/22 07:52, Brad Smith wrote: > > FreeBSD: Upgrade to 12.4 release > > > > Signed-off-by: Brad Smith > > --- > > .gitlab-ci.d/cirrus.yml | 2 +- > > tests/vm/freebsd| 4 ++-- > > 2 files changed, 3 insertions(+), 3

Re: [PATCH v2 3/3] hw/nvme: fix missing cq eventidx update

2022-12-08 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 01:26:42PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > Prior to reading the shadow doorbell cq head, we have to update the > eventidx. Otherwise, we risk that the driver will skip an mmio doorbell > write. This happens on riscv64, as reported by Guenter. > > Addin

Re: [PATCH] scripts/archive-source: Use more portable argument with tar command

2022-12-08 Thread Philippe Mathieu-Daudé
On 8/12/22 18:15, Daniel P. Berrangé wrote: On Thu, Dec 08, 2022 at 05:20:51PM +0100, Philippe Mathieu-Daudé wrote: When using the archive-source.sh script on Darwin we get: tar: Option --concatenate is not supported Usage: List:tar -tf Extract: tar -xf Create: tar -

Re: [PATCH 1/4] coroutine: Clean up superfluous inclusion of qemu/coroutine.h

2022-12-08 Thread Markus Armbruster
Stefan Hajnoczi writes: > Probably because block layer, aio.h, and coroutine_int.h header files > already include "qemu/coroutine.h"? Mostly, but not always. For instance, crypto/block-luks-priv.h compiles fine without it, and doesn't include it after this patch. > Reviewed-by: Stefan Hajnoczi

Re: [PATCH qemu.git 0/1] hw/arm/virt: add 2x sp804 timer

2022-12-08 Thread Axel Heider
Peter, For the seL4 specific case, this is currently not possible in the standard configuration. It's only exposed for a special debug and benchmarking configuration. It's not clear to me what you mean here -- the generic timer in the CPU exists in all configurations, so there should be no ob

Re: [PATCH] scripts/archive-source: Use more portable argument with tar command

2022-12-08 Thread Daniel P . Berrangé
On Thu, Dec 08, 2022 at 05:20:51PM +0100, Philippe Mathieu-Daudé wrote: > When using the archive-source.sh script on Darwin we get: > > tar: Option --concatenate is not supported > Usage: > List:tar -tf > Extract: tar -xf > Create: tar -cf [filenames...] > Help:tar

Re: [PATCH] scripts/archive-source: Use more portable argument with tar command

2022-12-08 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > When using the archive-source.sh script on Darwin we get: > > tar: Option --concatenate is not supported > Usage: > List:tar -tf > Extract: tar -xf > Create: tar -cf [filenames...] > Help:tar --help > > Replace the long argument a

Re: [PATCH qemu.git 0/1] hw/arm/virt: add 2x sp804 timer

2022-12-08 Thread Peter Maydell
On Thu, 8 Dec 2022 at 16:59, Axel Heider wrote: > > Peter, > > >> This patch adds timer peripherals to the arm-virt machine.>> > > Is there a reason you can't use the CPU's built-in generic timer > > device ? That is what typical guest code does on this system. > > I'm a bit reluctant to add more

Re: [PATCH qemu.git 0/1] hw/arm/virt: add 2x sp804 timer

2022-12-08 Thread Axel Heider
Peter, This patch adds timer peripherals to the arm-virt machine.>> Is there a reason you can't use the CPU's built-in generic timer device ? That is what typical guest code does on this system. I'm a bit reluctant to add more devices to the virt board because over time it gradually gets increa

Re: [PATCH] scripts/archive-source: Use more portable argument with tar command

2022-12-08 Thread Peter Maydell
On Thu, 8 Dec 2022 at 16:21, Philippe Mathieu-Daudé wrote: > > When using the archive-source.sh script on Darwin we get: > > tar: Option --concatenate is not supported > Usage: > List:tar -tf > Extract: tar -xf > Create: tar -cf [filenames...] > Help:tar --help > >

Re: [RFC PATCH-for-8.0] hw: Avoid using inlined functions with external linkage

2022-12-08 Thread Peter Maydell
On Thu, 8 Dec 2022 at 16:11, Philippe Mathieu-Daudé wrote: > > When using Clang ("Apple clang version 14.0.0 (clang-1400.0.29.202)") > and building with -Wall we get: > > hw/arm/smmu-common.c:173:33: warning: static function > 'smmu_hash_remove_by_asid_iova' is used in an inline function with e

[PATCH] scripts/archive-source: Use more portable argument with tar command

2022-12-08 Thread Philippe Mathieu-Daudé
When using the archive-source.sh script on Darwin we get: tar: Option --concatenate is not supported Usage: List:tar -tf Extract: tar -xf Create: tar -cf [filenames...] Help:tar --help Replace the long argument added by commit 8fc76176f6 ("scripts: use git-archive

[RFC PATCH-for-8.0] hw: Avoid using inlined functions with external linkage

2022-12-08 Thread Philippe Mathieu-Daudé
When using Clang ("Apple clang version 14.0.0 (clang-1400.0.29.202)") and building with -Wall we get: hw/arm/smmu-common.c:173:33: warning: static function 'smmu_hash_remove_by_asid_iova' is used in an inline function with external linkage [-Wstatic-in-inline] hw/arm/smmu-common.h:170:1: not

Re: [PATCH v4 0/2] Add OCP extended log to nvme QEMU

2022-12-08 Thread Joel Granados
ping. Is the solution to the guid constant ok? Best On Fri, Nov 25, 2022 at 10:48:06AM +0100, Joel Granados wrote: > The motivation and description are contained in the last patch in this set. > Will copy paste it here for convenience: > > In order to evaluate write amplification factor (WA

Re: [SeaBIOS] Re: [PATCH 4/4] be less conservative with the 64bit pci io window

2022-12-08 Thread Igor Mammedov
On Wed, 23 Nov 2022 11:25:08 +0100 Gerd Hoffmann wrote: > On Tue, Nov 22, 2022 at 01:43:16PM -0500, Kevin O'Connor wrote: > > On Mon, Nov 21, 2022 at 11:32:13AM +0100, Gerd Hoffmann wrote: > > > Current seabios code will only enable and use the 64bit pci io window in > > > case it runs out of s

Re: [RFC PATCH] migration: reduce time of loading non-iterable vmstate

2022-12-08 Thread Peter Xu
On Thu, Dec 08, 2022 at 10:39:11PM +0800, Chuang Xu wrote: > > On 2022/12/8 上午6:08, Peter Xu wrote: > > On Thu, Dec 08, 2022 at 12:07:03AM +0800, Chuang Xu wrote: > > > On 2022/12/6 上午12:28, Peter Xu wrote: > > > > Chuang, > > > > > > > > No worry on the delay; you're faster than when I read your

Re: [PATCH-for-8.0 v2 2/4] gdbstub: Use vaddr type for generic insert/remove_breakpoint() API

2022-12-08 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > Both insert/remove_breakpoint() handlers are used in system and > user emulation. We can not use the 'hwaddr' type on user emulation, > we have to use 'vaddr' which is defined as "wide enough to contain > any #target_ulong virtual address". > > gdbstub.c doesn't r

[PATCH] mailmap: Fix Stefan Weil author email

2022-12-08 Thread Philippe Mathieu-Daudé
Fix authorship of commits 266aaedc37~..ac14949821. See commit 3bd2608db7 ("maint: Add .mailmap entries for patches claiming list authorship") for rationale. Signed-off-by: Philippe Mathieu-Daudé --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 35dddbe27b

Re: [PATCH-for-8.0 v2 0/4] target/cpu: System/User cleanups around hwaddr/vaddr

2022-12-08 Thread Richard Henderson
On 12/8/22 09:35, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (4): cputlb: Restrict SavedIOTLB to system emulation gdbstub: Use vaddr type for generic insert/remove_breakpoint() API target/cpu: Restrict cpu_get_phys_page_debug() handlers to sysemu target/sparc/sysemu: Remove

[PATCH-for-8.0 v2 4/4] target/sparc/sysemu: Remove pointless CONFIG_USER_ONLY guard

2022-12-08 Thread Philippe Mathieu-Daudé
Commit caac44a52a ("target/sparc: Make sparc_cpu_tlb_fill sysemu only") restricted mmu_helper.c to system emulation. Checking whether CONFIG_USER_ONLY is defined is now pointless. Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/mmu_helper.c | 2 -- 1 file changed, 2 deletions(-) diff --g

[PATCH-for-8.0 v2 3/4] target/cpu: Restrict cpu_get_phys_page_debug() handlers to sysemu

2022-12-08 Thread Philippe Mathieu-Daudé
The 'hwaddr' type is only available / meaningful on system emulation. Signed-off-by: Philippe Mathieu-Daudé --- target/alpha/cpu.h| 2 +- target/cris/cpu.h | 3 +-- target/hppa/cpu.h | 2 +- target/m68k/cpu.h | 2 +- target/nios2/cpu.h| 2 +- target/openrisc/cpu.h | 3 ++- ta

[PATCH-for-8.0 v2 2/4] gdbstub: Use vaddr type for generic insert/remove_breakpoint() API

2022-12-08 Thread Philippe Mathieu-Daudé
Both insert/remove_breakpoint() handlers are used in system and user emulation. We can not use the 'hwaddr' type on user emulation, we have to use 'vaddr' which is defined as "wide enough to contain any #target_ulong virtual address". gdbstub.c doesn't require to include "exec/hwaddr.h" anymore.

[PATCH-for-8.0 v2 1/4] cputlb: Restrict SavedIOTLB to system emulation

2022-12-08 Thread Philippe Mathieu-Daudé
Commit 2f3a57ee47 ("cputlb: ensure we save the IOTLB data in case of reset") added the SavedIOTLB structure -- which is system emulation specific -- in the generic CPUState structure. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 6 -- 1 file changed, 4 insertions(+), 2 d

[PATCH-for-8.0 v2 0/4] target/cpu: System/User cleanups around hwaddr/vaddr

2022-12-08 Thread Philippe Mathieu-Daudé
We are not supposed to use the 'hwaddr' type on user emulation. This series is a preparatory cleanup before few refactors to isolate further System vs User code. Since v1: - only restrict SavedIOTLB in header (Alex) - convert insert/remove_breakpoint implementations (Peter) Philippe Mathieu-Daud

[RFC PATCH] RISC-V: Save mmu_idx using FIELD_DP32 not OR

2022-12-08 Thread Christoph Muellner
From: Christoph Müllner Setting flags using OR might work, but is not optimal for a couple of reasons: * No way grep for stores to the field MEM_IDX. * The return value of cpu_mmu_index() is not masked (not a real problem as long as cpu_mmu_index() returns only valid values). * If the offset of

CVMSEG Emulation

2022-12-08 Thread Christopher Wrogg
In userspace emulation how do I make a set of addresses always valid and initialized to 0 even though the process does not map it in? In particular I want to map

  1   2   >