[Top][All Lists]

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

Re: [PATCH v1 12/12] target/riscv: Support virtual time context synchron

From: Paolo Bonzini
Subject: Re: [PATCH v1 12/12] target/riscv: Support virtual time context synchronization
Date: Fri, 10 Dec 2021 11:11:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 11/20/21 23:34, Richard Henderson wrote:
On 11/20/21 8:46 AM, Yifei Jiang wrote:
  const VMStateDescription vmstate_riscv_cpu = {
      .name = "cpu",
      .version_id = 3,
      .minimum_version_id = 3,
+    .post_load = cpu_post_load,
      .fields = (VMStateField[]) {
          VMSTATE_UINTTL_ARRAY(env.gpr, RISCVCPU, 32),
          VMSTATE_UINT64_ARRAY(env.fpr, RISCVCPU, 32),
@@ -211,6 +221,10 @@ const VMStateDescription vmstate_riscv_cpu = {
          VMSTATE_UINT64(env.mtohost, RISCVCPU),
          VMSTATE_UINT64(env.timecmp, RISCVCPU),
+        VMSTATE_UINT64(env.kvm_timer_time, RISCVCPU),
+        VMSTATE_UINT64(env.kvm_timer_compare, RISCVCPU),
+        VMSTATE_UINT64(env.kvm_timer_state, RISCVCPU),

Can't alter VMStateDescription.fields without bumping version.

If this is really kvm-only state, consider placing it into a subsection.  But I worry about kvm-only state because ideally we'd be able to migrate between tcg and kvm (if only for debugging).

Where is this state stored for TCG?


reply via email to

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