[PATCH] security_apparmor: store dynamically generated rules

2024-11-08 Thread Georgia Garcia
Some rules are generated dynamically during boot and added to the AppArmor policy. An example of that is macvtap devices that call the AppArmorSetFDLabel hook to add a rule for the tap device path. Since this information is dynamic, it is not available in the xml config, therefore whenever a "Rest

Re: [RFC PATCH v3 04/17] hw/net/xilinx_ethlite: Simplify by having configurable endianness

2024-11-08 Thread Paolo Bonzini
On 11/8/24 16:43, Philippe Mathieu-Daudé wrote: The Xilinx 'ethlite' device was added in commit b43848a100 ("xilinx: Add ethlite emulation"), being only built back then for a big-endian MicroBlaze target (see commit 72b675caac "microblaze: Hook into the build-system"). I/O endianness access was

[PATCH v3 09/17] hw/ssi/xilinx_spips: Make device endianness configurable

2024-11-08 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Reviewed-by: Richard Henderson S

[PATCH v3 15/17] hw/microblaze: Support various endianness for s3adsp1800 machines

2024-11-08 Thread Philippe Mathieu-Daudé
Introduce an abstract machine parent class which defines the 'little_endian' property. Duplicate the current machine, which endian is tied to the binary endianness, to one big endian and a little endian machine; updating the machine description. Keep the current default machine for each binary. 'p

[PATCH v3 12/17] target/microblaze: Set MO_TE once in do_load() / do_store()

2024-11-08 Thread Philippe Mathieu-Daudé
All callers of do_load() / do_store() set MO_TE flag. Set it once in the callees. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/microblaze/translate.c | 36 +++ 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/targ

[PATCH v3 07/17] hw/char/xilinx_uartlite: Make device endianness configurable

2024-11-08 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Reviewed-by: Richard Henderson S

[PATCH v3 17/17] tests/functional: Add microblaze cross-endianness tests

2024-11-08 Thread Philippe Mathieu-Daudé
Copy/paste the current tests, but call the opposite endianness machines, testing: - petalogix-s3adsp1800-le machine (little-endian CPU) on the qemu-system-microblaze binary (big-endian) - petalogix-s3adsp1800-be machine (big-endian CPU) on the qemu-system-microblazeel binary (little-endian). S

[PATCH v3 16/17] tests/functional: Explicit endianness of microblaze assets

2024-11-08 Thread Philippe Mathieu-Daudé
The archive used in test_microblaze_s3adsp1800.py (testing a big-endian target) contains a big-endian kernel. Rename using the _BE suffix. Similarly, the archive in test_microblazeel_s3adsp1800 (testing a little-endian target) contains a little-endian kernel. Rename using _LE suffix. These change

[PATCH v3 14/17] target/microblaze: Consider endianness while translating code

2024-11-08 Thread Philippe Mathieu-Daudé
Consider the CPU ENDI bit, swap instructions when the CPU endianness doesn't match the binary one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/microblaze/cpu.h | 7 +++ target/microblaze/translate.c | 5 +++-- 2 files changed, 10 insertions(+), 2 de

[PATCH v3 13/17] target/microblaze: Introduce mo_endian() helper

2024-11-08 Thread Philippe Mathieu-Daudé
mo_endian() returns the target endianness, currently static. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/microblaze/translate.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/target/microblaze/translate.c b/target/microbla

[PATCH v3 11/17] target/microblaze: Explode MO_TExx -> MO_TE | MO_xx

2024-11-08 Thread Philippe Mathieu-Daudé
Extract the implicit MO_TE definition in order to replace it by runtime variable in the next commit. Mechanical change using: $ for n in UW UL UQ UO SW SL SQ; do \ sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \ $(git grep -l MO_TE$n target/microblaze); \ done Signed-off-by: Philip

[PATCH v3 10/17] hw/arm/xlnx-zynqmp: Use &error_abort for programming errors

2024-11-08 Thread Philippe Mathieu-Daudé
When a property value is static (not provided by QMP or CLI), error shouldn't happen, otherwise it is a programming error. Therefore simplify and use &error_abort as this can't fail. Reported-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/xlnx-zynqmp.c | 44 +

[PATCH v3 08/17] hw/ssi/xilinx_spi: Make device endianness configurable

2024-11-08 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Reviewed-by: Richard Henderson S

[PATCH v3 06/17] hw/timer/xilinx_timer: Make device endianness configurable

2024-11-08 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Reviewed-by: Richard Henderson Signed

[RFC PATCH v3 05/17] hw/timer/xilinx_timer: Allow down to 8-bit memory access

2024-11-08 Thread Philippe Mathieu-Daudé
Allow down to 8-bit access, per the datasheet (reference added in previous commit): "Timer Counter registers are accessed as one of the following types: • Byte (8 bits) • Half word (2 bytes) • Word (4 bytes)" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Acked-by: Al

[RFC PATCH v3 04/17] hw/net/xilinx_ethlite: Simplify by having configurable endianness

2024-11-08 Thread Philippe Mathieu-Daudé
The Xilinx 'ethlite' device was added in commit b43848a100 ("xilinx: Add ethlite emulation"), being only built back then for a big-endian MicroBlaze target (see commit 72b675caac "microblaze: Hook into the build-system"). I/O endianness access was then clarified in commit d48751ed4f ("xilinx-ethli

[PATCH v3 03/17] hw/intc/xilinx_intc: Make device endianness configurable

2024-11-08 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Reviewed-by: Richard Henderson Signed

[PATCH v3 02/17] hw/microblaze: Propagate CPU endianness to microblaze_load_kernel()

2024-11-08 Thread Philippe Mathieu-Daudé
Pass vCPU endianness as argument so we can load kernels with different endianness (different from the qemu-system-binary builtin one). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Reviewed-by: Richard Henderson

[PATCH v3 01/17] hw/microblaze: Restrict MemoryRegionOps are implemented as 32-bit

2024-11-08 Thread Philippe Mathieu-Daudé
All these MemoryRegionOps read() and write() handlers are implemented expecting 32-bit accesses. Clarify that setting .impl.min/max_access_size fields. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20241105130431.22564-8-phi...@linaro.org> --- hw/char/xilinx_ua

[PATCH v3 00/17] hw/microblaze: Allow running cross-endian vCPUs

2024-11-08 Thread Philippe Mathieu-Daudé
Missing review: 4 (new) & 10 Since v2: - Addressed Richard's review comments Since v1: - Make device endianness configurable (Edgar) - Convert more Xilinx devices - Avoid preprocessor #if (Richard) - Add R-b tags Make machines endianness-agnostic, allowing to run a big-endian vCPU on the little-

Re: [PATCH v2 08/16] hw/ssi/xilinx_spi: Make device endianness configurable

2024-11-08 Thread Philippe Mathieu-Daudé
On 7/11/24 11:01, Richard Henderson wrote: On 11/7/24 01:22, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set th

Re: [PATCH v2 07/16] hw/char/xilinx_uartlite: Make device endianness configurable

2024-11-08 Thread Philippe Mathieu-Daudé
On 7/11/24 10:27, Richard Henderson wrote: On 11/7/24 01:22, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set th

[PATCH v2 1/4] qemu: capabilities: Add QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM

2024-11-08 Thread Boris Fiuczynski
Add capability QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM to detect multi boot device support in QEMU by checking the virtio-blk-ccw device property existence of loadparm. Signed-off-by: Boris Fiuczynski Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 8 + src/qemu/qem

[PATCH v2 3/4] qemu: command: add multi boot device support on s390x

2024-11-08 Thread Boris Fiuczynski
If QEMU supports multi boot device make use of it instead of using the single boot device machine parameter. Signed-off-by: Boris Fiuczynski Reviewed-by: Peter Krempa --- src/qemu/qemu_command.c | 36 ++--- src/qemu/qemu_command.h | 6 ++- sr

[PATCH v2 0/4] Full boot order support on s390x

2024-11-08 Thread Boris Fiuczynski
This series adds on s390x full boot order support which has been introduced recently in QEMU with the PR https://lore.kernel.org/qemu-devel/20241023131710.906748-1-th...@redhat.com/ Changes in v2: - fixed up patch 2 with Peter's feedback - added RBs given - added NEWS update The replies and xm

[PATCH v2 2/4] tests: add capabilities for QEMU 9.2.0 on s390x

2024-11-08 Thread Boris Fiuczynski
Let us introduce the xml and reply files for QEMU 9.2.0 on s390x. A QEMU at commit https://github.com/qemu/qemu/commit/11b8920ed2 was used to generate this data. Signed-off-by: Shalini Chellathurai Saroja Signed-off-by: Boris Fiuczynski --- tests/domaincapsdata/qemu_9.2.0.s390x.xml | 311

[PATCH v2 4/4] NEWS: qemu: add multi boot device support on s390x

2024-11-08 Thread Boris Fiuczynski
Signed-off-by: Boris Fiuczynski --- NEWS.rst | 16 1 file changed, 16 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 34028d59aa..b79f1d0245 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,22 @@ v10.10.0 (unreleased) * **New features** + * qemu: add multi boot devic