Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge first two pull requests of 6.1 development #263

Open
wants to merge 50 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ccdf06c
Open 6.1 development tree
pm215 Apr 30, 2021
bf559ee
hw/arm/smmuv3: Support 16K translation granule
Mar 31, 2021
8196fe9
target/arm: Make Thumb store insns UNDEF for Rn==1111
pm215 Apr 8, 2021
98f9605
target/arm: Fix mte_checkN
rth7680 Apr 16, 2021
f8c8a86
target/arm: Split out mte_probe_int
rth7680 Apr 16, 2021
4a09a21
target/arm: Fix unaligned checks for mte_check1, mte_probe1
rth7680 Apr 16, 2021
09641ef
test/tcg/aarch64: Add mte-5
rth7680 Apr 16, 2021
28f3250
target/arm: Replace MTEDESC ESIZE+TSIZE with SIZEM1
rth7680 Apr 16, 2021
bd47b61
target/arm: Merge mte_check1, mte_checkN
rth7680 Apr 16, 2021
d304d28
target/arm: Rename mte_probe1 to mte_probe
rth7680 Apr 16, 2021
4c3310c
target/arm: Simplify sve mte checking
rth7680 Apr 16, 2021
33e74c3
target/arm: Remove log2_esize parameter to gen_mte_checkN
rth7680 Apr 16, 2021
a736cbc
target/arm: Fix decode of align in VLDST_single
rth7680 Apr 19, 2021
6a01eab
target/arm: Rename TBFLAG_A32, SCTLR_B
rth7680 Apr 19, 2021
ae6eb1e
target/arm: Rename TBFLAG_ANY, PSTATE_SS
rth7680 Apr 19, 2021
a729a46
target/arm: Add wrapper macros for accessing tbflags
rth7680 Apr 19, 2021
3902bfc
target/arm: Introduce CPUARMTBFlags
rth7680 Apr 19, 2021
a378206
target/arm: Move mode specific TB flags to tb->cs_base
rth7680 Apr 19, 2021
5896f39
target/arm: Move TBFLAG_AM32 bits to the top
rth7680 Apr 19, 2021
eee81d4
target/arm: Move TBFLAG_ANY bits to the bottom
rth7680 Apr 19, 2021
4479ec3
target/arm: Add ALIGN_MEM to TBFLAG_ANY
rth7680 Apr 19, 2021
9d486b4
target/arm: Adjust gen_aa32_{ld, st}_i32 for align+endianness
rth7680 Apr 19, 2021
37bf7a0
target/arm: Merge gen_aa32_frob64 into gen_aa32_ld_i64
rth7680 Apr 19, 2021
9565ac4
target/arm: Fix SCTLR_B test for TCGv_i64 load/store
rth7680 Apr 19, 2021
abe6629
target/arm: Adjust gen_aa32_{ld, st}_i64 for align+endianness
rth7680 Apr 19, 2021
4d753eb
target/arm: Enforce word alignment for LDRD/STRD
rth7680 Apr 19, 2021
824efdf
target/arm: Enforce alignment for LDA/LDAH/STL/STLH
rth7680 Apr 19, 2021
2e1f39e
target/arm: Enforce alignment for LDM/STM
rth7680 Apr 19, 2021
c0c7f66
target/arm: Enforce alignment for RFE
rth7680 Apr 19, 2021
2fd0800
target/arm: Enforce alignment for SRS
rth7680 Apr 19, 2021
ad9aeae
target/arm: Enforce alignment for VLDM/VSTM
rth7680 Apr 19, 2021
6cd623d
target/arm: Enforce alignment for VLDR/VSTR
rth7680 Apr 19, 2021
a8502b3
target/arm: Enforce alignment for VLDn (all lanes)
rth7680 Apr 19, 2021
7c68c19
target/arm: Enforce alignment for VLDn/VSTn (multiple)
rth7680 Apr 19, 2021
88976ff
target/arm: Enforce alignment for VLDn/VSTn (single)
rth7680 Apr 19, 2021
dc82164
target/arm: Use finalize_memop for aa64 gpr load/store
rth7680 Apr 19, 2021
4044a3c
target/arm: Use finalize_memop for aa64 fpr load/store
rth7680 Apr 19, 2021
acb07e0
target/arm: Enforce alignment for aa64 load-acq/store-rel
rth7680 Apr 19, 2021
a9e89e5
target/arm: Use MemOp for size + endian in aa64 vector ld/st
rth7680 Apr 19, 2021
c8f638d
target/arm: Enforce alignment for aa64 vector LDn/STn (multiple)
rth7680 Apr 19, 2021
37abe39
target/arm: Enforce alignment for aa64 vector LDn/STn (single)
rth7680 Apr 19, 2021
0ca0f87
target/arm: Enforce alignment for sve LD1R
rth7680 Apr 19, 2021
da7e13c
hw: add compat machines for 6.1
cohuck Mar 31, 2021
a609110
hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows
pm215 Mar 25, 2021
c3811c0
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2…
pm215 Apr 30, 2021
f99afcb
Open 6.1 development tree
pm215 Apr 30, 2021
d07e50f
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2…
arichardson Nov 20, 2024
a6364b6
Avoid using cs_base for CHERI
arichardson Nov 22, 2024
bdc0726
target/arm: Retire local patch to handle SCTLR.A flag
arichardson Nov 22, 2024
8aafdf3
Fix uninitialized cs_base value for RISC-V and MIPS targets
arichardson Jan 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.0
6.0.50
46 changes: 27 additions & 19 deletions accel/tcg/cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *tb_exit)

qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
"Trace %d: %p [" TARGET_FMT_lx "/" TARGET_FMT_lx
"/" TARGET_FMT_lx "/%#x/%#x] %s\n",
"/" TARGET_FMT_lx "-" TARGET_FMT_lx "/%#x/%#x] %s\n",
cpu->cpu_index, itb->tc.ptr, itb->cs_base, itb->pc,
itb->cs_top, itb->cheri_flags, itb->flags,
lookup_symbol(itb->pc));
itb->pcc_base, itb->pcc_top, itb->cheri_flags,
itb->flags, lookup_symbol(itb->pc));

#if defined(DEBUG_DISAS)
if (qemu_loglevel_mask(CPU_LOG_TB_CPU)
Expand Down Expand Up @@ -247,7 +247,7 @@ void cpu_exec_step_atomic(CPUState *cpu)
{
CPUArchState *env = (CPUArchState *)cpu->env_ptr;
TranslationBlock *tb;
target_ulong cs_base, cs_top = 0, pc;
target_ulong cs_base, pcc_base = 0, pcc_top = 0, pc;
uint32_t cheri_flags = 0;
uint32_t flags;
uint32_t cflags = (curr_cflags(cpu) & ~CF_PARALLEL) | 1;
Expand All @@ -259,13 +259,15 @@ void cpu_exec_step_atomic(CPUState *cpu)
g_assert(!cpu->running);
cpu->running = true;

cpu_get_tb_cpu_state_6(env, &pc, &cs_base, &cs_top, &cheri_flags, &flags);
tb = tb_lookup(cpu, pc, cs_base, cs_top, cheri_flags, flags, cflags);
cpu_get_tb_cpu_state_ext(env, &pc, &cs_base, &pcc_base, &pcc_top,
&cheri_flags, &flags);
tb = tb_lookup(cpu, pc, cs_base, pcc_base, pcc_top, cheri_flags, flags,
cflags);

if (tb == NULL) {
mmap_lock();
tb = tb_gen_code(cpu, pc, cs_base, cs_top, cheri_flags, flags,
cflags);
tb = tb_gen_code(cpu, pc, cs_base, pcc_base, pcc_top, cheri_flags,
flags, cflags);
mmap_unlock();
}

Expand Down Expand Up @@ -303,7 +305,8 @@ void cpu_exec_step_atomic(CPUState *cpu)
struct tb_desc {
target_ulong pc;
target_ulong cs_base;
target_ulong cs_top;
target_ulong pcc_base;
target_ulong pcc_top;
CPUArchState *env;
tb_page_addr_t phys_page1;
uint32_t cheri_flags;
Expand All @@ -318,8 +321,9 @@ static bool tb_lookup_cmp(const void *p, const void *d)
const struct tb_desc *desc = d;

if (tb->pc == desc->pc && tb->page_addr[0] == desc->phys_page1 &&
tb->cs_base == desc->cs_base && tb->cs_top == desc->cs_top &&
tb->cheri_flags == desc->cheri_flags && tb->flags == desc->flags &&
tb->cs_base == desc->cs_base && tb->pcc_base == desc->pcc_base &&
tb->pcc_top == desc->pcc_top && tb->cheri_flags == desc->cheri_flags &&
tb->flags == desc->flags &&
tb->trace_vcpu_dstate == desc->trace_vcpu_dstate &&
tb_cflags(tb) == desc->cflags) {
/* check next page if needed */
Expand All @@ -340,17 +344,18 @@ static bool tb_lookup_cmp(const void *p, const void *d)
}

TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc,
target_ulong cs_base, target_ulong cs_top,
uint32_t cheri_flags, uint32_t flags,
uint32_t cflags)
target_ulong cs_base, target_ulong pcc_base,
target_ulong pcc_top, uint32_t cheri_flags,
uint32_t flags, uint32_t cflags)
{
tb_page_addr_t phys_pc;
struct tb_desc desc;
uint32_t h;

desc.env = (CPUArchState *)cpu->env_ptr;
desc.cs_base = cs_base;
desc.cs_top = cs_top;
desc.pcc_base = pcc_base;
desc.pcc_top = pcc_top;
desc.cheri_flags = cheri_flags;
desc.flags = flags;
desc.cflags = cflags;
Expand Down Expand Up @@ -425,16 +430,19 @@ static inline TranslationBlock *tb_find(CPUState *cpu,
{
CPUArchState *env = (CPUArchState *)cpu->env_ptr;
TranslationBlock *tb;
target_ulong cs_base, cs_top = 0, pc;
target_ulong cs_base, pcc_base = 0, pcc_top = 0, pc;
uint32_t cheri_flags = 0;
uint32_t flags;

cpu_get_tb_cpu_state_6(env, &pc, &cs_base, &cs_top, &cheri_flags, &flags);
cpu_get_tb_cpu_state_ext(env, &pc, &cs_base, &pcc_base, &pcc_top,
&cheri_flags, &flags);

tb = tb_lookup(cpu, pc, cs_base, cs_top, cheri_flags, flags, cflags);
tb = tb_lookup(cpu, pc, cs_base, pcc_base, pcc_top, cheri_flags, flags,
cflags);
if (tb == NULL) {
mmap_lock();
tb = tb_gen_code(cpu, pc, cs_base, cs_top, cheri_flags, flags, cflags);
tb = tb_gen_code(cpu, pc, cs_base, pcc_base, pcc_top, cheri_flags,
flags, cflags);
mmap_unlock();
/* We add the TB in the virtual pc hash table for the fast lookup */
qatomic_set(&cpu->tb_jmp_cache[tb_jmp_cache_hash_func(pc)], tb);
Expand Down
5 changes: 3 additions & 2 deletions accel/tcg/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
#include "exec/exec-all.h"

TranslationBlock *tb_gen_code(CPUState *cpu, target_ulong pc,
target_ulong cs_base, target_ulong cs_top,
uint32_t cheri_flags, uint32_t flags, int cflags);
target_ulong cs_base, target_ulong pcc_base,
target_ulong pcc_top, uint32_t cheri_flags,
uint32_t flags, int cflags);

void QEMU_NORETURN cpu_io_recompile(CPUState *cpu, uintptr_t retaddr);

Expand Down
14 changes: 8 additions & 6 deletions accel/tcg/tcg-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,23 @@ const void *HELPER(lookup_tb_ptr)(CPUArchState *env)
{
CPUState *cpu = env_cpu(env);
TranslationBlock *tb;
target_ulong cs_base, cs_top = 0, pc;
target_ulong cs_base, pcc_base = 0, pcc_top = 0, pc;
uint32_t cheri_flags = 0;
uint32_t flags;

cpu_get_tb_cpu_state_6(env, &pc, &cs_base, &cs_top, &cheri_flags, &flags);
cpu_get_tb_cpu_state_ext(env, &pc, &cs_base, &pcc_base, &pcc_top,
&cheri_flags, &flags);

tb = tb_lookup(cpu, pc, cs_base, cs_top, cheri_flags, flags, curr_cflags(cpu));
tb = tb_lookup(cpu, pc, cs_base, pcc_base, pcc_top, cheri_flags, flags,
curr_cflags(cpu));
if (tb == NULL) {
return tcg_code_gen_epilogue;
}
qemu_log_mask_and_addr(CPU_LOG_EXEC, pc,
"Chain %d: %p [" TARGET_FMT_lx "/" TARGET_FMT_lx
"/" TARGET_FMT_lx "/%#x/%#x] %s\n",
cpu->cpu_index, tb->tc.ptr, cs_base, pc, cs_top,
cheri_flags, flags, lookup_symbol(pc));
"/" TARGET_FMT_lx "-" TARGET_FMT_lx "/%#x/%#x] %s\n",
cpu->cpu_index, tb->tc.ptr, cs_base, pc, pcc_base,
pcc_top, cheri_flags, flags, lookup_symbol(pc));
return tb->tc.ptr;
}

Expand Down
35 changes: 20 additions & 15 deletions accel/tcg/translate-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,8 @@ static bool tb_cmp(const void *ap, const void *bp)

return a->pc == b->pc &&
a->cs_base == b->cs_base &&
a->cs_top == b->cs_top &&
a->pcc_base == b->pcc_base &&
a->pcc_top == b->pcc_top &&
a->cheri_flags == b->cheri_flags &&
a->flags == b->flags &&
(tb_cflags(a) & ~CF_INVALID) == (tb_cflags(b) & ~CF_INVALID) &&
Expand Down Expand Up @@ -1844,8 +1845,9 @@ tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc,

/* Called with mmap_lock held for user mode emulation. */
TranslationBlock *tb_gen_code(CPUState *cpu, target_ulong pc,
target_ulong cs_base, target_ulong cs_top,
uint32_t cheri_flags, uint32_t flags, int cflags)
target_ulong cs_base, target_ulong pcc_base,
target_ulong pcc_top, uint32_t cheri_flags,
uint32_t flags, int cflags)
{
CPUArchState *env = cpu->env_ptr;
TranslationBlock *tb, *existing_tb;
Expand Down Expand Up @@ -1894,7 +1896,8 @@ TranslationBlock *tb_gen_code(CPUState *cpu, target_ulong pc,
tb->tc.ptr = tcg_splitwx_to_rx(gen_code_buf);
tb->pc = pc;
tb->cs_base = cs_base;
tb->cs_top = cs_top;
tb->pcc_base = pcc_base;
tb->pcc_top = pcc_top;
tb->cheri_flags = cheri_flags;
tb->flags = flags;
tb->cflags = cflags;
Expand Down Expand Up @@ -2134,7 +2137,8 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
TranslationBlock *current_tb = NULL;
target_ulong current_pc = 0;
target_ulong current_cs_base = 0;
target_ulong current_cs_top = 0;
target_ulong current_pcc_base = 0;
target_ulong current_pcc_top = 0;
uint32_t current_cheri_flags = 0;
uint32_t current_flags = 0;
#endif /* TARGET_HAS_PRECISE_SMC */
Expand Down Expand Up @@ -2180,9 +2184,9 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
*/
current_tb_modified = true;
cpu_restore_state_from_tb(cpu, current_tb, retaddr, true);
cpu_get_tb_cpu_state_6(env, &current_pc, &current_cs_base,
&current_cs_top, &current_cheri_flags,
&current_flags);
cpu_get_tb_cpu_state_ext(env, &current_pc, &current_cs_base,
&current_pcc_base, &current_pcc_top,
&current_cheri_flags, &current_flags);
}
#endif /* TARGET_HAS_PRECISE_SMC */
tb_phys_invalidate__locked(tb);
Expand Down Expand Up @@ -2325,8 +2329,8 @@ static bool tb_invalidate_phys_page(tb_page_addr_t addr, uintptr_t pc)
int current_tb_modified = 0;
target_ulong current_pc = 0;
target_ulong current_cs_base = 0;
target_ulong current_cs_top = 0;
target_ulong current_ds_base = 0;
target_ulong current_pcc_base = 0;
target_ulong current_pcc_top = 0;
uint32_t current_cheri_flags = 0;
uint32_t current_flags = 0;
#endif
Expand Down Expand Up @@ -2360,9 +2364,9 @@ static bool tb_invalidate_phys_page(tb_page_addr_t addr, uintptr_t pc)

current_tb_modified = 1;
cpu_restore_state_from_tb(cpu, current_tb, pc, true);
cpu_get_tb_cpu_state_6(env, &current_pc, &current_cs_base,
&current_cs_top, &current_cheri_flags,
&current_flags);
cpu_get_tb_cpu_state_ext(env, &current_pc, &current_cs_base,
&current_pcc_base, &current_pcc_top,
&current_cheri_flags, &current_flags);
}
#endif /* TARGET_HAS_PRECISE_SMC */
tb_phys_invalidate(tb, addr);
Expand Down Expand Up @@ -2396,12 +2400,13 @@ void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr)
/* The exception probably happened in a helper. The CPU state should
have been saved before calling it. Fetch the PC from there. */
CPUArchState *env = cpu->env_ptr;
target_ulong pc, cs_base, cs_top = 0;
target_ulong pc, cs_base, pcc_base = 0, pcc_top = 0;
uint32_t cheri_flags = 0;
tb_page_addr_t addr;
uint32_t flags;

cpu_get_tb_cpu_state_6(env, &pc, &cs_base, &cs_top, &cheri_flags, &flags);
cpu_get_tb_cpu_state_ext(env, &pc, &cs_base, &pcc_base, &pcc_top,
&cheri_flags, &flags);
addr = get_page_addr_code(env, pc);
if (addr != -1) {
tb_invalidate_phys_range(addr, addr + 1);
Expand Down
4 changes: 2 additions & 2 deletions accel/tcg/translator.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db,
db->max_insns = max_insns;
db->singlestep_enabled = cpu->singlestep_enabled;
#ifdef TARGET_CHERI
db->pcc_base = tb->cs_base;
db->pcc_top = tb->cs_top;
db->pcc_base = tb->pcc_base;
db->pcc_top = tb->pcc_top;
cheri_debug_assert(db->pcc_base ==
cap_get_base(cheri_get_recent_pcc(cpu->env_ptr)));
cheri_debug_assert(db->pcc_top ==
Expand Down
6 changes: 4 additions & 2 deletions hw/arm/smmuv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ static void smmuv3_init_regs(SMMUv3State *s)
s->idr[3] = FIELD_DP32(s->idr[3], IDR3, RIL, 1);
s->idr[3] = FIELD_DP32(s->idr[3], IDR3, HAD, 1);

/* 4K and 64K granule support */
/* 4K, 16K and 64K granule support */
s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN4K, 1);
s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN16K, 1);
s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN64K, 1);
s->idr[5] = FIELD_DP32(s->idr[5], IDR5, OAS, SMMU_IDR5_OAS); /* 44 bits */

Expand Down Expand Up @@ -503,7 +504,8 @@ static int decode_cd(SMMUTransCfg *cfg, CD *cd, SMMUEventInfo *event)

tg = CD_TG(cd, i);
tt->granule_sz = tg2granule(tg, i);
if ((tt->granule_sz != 12 && tt->granule_sz != 16) || CD_ENDI(cd)) {
if ((tt->granule_sz != 12 && tt->granule_sz != 14 &&
tt->granule_sz != 16) || CD_ENDI(cd)) {
goto bad_cd;
}

Expand Down
7 changes: 6 additions & 1 deletion hw/arm/virt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2772,10 +2772,15 @@ static void machvirt_machine_init(void)
}
type_init(machvirt_machine_init);

static void virt_machine_6_1_options(MachineClass *mc)
{
}
DEFINE_VIRT_MACHINE_AS_LATEST(6, 1)

static void virt_machine_6_0_options(MachineClass *mc)
{
}
DEFINE_VIRT_MACHINE_AS_LATEST(6, 0)
DEFINE_VIRT_MACHINE(6, 0)

static void virt_machine_5_2_options(MachineClass *mc)
{
Expand Down
5 changes: 5 additions & 0 deletions hw/core/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-pci.h"

GlobalProperty hw_compat_6_0[] = {
{ "gpex-pcihost", "allow-unmapped-accesses", "false" },
};
const size_t hw_compat_6_0_len = G_N_ELEMENTS(hw_compat_6_0);

GlobalProperty hw_compat_5_2[] = {
{ "ICH9-LPC", "smm-compat", "on"},
{ "PIIX4_PM", "smm-compat", "on"},
Expand Down
3 changes: 3 additions & 0 deletions hw/i386/pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
#include "trace.h"
#include CONFIG_DEVICES

GlobalProperty pc_compat_6_0[] = {};
const size_t pc_compat_6_0_len = G_N_ELEMENTS(pc_compat_6_0);

GlobalProperty pc_compat_5_2[] = {
{ "ICH9-LPC", "x-smi-cpu-hotunplug", "off" },
};
Expand Down
14 changes: 13 additions & 1 deletion hw/i386/pc_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
}

static void pc_i440fx_6_0_machine_options(MachineClass *m)
static void pc_i440fx_6_1_machine_options(MachineClass *m)
{
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pc_i440fx_machine_options(m);
Expand All @@ -424,6 +424,18 @@ static void pc_i440fx_6_0_machine_options(MachineClass *m)
pcmc->default_cpu_version = 1;
}

DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", NULL,
pc_i440fx_6_1_machine_options);

static void pc_i440fx_6_0_machine_options(MachineClass *m)
{
pc_i440fx_6_1_machine_options(m);
m->alias = NULL;
m->is_default = false;
compat_props_add(m->compat_props, hw_compat_6_0, hw_compat_6_0_len);
compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len);
}

DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0", NULL,
pc_i440fx_6_0_machine_options);

Expand Down
13 changes: 12 additions & 1 deletion hw/i386/pc_q35.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,25 @@ static void pc_q35_machine_options(MachineClass *m)
m->max_cpus = 288;
}

static void pc_q35_6_0_machine_options(MachineClass *m)
static void pc_q35_6_1_machine_options(MachineClass *m)
{
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pc_q35_machine_options(m);
m->alias = "q35";
pcmc->default_cpu_version = 1;
}

DEFINE_Q35_MACHINE(v6_1, "pc-q35-6.1", NULL,
pc_q35_6_1_machine_options);

static void pc_q35_6_0_machine_options(MachineClass *m)
{
pc_q35_6_1_machine_options(m);
m->alias = NULL;
compat_props_add(m->compat_props, hw_compat_6_0, hw_compat_6_0_len);
compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len);
}

DEFINE_Q35_MACHINE(v6_0, "pc-q35-6.0", NULL,
pc_q35_6_0_machine_options);

Expand Down
Loading