Re: [PATCH] target/i386/tcg: Fix masking of real-mode addresses with A20 bit

2022-05-26 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] virtio/vhost-user: Fix wrong vhost notifier GPtrArray size

2022-05-26 Thread Alex Bennée
Yajun Wu writes: > In fetch_or_create_notifier, idx begins with 0. So the GPtrArray size > should be idx + 1 and g_ptr_array_set_size should be called with idx + 1. > > This wrong GPtrArray size causes fetch_or_create_notifier return an invalid > address. Passing this invalid pointer to vhost_u

Re: [PATCH v4 2/3] target/riscv: Add stimecmp support

2022-05-26 Thread Atish Patra
On Wed, May 25, 2022 at 10:11 PM Alistair Francis wrote: > > On Sat, May 14, 2022 at 4:39 AM Atish Patra wrote: > > > > stimecmp allows the supervisor mode to update stimecmp CSR directly > > to program the next timer interrupt. This CSR is part of the Sstc > > extension which was ratified recent

[PATCH] ui/console: allow display device to be labeled with given id

2022-05-26 Thread Wen, Jianxian
The update makes it easier to find and specify devices. They can only be found by device type name without the id field, for example, devices of the same type have the same label. The update also adds a head field, which is useful for devices that support multiple heads, such as virtio-gpu. Signed

Re: [RFC PATCH v4 22/36] i386/tdx: Track RAM entries for TDX VM

2022-05-26 Thread Xiaoyao Li
On 5/24/2022 3:37 PM, Gerd Hoffmann wrote: +static int tdx_accept_ram_range(uint64_t address, uint64_t length) +{ +TdxRamEntry *e; +int i; + +for (i = 0; i < tdx_guest->nr_ram_entries; i++) { +e = &tdx_guest->ram_entries[i]; + +if (address + length < e->address || +

Re: [PATCH v9 09/12] target/riscv: Simplify counter predicate function

2022-05-26 Thread Atish Patra
On Wed, May 25, 2022 at 3:24 AM Frank Chang wrote: > > On Tue, May 24, 2022 at 8:02 AM Atish Patra wrote: >> >> All the hpmcounters and the fixed counters (CY, IR, TM) can be represented >> as a unified counter. Thus, the predicate function doesn't need handle each >> case separately. >> >> Simpl

Re: [PATCH v9 08/12] target/riscv: Add sscofpmf extension support

2022-05-26 Thread Atish Patra
On Wed, May 25, 2022 at 3:22 AM Frank Chang wrote: > > On Tue, May 24, 2022 at 7:57 AM Atish Patra wrote: >> >> The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions, >> and 'cofpmf' for Count OverFlow and Privilege Mode Filtering) >> extension allows the perf to handle overflow

Re: [PATCH] iotests: fix source directory location

2022-05-26 Thread Daniel P . Berrangé
On Wed, May 25, 2022 at 08:25:12PM -0400, John Snow wrote: > If you invoke the check script from outside of the tests/qemu-iotests > directory, the directories initialized as source_iotests and > build_iotests will be incorrect. > > We can use the location of the source file itself to be more accu

Re: [PATCH v2 15/15] tests/qtest: enable tests for virtio-gpio

2022-05-26 Thread Stefan Hajnoczi
On Wed, May 25, 2022 at 11:35:53PM +0100, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > [[PGP Signed Part:Undecided]] > > On Tue, May 24, 2022 at 04:40:56PM +0100, Alex Bennée wrote: > >> We don't have a virtio-gpio implementation in QEMU and only > >> support a vhost-user backend. The QE

AArch64 semihosting?

2022-05-26 Thread Liviu Ionescu
I'm trying to set-up an environment for running unit-tests on AArch64, and I'm constantly getting crashes: ``` ilg@wksi ~ % /Users/ilg/Library/xPacks/@xpack-dev-tools/qemu-arm/6.2.0-1.1/.content/bin/qemu-system-aarch64 "--machine" "virt" "--cpu" "cortex-a57" "--kernel" "/Users/ilg/My Files/WKS

Re: AArch64 semihosting?

2022-05-26 Thread Peter Maydell
On Thu, 26 May 2022 at 09:14, Liviu Ionescu wrote: > > I'm trying to set-up an environment for running unit-tests on AArch64, and > I'm constantly getting crashes: > > ``` > ilg@wksi ~ % > /Users/ilg/Library/xPacks/@xpack-dev-tools/qemu-arm/6.2.0-1.1/.content/bin/qemu-system-aarch64 > "--machi

Re: AArch64 semihosting?

2022-05-26 Thread Liviu Ionescu
> On 26 May 2022, at 11:20, Peter Maydell wrote: > > ... can you provide us with > a reproduce case (eg the binary you used here)? Sure. I'll try to attach it to this message, it is only 64K. The command I used to run the test is in the previous message. Please confirm that you get the same

Re: [PATCH v3 01/10] block: Add a 'flags' param to bdrv_{pread,pwrite,pwrite_sync}()

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:31PM +0100, Alberto Faria wrote: > For consistency with other I/O functions, and in preparation to > implement them using generated_co_wrapper. > > Callers were updated using this Coccinelle script: > > @@ expression child, offset, buf, bytes; @@ > - bdrv_pre

Re: [PATCH v3 02/10] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:32PM +0100, Alberto Faria wrote: > Swap 'buf' and 'bytes' around for consistency with > bdrv_co_{pread,pwrite}(), and in preparation to implement these > functions using generated_co_wrapper. > > Callers were updated using this Coccinelle script: > > @@ expressio

Re: [PATCH v5 40/43] hw/loongarch: Add LoongArch ls7a acpi device support

2022-05-26 Thread Igor Mammedov
On Tue, 24 May 2022 16:18:01 +0800 Xiaojuan Yang wrote: commit message needs pointers to specification, + in patch comments that point to specific chapters within the spec for newly introduced registers > From: Song Gao > > Signed-off-by: Xiaojuan Yang > Signed-off-by: Song Gao > --- > MA

[PATCH v3 2/9] replay: notify vCPU when BH is scheduled

2022-05-26 Thread Pavel Dovgalyuk
vCPU execution should be suspended when new BH is scheduled. This is needed to avoid guest timeouts caused by the long cycles of the execution. In replay mode execution may hang when vCPU sleeps and block event comes to the queue. This patch adds notification which wakes up vCPU or interrupts execu

[PATCH v3 4/9] replay: simplify async event processing

2022-05-26 Thread Pavel Dovgalyuk
This patch joins replay event id and async event id into single byte in the log. It makes processing a bit faster and log a bit smaller. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson -- v2: minor enum fixes (suggested by Richard Henderson) --- replay/replay-events.c | 36 +

[PATCH v3 7/9] tests/avocado: update replay_linux test

2022-05-26 Thread Pavel Dovgalyuk
This patch updates replay_linux test to make it compatible with new LinuxTest class. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_li

[PATCH v3 0/9] Record/replay refactoring and stuff

2022-05-26 Thread Pavel Dovgalyuk
The following series includes the following record/replay-related changes: - simplified async event processing - updated record/replay documentation, which was also converted to rst - avocado tests for record/replay of Linux for x86_64 and Aarch64 - some bugfixes v3 changes: - rebased to master

[PATCH v3 5/9] docs: convert docs/devel/replay page to rst

2022-05-26 Thread Pavel Dovgalyuk
This patch converts prior .txt replay devel documentation to .rst. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- docs/devel/index-tcg.rst |1 + docs/devel/replay.rst| 54 ++ docs/devel/replay.txt| 46 ---

[PATCH] target/riscv: fix priv enum

2022-05-26 Thread Nikita Shubin
From: Nikita Shubin Add PRIV_VERSION_UNKNOWN to enum, otherwise PRIV_VERSION_1_10_0 will be overwritten to PRIV_VERSION_1_12_0 in riscv_cpu_realize. Fixes: a46d410c5c ("target/riscv: Define simpler privileged spec version numbering") Signed-off-by: Nikita Shubin --- target/riscv/cpu.h | 3 ++-

[PATCH v3 9/9] tests/avocado: add replay Linux test for Aarch64 machines

2022-05-26 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on Aarch64 platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_l

[PATCH v3 6/9] docs: move replay docs to docs/system/replay.rst

2022-05-26 Thread Pavel Dovgalyuk
This patch adds replay description page, converting prior text from docs/replay.txt. The text was also updated and some sections were moved to devel part of the docs. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- docs/devel/replay.rst | 264 ++- do

[PATCH v3 8/9] tests/avocado: add replay Linux tests for virtio machine

2022-05-26 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on x86_64 virtio platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py i

[PATCH v3 1/9] replay: fix event queue flush for qemu shutdown

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

[PATCH v3 3/9] replay: rewrite async event handling

2022-05-26 Thread Pavel Dovgalyuk
This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- accel/tcg/tcg-accel-ops-icount.c |5 +-- docs/replay.txt |

Re: [PATCH v3 04/10] crypto: Make block callbacks return 0 on success

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:34PM +0100, Alberto Faria wrote: > They currently return the value of their headerlen/buflen parameter on > success. Returning 0 instead makes it clear that short reads/writes are > not possible. > > Signed-off-by: Alberto Faria > Reviewed-by: Eric Blake > --- > bl

Re: [PATCH v3 05/10] block: Make bdrv_co_pwrite() take a const buffer

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:35PM +0100, Alberto Faria wrote: > It does not mutate the buffer. > > Signed-off-by: Alberto Faria > Reviewed-by: Paolo Bonzini > --- > include/block/block_int-io.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.a

Re: [PATCH v3 03/10] block: Make bdrv_{pread,pwrite}() return 0 on success

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:33PM +0100, Alberto Faria wrote: > diff --git a/block/qcow2.c b/block/qcow2.c > index 5493e6b847..d5a1e8bc43 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -113,7 +113,7 @@ static ssize_t qcow2_crypto_hdr_read_func(QCryptoBlock > *block, size_t offset, >

Re: [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}() an int64_t

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:36PM +0100, Alberto Faria wrote: > For consistency with other I/O functions, and in preparation to > implement bdrv_{pread,pwrite}() using generated_co_wrapper. > > unsigned int fits in int64_t, so all callers remain correct. > > Signed-off-by: Alberto Faria > --- >

Re: [PATCH v3 03/10] block: Make bdrv_{pread,pwrite}() return 0 on success

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:33PM +0100, Alberto Faria wrote: > They currently return the value of their 'bytes' parameter on success. > > Make them return 0 instead, for consistency with other I/O functions and > in preparation to implement them using generated_co_wrapper. This also > makes it c

Re: [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using generated_co_wrapper

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:37PM +0100, Alberto Faria wrote: > bdrv_pwrite_zeroes() now also calls trace_bdrv_co_pwrite_zeroes() and > clears the BDRV_REQ_MAY_UNMAP flag when appropriate, which it didn't > previously. The bdrv_pread()/bdrv_pwrite() errno for negative bytes changes from EINVAL to

Re: AArch64 semihosting?

2022-05-26 Thread Liviu Ionescu
> On 26 May 2022, at 11:20, Peter Maydell wrote: > > QEMU also shares code for those two architectures' semihosting > implementation. Then it seems to be a difference between Arm 64-bit and Arm 32-bit (which is fine). After fixing the AArch64 tests I'll get to RISC-V, which should run the s

Re: [PATCH v3 08/10] block: Add bdrv_co_pwrite_sync()

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:38PM +0100, Alberto Faria wrote: > Also convert bdrv_pwrite_sync() to being implemented using > generated_co_wrapper. > > Signed-off-by: Alberto Faria > Reviewed-by: Eric Blake > --- > block/io.c | 9 + > include/block/block-io.h | 8 ++--

Re: [PATCH v3 03/10] block: Make bdrv_{pread,pwrite}() return 0 on success

2022-05-26 Thread Daniel P . Berrangé
On Thu, May 26, 2022 at 09:49:03AM +0100, Stefan Hajnoczi wrote: > On Thu, May 19, 2022 at 03:48:33PM +0100, Alberto Faria wrote: > > diff --git a/block/qcow2.c b/block/qcow2.c > > index 5493e6b847..d5a1e8bc43 100644 > > --- a/block/qcow2.c > > +++ b/block/qcow2.c > > @@ -113,7 +113,7 @@ static ssi

Re: [PATCH v3 10/10] block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty()

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:40PM +0100, Alberto Faria wrote: > Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush() > separately. > > Signed-off-by: Alberto Faria > Reviewed-by: Eric Blake > --- > block/qcow2.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(

Re: [PATCH v3 09/10] block: Use bdrv_co_pwrite_sync() when caller is coroutine_fn

2022-05-26 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 03:48:39PM +0100, Alberto Faria wrote: > Convert uses of bdrv_pwrite_sync() into bdrv_co_pwrite_sync() when the > callers are already coroutine_fn. > > Signed-off-by: Alberto Faria > Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > block/parallels.c | 2 +- > block

Re: [PATCH v3 2/9] replay: notify vCPU when BH is scheduled

2022-05-26 Thread Paolo Bonzini
On 5/26/22 10:45, Pavel Dovgalyuk wrote: vCPU execution should be suspended when new BH is scheduled. This is needed to avoid guest timeouts caused by the long cycles of the execution. In replay mode execution may hang when vCPU sleeps and block event comes to the queue. This patch adds notificat

Re: [PATCH v3 4/9] replay: simplify async event processing

2022-05-26 Thread Paolo Bonzini
On 5/26/22 10:45, Pavel Dovgalyuk wrote: + +typedef enum ReplayAsyncEventKind { +REPLAY_ASYNC_EVENT_BH, +REPLAY_ASYNC_EVENT_BH_ONESHOT, +REPLAY_ASYNC_EVENT_INPUT, +REPLAY_ASYNC_EVENT_INPUT_SYNC, +REPLAY_ASYNC_EVENT_CHAR_READ, +REPLAY_ASYNC_EVENT_BLOCK, +REPLAY_ASYNC_EV

Re: [PATCH v3 0/9] Record/replay refactoring and stuff

2022-05-26 Thread Paolo Bonzini
On 5/26/22 10:45, Pavel Dovgalyuk wrote: The following series includes the following record/replay-related changes: - simplified async event processing - updated record/replay documentation, which was also converted to rst - avocado tests for record/replay of Linux for x86_64 and Aarch64 - some b

Re: [PATCH v3 2/9] replay: notify vCPU when BH is scheduled

2022-05-26 Thread Pavel Dovgalyuk
On 26.05.2022 12:37, Paolo Bonzini wrote: On 5/26/22 10:45, Pavel Dovgalyuk wrote: vCPU execution should be suspended when new BH is scheduled. This is needed to avoid guest timeouts caused by the long cycles of the execution. In replay mode execution may hang when vCPU sleeps and block event co

Re: [PATCH v3 4/9] replay: simplify async event processing

2022-05-26 Thread Pavel Dovgalyuk
On 26.05.2022 12:40, Paolo Bonzini wrote: On 5/26/22 10:45, Pavel Dovgalyuk wrote: + +typedef enum ReplayAsyncEventKind { +    REPLAY_ASYNC_EVENT_BH, +    REPLAY_ASYNC_EVENT_BH_ONESHOT, +    REPLAY_ASYNC_EVENT_INPUT, +    REPLAY_ASYNC_EVENT_INPUT_SYNC, +    REPLAY_ASYNC_EVENT_CHAR_READ, +    REP

Re: [PATCH 00/16] Cross compilation of embedded firmware

2022-05-26 Thread Paolo Bonzini
On 5/25/22 15:16, Paolo Bonzini wrote: On 5/24/22 17:53, Alex Bennée wrote: Paolo Bonzini writes: I actually expect the compiler tests to move back to tests/tcg, running at Make time after the docker images are built.  For now, the file is moved as a whole, including both compiler detection an

Re: AArch64 semihosting?

2022-05-26 Thread Peter Maydell
On Thu, 26 May 2022 at 09:32, Liviu Ionescu wrote: > > On 26 May 2022, at 11:20, Peter Maydell wrote: > > > > ... can you provide us with > > a reproduce case (eg the binary you used here)? > > Sure. I'll try to attach it to this message, it is only 64K. > > The command I used to run the test is

[PATCH v3 1/4] target/riscv: Don't force update priv spec version to latest

2022-05-26 Thread Anup Patel
The riscv_cpu_realize() sets priv spec verion to v1.12 when it is when "env->priv_ver == 0" (i.e. default v1.10) because the enum value of priv spec v1.10 is zero. Due to above issue, the sifive_u machine will see priv spec v1.12 instead of priv spec v1.10. To fix this issue, we set latest priv s

[PATCH v3 0/4] QEMU RISC-V nested virtualization fixes

2022-05-26 Thread Anup Patel
This series does fixes and improvements to have nested virtualization on QEMU RISC-V. These patches can also be found in riscv_nested_fixes_v3 branch at: https://github.com/avpatel/qemu.git The RISC-V nested virtualization was tested on QEMU RISC-V using Xvisor RISC-V which has required hyperviso

[PATCH v3 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-05-26 Thread Anup Patel
We should disable extensions in riscv_cpu_realize() if minimum required priv spec version is not satisfied. This also ensures that machines with priv spec v1.11 (or lower) cannot enable H, V, and various multi-letter extensions. Fixes: a775398be2e ("target/riscv: Add isa extenstion strings to the

[PATCH v3 3/4] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-05-26 Thread Anup Patel
We should write transformed instruction encoding of the trapped instruction in [m|h]tinst CSR at time of taking trap as defined by the RISC-V privileged specification v1.12. Signed-off-by: Anup Patel --- target/riscv/cpu_helper.c | 210 +- target/riscv/instmap

[PATCH v3 2/4] target/riscv: Add dummy mcountinhibit CSR for priv spec v1.11 or higher

2022-05-26 Thread Anup Patel
The mcountinhibit CSR is mandatory for priv spec v1.11 or higher. For implementation that don't want to implement can simply have a dummy mcountinhibit which always zero. Fixes: a4b2fa433125 ("target/riscv: Introduce privilege version field in the CSR ops.") Signed-off-by: Anup Patel Reviewed-by:

Re: [PATCH] target/riscv: fix priv enum

2022-05-26 Thread Anup Patel
On Thu, May 26, 2022 at 2:15 PM Nikita Shubin wrote: > > From: Nikita Shubin > > Add PRIV_VERSION_UNKNOWN to enum, otherwise PRIV_VERSION_1_10_0 will > be overwritten to PRIV_VERSION_1_12_0 in riscv_cpu_realize. > > Fixes: a46d410c5c ("target/riscv: Define simpler privileged spec version > numbe

Re: AArch64 semihosting?

2022-05-26 Thread Peter Maydell
On Thu, 26 May 2022 at 11:01, Peter Maydell wrote: > > On Thu, 26 May 2022 at 09:32, Liviu Ionescu wrote: > > > On 26 May 2022, at 11:20, Peter Maydell wrote: > > > > > > ... can you provide us with > > > a reproduce case (eg the binary you used here)? > > > > Sure. I'll try to attach it to this

[PULL 1/7] qapi: crypto-akcipher: Introduce akcipher types to qapi

2022-05-26 Thread Daniel P . Berrangé
From: Lei He Introduce akcipher types, also include RSA related types. Signed-off-by: Lei He Signed-off-by: zhenwei pi Signed-off-by: Daniel P. Berrangé --- qapi/crypto.json | 64 1 file changed, 64 insertions(+) diff --git a/qapi/crypto.json

[PULL 0/7] crypto asymmetric cipher patches

2022-05-26 Thread Daniel P . Berrangé
The following changes since commit 58b53669e87fed0d70903e05cd42079fbbdbc195: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-05-25 13:46:29 -0700) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/ak-pull-request for you to fetch c

[PULL 3/7] crypto: add ASN.1 DER decoder

2022-05-26 Thread Daniel P . Berrangé
From: Lei He Add an ANS.1 DER decoder which is used to parse asymmetric cipher keys Signed-off-by: zhenwei pi Signed-off-by: lei he Signed-off-by: Daniel P. Berrangé --- crypto/der.c | 189 +++ crypto/der.h | 81 ++ crypto/meson.bu

[PULL 7/7] tests/crypto: Add test suite for RSA keys

2022-05-26 Thread Daniel P . Berrangé
From: Lei He As Daniel suggested, Add tests suite for rsakey, as a way to prove that we can handle DER errors correctly. Signed-off-by: lei he Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-akcipher.c | 285 +- 1 file changed, 282 insertions(+), 3 del

[PULL 5/7] crypto: Implement RSA algorithm by gcrypt

2022-05-26 Thread Daniel P . Berrangé
From: Lei He Added gcryt implementation of RSA algorithm, RSA algorithm implemented by gcrypt has a higher priority than nettle because it supports raw padding. Signed-off-by: lei he Signed-off-by: Daniel P. Berrangé --- crypto/akcipher-gcrypt.c.inc | 595 +++

[PULL 2/7] crypto: Introduce akcipher crypto class

2022-05-26 Thread Daniel P . Berrangé
From: zhenwei pi Introduce new akcipher crypto class 'QCryptoAkCIpher', which supports basic asymmetric operations: encrypt, decrypt, sign and verify. Suggested by Daniel P. Berrangé, also add autoptr cleanup for the new class. Thanks to Daniel! Co-developed-by: lei he Signed-off-by: lei he S

[PULL 6/7] test/crypto: Add test suite for crypto akcipher

2022-05-26 Thread Daniel P . Berrangé
From: Lei He Add unit test and benchmark test for crypto akcipher. Signed-off-by: lei he Signed-off-by: zhenwei pi Signed-off-by: Daniel P. Berrangé --- crypto/akcipher-nettle.c.inc| 14 +- tests/bench/benchmark-crypto-akcipher.c | 137 + tests/bench/meson.build

Re: [PATCH] target/riscv: fix priv enum

2022-05-26 Thread Nikita Shubin
Hi Anup! On Thu, 26 May 2022 15:37:54 +0530 Anup Patel wrote: > On Thu, May 26, 2022 at 2:15 PM Nikita Shubin > wrote: > > > > From: Nikita Shubin > > > > Add PRIV_VERSION_UNKNOWN to enum, otherwise PRIV_VERSION_1_10_0 will > > be overwritten to PRIV_VERSION_1_12_0 in riscv_cpu_realize. > > >

Re: [PATCH v7 0/9] Introduce akcipher service for virtio-crypto

2022-05-26 Thread Daniel P . Berrangé
I've sent a pull request containing all the crypto/ changes, as that covers stuff I maintain. ie patches 2-8 Patches 1 and 9, I'll leave for MST to review & queue since the virtual hardware is not my area of knowledge. On Wed, May 25, 2022 at 05:01:09PM +0800, Lei He wrote: > v6 -> v7: > - Fix se

[PULL 4/7] crypto: Implement RSA algorithm by hogweed

2022-05-26 Thread Daniel P . Berrangé
From: Lei He Implement RSA algorithm by hogweed from nettle. Thus QEMU supports a 'real' RSA backend to handle request from guest side. It's important to test RSA offload case without OS & hardware requirement. Signed-off-by: lei he Signed-off-by: zhenwei pi Signed-off-by: Daniel P. Berrangé

Re: AArch64 semihosting?

2022-05-26 Thread Liviu Ionescu
> On 26 May 2022, at 13:01, Peter Maydell wrote: > > Yes, I can reproduce this. Ok, it seems you diagnosed it pretty quickly, great! > Did you intend to pass '-s' (allow gdbstub connection) but not > '-S' (wait on startup for gdb to connect and say "continue"), > by the way? Oops! I forgot

[PATCH 3/5] gitlab: convert static checks to .base_job_template

2022-05-26 Thread Daniel P . Berrangé
This folds the static checks into using the base job template rules, introducing one new variable - QEMU_JOB_ONLY_FORKS - a job that should never run on an upstream pipeline. The information it reports is only applicable to contributors in a pre-submission scenario, not time of merge. S

[PATCH 2/5] gitlab: convert Cirrus jobs to .base_job_template

2022-05-26 Thread Daniel P . Berrangé
This folds the Cirrus job rules into the base job template, introducing two new variables - QEMU_JOB_CIRRUS - identifies the job as making use of Cirrus CI via cirrus-run - QEMU_JOB_OPTIONAL - identifies the job as one that is not run by default, primarily due to resource constrai

[PATCH 1/5] gitlab: introduce a common base job template

2022-05-26 Thread Daniel P . Berrangé
Currently job rules are spread across the various templates and jobs, making it hard to understand exactly what runs in what scenario. This leads to inconsistency in the rules and increased maint burden. The intent is that we introduce a common '.base_job_template' which will have a general purpos

[PATCH 4/5] gitlab: convert build/container jobs to .base_job_template

2022-05-26 Thread Daniel P . Berrangé
This converts the main build and container jobs to use the base job rules, defining the following new variables - QEMU_JOB_SKIPPED - jobs that are known to be currently broken and should not be run. Can still be manually launched if desired. - QEMU_JOB_AVOCADO - jobs that run the Avocado

[PATCH 5/5] gitlab: don't run CI jobs in forks by default

2022-05-26 Thread Daniel P . Berrangé
To preserve CI shared runner credits we don't want to run pipelines on every push. This sets up the config to that pipelines are never created for contributors by default. To override this the QEMU_CI variable can be set to a non-zero value. If set to 1, the pipeline will be created but all jobs w

[PATCH 0/2] hppa: Fix serial port pass-through

2022-05-26 Thread Helge Deller
This series fixes the SeaBIOS-hppa firmware and the serial ports setup code in qemu so that it reflects the real hardware and now allows serial port-passthrough from the host to guests. Tested with Linux guests. Signed-off-by: Helge Deller Helge Deller (2): New SeaBIOS-hppa version 6 hppa:

Re: AArch64 semihosting?

2022-05-26 Thread Peter Maydell
On Thu, 26 May 2022 at 12:03, Liviu Ionescu wrote: > > > > > On 26 May 2022, at 13:01, Peter Maydell wrote: > > > > Yes, I can reproduce this. > > Ok, it seems you diagnosed it pretty quickly, great! > > > Did you intend to pass '-s' (allow gdbstub connection) but not > > '-S' (wait on startup fo

Re: [PATCH] qsd: document vduse-blk exports

2022-05-26 Thread Yongji Xie
On Wed, May 25, 2022 at 8:19 PM Stefan Hajnoczi wrote: > > Document vduse-blk exports in qemu-storage-daemon --help and the > qemu-storage-daemon(1) man page. > > Based-on: <20220523084611.91-1-xieyon...@bytedance.com> > Cc: Xie Yongji > Signed-off-by: Stefan Hajnoczi > --- > docs/tools/qemu-st

[PATCH 2/2] hppa: Fix serial port pass-through

2022-05-26 Thread Helge Deller
This fixes the serial ports in the emulation to behave as on original hardware. On the real hardware, the LASI UART is serial port #0 and the DINO UART is serial port #1. This is fixed in SEABIOS_HPPA_VERSION >= 6, which is why the latest firmware is required. The serial port addresses in hppa/hp

Re: [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() an int64_t

2022-05-26 Thread Alberto Faria
On Thu, May 26, 2022 at 10:00 AM Stefan Hajnoczi wrote: > Maybe let the existing bdrv_check_request32() call in bdrv_co_preadv() > check this? It returns -EIO if bytes is too large. I'd be okay with that. Does this warrant changing blk_co_pread() and blk_co_pwrite() as well? Eric, what do you th

RE: [PATCH v7 0/9] Introduce akcipher service for virtio-crypto

2022-05-26 Thread Gonglei (Arei)
> -Original Message- > From: Daniel P. Berrangé [mailto:berra...@redhat.com] > Sent: Thursday, May 26, 2022 6:48 PM > To: Lei He > Cc: m...@redhat.com; Gonglei (Arei) ; > qemu-devel@nongnu.org; virtualizat...@lists.linux-foundation.org; > linux-cry...@vger.kernel.org; jasow...@redhat.com

[PATCH 0/5] gitlab: restrict running jobs in forks and upstream master

2022-05-26 Thread Daniel P . Berrangé
Currently on upstream most jobs will run in both staging and master. This is quite wasteful of CI credits. The only need to run in master is for the jobs related to publishing the website In forks we run jobs on every push. With restricted CI allowance this is quickly going to cause problems. Wi

Re: AArch64 semihosting?

2022-05-26 Thread Liviu Ionescu
> On 26 May 2022, at 14:08, Peter Maydell wrote: > I confirm that, started via "-kernel aarch64-boot-libgloss.elf", with a single "--semihosting-config", the app ran properly, displayed the printf() output and no longer crashed. ``` ilg@wksi ~ % /Users/ilg/Library/xPacks/@xpack-dev-tools/

[PATCH] MAINTAINERS: update Vladimir's address and repositories

2022-05-26 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! Finally, I'm at Yandex, so that's my new address. I don't think .mailmap or contrib/gitdm/aliases really need to be updated. I send this patch now, but let me send one-two series from new address before merging this, to be sure that everyt

Re: [PATCH v2 09/11] scsi-disk: allow MODE SELECT block descriptor to set the ROM device block size

2022-05-26 Thread Paolo Bonzini
On 4/24/22 18:49, Mark Cave-Ayland wrote: Whilst CDROM drives usually have a 2048 byte sector size, older drives have the ability to switch between 2048 byte and 512 byte sector sizes by specifying a block descriptor in the MODE SELECT command. If a MODE SELECT block descriptor is provided, upda

Re: [PATCH v11 0/2] hw/arm/virt: CXL 2.0 emulation support

2022-05-26 Thread Jonathan Cameron via
On Fri, 20 May 2022 17:37:30 +0100 Jonathan Cameron wrote: > The initial CXL support including support on x86/pc has now merged > (thanks Michael!). > > This is the first of the two remaining parts of that series, unchanged > since v10. The second is CXL switch support which can be applied > se

Re: [PATCH 0/3] hw/acpi/aml-build: Fix {socket, cluster, core} IDs in PPTT

2022-05-26 Thread Gavin Shan
Hi Igor, Yanan and maintainers, On 5/18/22 5:21 PM, Gavin Shan wrote: The {socket, cluster, core} IDs detected from Linux guest aren't matching with what have been provided in PPTT. The flag used for 'ACPI Processor ID valid' is missed for {socket, cluster, core} nodes. In this case, Linux guest

Re: [PATCH 6/9] tests: install "qemu" namespace package into venv

2022-05-26 Thread Paolo Bonzini
On 5/26/22 02:09, John Snow wrote: This patch adds the "qemu" namespace package to the $build/tests/venv directory. It does so in "editable" mode, which means that changes to the source python directory will actively be reflected by the venv. This patch also then removes any sys.path hacking fro

Re: [PATCH v2 00/11] scsi: add quirks and features to support m68k Macs

2022-05-26 Thread Paolo Bonzini
On 5/18/22 16:16, Mark Cave-Ayland wrote: Ping? Anyone have any further thoughts on this? Just a couple question, thanks for the reminder! Paolo

Re: [PATCH 3/9] tests: use python3 as the python executable name

2022-05-26 Thread Paolo Bonzini
On 5/26/22 02:09, John Snow wrote: Use "python3" instead of "python" as per PEP0394: https://peps.python.org/pep-0394/ This should always be defined (in a venv, at least!), matching the preferred python shebang of "#!/usr/bin/env python3". Signed-off-by: John Snow --- tests/Makefile.include

Re: Re: [PATCH v7 0/9] Introduce akcipher service for virtio-crypto

2022-05-26 Thread zhenwei pi
Hi, Daniel Thanks a lot for your review! On 5/26/22 18:48, Daniel P. Berrangé wrote: I've sent a pull request containing all the crypto/ changes, as that covers stuff I maintain. ie patches 2-8 Patches 1 and 9, I'll leave for MST to review & queue since the virtual hardware is not my area of k

Re: [PATCH 5/9] tests: add quiet-venv-pip macro

2022-05-26 Thread Paolo Bonzini
On 5/26/22 02:09, John Snow wrote: Factor out the "test venv pip" macro; rewrite the "check-venv" rule to be a little more compact. Replace the "PIP" pseudo-command output with "VENVPIP" to make it 1% more clear that we are talking about using pip to install something into a venv. Signed-off-by:

Re: [PATCH v2 10/11] q800: add default vendor and product information for scsi-hd devices

2022-05-26 Thread Laurent Vivier
Le 24/04/2022 à 18:49, Mark Cave-Ayland a écrit : The Apple HD SC Setup program uses a SCSI INQUIRY command to check that any SCSI hard disks detected match a whitelist of vendors and products before allowing the "Initialise" button to prepare an empty disk. Add known-good default vendor and pro

Re: [PATCH v2 07/11] scsi-disk: allow truncated MODE SELECT requests

2022-05-26 Thread Paolo Bonzini
On 4/24/22 18:49, Mark Cave-Ayland wrote: According to [1] this truncated request is accepted on real hardware whereas in QEMU it generates an INVALID_PARAM_LEN sense code which causes A/UX to get stuck in a loop retrying the command in an attempt to succeed. That's for MODE SENSE, not MODE SEL

Re: [PATCH 4/9] tests: silence pip upgrade warnings during venv creation

2022-05-26 Thread Paolo Bonzini
On 5/26/22 02:09, John Snow wrote: Turn off the nag warning coaxing us to upgrade pip. It's not really that interesting to see in CI logs, and as long as nothing is broken -- nothing is broken. Signed-off-by: John Snow --- tests/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 d

Re: [PATCH v2 02/11] scsi-disk: add new quirks bitmap to SCSIDiskState

2022-05-26 Thread Laurent Vivier
Le 24/04/2022 à 18:49, Mark Cave-Ayland a écrit : Since the MacOS SCSI implementation is quite old (and Apple added some firmware customisations to their drives for m68k Macs) there is need to add a mechanism to correctly handle Apple-specific quirks. Add a new quirks bitmap to SCSIDiskState tha

Re: [PATCH 2/3] hw/acpi/aml-build: Fix {socket, cluster, core} IDs in PPTT

2022-05-26 Thread Igor Mammedov
On Wed, 18 May 2022 17:21:40 +0800 Gavin Shan wrote: > The {socket, cluster, core} IDs detected from Linux guest aren't > matching with what have been provided in PPTT. The flag used for > 'ACPI Processor ID valid' is missed for {socket, cluster, core} > nodes. To permit this flag set on no lea

Re: [PATCH v3 2/9] replay: notify vCPU when BH is scheduled

2022-05-26 Thread Paolo Bonzini
On 5/26/22 11:51, Pavel Dovgalyuk wrote: At least aio_bh_schedule_oneshot_full should have the same effect, so should this be done at a lower level, in aio_bh_enqueue() or even aio_notify()? Not sure about aio_notify. It can operate with different contexts. Can some of them be not related to

Re: [PATCH 9/9] tests: run 'device-crash-test' from tests/venv

2022-05-26 Thread Paolo Bonzini
On 5/26/22 02:09, John Snow wrote: Remove the sys.path hacking from device-crash-test, and add in a little user-friendly message for anyone who was used to running this script directly from the source tree. Modify the GitLab job recipes to create the tests/venv first, then run device-crash-test

Re: [PATCH v2 11/11] q800: add default vendor and product information for scsi-cd devices

2022-05-26 Thread Laurent Vivier
Le 24/04/2022 à 18:49, Mark Cave-Ayland a écrit : The MacOS CDROM driver uses a SCSI INQUIRY command to check that any SCSI CDROMs detected match a whitelist of vendors and products before adding them to the list of available devices. Add known-good default vendor and product information using t

Re: [PATCH 8/9] tests: add python3-venv to debian10.docker

2022-05-26 Thread Paolo Bonzini
On 5/26/22 02:09, John Snow wrote: This is needed to be able to add a venv-building step to 'make check'; the clang-user job in particular needs this to be able to run check-unit. Signed-off-by: John Snow --- tests/docker/dockerfiles/debian10.docker | 1 + 1 file changed, 1 insertion(+) dif

Re: [PATCH 5/9] tests: add quiet-venv-pip macro

2022-05-26 Thread Paolo Bonzini
On 5/26/22 02:09, John Snow wrote: Factor out the "test venv pip" macro; rewrite the "check-venv" rule to be a little more compact. Replace the "PIP" pseudo-command output with "VENVPIP" to make it 1% more clear that we are talking about using pip to install something into a venv. Signed-off-by:

Re: [PATCH v2 06/11] q800: implement compat_props to enable quirk_mode_sense_rom_force_dbd for scsi-cd devices

2022-05-26 Thread Laurent Vivier
Le 24/04/2022 à 18:49, Mark Cave-Ayland a écrit : By default quirk_mode_sense_rom_force_dbd should be enabled for all scsi-cd devices connected to the q800 machine to correctly report the CDROM block descriptor back to A/UX. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 1 + 1 file

Re: [PATCH v2 03/11] scsi-disk: add MODE_PAGE_APPLE_VENDOR quirk for Macintosh

2022-05-26 Thread Laurent Vivier
Le 24/04/2022 à 18:49, Mark Cave-Ayland a écrit : One of the mechanisms MacOS uses to identify drives compatible with MacOS is to send a custom MODE SELECT command for page 0x30 to the drive. The response to this is a hard-coded manufacturer string which must match in order for the drive to be us

Re: [PATCH v2 04/11] q800: implement compat_props to enable quirk_mode_page_apple_vendor for scsi-hd devices

2022-05-26 Thread Laurent Vivier
Le 24/04/2022 à 18:49, Mark Cave-Ayland a écrit : By default quirk_mode_page_apple_vendor should be enabled for all scsi-hd devices connected to the q800 machine to enable MacOS to detect and use them. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 6 ++ 1 file changed, 6 insertio

Re: [PATCH 0/3] hw/acpi/aml-build: Fix {socket, cluster, core} IDs in PPTT

2022-05-26 Thread Igor Mammedov
On Thu, 26 May 2022 19:37:47 +0800 Gavin Shan wrote: > Hi Igor, Yanan and maintainers, > > On 5/18/22 5:21 PM, Gavin Shan wrote: > > The {socket, cluster, core} IDs detected from Linux guest aren't > > matching with what have been provided in PPTT. The flag used for > > 'ACPI Processor ID valid'

Re: [PULL v2 75/86] include/hw/pci/pcie_host: Correct PCIE_MMCFG_SIZE_MAX

2022-05-26 Thread Daniel Henrique Barboza
Hi, This patch broke the boot of the sam460ex ppc machine: qemu-system-ppc -M sam460ex -kernel ./buildroot/qemu_ppc_sam460ex-latest/vmlinux \ -device virtio-net-pci,netdev=net0 -netdev user,id=net0 -serial mon:stdio \ -nographic -snapshot qemu-system-ppc: ../hw/pci/pcie_host.c:97: pcie_host_mmc

RE: [PATCH 9/9] crypto: Introduce RSA algorithm

2022-05-26 Thread Gonglei (Arei)
> -Original Message- > From: Lei He [mailto:helei.si...@bytedance.com] > Sent: Wednesday, May 25, 2022 5:01 PM > To: m...@redhat.com; Gonglei (Arei) ; > berra...@redhat.com > Cc: qemu-devel@nongnu.org; virtualizat...@lists.linux-foundation.org; > linux-cry...@vger.kernel.org; jasow...@re

  1   2   >