Re: [PATCH v4 19/19] iotests: specify some unsupported_imgopts for python iotests

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
23.12.2021 15:44, Hanna Reitz wrote: On 03.12.21 14:07, Vladimir Sementsov-Ogievskiy wrote: We support IMGOPTS for python iotests now. Still a lot of tests are unprepared to common IMGOPTS that are used with bash iotests. So we should define corresponding unsupported_imgopts. Signed-off-by: Vla

Re: [PATCH v4 18/19] iotests.py: implement unsupported_imgopts

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
23.12.2021 15:41, Hanna Reitz wrote: On 03.12.21 14:07, Vladimir Sementsov-Ogievskiy wrote: We have added support for some addition IMGOPTS in python iotests like in bash iotests. Similarly to bash iotests, we want a way to skip some tests which can't work with specific IMGOPTS. Globally for py

Re: [RFC PATCH v2 14/14] job.c: enable job lock/unlock and remove Aiocontext locks

2021-12-23 Thread Emanuele Giuseppe Esposito
On 18/12/2021 13:24, Vladimir Sementsov-Ogievskiy wrote: 04.11.2021 17:53, Emanuele Giuseppe Esposito wrote: --- a/block/replication.c +++ b/block/replication.c @@ -728,9 +728,11 @@ static void replication_stop(ReplicationState *rs, bool failover, Error **errp)    * disk, secondary

[PATCH v3 2/2] linux-user: call set/getscheduler set/getparam directly

2021-12-23 Thread Tonis Tiigi
There seems to be difference in syscall and libc definition of these methods and therefore musl does not implement them (1e21e78bf7). Call syscall directly to ensure the behavior of the libc of user application, not the libc that was used to build QEMU. Signed-off-by: Tonis Tiigi --- linux-user/

[PATCH v3 1/2] linux-user: add sched_getattr support

2021-12-23 Thread Tonis Tiigi
Signed-off-by: Tonis Tiigi --- linux-user/syscall.c | 94 +++ linux-user/syscall_defs.h | 14 ++ 2 files changed, 108 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f1cfcc8104..2f5a0fac5a 100644 --- a/linux-user/syscall.c

[PATCH v3 0/2] linux-user: fixes for sched_ syscalls

2021-12-23 Thread Tonis Tiigi
This patchset improves support for sched_* syscalls under user emulation. The first commit adds support for sched_g/setattr that was previously not implemented. There is no equivalent for these syscalls in libc, so I needed to redefine the struct from kernel. It can't be included directly becaus

QEMU CAS

2021-12-23 Thread Jasper Ruehl
Dear QEMU Community, after chatting a bit in the IRC channel, "stefanha" advised me to contact you via EMail about my problem. My advisor and me from the DSE chair at the TU Munich had the idea to improve the emulation of the x86 cmpxchg instruction on ARM64 CPUs by improving the translation s

Re: [PATCH v2] audio: Add sndio backend

2021-12-23 Thread WANG Xuerui
Hi Alexandre, On 12/17/21 17:38, Alexandre Ratchov wrote: sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). Signed-off-by: Brad Smith Signed-off-by: Alexandre Ratchov --- Thank you for the reviews a

Re: [PATCH for-7.0] tests/qemu-iotests: Fix 051 for binaries without 'lsi53c895a'

2021-12-23 Thread Hanna Reitz
On 06.12.21 15:34, Thomas Huth wrote: The lsi53c895a SCSI adaptor might not be enabled in each and every x86 QEMU binary, e.g. it's disabled in the RHEL/CentOS build. Thus let's add a check to the 051 test so that it does not fail if this device is not available. Signed-off-by: Thomas Huth ---

Re: [PATCH] Supporting AST2600 HACE engine accumulative mode

2021-12-23 Thread Klaus Heinrich Kiwi
Em qui., 23 de dez. de 2021 às 09:54, Cédric Le Goater escreveu: > > [ Adding Klaus ] Thanks Cedric. It's been a while since I've looked at this but I'll do my best.. > > On 12/22/21 03:22, Troy Lee wrote: > > Accumulative mode will supply a initial state and append padding bit at > > the end of

[PATCH v5 02/19] iotests.py: implement unsupported_imgopts

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
We are going to support some addition IMGOPTS in python iotests like in bash iotests. Similarly to bash iotests, we want a way to skip some tests which can't work with specific IMGOPTS. Globally for python iotests we will not support things like 'data_file=$TEST_IMG.ext_data_file' in IMGOPTS, so,

[PATCH v5 01/19] iotests.py: img_info_log(): rename imgopts argument

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
We are going to support IMGOPTS environment variable like in bash tests. Corresponding global variable in iotests.py should be called imgopts. So to not interfere with function argument, rename it in advance. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iote

[PATCH v5 19/19] iotests: declare lack of support for compresion_type in IMGOPTS

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
compression_type can't be used if we want to create image with compat=0.10. So, skip these tests, not many of them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/031 | 5 +++-- tests/qemu-iotests/051 | 5 +++-- tests/qemu-iotests/061 | 6 +- tes

[PATCH v5 04/19] iotests.py: qemu_img*("create"): support IMGOPTS='compression_type=zstd'

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
Adding support of IMGOPTS (like in bash tests) allows user to pass a lot of different options. Still, some may require additional logic. Now we want compression_type option, so add some smart logic around it: ignore compression_type=zstd in IMGOPTS, if test want qcow2 in compatibility mode. As wel

[PATCH v5 00/19] iotests: support zstd

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
These series makes tests pass with IMGOPTS='compression_type=zstd' Also, python iotests start to support IMGOPTS (they didn't before). v5: Move patches with unsupported_imgopts to the start of the series 02: add Hanna's r-b 03: - don't modify migrate-during-backup test - disably any 'comp

[PATCH v5 18/19] iotest 214: explicit compression type

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
The test-case "Corrupted size field in compressed cluster descriptor" heavily depends on zlib compression type. So, make it explicit. This way test passes with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/214 | 2 +-

[PATCH v5 06/19] iotests.py: rewrite default luks support in qemu_img

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
Move the logic to more generic qemu_img_pipe_and_status(). Also behave better when we have several -o options. And reuse argument parser of course. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 36 +-- 1

[PATCH v5 10/19] iotests.py: filter compression type out

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
We want iotests pass with both the default zlib compression and with IMGOPTS='compression_type=zstd'. Actually the only test that is interested in real compression type in test output is 287 (test for qcow2 compression type) and it's in bash. So for now we can safely filter out compression type in

[PATCH v5 03/19] iotests: specify some unsupported_imgopts for python iotests

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
We are going to support IMGOPTS for python iotests. Still some iotests will not work with common IMGOPTS used with bash iotests like specifying refcount_bits and compat qcow2 options. So we should define corresponding unsupported_imgopts for now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- t

[PATCH v5 11/19] iotest 302: use img_info_log() helper

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
Instead of qemu_img_log("info", ..) use generic helper img_info_log(). img_info_log() has smarter logic. For example it use filter_img_info() to filter output, which in turns filter a compression type. So it will help us in future when we implement a possibility to use zstd compression by default

[PATCH v5 07/19] iotest 303: explicit compression type

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
The test prints qcow2 header fields which depends on chosen compression type. So, let's be explicit in what compression type we want and independent of IMGOPTS. Test both existing compression types. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/303

[PATCH v5 12/19] qcow2: simple case support for downgrading of qcow2 images with zstd

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
If image doesn't have any compressed cluster we can easily switch to zlib compression, which may allow to downgrade the image. That's mostly needed to support IMGOPTS='compression_type=zstd' in some iotests which do qcow2 downgrade. While being here also fix checkpatch complain against '#' in pri

[PATCH v5 05/19] iotests: drop qemu_img_verbose() helper

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
qemu_img_verbose() has a drawback of not going through generic qemu_img_pipe_and_status(). qemu_img_verbose() is not very popular, so update the only two users to qemu_img_log() and drop qemu_img_verbose() at all. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qe

[PATCH v5 09/19] iotests.py: filter out successful output of qemu-img create

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
The only "feature" of this "Formatting ..." line is that we have to update it every time we add new option. Let's drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/149.out| 21 - tests/qemu-iotests/237.out| 3 --- t

[PATCH v5 08/19] iotest 065: explicit compression type

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
The test checks different options. It of course fails if set IMGOPTS='compression_type=zstd'. So, let's be explicit in what compression type we want and independent of IMGOPTS. Test both existing compression types. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/q

[PATCH v5 17/19] iotests 60: more accurate set dirty bit in qcow2 header

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
Don't touch other incompatible bits, like compression-type. This makes the test pass with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/060 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu

[PATCH v5 13/19] iotests/common.rc: introduce _qcow2_dump_header helper

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
We'll use it in tests instead of explicit qcow2.py. Then we are going to add some filtering in _qcow2_dump_header. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/common.rc | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/qemu-iotes

[PATCH v5 16/19] iotests: bash tests: filter compression type

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
We want iotests pass with both the default zlib compression and with IMGOPTS='compression_type=zstd'. Actually the only test that is interested in real compression type in test output is 287 (test for qcow2 compression type), so implement specific option for it. Signed-off-by: Vladimir Sementsov-

[PATCH v5 15/19] iotest 39: use _qcow2_dump_header

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
_qcow2_dump_header has filter for compression type, so this change makes test pass with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/039 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-i

[PATCH v5 14/19] iotests: massive use _qcow2_dump_header

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
We are going to add filtering in _qcow2_dump_header and want all tests use it. The patch is generated by commands: cd tests/qemu-iotests sed -ie 's/$PYTHON qcow2.py "$TEST_IMG" dump-header\($\| \)/_qcow2_dump_header\1/' ??? tests/* (the difficulty is to avoid converting dump-header-exts) Si

Re: [PATCH] target/ppc: Improve logging in Radix MMU

2021-12-23 Thread Richard Henderson
On 12/21/21 11:10 PM, Cédric Le Goater wrote: +static bool __ppc_radix64_xlate(PowerPCCPU *cpu, vaddr eaddr, Don't do the double-underscore thing. It's technically a reserved namespace. Use e.g. ppc_radix_xlate_impl. Otherwise Reviewed-by: Richard Henderson r~

Re: [RFC PATCH 2/2] accel/tcg: replace phys_pc with asid in TB htable key

2021-12-23 Thread Richard Henderson
On 12/22/21 8:50 AM, Oleg Vasilev wrote: From: Oleg Vasilev Using a physical pc requires to translate address every time next block needs to be found and executed. This also contaminates TLB with code-related records. Instead, I suggest we introduce an architecture-specific address space ident

Re: [PATCH 5/5] net/tap: net_init_tap_one(): fix net-client leak on failure path

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
12.01.2021 07:53, Jason Wang wrote: On 2020/12/22 上午3:06, Vladimir Sementsov-Ogievskiy wrote: net_tap_fd_init() allocates new NetClientState through qemu_new_net_client(). We should free it on failure path. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Attention: it's an intuitive patch.

[PATCH] iotests/MRCE: Write data to source

2021-12-23 Thread Hanna Reitz
This test assumes that mirror flushes the source when entering the READY state, and that the format level will pass that flush on to the protocol level (where we intercept it with blkdebug). However, apparently that does not happen when using a VMDK image with zeroed_grain=on, which actually is th

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2021-12-23 Thread Hanna Reitz
On 20.12.21 13:20, Emanuele Giuseppe Esposito wrote: On 17/12/2021 17:38, Emanuele Giuseppe Esposito wrote: On 17/12/2021 12:04, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_invalidate_cache is special: it is an I/O function, I still don’t believe it is

Re: [PATCH v5 30/31] crypto: delegate permission functions to JobDriver .pre_run

2021-12-23 Thread Hanna Reitz
On 20.12.21 16:47, Emanuele Giuseppe Esposito wrote: On 17/12/2021 13:29, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: block_crypto_amend_options_generic_luks uses the block layer permission API, therefore it should be called with the BQL held. However, the same fu

Re: [PATCH v3 kvm/queue 04/16] KVM: Extend the memslot to support fd-based private memory

2021-12-23 Thread Sean Christopherson
On Thu, Dec 23, 2021, Chao Peng wrote: > Extend the memslot definition to provide fd-based private memory support > by adding two new fields(fd/ofs). The memslot then can maintain memory > for both shared and private pages in a single memslot. Shared pages are > provided in the existing way by usin

Re: [PATCH v3 2/2] linux-user: call set/getscheduler set/getparam directly

2021-12-23 Thread Laurent Vivier
Le 23/12/2021 à 07:47, Tonis Tiigi a écrit : There seems to be difference in syscall and libc definition of these methods and therefore musl does not implement them (1e21e78bf7). Call syscall directly to ensure the behavior of the libc of user application, not the libc that was used to build QEMU

Re: [PATCH] iotests/MRCE: Write data to source

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
23.12.2021 19:53, Hanna Reitz wrote: This test assumes that mirror flushes the source when entering the READY state, and that the format level will pass that flush on to the protocol level (where we intercept it with blkdebug). However, apparently that does not happen when using a VMDK image wit

Re: [PATCH] iotests/MRCE: Write data to source

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
23.12.2021 20:50, Vladimir Sementsov-Ogievskiy wrote: Hmm, relying on flush requests sequence doesn't seem reliable.. Maybe, it's better to insert blockdev-add filter after JOB_READY? blockdev-reopen should work now for "file" link changing. s/blockdev-add/blkdebug/ :) -- Best regards, Vladi

Re: [PATCH v3 kvm/queue 05/16] KVM: Maintain ofs_tree for fast memslot lookup by file offset

2021-12-23 Thread Sean Christopherson
On Thu, Dec 23, 2021, Chao Peng wrote: > Similar to hva_tree for hva range, maintain interval tree ofs_tree for > offset range of a fd-based memslot so the lookup by offset range can be > faster when memslot count is high. This won't work. The hva_tree relies on there being exactly one virtual ad

Re: [PATCH v3 kvm/queue 11/16] KVM: Add kvm_map_gfn_range

2021-12-23 Thread Sean Christopherson
On Thu, Dec 23, 2021, Chao Peng wrote: > This new function establishes the mapping in KVM page tables for a > given gfn range. It can be used in the memory fallocate callback for > memfd based memory to establish the mapping for KVM secondary MMU when > the pages are allocated in the memory backend

RE: [PATCH v7 12/13] target/hexagon: import additional tests

2021-12-23 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 12/13] target/hexagon: import additional t

Re: [PATCH v3 kvm/queue 13/16] KVM: Add KVM_EXIT_MEMORY_ERROR exit

2021-12-23 Thread Sean Christopherson
On Thu, Dec 23, 2021, Chao Peng wrote: > This new exit allows user space to handle memory-related errors. > Currently it supports two types (KVM_EXIT_MEM_MAP_SHARED/PRIVATE) of > errors which are used for shared memory <-> private memory conversion > in memory encryption usage. > > After private m

Re: [PATCH v3 kvm/queue 06/16] KVM: Implement fd-based memory using MEMFD_OPS interfaces

2021-12-23 Thread Sean Christopherson
On Thu, Dec 23, 2021, Chao Peng wrote: > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig > index 03b2ce34e7f4..86655cd660ca 100644 > --- a/arch/x86/kvm/Kconfig > +++ b/arch/x86/kvm/Kconfig > @@ -46,6 +46,7 @@ config KVM > select SRCU > select INTERVAL_TREE > select HAVE_K

[PATCH] check-block.sh: passthrough -jN flag of make to -j N flag of check

2021-12-23 Thread Vladimir Sementsov-Ogievskiy
This improves performance of running iotests during "make -jN check". Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/check-block.sh | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/check-block.sh b/tests/check-block.sh index f86cb863de..d98d49ad63 100755 -

Re: QEMU CAS

2021-12-23 Thread Richard Henderson
On 12/23/21 1:51 AM, Jasper Ruehl wrote: Dear QEMU Community, after chatting a bit in the IRC channel, "stefanha" advised me to contact you via EMail about my problem. My advisor and me from the DSE chair at the TU Munich had the idea to improve the emulation of the x86 cmpxchg instruction on

Re: [PULL v2 0/7] NBD patches

2021-12-23 Thread Richard Henderson
On 12/23/21 12:53 AM, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84: Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800) are available in the Git repository at: https

[PATCH v2 1/5] target/ppc: introduce power8-pmu-insn-cnt.c.inc

2021-12-23 Thread Daniel Henrique Barboza
We're going to add a significant amount of TCG ops code for instruction counting, eventually getting rid of the 'helper_insn_inc' helper entirely. Create a new file to avoid putting even more stuff on the already crowded target/ppc/translate.c. Signed-off-by: Daniel Henrique Barboza --- target/

[PATCH v2 3/5] target/ppc/power8-pmu-insn-cnt: add PMCs1-4 insn count

2021-12-23 Thread Daniel Henrique Barboza
Use inc_spr_if_cond() to count instructions of all other PMCs that are capable of counting instructions (all PMCs but PMC6). Signed-off-by: Daniel Henrique Barboza --- target/ppc/power8-pmu-insn-cnt.c.inc | 62 1 file changed, 62 insertions(+) diff --git a/target/pp

[PATCH v2 2/5] target/ppc/power8-pmu-insn-cnt: introduce inc_spr_if_cond()

2021-12-23 Thread Daniel Henrique Barboza
The code that increments a PMC is repetitive: check if a given register has a bit/mask set or cleared and increment the counter. inc_spr_if_cond() will help deal with this repetition. This patch also gives a sample of how the function works by incrementing PMC5, which is supposed to be incremented

[PATCH v2 4/5] target/ppc/power8-pmu-insn-cnt: add pmu_check_overflow()

2021-12-23 Thread Daniel Henrique Barboza
pmu_check_overflow() will verify for overflow in the PMC1-5 counters, firing a performance monitor alert if an overflow happened with the proper MMCR0 bits set. The alert is fired by using helper_pmu_overflow(). Signed-off-by: Daniel Henrique Barboza --- target/ppc/helper.h |

[PATCH v2 0/5] Re-write PPC64 PMU instruction count using TCG Ops

2021-12-23 Thread Daniel Henrique Barboza
Hi, In this version the tedious repetition was taken away from the code by using a helper that increments the PMCs based on specified conditions. As far as Avocado test goes, the performance is the same as the previous version. All PMU-EBB kernel selftests are also passing. Basically we have the

[PATCH v2 5/5] target/ppc/power8-pmu.c: remove helper_insns_inc()

2021-12-23 Thread Daniel Henrique Barboza
After moving all the instruction counting to TCG Ops code this helper is not needed anymore. Signed-off-by: Daniel Henrique Barboza --- target/ppc/helper.h | 1 - target/ppc/power8-pmu-insn-cnt.c.inc | 4 -- target/ppc/power8-pmu.c | 60 ---

Re: [PATCH 0/3] Reorg ppc64 pmu insn counting

2021-12-23 Thread Daniel Henrique Barboza
On 12/23/21 00:01, Richard Henderson wrote: In contrast to Daniel's version, the code stays in power8-pmu.c, but is better organized to not take so much overhead. Before: 32.97% qemu-system-ppc qemu-system-ppc64 [.] pmc_get_event 20.22% qemu-system-ppc qemu-system-ppc64 [.]

Re: [PATCH v3 2/2] linux-user: call set/getscheduler set/getparam directly

2021-12-23 Thread Laurent Vivier
Le 23/12/2021 à 07:47, Tonis Tiigi a écrit : There seems to be difference in syscall and libc definition of these methods and therefore musl does not implement them (1e21e78bf7). Call syscall directly to ensure the behavior of the libc of user application, not the libc that was used to build QEMU

Re: [PATCH] acpi: validate hotplug selector on access

2021-12-23 Thread Mauro Matteo Cascella
On Thu, Dec 23, 2021 at 2:43 PM Michael S. Tsirkin wrote: > > On Thu, Dec 23, 2021 at 10:58:14AM +0100, Mauro Matteo Cascella wrote: > > Hi, > > > > On Wed, Dec 22, 2021 at 9:52 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Dec 22, 2021 at 09:27:51PM +0100, Philippe Mathieu-Daudé wrote: > > >

Re: [PATCH v3 1/2] linux-user: add sched_getattr support

2021-12-23 Thread Laurent Vivier
Le 23/12/2021 à 07:47, Tonis Tiigi a écrit : Please copy here what you explain in PATCH 0 regarding this patch. (do the same for PATCH 1) Signed-off-by: Tonis Tiigi --- linux-user/syscall.c | 94 +++ linux-user/syscall_defs.h | 14 ++ 2 files ch

Re: [PATCH v2 2/5] target/ppc/power8-pmu-insn-cnt: introduce inc_spr_if_cond()

2021-12-23 Thread Richard Henderson
On 12/23/21 12:18 PM, Daniel Henrique Barboza wrote: The code that increments a PMC is repetitive: check if a given register has a bit/mask set or cleared and increment the counter. inc_spr_if_cond() will help deal with this repetition. This patch also gives a sample of how the function works by

Re: [PATCH 0/3] Reorg ppc64 pmu insn counting

2021-12-23 Thread Richard Henderson
On 12/23/21 12:36 PM, Daniel Henrique Barboza wrote: This reorg is breaking PMU-EBB tests, unfortunately. These tests are run from the kernel tree [1] and I test them inside a pSeries TCG guest. You'll need to apply patches 9 and 10 of [2] beforehand (they apply cleanly in current master) becau

Re: [PATCH 6/6] target/sh4: Implement prctl_unalign_sigbus

2021-12-23 Thread Laurent Vivier
Le 20/12/2021 à 22:41, Richard Henderson a écrit : Leave TARGET_ALIGNED_ONLY set, but use the new CPUState flag to set MO_UNALN for the instructions that the kernel handles in the unaligned trap. The Linux kernel does not handle all memory operations: no floating-point and no MAC. Signed-off-by

[PATCH 1/6] hw/usb: Add CanoKey Implementation

2021-12-23 Thread Hongren (Zenithal) Zheng
This commit added a new emulated device called CanoKey to QEMU. CanoKey implements platform independent features in canokey-core https://github.com/canokeys/canokey-core, and leaves the USB implementation to the platform. In this commit the USB part was implemented in QEMU using QEMU's USB APIs,

[PATCH 2/6] meson: Add CanoKey

2021-12-23 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/Kconfig| 5 + hw/usb/meson.build| 3 +++ meson.build | 6 ++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 5 files changed, 19 insertions(+) diff --git a/hw/usb

[PATCH 4/6] docs/system/devices/usb: Add CanoKey to USB devices examples

2021-12-23 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/system/devices/usb.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/system/devices/usb.rst b/docs/system/devices/usb.rst index afb7d6c226..341694403a 100644 --- a/docs/system/devices/usb.rst +++ b/docs/system/devices/usb.rst @@ -199,

[PATCH 3/6] docs: Add CanoKey documentation

2021-12-23 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/canokey.txt | 133 +++ 1 file changed, 133 insertions(+) create mode 100644 docs/canokey.txt diff --git a/docs/canokey.txt b/docs/canokey.txt new file mode 100644 index 00..69262194c4 --- /dev/n

[PATCH 0/6] Introduce CanoKey QEMU

2021-12-23 Thread Hongren (Zenithal) Zheng
- One sentense With this patch series, QEMU would fully emulate an open-source secure key, CanoKey, with supports of various features listed below: * U2F / FIDO2 with Ed25519 and HMAC-secret * OpenPGP Card V3.4 with RSA4096, Ed25519 and more * PIV (NIST SP 800-73-4) * HOTP / TOTP - What's Ne

[PATCH 5/6] docs/qdev-device-use: Add CanoKey to QDEV devices examples

2021-12-23 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/qdev-device-use.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt index 2408889334..278fb66c0a 100644 --- a/docs/qdev-device-use.txt +++ b/docs/qdev-device-use.txt @@ -342,6 +342,7 @@ The ne

[PATCH 6/6] MAINTAINERS: add myself as CanoKey maintainer

2021-12-23 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5456536805..522b0e5687 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2295,6 +2295,14 @@ F: hw/timer/mips_gictimer.c F: include/hw/intc/mips_gic.h

Re: [PATCH 1/8] target/ppc: Print out literal exception names in logs

2021-12-23 Thread Richard Henderson
On 12/21/21 10:40 PM, Cédric Le Goater wrote: +static inline const char *powerpc_excp_name(int excp) Drop the inline. It's not performance critical; let the compiler decide. Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH 6/6] target/sh4: Implement prctl_unalign_sigbus

2021-12-23 Thread Richard Henderson
On 12/23/21 1:22 PM, Laurent Vivier wrote: +#define UNALIGN(C)   (ctx->tbflags & TB_FLAG_UNALIGN ? MO_UNALN : 0) Why isn't it like the other targets: "ctx->tb_flags & TB_FLAG_UNALIGN ? MO_UNALN : MO_ALIGN)"? It should be; not using 0 was a late revision and I missed this one. r~

Re: [PATCH 3/8] ppc/ppc405: Activate MMU logs

2021-12-23 Thread Richard Henderson
On 12/21/21 10:40 PM, Cédric Le Goater wrote: There is no need to deactivate MMU logging at compile time. Signed-off-by: Cédric Le Goater --- target/ppc/mmu_common.c | 4 ++-- target/ppc/mmu_helper.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) There's also no need to use #defi

Re: [PATCH 4/8] ppc/ppc405: Restore TCR and STR write handlers

2021-12-23 Thread Richard Henderson
On 12/21/21 10:40 PM, Cédric Le Goater wrote: The 405 timers were broken when booke support was added. Assumption was made that the register numbers were the same but it's not : SPR_BOOKE_TSR (0x150) SPR_BOOKE_TCR (0x154) SPR_40x_TSR (0x3D8) SPR_40x_

Re: [PATCH 5/8] ppc/ppc405: Rework ppc_40x_timers_init() to use a PowerPCCPU

2021-12-23 Thread Richard Henderson
On 12/21/21 10:40 PM, Cédric Le Goater wrote: This is a small cleanup to ease reading. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc.c | 42 +++--- 1 file changed, 19 insertions(+), 23 deletions(-) You should mention dropping the comparison vs null as im

Re: [PATCH 6/8] ppc/ppc405: Fix timer initialization

2021-12-23 Thread Richard Henderson
On 12/21/21 10:40 PM, Cédric Le Goater wrote: Timers are already initialized in ppc4xx_init(). No need to do it a second time with a wrong set. Fixes: d715ea961254 ("PPC: 405: Fix ppc405ep initialization") Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_uc.c | 2 -- 1 file changed, 2 deleti

Re: [PATCH 7/8] ppc/ppc405: Introduce a store helper for SPR_40x_PID

2021-12-23 Thread Richard Henderson
On 12/21/21 10:40 PM, Cédric Le Goater wrote: The PID SPR of the 405 CPU contains the translation ID of the TLB which is a 8-bit field. Enforce the mask with a store helper. Cc: Christophe Leroy Signed-off-by: Cédric Le Goater --- target/ppc/spr_tcg.h | 1 + target/ppc/cpu_init.c | 2 +-

Re: [PATCH 8/8] ppc/ppc405: Dump specific registers

2021-12-23 Thread Richard Henderson
On 12/21/21 10:40 PM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- target/ppc/cpu_init.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 9ef9a1a5ddd5..8f6a58e82483 100644 --- a/target/ppc/cpu_init.c +++ b/targ

[ANNOUNCE] QEMU 6.1.1 Stable released

2021-12-23 Thread Michael Roth
Hi everyone, I am pleased to announce that the QEMU v6.1.1 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source v6.1.1 is now tagged in the official qemu.git repository, and the stable-6.1 branch has been updated accordin

Re: [PATCH 0/3] Reorg ppc64 pmu insn counting

2021-12-23 Thread Daniel Henrique Barboza
On 12/23/21 18:19, Richard Henderson wrote: On 12/23/21 12:36 PM, Daniel Henrique Barboza wrote: This reorg is breaking PMU-EBB tests, unfortunately. These tests are run from the kernel tree [1] and I test them inside a pSeries TCG guest. You'll need to apply patches 9 and 10 of [2] beforeh

Re: [PATCH v3 1/2] linux-user: add sched_getattr support

2021-12-23 Thread Tõnis Tiigi
On Thu, Dec 23, 2021 at 1:03 PM Laurent Vivier wrote: > > Le 23/12/2021 à 07:47, Tonis Tiigi a écrit : > > Please copy here what you explain in PATCH 0 regarding this patch. > (do the same for PATCH 1) > > > Signed-off-by: Tonis Tiigi > > --- > > linux-user/syscall.c | 94 +

Re: [PATCH v3 kvm/queue 06/16] KVM: Implement fd-based memory using MEMFD_OPS interfaces

2021-12-23 Thread Paolo Bonzini
On 12/23/21 19:34, Sean Christopherson wrote: select HAVE_KVM_PM_NOTIFIER if PM + select MEMFD_OPS MEMFD_OPS is a weird Kconfig name given that it's not just memfd() that can implement the ops. Or, it's kvm that implements them to talk to memfd? Paolo

Re: [PULL 0/1] "make check" switch to meson test harness

2021-12-23 Thread Richard Henderson
On 12/23/21 2:17 AM, Paolo Bonzini wrote: The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84: Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800) are available in the Git repository at: https://gitlab.com/bo

Re: [PULL 03/15] user: move common-user includes to a subdirectory of {bsd,linux}-user/

2021-12-23 Thread Richard Henderson
On 12/23/21 3:51 AM, Paolo Bonzini wrote: Avoid polluting the compilation of common-user/ with local include files; making an include file available to common-user/ should be a deliberate decision in order to keep a clear interface that can be used by both bsd-user/ and linux-user/. Reviewed-by:

Re: [RFC v2 02/12] target/ppc: powerpc_excp: Set vector earlier

2021-12-23 Thread Richard Henderson
On 12/20/21 10:18 AM, Fabiano Rosas wrote: None of the interrupt setup code touches 'vector', so we can move it earlier in the function. This will allow us to later move the System Call Vectored setup that is on the top level into the POWERPC_EXCP_SYSCALL_VECTORED code block. This patch also mov

Re: [RFC v2 04/12] target/ppc: powerpc_excp: Stop passing excp_model around

2021-12-23 Thread Richard Henderson
On 12/20/21 10:18 AM, Fabiano Rosas wrote: We can just access it directly in powerpc_excp. Signed-off-by: Fabiano Rosas --- target/ppc/excp_helper.c | 43 1 file changed, 21 insertions(+), 22 deletions(-) Reviewed-by: Richard Henderson r~

Re: [RFC v2 03/12] target/ppc: powerpc_excp: Move system call vectored code together

2021-12-23 Thread Richard Henderson
On 12/20/21 10:18 AM, Fabiano Rosas wrote: Now that 'vector' is known before calling the interrupt-specific setup code, we can move all of the scv setup into one place. No functional change intended. Signed-off-by: Fabiano Rosas --- target/ppc/excp_helper.c | 13 + 1 file changed

Re: [RFC v2 01/12] target/ppc: powerpc_excp: Set alternate SRRs directly

2021-12-23 Thread David Gibson
On Mon, Dec 20, 2021 at 03:18:52PM -0300, Fabiano Rosas wrote: > There are currently only two interrupts that use alternate SRRs, so > let them write to them directly during the setup code. > > No functional change intented. > > Signed-off-by: Fabiano Rosas Reviewed-by: David Gibson > --- >

[PULL 0/1] target/hppa: Fix deposit assert from trans_shrpw_imm

2021-12-23 Thread Richard Henderson
The following changes since commit f18155a207dbc6a23f06a4af667280743819c31e: Merge tag 'for-upstream-mtest' of https://gitlab.com/bonzini/qemu into staging (2021-12-23 11:35:48 -0800) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-pa-2021122

[PULL 1/1] target/hppa: Fix deposit assert from trans_shrpw_imm

2021-12-23 Thread Richard Henderson
Because sa may be 0, tcg_gen_deposit_reg(dest, t0, cpu_gr[a->r1], 32 - sa, sa); may attempt a zero-width deposit at bit 32, which will assert for TARGET_REGISTER_BITS == 32. Use the newer extract2 when possible, which itself includes the rotri special case; otherwise mirror the code from tra

[PATCH] net/filter: Optimize filter_send to coroutine

2021-12-23 Thread Rao, Lei
This patch is to improve the logic of QEMU main thread sleep code in qemu_chr_write_buffer() where it can be blocked and can't run other coroutines during COLO IO stress test. Our approach is to put filter_send() in a coroutine. In this way, filter_send() will call qemu_coroutine_yield() in qemu_c

[PATCH 1/6] target/riscv: add cfg properties for zfinx, zdinx and zhinx{min}

2021-12-23 Thread liweiwei
Co-authored-by: ardxwe Signed-off-by: liweiwei Signed-off-by: wangjunqiang --- roms/SLOF| 2 +- target/riscv/cpu.c | 12 target/riscv/cpu.h | 4 target/riscv/translate.c | 8 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a

[PATCH 5/6] target/riscv: add support for zhinx/zhinxmin

2021-12-23 Thread liweiwei
- update extension check REQUIRE_ZHINX_OR_ZFH and REQUIRE_ZFH_OR_ZFHMIN_OR_ZHINX_OR_ZHINXMIN - update half float point register read/write - disable nanbox_h check Signed-off-by: liweiwei Signed-off-by: wangjunqiang --- target/riscv/fpu_helper.c | 60 ++-- target/riscv/h

[PATCH 6/6] target/riscv: expose zfinx, zdinx, zhinx{min} properties

2021-12-23 Thread liweiwei
Co-authored-by: ardxwe Signed-off-by: liweiwei Signed-off-by: wangjunqiang --- target/riscv/cpu.c | 4 1 file changed, 4 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index a5fa14f2ac..dbd15693be 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -657,6 +657,

[PATCH 2/6] target/riscv: add support for unique fpr read/write with support for zfinx

2021-12-23 Thread liweiwei
Co-authored-by: ardxwe Signed-off-by: liweiwei Signed-off-by: wangjunqiang --- target/riscv/translate.c | 169 +++ 1 file changed, 169 insertions(+) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 8b1cdacf50..bac42e60bd 100644 --- a/ta

Re: [PATCH v3 kvm/queue 03/16] mm/memfd: Introduce MEMFD_OPS

2021-12-23 Thread Robert Hoo
On Thu, 2021-12-23 at 20:29 +0800, Chao Peng wrote: > From: "Kirill A. Shutemov" > > The patch introduces new MEMFD_OPS facility around file created by > memfd_create() to allow a third kernel component to make use of > memory > bookmarked in a memfd and gets notifier when the memory in the file

[PATCH 0/6] support subsets of Float-Point in Integer Registers extensions

2021-12-23 Thread liweiwei
This patchset implements RISC-V Float-Point in Integer Registers extensions(Version 1.0.0-rc), which includes Zfinx, Zdinx, Zhinx and Zhinxmin extension. Specification: https://github.com/riscv/riscv-zfinx/blob/main/zfinx-1.0.0-rc.pdf The port is available here: https://github.com/plctlab/plct

[PATCH 3/6] target/riscv: add support for zfinx

2021-12-23 Thread liweiwei
- update extension check REQUIRE_ZFINX_OR_F - update single float point register read/write - disable nanbox_s check Co-authored-by: ardxwe Signed-off-by: liweiwei Signed-off-by: wangjunqiang --- target/riscv/fpu_helper.c | 60 ++--- target/riscv/helper.h

[PATCH 4/6] target/riscv: add support for zdinx

2021-12-23 Thread liweiwei
-- update extension check REQUIRE_ZDINX_OR_D -- update double float point register read/write Co-authored-by: ardxwe Signed-off-by: liweiwei Signed-off-by: wangjunqiang --- target/riscv/insn_trans/trans_rvd.c.inc | 252 1 file changed, 174 insertions(+), 78 deletio

[PATCH 2/2] test/tcg/ppc64le: Add float reference files

2021-12-23 Thread Richard Henderson
Generated on Power9, PowerNV 9006-22P. Signed-off-by: Richard Henderson --- tests/tcg/ppc64le/float_convs.ref | 748 + tests/tcg/ppc64le/float_madds.ref | 768 ++ 2 files changed, 1516 insertions(+) create mode 100644 tests/tcg/ppc64le/flo

Re: [PULL 0/1] target/hppa: Fix deposit assert from trans_shrpw_imm

2021-12-23 Thread Richard Henderson
https://gitlab.com/rth7680/qemu.git tags/pull-pa-20211223 for you to fetch changes up to 05bfd4db08608bc4c22de729780c1f74612fbc0e: target/hppa: Fix deposit assert from trans_shrpw_imm (2021-12-23 17:47:01 -0800) Fix target

Re: [PATCH v3 kvm/queue 05/16] KVM: Maintain ofs_tree for fast memslot lookup by file offset

2021-12-23 Thread Chao Peng
On Thu, Dec 23, 2021 at 06:02:33PM +, Sean Christopherson wrote: > On Thu, Dec 23, 2021, Chao Peng wrote: > > Similar to hva_tree for hva range, maintain interval tree ofs_tree for > > offset range of a fd-based memslot so the lookup by offset range can be > > faster when memslot count is high.

<    1   2   3   >