qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] About Revert this patch: arm: Allow system registers for


From: gengdongjiu
Subject: Re: [Qemu-arm] About Revert this patch: arm: Allow system registers for KVM guests to be changed by QEMU code
Date: Thu, 14 Mar 2019 20:23:54 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

If you think this patch will introduce some issue, we can add one function 
write_part_cpustate_to_list()[2] to change the specified
register instead of all the registers[1].

Below function that you added will modified all the register if new value is 
different with old value.
[1]:
bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync)
{

}

[2]:
+bool write_part_cpustate_to_list(ARMCPU *cpu, ptrdiff_t fieldoffset)
+{
+    const ARMCPRegInfo *ri;
+    uint32_t regidx, i;
+
+    for (i = 0; i < cpu->cpreg_array_len; i++) {
+        regidx = kvm_to_cpreg_id(cpu->cpreg_indexes[i]);
+        ri = get_arm_cp_reginfo(cpu->cp_regs, regidx);
+        if (!ri) {
+            continue;
+        }
+
+        if (ri->type & ARM_CP_NO_RAW) {
+            continue;
+        }
+        if (ri->fieldoffset == fieldoffset) {
+            cpu->cpreg_values[i] = read_raw_cp_reg(&cpu->env, ri);
+            return true;
+        }
+    }
+    return false;
+}
+



On 2019/3/14 19:31, gengdongjiu wrote:
>  Hi   Peter/Eric,
>    I think we should fix the regression issue instead of revert this patch,  
> I think the reason of
>    this issue is that QEMU modified some unexpected resisters, we should find 
> out.
> 
> 
>     Revert "arm: Allow system registers for KVM guests to be changed by QEMU 
> code"
> 
>     This reverts commit 823e1b3818f9b10b824ddcd756983b6e2fa68730,
>     which introduces a regression running EDK2 guest firmware
>     under KVM:
> 
>     error: kvm run failed Function not implemented
>      PC=000000013f5a6208 X00=00000000404003c4 X01=000000000000003a
>     X02=0000000000000000 X03=00000000404003c4 X04=0000000000000000
>     X05=0000000096000046 X06=000000013d2ef270 X07=000000013e3d1710
>     X08=09010755ffaf8ba8 X09=ffaf8b9cfeeb5468 X10=feeb546409010756
>     X11=09010757ffaf8b90 X12=feeb50680903068b X13=090306a1ffaf8bc0
>     X14=0000000000000000 X15=0000000000000000 X16=000000013f872da0
>     X17=00000000ffffa6ab X18=0000000000000000 X19=000000013f5a92d0
>     X20=000000013f5a7a78 X21=000000000000003a X22=000000013f5a7ab2
>     X23=000000013f5a92e8 X24=000000013f631090 X25=0000000000000010
>     X26=0000000000000100 X27=000000013f89501b X28=000000013e3d14e0
>     X29=000000013e3d12a0 X30=000000013f5a2518  SP=000000013b7be0b0
>     PSTATE=404003c4 -Z-- EL1t
> 
>     with
>     [ 3507.926571] kvm [35042]: load/store instruction decoding not 
> implemented
>     in the host dmesg.
> 
>     Revert the change for the moment until we can investigate the
>     cause of the regression.
> 
>     Reported-by: Eric Auger <address@hidden>
>     Signed-off-by: Peter Maydell <address@hidden>
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]