On 16/12/25 01:01, Pierrick Bouvier wrote:
From: Tao Tang <[email protected]>

The ARMSecuritySpace enum and its related helpers were defined in the
target-specific header target/arm/cpu.h. This prevented common,
target-agnostic code like the SMMU model from using these definitions
without triggering "cpu.h included from common code" errors.

To resolve this, this commit introduces a new, lightweight header,
include/hw/arm/arm-security.h, which is safe for inclusion by common
code.

The following change was made:

- The ARMSecuritySpace enum and the arm_space_is_secure() and
arm_secure_to_space() helpers have been moved from target/arm/cpu.h
to the new hw/arm/arm-security.h header.

This refactoring decouples the security state definitions from the core
CPU implementation, allowing common hardware models to correctly handle
security states without pulling in heavyweight, target-specific headers.

Signed-off-by: Tao Tang <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Link: https://lists.nongnu.org/archive/html/qemu-arm/2025-09/msg01288.html
Signed-off-by: Pierrick Bouvier <[email protected]>
---
  include/hw/arm/arm-security.h | 37 +++++++++++++++++++++++++++++++++++
  target/arm/cpu.h              | 25 +----------------------
  2 files changed, 38 insertions(+), 24 deletions(-)
  create mode 100644 include/hw/arm/arm-security.h

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to