Re: [PATCH 1/2] target/arm: Update translation regime comment for new features

2024-08-10 Thread Richard Henderson
On 8/10/24 02:04, Peter Maydell wrote: We have a long comment describing the Arm architectural translation regimes and how we map them to QEMU MMU indexes. This comment has got a bit out of date: * FEAT_SEL2 allows Secure EL2 and corresponding new regimes * FEAT_RME introduces Realm state a

Re: [PATCH 2/2] target/arm: Fix usage of MMU indexes when EL3 is AArch32

2024-08-10 Thread Richard Henderson
On 8/10/24 02:04, Peter Maydell wrote: Our current usage of MMU indexes when EL3 is AArch32 is confused. Architecturally, when EL3 is AArch32, all Secure code runs under the Secure PL1&0 translation regime: * code at EL3, which might be Mon, or SVC, or any of the other privileged modes (PL1

Re: [PULL 0/5] NBD: fix CVE-2024-7409 for 9.1

2024-08-10 Thread Richard Henderson
On 8/9/24 07:53, Eric Blake wrote: The following changes since commit 75c7f574035622798e9361a942bdfbb0af930f0e: Merge tag 'pull-hex-20240807' ofhttps://github.com/quic/qemu into staging (2024-08-08 16:08:18 +1000) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git

Re: [PULL 15/57] target/mips: Pass ptw_mmu_idx down from mips_cpu_tlb_fill

2024-08-10 Thread Richard Henderson
On 8/10/24 04:11, Philippe Mathieu-Daudé wrote: Hi Richard, On 2/2/24 06:49, Richard Henderson wrote: Rather than adjust env->hflags so that the value computed by cpu_mmu_index() changes, compute the mmu_idx that we want directly and pass it down. Introduce symbolic constants for MMU_{KERNEL,E

[PATCH v3 4/5] machine/nitro-enclave: Add built-in Nitro Secure Module device

2024-08-10 Thread Dorjoy Chowdhury
AWS Nitro Enclaves have built-in Nitro Secure Module (NSM) device which is used for stripped down TPM functionality like attestation. This commit adds the built-in NSM device in the nitro-enclave machine type. In Nitro Enclaves, all the PCRs start in a known zero state and the first 16 PCRs are lo

[PATCH v3 1/5] machine/nitro-enclave: New machine type for AWS Nitro Enclaves

2024-08-10 Thread Dorjoy Chowdhury
AWS nitro enclaves[1] is an Amazon EC2[2] feature that allows creating isolated execution environments, called enclaves, from Amazon EC2 instances which are used for processing highly sensitive data. Enclaves have no persistent storage and no external networking. The enclave VMs are based on Firecr

[PATCH v3 0/5] AWS Nitro Enclave emulation support

2024-08-10 Thread Dorjoy Chowdhury
This is v3 submission for AWS Nitro Enclave emulation in QEMU. From the QEMU side the implementation for nitro enclaves is complete. A lot of changes from v2 so all the patches need to be reviewed. v2 is at: https://mail.gnu.org/archive/html/qemu-devel/2024-06/msg00012.html Changes in v3: -

[PATCH v3 3/5] device/virtio-nsm: Support for Nitro Secure Module device

2024-08-10 Thread Dorjoy Chowdhury
Nitro Secure Module (NSM)[1] device is used in AWS Nitro Enclaves for stripped down TPM functionality like cryptographic attestation. The requests to and responses from NSM device are CBOR[2] encoded. This commit adds support for NSM device in QEMU. Although related to AWS Nitro Enclaves, the viri

[PATCH v3 2/5] machine/nitro-enclave: Add vhost-user-vsock device

2024-08-10 Thread Dorjoy Chowdhury
AWS Nitro Enclaves have built-in vhost-vsock device support which enables applications in enclave VMs to communicate with the parent EC2 VM over vsock. The enclave VMs have dynamic CID while the parent always has CID 3. In QEMU, the vsock emulation for nitro enclave is added using vhost-user-vsock

[PATCH v3 5/5] docs/nitro-enclave: Documentation for nitro-enclave machine type

2024-08-10 Thread Dorjoy Chowdhury
--- docs/system/i386/nitro-enclave.rst | 80 ++ 1 file changed, 80 insertions(+) create mode 100644 docs/system/i386/nitro-enclave.rst diff --git a/docs/system/i386/nitro-enclave.rst b/docs/system/i386/nitro-enclave.rst new file mode 100644 index 00..25bff898

[PATCH 1/4] target/m68k: Introduce M68K_FEATURE_FPU_PACKED_DECIMAL

2024-08-10 Thread Richard Henderson
Set for 68020 and 68030, but does nothing so far. Signed-off-by: Richard Henderson --- target/m68k/cpu.h | 2 ++ target/m68k/cpu.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index b5bbeedb7a..7114324e4d 100644 --- a/target/m68k/cpu.h +++ b/target

[PATCH 4/4] tests/tcg/m68k: Add packed decimal tests

2024-08-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tests/tcg/m68k/packeddecimal-1.c | 45 tests/tcg/m68k/packeddecimal-2.c | 42 + tests/tcg/m68k/Makefile.target | 2 +- 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 tests/tc

[PATCH 3/4] target/m68k: Implement packed decimal real stores

2024-08-10 Thread Richard Henderson
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2488 Signed-off-by: Richard Henderson --- target/m68k/helper.h | 1 + target/m68k/fpu_helper.c | 100 +++ target/m68k/translate.c | 27 +-- 3 files changed, 125 insertions(+), 3 deletions(-

[PATCH for-9.2 0/4] target/m68k: Implement fmove.p

2024-08-10 Thread Richard Henderson
Implement packed decimal real conversions. This is perhaps too trivial, as it does not produce correctly rounded results compared to the compiler. I'm not sure how else to implement this without using gmp, which seems a bit heavy-weight. Perhaps we could do better with a compile-time table of po

[PATCH 2/4] target/m68k: Implement packed decimal real loads

2024-08-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/m68k/helper.h | 2 + target/m68k/fpu_helper.c | 137 +++ target/m68k/translate.c | 22 --- 3 files changed, 151 insertions(+), 10 deletions(-) diff --git a/target/m68k/helper.h b/target/m68k/helper.h inde