[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 2/6] target-ppc: make use of new -cpu suboptions ha
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [PATCH v3 2/6] target-ppc: make use of new -cpu suboptions handling |
Date: |
Mon, 11 Nov 2013 18:44:31 +1100 |
This enables -cpu subobtions parser. No option is supported yet.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
hw/ppc/spapr.c | 4 +++-
target-ppc/translate_init.c | 5 +++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 7e53a5f..2e18bdb 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1101,7 +1101,7 @@ static SaveVMHandlers savevm_htab_handlers = {
static void ppc_spapr_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
- const char *cpu_model = args->cpu_model;
+ const char *cpu_model;
const char *kernel_filename = args->kernel_filename;
const char *kernel_cmdline = args->kernel_cmdline;
const char *initrd_filename = args->initrd_filename;
@@ -1121,6 +1121,8 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
msi_supported = true;
+ cpu_model = qemu_opt_get(qemu_get_cpu_opts(), "type");
+
spapr = g_malloc0(sizeof(*spapr));
QLIST_INIT(&spapr->phbs);
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index c030a20..9e4af56 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -7381,6 +7381,10 @@ static void init_ppc_proc(PowerPCCPU *cpu)
/* PowerPC implementation specific initialisations (SPRs, timers, ...) */
(*pcc->init_proc)(env);
+ if (cpu_parse_options(CPU(cpu))) {
+ exit(1);
+ }
+
/* MSR bits & flags consistency checks */
if (env->msr_mask & (1 << 25)) {
switch (env->flags & (POWERPC_FLAG_SPE | POWERPC_FLAG_VRE)) {
@@ -8674,6 +8678,7 @@ static void ppc_cpu_class_init(ObjectClass *oc, void
*data)
#endif
dc->fw_name = "PowerPC,UNKNOWN";
+ cc->parse_options = cpu_default_parse_options_func;
}
static const TypeInfo ppc_cpu_type_info = {
--
1.8.4.rc4
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments, (continued)
- [Qemu-ppc] [PATCH v3 3/6] target-ppc: add "compat" CPU option, Alexey Kardashevskiy, 2013/11/11
- [Qemu-ppc] [PATCH v3 5/6] bitops: add BITNR macro, Alexey Kardashevskiy, 2013/11/11
- Re: [Qemu-ppc] [PATCH v3 5/6] bitops: add BITNR macro, Andreas Färber, 2013/11/11
- Re: [Qemu-ppc] [PATCH v3 5/6] bitops: add BITNR macro, Alexey Kardashevskiy, 2013/11/11
- Re: [Qemu-ppc] [PATCH v3 5/6] bitops: add BITNR macro, Alexey Kardashevskiy, 2013/11/12
- Re: [Qemu-ppc] [PATCH v3 5/6] bitops: add BITNR macro, Paolo Bonzini, 2013/11/13
- Re: [Qemu-ppc] [PATCH v3 5/6] bitops: add BITNR macro, Alexey Kardashevskiy, 2013/11/14
- Re: [Qemu-ppc] [PATCH v3 5/6] bitops: add BITNR macro, Paolo Bonzini, 2013/11/14
[Qemu-ppc] [PATCH v3 2/6] target-ppc: make use of new -cpu suboptions handling,
Alexey Kardashevskiy <=
[Qemu-ppc] [PATCH v3 6/6] target-ppc: demonstrate new "vsx" property, Alexey Kardashevskiy, 2013/11/11