mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging
x86, cpu queue, 2017-09-01 CPU creation refactor plus x86 patches. # gpg: Signature made Fri 01 Sep 2017 15:59:02 BST # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-and-machine-pull-request: (29 commits) ppc: replace cpu_ppc_init() with cpu_generic_init() unicore32: replace uc32_cpu_init() with cpu_generic_init() openrisc: replace cpu_openrisc_init() with cpu_generic_init() moxie: replace cpu_moxie_init() with cpu_generic_init() lm32: replace cpu_lm32_init() with cpu_generic_init() x86: replace cpu_x86_init() with cpu_generic_init() cris: replace cpu_cris_init() with cpu_generic_init() arm: replace cpu_arm_init() with cpu_generic_init() sh4: replace cpu_sh4_init() with cpu_generic_init() tricore: replace cpu_tricore_init() with cpu_generic_init() xtensa: replace cpu_xtensa_init() with cpu_generic_init() tilegx: replace cpu_tilegx_init() with cpu_generic_init() nios2: replace cpu_nios2_init() with cpu_generic_init() microblaze: replace cpu_mb_init() with cpu_generic_init() m68k: replace cpu_m68k_init() with cpu_generic_init() hppa: replace cpu_hppa_init() with cpu_generic_init() alpha: replace cpu_alpha_init() with cpu_generic_init() s390x: replace cpu_s390x_init() with cpu_generic_init() sparc: replace cpu_sparc_init() with cpu_generic_init() sparc: make cpu feature parsing property based ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -215,7 +215,7 @@ bool cryptodev_backend_is_ready(CryptoDevBackend *backend)
|
||||
}
|
||||
|
||||
static bool
|
||||
cryptodev_backend_can_be_deleted(UserCreatable *uc, Error **errp)
|
||||
cryptodev_backend_can_be_deleted(UserCreatable *uc)
|
||||
{
|
||||
return !cryptodev_backend_is_used(CRYPTODEV_BACKEND(uc));
|
||||
}
|
||||
|
||||
+1
-1
@@ -342,7 +342,7 @@ out:
|
||||
}
|
||||
|
||||
static bool
|
||||
host_memory_backend_can_be_deleted(UserCreatable *uc, Error **errp)
|
||||
host_memory_backend_can_be_deleted(UserCreatable *uc)
|
||||
{
|
||||
if (host_memory_backend_is_mapped(MEMORY_BACKEND(uc))) {
|
||||
return false;
|
||||
|
||||
@@ -115,9 +115,10 @@ ETEXI
|
||||
#if defined(TARGET_I386)
|
||||
{
|
||||
.name = "lapic",
|
||||
.args_type = "",
|
||||
.params = "",
|
||||
.help = "show local apic state",
|
||||
.args_type = "apic-id:i?",
|
||||
.params = "[apic-id]",
|
||||
.help = "show local apic state (apic-id: local apic to read, default is which of current CPU)",
|
||||
|
||||
.cmd = hmp_info_local_apic,
|
||||
},
|
||||
#endif
|
||||
|
||||
+6
-2
@@ -51,7 +51,7 @@ static int clipper_pci_map_irq(PCIDevice *d, int irq_num)
|
||||
static void clipper_init(MachineState *machine)
|
||||
{
|
||||
ram_addr_t ram_size = machine->ram_size;
|
||||
const char *cpu_model = machine->cpu_model;
|
||||
const char *cpu_model = machine->cpu_model ? machine->cpu_model : "ev67";
|
||||
const char *kernel_filename = machine->kernel_filename;
|
||||
const char *kernel_cmdline = machine->kernel_cmdline;
|
||||
const char *initrd_filename = machine->initrd_filename;
|
||||
@@ -67,7 +67,11 @@ static void clipper_init(MachineState *machine)
|
||||
/* Create up to 4 cpus. */
|
||||
memset(cpus, 0, sizeof(cpus));
|
||||
for (i = 0; i < smp_cpus; ++i) {
|
||||
cpus[i] = cpu_alpha_init(cpu_model ? cpu_model : "ev67");
|
||||
cpus[i] = ALPHA_CPU(cpu_generic_init(TYPE_ALPHA_CPU, cpu_model));
|
||||
if (!cpus[i]) {
|
||||
error_report("Unable to find CPU definition");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
cpus[0]->env.trap_arg0 = ram_size;
|
||||
|
||||
+1
-1
@@ -1593,7 +1593,7 @@ static void musicpal_init(MachineState *machine)
|
||||
if (!cpu_model) {
|
||||
cpu_model = "arm926";
|
||||
}
|
||||
cpu = cpu_arm_init(cpu_model);
|
||||
cpu = ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, cpu_model));
|
||||
if (!cpu) {
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
|
||||
+1
-1
@@ -3863,7 +3863,7 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *system_memory,
|
||||
|
||||
/* Core */
|
||||
s->mpu_model = omap310;
|
||||
s->cpu = cpu_arm_init(core);
|
||||
s->cpu = ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, core));
|
||||
if (s->cpu == NULL) {
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
|
||||
+1
-1
@@ -2261,7 +2261,7 @@ struct omap_mpu_state_s *omap2420_mpu_init(MemoryRegion *sysmem,
|
||||
|
||||
/* Core */
|
||||
s->mpu_model = omap2420;
|
||||
s->cpu = cpu_arm_init(core ?: "arm1136-r2");
|
||||
s->cpu = ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, core ?: "arm1136-r2"));
|
||||
if (s->cpu == NULL) {
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
|
||||
+2
-2
@@ -2066,7 +2066,7 @@ PXA2xxState *pxa270_init(MemoryRegion *address_space,
|
||||
if (!revision)
|
||||
revision = "pxa270";
|
||||
|
||||
s->cpu = cpu_arm_init(revision);
|
||||
s->cpu = ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, revision));
|
||||
if (s->cpu == NULL) {
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
@@ -2196,7 +2196,7 @@ PXA2xxState *pxa255_init(MemoryRegion *address_space, unsigned int sdram_size)
|
||||
|
||||
s = g_new0(PXA2xxState, 1);
|
||||
|
||||
s->cpu = cpu_arm_init("pxa255");
|
||||
s->cpu = ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, "pxa255"));
|
||||
if (s->cpu == NULL) {
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
|
||||
+1
-1
@@ -1597,7 +1597,7 @@ StrongARMState *sa1110_init(MemoryRegion *sysmem,
|
||||
exit(1);
|
||||
}
|
||||
|
||||
s->cpu = cpu_arm_init(rev);
|
||||
s->cpu = ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, rev));
|
||||
|
||||
if (!s->cpu) {
|
||||
error_report("Unable to find CPU definition");
|
||||
|
||||
@@ -271,7 +271,7 @@ void axisdev88_init(MachineState *machine)
|
||||
if (cpu_model == NULL) {
|
||||
cpu_model = "crisv32";
|
||||
}
|
||||
cpu = cpu_cris_init(cpu_model);
|
||||
cpu = CRIS_CPU(cpu_generic_init(TYPE_CRIS_CPU, cpu_model));
|
||||
env = &cpu->env;
|
||||
|
||||
/* allocate RAM */
|
||||
|
||||
@@ -104,7 +104,7 @@ static void lm32_evr_init(MachineState *machine)
|
||||
if (cpu_model == NULL) {
|
||||
cpu_model = "lm32-full";
|
||||
}
|
||||
cpu = cpu_lm32_init(cpu_model);
|
||||
cpu = LM32_CPU(cpu_generic_init(TYPE_LM32_CPU, cpu_model));
|
||||
if (cpu == NULL) {
|
||||
fprintf(stderr, "qemu: unable to find CPU '%s'\n", cpu_model);
|
||||
exit(1);
|
||||
@@ -205,7 +205,7 @@ static void lm32_uclinux_init(MachineState *machine)
|
||||
if (cpu_model == NULL) {
|
||||
cpu_model = "lm32-full";
|
||||
}
|
||||
cpu = cpu_lm32_init(cpu_model);
|
||||
cpu = LM32_CPU(cpu_generic_init(TYPE_LM32_CPU, cpu_model));
|
||||
if (cpu == NULL) {
|
||||
fprintf(stderr, "qemu: unable to find CPU '%s'\n", cpu_model);
|
||||
exit(1);
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ milkymist_init(MachineState *machine)
|
||||
if (cpu_model == NULL) {
|
||||
cpu_model = "lm32-full";
|
||||
}
|
||||
cpu = cpu_lm32_init(cpu_model);
|
||||
cpu = LM32_CPU(cpu_generic_init(TYPE_LM32_CPU, cpu_model));
|
||||
if (cpu == NULL) {
|
||||
fprintf(stderr, "qemu: unable to find CPU '%s'\n", cpu_model);
|
||||
exit(1);
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ static void an5206_init(MachineState *machine)
|
||||
if (!cpu_model) {
|
||||
cpu_model = "m5206";
|
||||
}
|
||||
cpu = cpu_m68k_init(cpu_model);
|
||||
cpu = M68K_CPU(cpu_generic_init(TYPE_M68K_CPU, cpu_model));
|
||||
if (!cpu) {
|
||||
error_report("Unable to find m68k CPU definition");
|
||||
exit(1);
|
||||
|
||||
+1
-1
@@ -232,7 +232,7 @@ static void mcf5208evb_init(MachineState *machine)
|
||||
if (!cpu_model) {
|
||||
cpu_model = "m5208";
|
||||
}
|
||||
cpu = cpu_m68k_init(cpu_model);
|
||||
cpu = M68K_CPU(cpu_generic_init(TYPE_M68K_CPU, cpu_model));
|
||||
if (!cpu) {
|
||||
fprintf(stderr, "Unable to find m68k CPU definition\n");
|
||||
exit(1);
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ static void moxiesim_init(MachineState *machine)
|
||||
if (cpu_model == NULL) {
|
||||
cpu_model = "MoxieLite-moxie-cpu";
|
||||
}
|
||||
cpu = cpu_moxie_init(cpu_model);
|
||||
cpu = MOXIE_CPU(cpu_generic_init(TYPE_MOXIE_CPU, cpu_model));
|
||||
if (!cpu) {
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
|
||||
@@ -75,7 +75,7 @@ static void nios2_10m50_ghrd_init(MachineState *machine)
|
||||
phys_ram_alias);
|
||||
|
||||
/* Create CPU -- FIXME */
|
||||
cpu = cpu_nios2_init("nios2");
|
||||
cpu = NIOS2_CPU(cpu_generic_init(TYPE_NIOS2_CPU, "nios2"));
|
||||
|
||||
/* Register: CPU interrupt controller (PIC) */
|
||||
cpu_irq = nios2_cpu_pic_init(cpu);
|
||||
|
||||
@@ -109,7 +109,7 @@ static void openrisc_sim_init(MachineState *machine)
|
||||
}
|
||||
|
||||
for (n = 0; n < smp_cpus; n++) {
|
||||
cpu = cpu_openrisc_init(cpu_model);
|
||||
cpu = OPENRISC_CPU(cpu_generic_init(TYPE_OPENRISC_CPU, cpu_model));
|
||||
if (cpu == NULL) {
|
||||
fprintf(stderr, "Unable to find CPU definition!\n");
|
||||
exit(1);
|
||||
|
||||
+2
-1
@@ -819,7 +819,8 @@ void ppce500_init(MachineState *machine, PPCE500Params *params)
|
||||
CPUState *cs;
|
||||
qemu_irq *input;
|
||||
|
||||
cpu = cpu_ppc_init(machine->cpu_model);
|
||||
cpu = POWERPC_CPU(cpu_generic_init(TYPE_POWERPC_CPU,
|
||||
machine->cpu_model));
|
||||
if (cpu == NULL) {
|
||||
fprintf(stderr, "Unable to initialize CPU!\n");
|
||||
exit(1);
|
||||
|
||||
@@ -187,7 +187,8 @@ static void ppc_core99_init(MachineState *machine)
|
||||
#endif
|
||||
}
|
||||
for (i = 0; i < smp_cpus; i++) {
|
||||
cpu = cpu_ppc_init(machine->cpu_model);
|
||||
cpu = POWERPC_CPU(cpu_generic_init(TYPE_POWERPC_CPU,
|
||||
machine->cpu_model));
|
||||
if (cpu == NULL) {
|
||||
fprintf(stderr, "Unable to find PowerPC CPU definition\n");
|
||||
exit(1);
|
||||
|
||||
@@ -116,7 +116,8 @@ static void ppc_heathrow_init(MachineState *machine)
|
||||
if (machine->cpu_model == NULL)
|
||||
machine->cpu_model = "G3";
|
||||
for (i = 0; i < smp_cpus; i++) {
|
||||
cpu = cpu_ppc_init(machine->cpu_model);
|
||||
cpu = POWERPC_CPU(cpu_generic_init(TYPE_POWERPC_CPU,
|
||||
machine->cpu_model));
|
||||
if (cpu == NULL) {
|
||||
fprintf(stderr, "Unable to find PowerPC CPU definition\n");
|
||||
exit(1);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user