Re: [PATCH v2 2/2] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-07-30 Thread Philippe Mathieu-Daudé
Hi Alejandro, On 29/7/24 21:00, Alejandro Zeise wrote: Make the Aspeed HACE module use the new qcrypto accumulative hashing functions when in scatter-gather accumulative mode. A hash context will maintain a "running-hash" as each scatter-gather chunk is received. Previously each scatter-gather

Re: [PATCH v5 05/11] exec/ioport: Add portio_list_set_address()

2024-07-30 Thread Philippe Mathieu-Daudé
On 29/7/24 23:07, Bernhard Beschow wrote: Am 29. Juli 2024 09:26:19 UTC schrieb "Philippe Mathieu-Daudé" : On 14/1/24 13:39, Bernhard Beschow wrote: Some SuperI/O devices such as the VIA south bridges or the PC87312 controller are able to relocate their SuperI/O functions. Add a convenience

Re: [PATCH] target/arm: Fix BTI versus CF_PCREL

2024-07-30 Thread Philippe Mathieu-Daudé
On 30/7/24 03:39, Richard Henderson wrote: With pcrel, we cannot check the guarded page bit at translation time, as different mappings of the same physical page may or may not have the GP bit set. Instead, add a couple of helpers to check the page at runtime, after all other filters that might o

Re: [PATCH v3 1/7] arm/virt: place power button pin number on a define

2024-07-30 Thread Igor Mammedov
On Mon, 22 Jul 2024 08:45:53 +0200 Mauro Carvalho Chehab wrote: > Having magic numbers inside the code is not a good idea, as it > is error-prone. So, instead, create a macro with the number > definition. > > Signed-off-by: Mauro Carvalho Chehab > Reviewed-by: Jonathan Cameron > --- > hw/arm/

[PATCH] hw/arm/mps2-tz.c: fix RX/TX interrupts order

2024-07-30 Thread marco
From: Marco Palumbi The order of the RX and TX interrupts are swapped. This commit fixes the order as per the following documents: * https://developer.arm.com/documentation/dai0505/latest/ * https://developer.arm.com/documentation/dai0521/latest/ * https://developer.arm.com/documentation/dai05

Re: [PATCH v4 2/6] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-30 Thread Zhao Liu
Hi Mauro, On Mon, Jul 29, 2024 at 03:21:06PM +0200, Mauro Carvalho Chehab wrote: > Date: Mon, 29 Jul 2024 15:21:06 +0200 > From: Mauro Carvalho Chehab > Subject: [PATCH v4 2/6] arm/virt: Wire up GPIO error source for ACPI / GHES > X-Mailer: git-send-email 2.45.2 > > From: Jonathan Cameron > >

[PULL 0/1] s390x updates

2024-07-30 Thread David Hildenbrand
The following changes since commit 8e466dd092469e5ab0f355775c571ea96f3a8e23: gitlab-ci: Use -fno-sanitize=function in the clang-user job (2024-07-26 09:35:27 +1000) are available in the Git repository at: https://github.com/davidhildenbrand/qemu.git tags/s390x-20240730 for you to fetch

[PULL 1/1] target/s390x: move @deprecated-props to CpuModelExpansion Info

2024-07-30 Thread David Hildenbrand
From: Collin Walling CpuModelInfo is used both as command argument and in command returns. Its @deprecated-props array does not make any sense in arguments, and is silently ignored. We actually want it only as return value of query-cpu-model-expansion. Move it from CpuModelInfo to CpuModelExpa

[PATCH 04/18] qapi/common: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves OffAutoPCIBAR's generated enumeration constant prefix from OFF_AUTOPCIBAR_OFF to OFF_AUTO_PCIBAR_OFF. Signed-off-by: Markus Armbrus

[PATCH 02/18] tests/qapi-schema: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This changes TestUnionEnumA's generated enumeration constant prefix from TEST_UNION_ENUMA to TEST_UNION_ENUM_A. Signed-off-by: Markus Armbruster

[PATCH 15/18] qapi/crypto: Rename QCryptoRSAPaddingAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoRSAPaddingAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_RSA_PADDING_ALG. We could simply drop 'pref

[PATCH 16/18] qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo

2024-07-30 Thread Markus Armbruster
For consistency with other types names *Algo. Signed-off-by: Markus Armbruster --- crypto/afalgpriv.h| 14 +++--- crypto/hmacpriv.h | 2 +- crypto/afalg.c| 8 crypto/cipher-afalg.c | 12 ++-- crypto/hash-afalg.c | 14 +++--- 5 files changed, 2

[PATCH 06/18] qapi/ebpf: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves EbpfProgramID's generated enumeration constant prefix from EBPF_PROGRAMID to EBPF_PROGRAM_ID. Signed-off-by: Markus Armbruster ---

[PATCH 18/18] qapi/cryptodev: Rename QCryptodevBackendAlgType to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptodevBackendAlgType a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTODEV_BACKEND_ALG. We could simply drop 'prefix', bu

[PATCH 08/18] qapi/ui: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves DisplayGLMode's generated enumeration constant prefix from DISPLAYGL_MODE to DISPLAY_GL_MODE. Signed-off-by: Markus Armbruster ---

[PATCH 00/18] qapi: Reduce use of 'prefix'.

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. We use 'prefix' for a number of reasons: * To override an ugly default. * To shorten the prefix. * To work around name clashes. This series attacks the

[PATCH 14/18] qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoAkCipherAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_AKCIPHER_ALG. We could simply drop 'prefix',

[PATCH 09/18] qapi/machine: Rename CpuS390* to S390Cpu, and drop 'prefix'

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. CpuS390Entitlement has a 'prefix' to change the generated enumeration constants' prefix from CPU_S390_POLARIZATION to S390_CPU_POLARIZATION. Rename the type

[PATCH 03/18] qapi/block-core: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves XDbgBlockGraphNodeType's generated enumeration constant prefix from X_DBG_BLOCK_GRAPH_NODE_TYPE_BLOCK_BACKEND to XDBG_BLOCK_GRAPH_NO

[PATCH 07/18] qapi/machine: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves HmatLBDataType's generated enumeration constant prefix from HMATLB_DATA_TYPE to HMAT_LB_DATA_TYPE. Signed-off-by: Markus Armbruster

[PATCH 13/18] qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoIVGenAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_IVGEN_ALG. We could simply drop 'prefix', but th

[PATCH 12/18] qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoCipherAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_CIPHER_ALG. We could simply drop 'prefix', but

[PATCH 11/18] qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoHashAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_HASH_ALG. We could simply drop 'prefix', but then

[PATCH 05/18] qapi/crypto: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added two temporary 'prefix' to delay changing the generated code. Revert them. This improves QCryptoBlockFormat's generated enumeration constant prefix from Q_CRYPTO_BLOCK_FORMAT to QCRYPTO_BLOCK_FORMAT, and QCryptoBlockL

[PATCH 10/18] qapi/crypto: Drop unwanted 'prefix'

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoAkCipherKeyType has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_AKCIPHER_KEY_TYPE. Drop it. The prefix becomes

[PATCH 01/18] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-07-30 Thread Markus Armbruster
camel_to_upper() converts its argument from camel case to upper case with '_' between words. Used for generated enumeration constant prefixes. When some of the words are spelled all caps, where exactly to insert '_' is guesswork. camel_to_upper()'s guesses are bad enough in places to make people

[PATCH 17/18] qapi/cryptodev: Drop unwanted 'prefix'

2024-07-30 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptodevBackendServiceType has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTODEV_BACKEND_SERVICE. Drop it. The prefix

Re: [PATCH v3 1/7] arm/virt: place power button pin number on a define

2024-07-30 Thread Peter Maydell
On Tue, 30 Jul 2024 at 08:26, Igor Mammedov wrote: > > On Mon, 22 Jul 2024 08:45:53 +0200 > Mauro Carvalho Chehab wrote: > > > Having magic numbers inside the code is not a good idea, as it > > is error-prone. So, instead, create a macro with the number > > definition. > > > > Signed-off-by: Maur

Re: [PATCH v3 2/7] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-30 Thread Igor Mammedov
On Mon, 22 Jul 2024 08:45:54 +0200 Mauro Carvalho Chehab wrote: > From: Jonathan Cameron > > Creates a GED - Generic Event Device and set a GPIO to > be used or error injection. QEMU already has GED device, so question is why it wasn't used for event delivery? I nutshell, I'd really prefer thi

Re: [PATCH v4 2/6] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-30 Thread Jonathan Cameron via
On Tue, 30 Jul 2024 07:13:30 +0200 Mauro Carvalho Chehab wrote: > Em Mon, 29 Jul 2024 17:08:40 +0100 > Jonathan Cameron escreveu: > > > On Mon, 29 Jul 2024 15:21:06 +0200 > > Mauro Carvalho Chehab wrote: > > > > > From: Jonathan Cameron > > > > > > Creates a Generic Event Device (GED) as

Re: [PATCH v3 3/7] acpi/ghes: Support GPIO error source.

2024-07-30 Thread Igor Mammedov
On Mon, 22 Jul 2024 08:45:55 +0200 Mauro Carvalho Chehab wrote: > From: Jonathan Cameron > > Add error notification to GHES v2 using the GPIO source. > > Signed-off-by: Jonathan Cameron > Signed-off-by: Mauro Carvalho Chehab > --- > hw/acpi/ghes.c | 8 ++-- > include/hw/acpi/ghe

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-30 Thread Jason Wang
On Mon, Jul 29, 2024 at 6:05 PM Eugenio Perez Martin wrote: > > On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: > > > > > > > > On 5/13/24 11:56 PM, Jason Wang wrote: > > > On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin > > > wrote: > > >> > > >> On Mon, May 13, 2024 at 10:28 AM Jason

Re: [PATCH 05/18] qapi/crypto: Drop temporary 'prefix'

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:19AM +0200, Markus Armbruster wrote: > Recent commit "qapi: Smarter camel_to_upper() to reduce need for > 'prefix'" added two temporary 'prefix' to delay changing the generated > code. > > Revert them. This improves QCryptoBlockFormat's generated enumeration > consta

Re: [PATCH 10/18] qapi/crypto: Drop unwanted 'prefix'

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:24AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > QCryptoAkCipherKeyType has a 'prefix' that overrides the generated > enumeratio

Re: [PATCH 11/18] qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:25AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > QCryptoHashAlgorithm has a 'prefix' that overrides the generated > enumeration

Re: [PATCH 12/18] qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:26AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > QCryptoCipherAlgorithm has a 'prefix' that overrides the generated > enumeratio

Re: [PATCH 13/18] qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:27AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > QCryptoIVGenAlgorithm has a 'prefix' that overrides the generated > enumeration

Re: [PATCH 14/18] qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:28AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > QCryptoAkCipherAlgorithm has a 'prefix' that overrides the generated > enumerat

Re: [PATCH 15/18] qapi/crypto: Rename QCryptoRSAPaddingAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:29AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > QCryptoRSAPaddingAlgorithm has a 'prefix' that overrides the generated > enumer

Re: [PATCH 16/18] qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:30AM +0200, Markus Armbruster wrote: > For consistency with other types names *Algo. > > Signed-off-by: Markus Armbruster > --- > crypto/afalgpriv.h| 14 +++--- > crypto/hmacpriv.h | 2 +- > crypto/afalg.c| 8 > crypto/cipher-afalg

Re: [PATCH 17/18] qapi/cryptodev: Drop unwanted 'prefix'

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:31AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > QCryptodevBackendServiceType has a 'prefix' that overrides the > generated enum

Re: [PATCH] virtio-rng: block max-bytes=0

2024-07-30 Thread Laurent Vivier
On 24/07/2024 12:51, Michael S. Tsirkin wrote: with max-bytes set to 0, quota is 0 and so device does not work. block this to avoid user confusion Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-rng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/virtio/v

Re: [PATCH 18/18] qapi/cryptodev: Rename QCryptodevBackendAlgType to *Algo, and drop prefix

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:32AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > QCryptodevBackendAlgType a 'prefix' that overrides the generated > enumeration

Re: [PATCH 09/18] qapi/machine: Rename CpuS390* to S390Cpu, and drop 'prefix'

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:23AM +0200, Markus Armbruster wrote: > QAPI's 'prefix' feature can make the connection between enumeration > type and its constants less than obvious. It's best used with > restraint. > > CpuS390Entitlement has a 'prefix' to change the generated enumeration > constan

Re: [PATCH 09/18] qapi/machine: Rename CpuS390* to S390Cpu, and drop 'prefix'

2024-07-30 Thread Zhao Liu
On Tue, Jul 30, 2024 at 10:10:23AM +0200, Markus Armbruster wrote: > Date: Tue, 30 Jul 2024 10:10:23 +0200 > From: Markus Armbruster > Subject: [PATCH 09/18] qapi/machine: Rename CpuS390* to S390Cpu, and drop > 'prefix' > > QAPI's 'prefix' feature can make the connection between enumeration > ty

Re: [PATCH 07/18] qapi/machine: Drop temporary 'prefix'

2024-07-30 Thread Zhao Liu
On Tue, Jul 30, 2024 at 10:10:21AM +0200, Markus Armbruster wrote: > Date: Tue, 30 Jul 2024 10:10:21 +0200 > From: Markus Armbruster > Subject: [PATCH 07/18] qapi/machine: Drop temporary 'prefix' > > Recent commit "qapi: Smarter camel_to_upper() to reduce need for > 'prefix'" added a temporary 'p

Re: [PATCH 01/18] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:10:15AM +0200, Markus Armbruster wrote: > camel_to_upper() converts its argument from camel case to upper case > with '_' between words. Used for generated enumeration constant > prefixes. > > When some of the words are spelled all caps, where exactly to insert > '_' is

[PATCH-for-9.1 0/5] hw/sd: SDcard & SDHCI fixes

2024-07-30 Thread Philippe Mathieu-Daudé
3 fixes (2 fuzzed). Philippe Mathieu-Daudé (5): hw/sd/sdcard: Explicit dummy byte value hw/sd/sdcard: Do not abort when reading DAT lines on invalid cmd state hw/sd/sdhci: Reset @data_count index on invalid ADMA transfers hw/sd/sdhci: Trace ADMA descriptors hw/sd/sdhci: Check ADMA descri

[PATCH-for-9.1 2/5] hw/sd/sdcard: Do not abort when reading DAT lines on invalid cmd state

2024-07-30 Thread Philippe Mathieu-Daudé
Guest should not try to read the DAT lines from invalid command state. If it still insists to do so, return a dummy value. Cc: qemu-sta...@nongnu.org Fixes: e2dec2eab0 ("hw/sd/sdcard: Remove default case in read/write on DAT lines") Reported-by: Zheyu Ma Resolves: https://gitlab.com/qemu-project

[PATCH-for-9.1 4/5] hw/sd/sdhci: Trace ADMA descriptors

2024-07-30 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 8 hw/sd/trace-events | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 8293d83556..66b9364e9e 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -693,6 +693,11 @@ typedef struct ADMADes

[PATCH-for-9.1 3/5] hw/sd/sdhci: Reset @data_count index on invalid ADMA transfers

2024-07-30 Thread Philippe Mathieu-Daudé
We neglected to clear the @data_count index on ADMA error, allowing to trigger assertion in sdhci_read_dataport() or sdhci_write_dataport(). Cc: qemu-sta...@nongnu.org Fixes: d7dfca0807 ("hw/sdhci: introduce standard SD host controller") Reported-by: Zheyu Ma Resolves: https://gitlab.com/qemu-pro

[PATCH-for-9.1 1/5] hw/sd/sdcard: Explicit dummy byte value

2024-07-30 Thread Philippe Mathieu-Daudé
On error the DAT lines are left unmodified to their previous states. QEMU returns 0x00 for convenience. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 07cb97d88c..c02f04f1ea 10064

[PATCH-for-9.1 5/5] hw/sd/sdhci: Check ADMA descriptors can be accessed

2024-07-30 Thread Philippe Mathieu-Daudé
Since malicious guest can write invalid addresses to the ADMASYSADDR register, we need to check whether the descriptor could be correctly filled or not. Cc: qemu-sta...@nongnu.org Fixes: d7dfca0807 ("hw/sdhci: introduce standard SD host controller") Signed-off-by: Philippe Mathieu-Daudé --- hw/s

Re: [PATCH] target/arm: Fix BTI versus CF_PCREL

2024-07-30 Thread Peter Maydell
On Tue, 30 Jul 2024 at 03:07, Richard Henderson wrote: > > With pcrel, we cannot check the guarded page bit at translation > time, as different mappings of the same physical page may or may > not have the GP bit set. > > Instead, add a couple of helpers to check the page at runtime, > after all ot

[PULL 00/21] target-arm queue

2024-07-30 Thread Peter Maydell
ggin/qemu into staging (2024-07-26 15:10:45 +1000) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240730 for you to fetch changes up to 73188068d7ba40c8a37b4763db38bb1ce24ca07d: system/physmem: Where we assume we have a RA

[PULL 20/21] target/sh4: Avoid shift into sign bit in update_itlb_use()

2024-07-30 Thread Peter Maydell
In update_itlb_use() the variables or_mask and and_mask are uint8_t, which means that in expressions like "and_mask << 24" the usual C arithmetic conversions will result in the shift being done as a signed int type, and so we will shift into the sign bit. For QEMU this isn't undefined behaviour bec

[PULL 03/21] target/arm/kvm: Set PMU for host only when available

2024-07-30 Thread Peter Maydell
From: Akihiko Odaki target/arm/kvm.c checked PMU availability but unconditionally set the PMU feature flag for the host CPU model, which is confusing. Set the feature flag only when available. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm

[PULL 04/21] target/arm/kvm: Do not silently remove PMU

2024-07-30 Thread Peter Maydell
From: Akihiko Odaki kvm_arch_init_vcpu() used to remove PMU when it is not available even if the CPU model needs one. It is semantically incorrect, and may continue execution on a misbehaving host that advertises a CPU model while lacking its PMU. Keep the PMU when the CPU model needs one, and le

[PULL 02/21] hw/arm/smmuv3: Assert input to oas2bits() is valid

2024-07-30 Thread Peter Maydell
From: Mostafa Saleh Coverity has spotted a possible problem with the OAS handling (CID 1558464), where the error return of oas2bits() -1 is not checked, which can cause an overflow in oas value. oas2bits() is only called with valid inputs, harden the function to assert that. Reported-By: Peter

[PULL 13/21] target/arm: Fix UMOPA/UMOPS of 16-bit values

2024-07-30 Thread Peter Maydell
The UMOPA/UMOPS instructions are supposed to multiply unsigned 8 or 16 bit elements and accumulate the products into a 64-bit element. In the Arm ARM pseudocode, this is done with the usual infinite-precision signed arithmetic. However our implementation doesn't quite get it right, because in the

[PULL 14/21] target/arm: Avoid shifts by -1 in tszimm_shr() and tszimm_shl()

2024-07-30 Thread Peter Maydell
The function tszimm_esz() returns a shift amount, or possibly -1 in certain cases that correspond to unallocated encodings in the instruction set. We catch these later in the trans_ functions (generally with an "a-esz < 0" check), but before we do the decodetree-generated code will also call tszim

[PULL 19/21] target/i386: Remove dead assignment to ss in do_interrupt64()

2024-07-30 Thread Peter Maydell
Coverity points out that in do_interrupt64() in the "to inner privilege" codepath we set "ss = 0", but because we also set "new_stack = 1" there, later in the function we will always override that value of ss with "ss = 0 | dpl". Remove the unnecessary initialization of ss, which allows us to redu

[PULL 05/21] hvf: arm: Raise an exception for sysreg by default

2024-07-30 Thread Peter Maydell
From: Akihiko Odaki Any sysreg access results in an exception unless defined otherwise so we should raise an exception by default. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 174 +--

[PULL 01/21] hw/char/bcm2835_aux: Fix assert when receive FIFO fills up

2024-07-30 Thread Peter Maydell
From: Frederik van Hövell When a bare-metal application on the raspi3 board reads the AUX_MU_STAT_REG MMIO register while the device's buffer is at full receive FIFO capacity (i.e. `s->read_count == BCM2835_AUX_RX_FIFO_LEN`) the assertion `assert(s->read_count < BCM2835_AUX_RX_FIFO_LEN)` fails.

[PULL 07/21] hvf: arm: Do not advance PC when raising an exception

2024-07-30 Thread Peter Maydell
From: Akihiko Odaki This is identical with commit 30a1690f2402 ("hvf: arm: Do not advance PC when raising an exception") but for writes instead of reads. Fixes: a2260983c655 ("hvf: arm: Add support for GICv3") Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell

[PULL 18/21] target/m68k: avoid shift into sign bit in dump_address_map()

2024-07-30 Thread Peter Maydell
Coverity complains (CID 1547592) that in dump_address_map() we take a value stored in a signed integer variable 'i' and shift it by enough to shift into the sign bit when we construct the value 'logical'. This isn't a bug for QEMU because we use -fwrapv semantics, but we can make Coverity happy by

[PULL 06/21] hvf: arm: Properly disable PMU

2024-07-30 Thread Peter Maydell
From: Akihiko Odaki Setting pmu property used to have no effect for hvf so fix it. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 186 +++ 1 file changed, 98 insertions(+), 88 deletions(-

[PULL 09/21] hw/misc/bcm2835_property: Avoid overflow in OTP access properties

2024-07-30 Thread Peter Maydell
Coverity points out that in our handling of the property RPI_FWREQ_SET_CUSTOMER_OTP we have a potential overflow. This happens because we read start_num and number from the guest as unsigned 32 bit integers, but then the variable 'n' we use as a loop counter as we iterate from start_num to start_n

[PULL 08/21] hw/misc/bcm2835_property: Fix handling of FRAMEBUFFER_SET_PALETTE

2024-07-30 Thread Peter Maydell
The documentation of the "Set palette" mailbox property at https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface#set-palette says it has the form: Length: 24..1032 Value: u32: offset: first palette index to set (0-255) u32: length: number of palette entrie

Re: [PULL 06/27] iotests/{024, 271}: add testcases for qemu-img rebase

2024-07-30 Thread Andrey Drobyshev
On 7/22/24 10:18 AM, Thomas Huth wrote: > [Вы нечасто получаете письма от th...@redhat.com. Узнайте, почему это > важно, по адресу https://aka.ms/LearnAboutSenderIdentification ] > > On 31/10/2023 19.58, Kevin Wolf wrote: >> From: Andrey Drobyshev >> >> As the previous commit changes the logic of

[PULL 16/21] target/tricore: Use unsigned types for bitops in helper_eq_b()

2024-07-30 Thread Peter Maydell
Coverity points out that in helper_eq_b() we have an int32_t 'msk' and we end up shifting into its sign bit. This is OK for QEMU because we use -fwrapv to give this well defined semantics, but when you look at what this function is doing it's doing bit operations, so we should be using an unsigned

[PULL 12/21] target/arm: Don't assert for 128-bit tile accesses when SVL is 128

2024-07-30 Thread Peter Maydell
For an instruction which accesses a 128-bit element tile when the SVL is also 128 (for example MOV z0.Q, p0/M, ZA0H.Q[w0,0]), we will assert in get_tile_rowcol(): qemu-system-aarch64: ../../tcg/tcg-op.c:926: tcg_gen_deposit_z_i32: Assertion `len > 0' failed. This happens because we calculate

[PULL 17/21] target/xtensa: Make use of 'segment' in pptlb helper less confusing

2024-07-30 Thread Peter Maydell
Coverity gets confused about the use of the 'segment' variable in the pptlb helper function: it thinks that we can take a code path where we first initialize it: unsigned segment = XTENSA_MPU_PROBE_B; // 0x4000 and then use that value as a shift count: } else if (nhits == 1 && (env->sregs[

[PULL 15/21] target/arm: Ignore SMCR_EL2.LEN and SVCR_EL2.LEN if EL2 is not enabled

2024-07-30 Thread Peter Maydell
When determining the current vector length, the SMCR_EL2.LEN and SVCR_EL2.LEN settings should only be considered if EL2 is enabled (compare the pseudocode CurrentSVL and CurrentNSVL which call EL2Enabled()). We were checking against ARM_FEATURE_EL2 rather than calling arm_is_el2_enabled(), which m

[PULL 21/21] system/physmem: Where we assume we have a RAM MR, assert it

2024-07-30 Thread Peter Maydell
In the functions invalidate_and_set_dirty() and cpu_physical_memory_snapshot_and_clear_dirty(), we assume that we are dealing with RAM memory regions. In this case we know that memory_region_get_ram_addr() will succeed. Assert this before we use the returned ram_addr_t in arithmetic. This makes Co

[PULL 11/21] hw/misc/bcm2835_property: Reduce scope of variables in mbox push function

2024-07-30 Thread Peter Maydell
In bcm2835_property_mbox_push(), some variables are defined at function scope but used only in a smaller scope of the function: * tag, bufsize, resplen are used only in the body of the while() loop * tmp is used only for RPI_FWREQ_SET_POWER_STATE (and is badly named) Declare these variables in t

[PULL 10/21] hw/misc/bcm2835_property: Restrict scope of start_num, number, otp_row

2024-07-30 Thread Peter Maydell
In the long function bcm2835_property_mbox_push(), the variables start_num, number and otp_row are used only in the four cases which access OTP data, and their uses don't overlap with each other. Make these variables have scope restricted to the cases where they're used, so it's easier to read eac

[PATCH] iotests/024: exclude 'backing file format' field from the output

2024-07-30 Thread Andrey Drobyshev
Apparently 'qemu-img info' doesn't report the backing file format field for qed (as it does for qcow2): $ qemu-img create -f qed base.qed 1M && qemu-img create -f qed -b base.qed -F qed top.qed 1M $ qemu-img create -f qcow2 base.qcow2 1M && qemu-img create -f qcow2 -b base.qcow2 -F qcow2 top.qco

Re: [PATCH v5 05/11] exec/ioport: Add portio_list_set_address()

2024-07-30 Thread BALATON Zoltan
On Tue, 30 Jul 2024, Philippe Mathieu-Daudé wrote: On 29/7/24 23:07, Bernhard Beschow wrote: Am 29. Juli 2024 09:26:19 UTC schrieb "Philippe Mathieu-Daudé" : On 14/1/24 13:39, Bernhard Beschow wrote: Some SuperI/O devices such as the VIA south bridges or the PC87312 controller are able to relo

[PATCH] osdep.h: Clean up no-longer-needed back-compat for macOS 10

2024-07-30 Thread Peter Maydell
Our official support policy only supports the most recent two versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma), and we already have code that assumes at least macOS 12 Monterey or better. In commit 2d27c91e2b72ac7 we dropped some of the back-compat code for older macOS versions,

Re: [PATCH] osdep.h: Clean up no-longer-needed back-compat for macOS 10

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 10:59:39AM +0100, Peter Maydell wrote: > Our official support policy only supports the most recent two > versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma), > and we already have code that assumes at least macOS 12 Monterey or > better. In commit 2d27c91e2b7

Re: [PULL 00/14] Docs / testing patches for 2024-07-29

2024-07-30 Thread Philippe Mathieu-Daudé
On 29/7/24 17:36, Daniel P. Berrangé wrote: On Mon, Jul 29, 2024 at 05:27:00PM +0200, Philippe Mathieu-Daudé wrote: Thomas Huth (9): python: Install pycotap in our venv if necessary tests/functional: Add base classes for the upcoming pytest-based tests tests/Makefile.include: Increase

Re: [PULL 00/14] Docs / testing patches for 2024-07-29

2024-07-30 Thread Peter Maydell
On Tue, 30 Jul 2024 at 11:05, Philippe Mathieu-Daudé wrote: > > On 29/7/24 17:36, Daniel P. Berrangé wrote: > > On Mon, Jul 29, 2024 at 05:27:00PM +0200, Philippe Mathieu-Daudé wrote: > > >> Thomas Huth (9): > >>python: Install pycotap in our venv if necessary > >>tests/functional: Add bas

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-30 Thread Akihiko Odaki
On 2024/07/30 12:45, Jason Wang wrote: On Tue, Jul 30, 2024 at 11:29 AM Akihiko Odaki wrote: On 2024/07/30 12:17, Jason Wang wrote: On Tue, Jul 30, 2024 at 11:12 AM Akihiko Odaki wrote: On 2024/07/30 12:03, Jason Wang wrote: On Tue, Jul 30, 2024 at 10:57 AM Akihiko Odaki wrote: On 2024

Re: [PATCH v2 2/2] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-07-30 Thread Cédric Le Goater
Hello Alejandro, On 7/29/24 21:00, Alejandro Zeise wrote: Make the Aspeed HACE module use the new qcrypto accumulative hashing functions when in scatter-gather accumulative mode. A hash context will maintain a "running-hash" as each scatter-gather chunk is received. Previously each scatter-gath

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-30 Thread Eugenio Perez Martin
On Tue, Jul 30, 2024 at 10:48 AM Jason Wang wrote: > > On Mon, Jul 29, 2024 at 6:05 PM Eugenio Perez Martin > wrote: > > > > On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer > > wrote: > > > > > > > > > > > > On 5/13/24 11:56 PM, Jason Wang wrote: > > > > On Mon, May 13, 2024 at 5:58 PM Eugenio Per

Re: [PATCH v3 4/7] acpi/ghes: Add a logic to handle block addresses and FW first ARM processor error injection

2024-07-30 Thread Igor Mammedov
On Mon, 22 Jul 2024 08:45:56 +0200 Mauro Carvalho Chehab wrote: that's quite a bit of code that in 99% won't ever be used (assuming error injection testing scenario), not to mention it's a hw depended one and governed by different specs. Essentially we would need to create _whole_ lot of QAPI co

Re: [PATCH v3 6/7] acpi/ghes: update comments to point to newer ACPI specs

2024-07-30 Thread Igor Mammedov
On Mon, 22 Jul 2024 08:45:58 +0200 Mauro Carvalho Chehab wrote: > There is one reference to ACPI 4.0 and several references > to ACPI 6.x versions. > > Update them to point to ACPI 6.5 whenever possible. when it comes to APCI doc comments, they should point to the 1st (earliest) revision that p

Re: [PATCH v3 1/7] arm/virt: place power button pin number on a define

2024-07-30 Thread Igor Mammedov
On Tue, 30 Jul 2024 09:29:37 +0100 Peter Maydell wrote: > On Tue, 30 Jul 2024 at 08:26, Igor Mammedov wrote: > > > > On Mon, 22 Jul 2024 08:45:53 +0200 > > Mauro Carvalho Chehab wrote: > > > > > Having magic numbers inside the code is not a good idea, as it > > > is error-prone. So, instead,

Re: [PATCH] virtio-rng: block max-bytes=0

2024-07-30 Thread Michael S. Tsirkin
On Tue, Jul 30, 2024 at 11:07:11AM +0200, Laurent Vivier wrote: > On 24/07/2024 12:51, Michael S. Tsirkin wrote: > > with max-bytes set to 0, quota is 0 and so device does not work. > > block this to avoid user confusion > > > > Signed-off-by: Michael S. Tsirkin > > --- > > hw/virtio/virtio-rng

Re: [PATCH] target/arm: Fix BTI versus CF_PCREL

2024-07-30 Thread Richard Henderson
On 7/30/24 19:30, Peter Maydell wrote: +static bool is_guarded_page(CPUARMState *env, target_ulong addr) +{ +#ifdef CONFIG_USER_ONLY +return page_get_flags(addr) & PAGE_BTI; +#else +CPUTLBEntryFull *full; +void *host; +int mmu_idx = cpu_mmu_index(env_cpu(env), true); +int flag

Re: [PATCH v3 6/7] acpi/ghes: update comments to point to newer ACPI specs

2024-07-30 Thread Michael S. Tsirkin
On Tue, Jul 30, 2024 at 01:24:30PM +0200, Igor Mammedov wrote: > On Mon, 22 Jul 2024 08:45:58 +0200 > Mauro Carvalho Chehab wrote: > > > There is one reference to ACPI 4.0 and several references > > to ACPI 6.x versions. > > > > Update them to point to ACPI 6.5 whenever possible. > > when it co

Re: [PATCH v5 0/8] virtio-net: add support for SR-IOV emulation

2024-07-30 Thread Michael S. Tsirkin
On Mon, Jul 15, 2024 at 02:19:06PM +0900, Akihiko Odaki wrote: > Based-on: <20240714-rombar-v2-0-af1504ef5...@daynix.com> > ("[PATCH v2 0/4] hw/pci: Convert rom_bar into OnOffAuto") OK I will revert this for now. We'll try again after the release, there will be time to address s390.

Re: [PATCH v1] target/i386: Always set leaf 0x1f

2024-07-30 Thread Igor Mammedov
On Mon, 29 Jul 2024 19:42:39 +0700 Manish wrote: > On 29/07/24 7:18 pm, Igor Mammedov wrote: > > !---| > >CAUTION: External Email > > > > |---! > > > > On Wed, 24 Ju

[PATCH] sm4:Adjust the naming of SM4 encryption method

2024-07-30 Thread luzhipeng
With reference to the naming conventions of other encryption algorithms, the name of SM4 is modified.So libvirt and qemu are compatible. Signed-off-by: luzhipeng --- crypto/block-luks.c | 2 +- crypto/cipher-gcrypt.c.inc | 4 ++-- crypto/cipher-nettle.c.inc | 4 ++-- crypto

Re: [PATCH] sm4:Adjust the naming of SM4 encryption method

2024-07-30 Thread Daniel P . Berrangé
On Tue, Jul 30, 2024 at 07:38:50PM +0800, luzhipeng wrote: > With reference to the naming conventions of other encryption algorithms, > the name of SM4 is modified.So libvirt and qemu are compatible. > > Signed-off-by: luzhipeng > --- > crypto/block-luks.c | 2 +- > crypto/cipher-gcr

[PATCH v6 3/5] net/tap: Factorize fd closing after forking

2024-07-30 Thread Clément Léger
The same code is used twice to actually close all open file descriptors after forking. Factorize it in a single place. Signed-off-by: Clément Léger --- net/tap.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/net/tap.c b/net/tap.c index 51f7aec3

[PATCH v6 5/5] net/tap: Use qemu_close_all_open_fd()

2024-07-30 Thread Clément Léger
Instead of using a slow implementation to close all open fd after forking, use qemu_close_all_open_fd(). Signed-off-by: Clément Léger --- net/tap.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/net/tap.c b/net/tap.c index 7b2d5d5703..3f90022c0b 100644 ---

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-07-30 Thread Yuri Benditovich
@Akihiko Odaki The RSC is supported with vhost and without vhost The 'in-qemu RSC' is related to VIRTIO_NET_F_RSC_EXT feature, it is intended for one specific WHCK test only and should not be used in any functional setup. When it is used the vhost should be off On Tue, Jul 30, 2024 at 1:23 PM Akih

Re: [PATCH v5 0/8] virtio-net: add support for SR-IOV emulation

2024-07-30 Thread Akihiko Odaki
On 2024/07/30 20:37, Michael S. Tsirkin wrote: On Mon, Jul 15, 2024 at 02:19:06PM +0900, Akihiko Odaki wrote: Based-on: <20240714-rombar-v2-0-af1504ef5...@daynix.com> ("[PATCH v2 0/4] hw/pci: Convert rom_bar into OnOffAuto") OK I will revert this for now. We'll try again after the release, the

  1   2   3   >