diff options
author | Peter Maydell | 2018-03-20 13:56:19 +0100 |
---|---|---|
committer | Peter Maydell | 2018-03-20 13:56:20 +0100 |
commit | 036793aebfc1dd0ce124fa278d7668d89b5da936 (patch) | |
tree | 5379e9c3085460af6aa2665a07b2250f51c6b60f /linux-user/main.c | |
parent | RISC-V: Fix riscv_isa_string memory size bug (diff) | |
parent | i386: Disable Intel PT if packets IP payloads have LIP values (diff) | |
download | qemu-036793aebfc1dd0ce124fa278d7668d89b5da936.tar.gz qemu-036793aebfc1dd0ce124fa278d7668d89b5da936.tar.xz qemu-036793aebfc1dd0ce124fa278d7668d89b5da936.zip |
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging
Machine and x86 queue, 2018-03-19
* cpu_model/cpu_type cleanups
* x86: Fix on Intel Processor Trace CPUID checks
# gpg: Signature made Mon 19 Mar 2018 20:07:14 GMT
# gpg: using RSA key 2807936F984DC5A6
# 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/machine-next-pull-request:
i386: Disable Intel PT if packets IP payloads have LIP values
cpu: drop unnecessary NULL check and cpu_common_class_by_name()
cpu: get rid of unused cpu_init() defines
Use cpu_create(type) instead of cpu_init(cpu_model)
cpu: add CPU_RESOLVING_TYPE macro
tests: add machine 'none' with -cpu test
nios2: 10m50_devboard: replace cpu_model with cpu_type
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 108e1f202c..ba09b7d0c8 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -45,6 +45,7 @@ static const char *argv0; static int gdbstub_port; static envlist_t *envlist; static const char *cpu_model; +static const char *cpu_type; unsigned long mmap_min_addr; unsigned long guest_base; int have_guest_base; @@ -4114,7 +4115,7 @@ void init_task_state(TaskState *ts) CPUArchState *cpu_copy(CPUArchState *env) { CPUState *cpu = ENV_GET_CPU(env); - CPUState *new_cpu = cpu_init(cpu_model); + CPUState *new_cpu = cpu_create(cpu_type); CPUArchState *new_env = new_cpu->env_ptr; CPUBreakpoint *bp; CPUWatchpoint *wp; @@ -4597,10 +4598,13 @@ int main(int argc, char **argv, char **envp) if (cpu_model == NULL) { cpu_model = cpu_get_model(get_elf_eflags(execfd)); } + cpu_type = parse_cpu_model(cpu_model); + tcg_exec_init(0); /* NOTE: we need to init the CPU at this stage to get qemu_host_page_size */ - cpu = cpu_init(cpu_model); + + cpu = cpu_create(cpu_type); env = cpu->env_ptr; cpu_reset(cpu); |