Hi,

On 24/04/2023 07:02, Luca Fancellu wrote:
When a guest is allowed to use SVE, expose the SVE features through
the identification registers.

Signed-off-by: Luca Fancellu <luca.fance...@arm.com>

With one remark below:

Acked-by: Julien Grall <jgr...@amazon.com>

+    case HSR_SYSREG_ID_AA64ZFR0_EL1:
+    {
+        /*
+         * When the guest has the SVE feature enabled, the whole 
id_aa64zfr0_el1
+         * needs to be exposed.
+         */
+        register_t guest_reg_value = guest_cpuinfo.zfr64.bits[0];

Coding style: Add a newline after the declaration.

+        if ( is_sve_domain(v->domain) )
+            guest_reg_value = system_cpuinfo.zfr64.bits[0];
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  guest_reg_value);
+    }
/*
       * Those cases are catching all Reserved registers trapped by TID3 which

Cheers,

--
Julien Grall

Reply via email to