]> Git Repo - qemu.git/commitdiff
arm: check regime, not current state, for ATS write PAR format
authorPeter Maydell <[email protected]>
Fri, 3 Nov 2017 14:36:54 +0000 (14:36 +0000)
committerPeter Maydell <[email protected]>
Mon, 20 Nov 2017 13:42:25 +0000 (13:42 +0000)
In do_ats_write(), rather than using extended_addresses_enabled() to
decide whether the value we get back from get_phys_addr() is a 64-bit
format PAR or a 32-bit one, use arm_s1_regime_using_lpae_format().

This is not really the correct answer, because the PAR format
depends on the AT instruction being used, not just on the
translation regime. However getting this correct requires a
significant refactoring, so that get_phys_addr() returns raw
information about the fault which the caller can then assemble
into a suitable FSR/PAR/syndrome for its purposes, rather than
get_phys_addr() returning a pre-formatted FSR.

However this change at least improves the situation by making
the PAR work correctly for address translation operations done
at AArch64 EL2 on the EL2 translation regime. In particular,
this is necessary for Xen to be able to run in our emulation,
so this seems like a safer interim fix given that we are in freeze.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Edgar E. Iglesias <[email protected]>
Reviewed-by: Alex BennĂ©e <[email protected]>
Tested-by: Stefano Stabellini <[email protected]>
Message-id: 1509719814[email protected]

target/arm/helper.c

index 35c5bd693bced79b25a31bb1a3ebf691d9837b01..91a9300f119dad313ff1f6933aec515212a8754a 100644 (file)
@@ -2169,7 +2169,7 @@ static uint64_t do_ats_write(CPUARMState *env, uint64_t value,
 
     ret = get_phys_addr(env, value, access_type, mmu_idx, &phys_addr, &attrs,
                         &prot, &page_size, &fsr, &fi, &cacheattrs);
-    if (extended_addresses_enabled(env)) {
+    if (arm_s1_regime_using_lpae_format(env, mmu_idx)) {
         /* fsr is a DFSR/IFSR value for the long descriptor
          * translation table format, but with WnR always clear.
          * Convert it to a 64-bit PAR.
This page took 0.043172 seconds and 4 git commands to generate.