summary refs log tree commit diff stats
path: root/hw/timer/a9gtimer.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-02-21 13:32:25 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-02-21 13:32:25 +0000
commit477c3b934a47adf7de285863f59d6e4503dd1a6d (patch)
tree18c6a8a0d849f676ac72c7884d9f89d66efc251e /hw/timer/a9gtimer.c
parente670f6d825d4dee248b311197fd4048469d6772b (diff)
parentca511604925eef8572e22ecbf0d3c758d7277924 (diff)
downloadfocaccia-qemu-477c3b934a47adf7de285863f59d6e4503dd1a6d.tar.gz
focaccia-qemu-477c3b934a47adf7de285863f59d6e4503dd1a6d.zip
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20220221-1' into staging
arm, cocoa and misc:
 * MAINTAINERS file updates
 * Mark remaining global TypeInfo instances as const
 * checkpatch: Ensure that TypeInfos are const
 * arm hvf: Handle unknown ID registers as RES0
 * Make KVM -cpu max exactly like -cpu host
 * Fix '-cpu max' for HVF
 * Support PAuth extension for hvf
 * Kconfig: Add I2C_DEVICES device group
 * Kconfig: Add 'imply I2C_DEVICES' on boards with available i2c bus
 * hw/arm/armv7m: Handle disconnected clock inputs
 * osdep.h: pull out various things into new header files
 * hw/timer: fix a9gtimer vmstate
 * hw/arm: add initial mori-bmc board
 * ui/cocoa: Remove allowedFileTypes restriction in SavePanel
 * ui/cocoa: Do not alert even without block devices
 * ui/cocoa: Fix the leak of qemu_console_get_label

# gpg: Signature made Mon 21 Feb 2022 13:30:45 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20220221-1: (25 commits)
  ui/cocoa: Fix the leak of qemu_console_get_label
  ui/cocoa: Do not alert even without block devices
  ui/cocoa: Remove allowedFileTypes restriction in SavePanel
  hw/arm: add initial mori-bmc board
  hw/timer: fix a9gtimer vmstate
  MAINTAINERS: Add Akihiko Odaki to macOS-relateds
  include: Move hardware version declarations to new qemu/hw-version.h
  include: Move qemu_[id]cache_* declarations to new qemu/cacheinfo.h
  include: Move QEMU_MAP_* constants to mmap-alloc.h
  include: Move qemu_mprotect_*() to new qemu/mprotect.h
  include: Move qemu_madvise() and related #defines to new qemu/madvise.h
  hw/arm/armv7m: Handle disconnected clock inputs
  Kconfig: Add 'imply I2C_DEVICES' on boards with available i2c bus
  Kconfig: Add I2C_DEVICES device group
  target/arm: Support PAuth extension for hvf
  target/arm: Fix '-cpu max' for HVF
  target/arm: Unindent unnecessary else-clause
  target/arm: Make KVM -cpu max exactly like -cpu host
  target/arm: Use aarch64_cpu_register() for 'host' CPU type
  target/arm: Move '-cpu host' code to cpu64.c
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/timer/a9gtimer.c')
-rw-r--r--hw/timer/a9gtimer.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c
index 7233068a37..5e959b6d09 100644
--- a/hw/timer/a9gtimer.c
+++ b/hw/timer/a9gtimer.c
@@ -318,6 +318,12 @@ static void a9_gtimer_realize(DeviceState *dev, Error **errp)
     }
 }
 
+static bool vmstate_a9_gtimer_control_needed(void *opaque)
+{
+    A9GTimerState *s = opaque;
+    return s->control != 0;
+}
+
 static const VMStateDescription vmstate_a9_gtimer_per_cpu = {
     .name = "arm.cortex-a9-global-timer.percpu",
     .version_id = 1,
@@ -331,6 +337,17 @@ static const VMStateDescription vmstate_a9_gtimer_per_cpu = {
     }
 };
 
+static const VMStateDescription vmstate_a9_gtimer_control = {
+    .name = "arm.cortex-a9-global-timer.control",
+    .version_id = 1,
+    .minimum_version_id = 1,
+    .needed = vmstate_a9_gtimer_control_needed,
+    .fields = (VMStateField[]) {
+        VMSTATE_UINT32(control, A9GTimerState),
+        VMSTATE_END_OF_LIST()
+    }
+};
+
 static const VMStateDescription vmstate_a9_gtimer = {
     .name = "arm.cortex-a9-global-timer",
     .version_id = 1,
@@ -344,6 +361,10 @@ static const VMStateDescription vmstate_a9_gtimer = {
                                      1, vmstate_a9_gtimer_per_cpu,
                                      A9GTimerPerCPU),
         VMSTATE_END_OF_LIST()
+    },
+    .subsections = (const VMStateDescription*[]) {
+        &vmstate_a9_gtimer_control,
+        NULL
     }
 };