qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v4 20/22] cpu: Add address-space property


From: Edgar E. Iglesias
Subject: [Qemu-devel] [PATCH v4 20/22] cpu: Add address-space property
Date: Mon, 3 Feb 2014 19:44:48 +1000

From: "Edgar E. Iglesias" <address@hidden>

Signed-off-by: Edgar E. Iglesias <address@hidden>
---
 qom/cpu.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/qom/cpu.c b/qom/cpu.c
index 9d62479..fc6dbff 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -24,6 +24,7 @@
 #include "qemu/notify.h"
 #include "qemu/log.h"
 #include "sysemu/sysemu.h"
+#include "hw/qdev-properties.h"
 
 bool cpu_exists(int64_t id)
 {
@@ -237,6 +238,11 @@ static int64_t cpu_common_get_arch_id(CPUState *cpu)
     return cpu->cpu_index;
 }
 
+static Property cpu_properties[] = {
+    DEFINE_PROP_ADDRESS_SPACE("address-space", CPUState, as),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
 static void cpu_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
@@ -253,6 +259,7 @@ static void cpu_class_init(ObjectClass *klass, void *data)
     k->write_elf64_note = cpu_common_write_elf64_note;
     k->gdb_read_register = cpu_common_gdb_read_register;
     k->gdb_write_register = cpu_common_gdb_write_register;
+    dc->props = cpu_properties;
     dc->realize = cpu_common_realizefn;
     /*
      * Reason: CPUs still need special care by board code: wiring up
-- 
1.8.1.2




reply via email to

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