[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/17] bsd-user: Make cpu_model and cpu_type file scope
|
From: |
Warner Losh |
|
Subject: |
[PATCH 03/17] bsd-user: Make cpu_model and cpu_type file scope |
|
Date: |
Fri, 2 Aug 2024 17:56:03 -0600 |
linux-user already does this since 2278b93941d4. That same commit just
added them with main() scope to bsd-user. We need the cpu_type, like
linux-user does, to create new CPUs outside of main to support
threading. Move both cpu_model and cpu_type to mirror linux-user/main.c.
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 4d29e13a8f5..1533fd51168 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -62,6 +62,8 @@ intptr_t qemu_host_page_mask;
static bool opt_one_insn_per_tb;
uintptr_t guest_base;
bool have_guest_base;
+static const char *cpu_model;
+static const char *cpu_type;
/*
* When running 32-on-64 we should make sure we can fit all of the possible
* guest address space into a contiguous chunk of virtual host memory.
@@ -251,8 +253,6 @@ adjust_ssize(void)
int main(int argc, char **argv)
{
const char *filename;
- const char *cpu_model;
- const char *cpu_type;
const char *log_file = NULL;
const char *log_mask = NULL;
const char *seed_optarg = NULL;
--
2.45.1
- [PATCH 01/17] bsd-user: Delete TaskState next member, (continued)
- [PATCH 01/17] bsd-user: Delete TaskState next member, Warner Losh, 2024/08/02
- [PATCH 02/17] bsd-user: Make init_task_state global, Warner Losh, 2024/08/02
- [PATCH 04/17] bsd-user: Implement cpu_copy(), Warner Losh, 2024/08/02
- [PATCH 05/17] bsd-user: Eliminate unused regs arg in load_elf_binary, Warner Losh, 2024/08/02
- [PATCH 12/17] bsd-user: Use guest_range_valid_untagged to validate range, Warner Losh, 2024/08/02
- [PATCH 03/17] bsd-user: Make cpu_model and cpu_type file scope,
Warner Losh <=
- [PATCH 07/17] bsd-user: Remove deprecated -p argument, Warner Losh, 2024/08/02
- [PATCH 08/17] bsd-user: Eliminate unused qemu_uname_release, Warner Losh, 2024/08/02
- [PATCH 06/17] bsd-user: Remove load_flt_binary prototype, Warner Losh, 2024/08/02
- [PATCH 11/17] bsd-user: Replace set_brk and padzero with zerobss from linux-user, Warner Losh, 2024/08/02
- [PATCH 13/17] bsd-user: target_mprotect: rename prot to target_prot, Warner Losh, 2024/08/02