qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v3 6/6] target-ppc: demonstrate new "vsx" property


From: Alexey Kardashevskiy
Subject: [Qemu-devel] [PATCH v3 6/6] target-ppc: demonstrate new "vsx" property
Date: Mon, 11 Nov 2013 18:44:35 +1100

This patch is to demonstrate a static property handling in PowerPC.
Running QEMU with -cpu host,-vsx disables VSX bit in
PowerPCCPU::env::flags.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
 target-ppc/translate_init.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index df0d81c..60ea235 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -29,6 +29,7 @@
 #include "mmu-hash64.h"
 #include "qemu/error-report.h"
 #include "qapi/visitor.h"
+#include "hw/qdev-properties.h"
 
 //#define PPC_DUMP_CPU
 //#define PPC_DEBUG_SPR
@@ -8740,6 +8741,12 @@ static void ppc_cpu_class_init(ObjectClass *oc, void 
*data)
 
     dc->fw_name = "PowerPC,UNKNOWN";
     cc->parse_options = cpu_default_parse_options_func;
+
+    static Property powerpc_properties[] = {
+        DEFINE_PROP_BIT("vsx", PowerPCCPU, env.flags, BITNR(POWERPC_FLAG_VSX), 
false),
+        DEFINE_PROP_END_OF_LIST(),
+    };
+    dc->props = powerpc_properties;
 }
 
 static const TypeInfo ppc_cpu_type_info = {
-- 
1.8.4.rc4




reply via email to

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