On Thu, 10 Aug 2023 at 17:13, Philippe Mathieu-Daudé <phi...@linaro.org> wrote:
>
> Some CPU features aren't strictly required to run guest code (such
> debugging features), so we don't model them. To prevent the guest
> to access non-existent system registers, we disable the feature bit
> in the ID registers (see commit 7d8c283e10 "target/arm: Suppress more
> TCG unimplemented features in ID registers").
>
> Since it might be useful to know when a CPU supposed to implement a
> feature has it disabled in QEMU, provide the ability to log disabled
> features at the UNIMP level:
>
>   $ qemu-system-aarch64 -M virt -d unimp -S -cpu neoverse-v1
>   QEMU 8.0.92 monitor - type 'help' for more information
>   CPU#0: Disabling unimplemented feature 'FEAT_SPE (Statistical Profiling 
> Extension)' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'FEAT_TRF (Self-hosted Trace 
> Extension)' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'FEAT_TRF (Self-hosted Trace 
> Extension)' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'Trace Macrocell system register 
> access' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'Trace Macrocell system register 
> access' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'Memory-mapped Trace' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'FEAT_AMU (Activity Monitors 
> Extension)' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'FEAT_AMU (Activity Monitors 
> Extension)' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'FEAT_MPAM (Memory Partitioning and 
> Monitoring Extension)' for neoverse-v1
>   CPU#0: Disabling unimplemented feature 'FEAT_NV (Nested Virtualization)' 
> for neoverse-v1
>   (qemu) q
>
>   $ qemu-system-aarch64 -M xlnx-zcu102 -trace arm_disable\* -S -d unimp 
> -monitor stdio -cpu cortex-a76
>   QEMU 8.0.92 monitor - type 'help' for more information
>   CPU#0: Disabling unimplemented feature 'Memory-mapped Trace' for cortex-a53
>   CPU#1: Disabling unimplemented feature 'Memory-mapped Trace' for cortex-a53
>   CPU#2: Disabling unimplemented feature 'Memory-mapped Trace' for cortex-a53
>   CPU#3: Disabling unimplemented feature 'Memory-mapped Trace' for cortex-a53
>   (qemu) q

Generally the 'unimp' logging is "the guest tried to use some
feature we don't implement". Here we log about the fact we
don't implement the feature, even if the guest never tries
to use the feature at all...

thanks
-- PMM

Reply via email to