public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Brian Cain <brian.cain@oss.qualcomm.com>, qemu-devel@nongnu.org
Cc: ltaylorsimpson@gmail.com, matheus.bernardino@oss.qualcomm.com,
	marco.liebel@oss.qualcomm.com, quic_mburton@quicinc.com,
	sid.manning@oss.qualcomm.com, ale@rev.ng, anjo@rev.ng
Subject: Re: [PATCH v5 31/35] hw/hexagon: Introduce hexagon TLB device
Date: Wed, 25 Mar 2026 20:38:37 +0100	[thread overview]
Message-ID: <4f62c8fe-60ac-4d1c-a0e6-6139e9c334dc@linaro.org> (raw)
In-Reply-To: <20260311034923.1044737-32-brian.cain@oss.qualcomm.com>

Hi Brian,

On 11/3/26 04:49, Brian Cain wrote:
> Add the hexagon TLB QOM device model.
> 
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> 
> Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
> ---
>   include/hw/hexagon/hexagon_tlb.h |  45 +++
>   target/hexagon/cpu.h             |   4 +
>   hw/hexagon/hexagon_tlb.c         | 463 +++++++++++++++++++++++++++++++
>   target/hexagon/cpu.c             |   5 +
>   4 files changed, 517 insertions(+)
>   create mode 100644 include/hw/hexagon/hexagon_tlb.h
>   create mode 100644 hw/hexagon/hexagon_tlb.c
> 
> diff --git a/include/hw/hexagon/hexagon_tlb.h b/include/hw/hexagon/hexagon_tlb.h
> new file mode 100644
> index 00000000000..bcb387aa24d
> --- /dev/null
> +++ b/include/hw/hexagon/hexagon_tlb.h
> @@ -0,0 +1,45 @@
> +/*
> + * Hexagon TLB QOM Device
> + *
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#ifndef HW_HEXAGON_TLB_H
> +#define HW_HEXAGON_TLB_H
> +
> +#include "hw/core/sysbus.h"
> +#include "qom/object.h"
> +#include "exec/hwaddr.h"
> +#include "exec/mmu-access-type.h"
> +#define TYPE_HEXAGON_TLB "hexagon-tlb"
> +OBJECT_DECLARE_SIMPLE_TYPE(HexagonTLBState, HEXAGON_TLB)
> +
> +struct HexagonTLBState {
> +    SysBusDevice parent_obj;
> +
> +    uint32_t num_entries;
> +    uint64_t *entries;
> +};
> +
> +uint64_t hexagon_tlb_read(HexagonTLBState *tlb, uint32_t index);
> +void hexagon_tlb_write(HexagonTLBState *tlb, uint32_t index, uint64_t value);
> +
> +bool hexagon_tlb_find_match(HexagonTLBState *tlb, uint32_t asid,
> +                            uint32_t VA, MMUAccessType access_type,
> +                            hwaddr *PA, int *prot, uint64_t *size,
> +                            int32_t *excp, int *cause_code, int mmu_idx);
> +
> +uint32_t hexagon_tlb_lookup(HexagonTLBState *tlb, uint32_t asid,
> +                            uint32_t VA, int *cause_code);
> +
> +int hexagon_tlb_check_overlap(HexagonTLBState *tlb, uint64_t entry,
> +                              uint64_t index);
> +
> +void hexagon_tlb_dump(HexagonTLBState *tlb);
> +
> +bool hexagon_tlb_dump_entry(FILE *f, uint64_t entry);
> +
> +uint32_t hexagon_tlb_get_num_entries(HexagonTLBState *tlb);
> +
> +#endif /* HW_HEXAGON_TLB_H */
> diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h
> index 9eb2d1bbabe..e39e6e39fec 100644
> --- a/target/hexagon/cpu.h
> +++ b/target/hexagon/cpu.h
> @@ -46,6 +46,7 @@
>   #define REG_WRITES_MAX 32
>   #define PRED_WRITES_MAX 5                   /* 4 insns + endloop */
>   #define VSTORES_MAX 2
> +#define MAX_TLB_ENTRIES 1024
>   
>   #define CPU_RESOLVING_TYPE TYPE_HEXAGON_CPU
>   #ifndef CONFIG_USER_ONLY
> @@ -174,6 +175,9 @@ struct ArchCPU {
>       bool lldb_compat;
>       target_ulong lldb_stack_adjust;
>       bool short_circuit;
> +#ifndef CONFIG_USER_ONLY
> +    struct HexagonTLBState *tlb;

Please use the typedef (dropping the 'struct').

> +#endif
>   };
>   
>   #include "cpu_bits.h"
> diff --git a/hw/hexagon/hexagon_tlb.c b/hw/hexagon/hexagon_tlb.c
> new file mode 100644
> index 00000000000..90f319f56d3
> --- /dev/null
> +++ b/hw/hexagon/hexagon_tlb.c
> @@ -0,0 +1,463 @@
> +/*
> + * Hexagon TLB QOM Device
> + *
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#include "qemu/osdep.h"
> +#include "qemu/log.h"
> +#include "hw/hexagon/hexagon_tlb.h"
> +#include "hw/core/qdev-properties.h"
> +#include "hw/core/resettable.h"
> +#include "migration/vmstate.h"
> +#include "qapi/error.h"
> +#include "target/hexagon/cpu.h"
> +#include "target/hexagon/cpu_bits.h"
> +
> +/* PTE (TLB entry) field extraction */
> +#define GET_PTE_PPD(entry)   extract64((entry),  0, 24)
> +#define GET_PTE_C(entry)     extract64((entry), 24,  4)
> +#define GET_PTE_U(entry)     extract64((entry), 28,  1)
> +#define GET_PTE_R(entry)     extract64((entry), 29,  1)
> +#define GET_PTE_W(entry)     extract64((entry), 30,  1)
> +#define GET_PTE_X(entry)     extract64((entry), 31,  1)
> +#define GET_PTE_VPN(entry)   extract64((entry), 32, 20)
> +#define GET_PTE_ASID(entry)  extract64((entry), 52,  7)
> +#define GET_PTE_ATR0(entry)  extract64((entry), 59,  1)
> +#define GET_PTE_ATR1(entry)  extract64((entry), 60,  1)
> +#define GET_PTE_PA35(entry)  extract64((entry), 61,  1)
> +#define GET_PTE_G(entry)     extract64((entry), 62,  1)
> +#define GET_PTE_V(entry)     extract64((entry), 63,  1)
> +
> +/* PPD (physical page descriptor) */
> +static inline uint64_t GET_PPD(uint64_t entry)
> +{
> +    return GET_PTE_PPD(entry) | (GET_PTE_PA35(entry) << 24);
> +}
> +
> +#define NO_ASID      (1 << 8)
> +
> +typedef enum {
> +    PGSIZE_4K,
> +    PGSIZE_16K,
> +    PGSIZE_64K,
> +    PGSIZE_256K,
> +    PGSIZE_1M,
> +    PGSIZE_4M,
> +    PGSIZE_16M,
> +    PGSIZE_64M,
> +    PGSIZE_256M,
> +    PGSIZE_1G,
> +    NUM_PGSIZE_TYPES

Matter of style, since the last entry isn't part of the enum
I'd use:

   #define NUM_PGSIZE_TYPES (PGSIZE_1G + 1)

> +} tlb_pgsize_t;
> +
> +static const char *pgsize_str[NUM_PGSIZE_TYPES] = {
> +    "4K",
> +    "16K",
> +    "64K",
> +    "256K",
> +    "1M",
> +    "4M",
> +    "16M",
> +    "64M",
> +    "256M",
> +    "1G",
> +};
> +
> +#define INVALID_MASK 0xffffffffLL
> +
> +static const uint64_t encmask_2_mask[] = {
> +    0x0fffLL,                           /* 4k,   0000 */
> +    0x3fffLL,                           /* 16k,  0001 */
> +    0xffffLL,                           /* 64k,  0010 */
> +    0x3ffffLL,                          /* 256k, 0011 */
> +    0xfffffLL,                          /* 1m,   0100 */
> +    0x3fffffLL,                         /* 4m,   0101 */
> +    0xffffffLL,                         /* 16m,  0110 */
> +    0x3ffffffLL,                        /* 64m,  0111 */
> +    0xfffffffLL,                        /* 256m, 1000 */
> +    0x3fffffffLL,                       /* 1g,   1001 */
> +    INVALID_MASK,                       /* RSVD, 0111 */

Typo '1111' I suppose, since 0111 is 64M.

> +};
> +
> +static inline tlb_pgsize_t hex_tlb_pgsize_type(uint64_t entry)
> +{
> +    if (entry == 0) {
> +        qemu_log_mask(CPU_LOG_MMU, "%s: Supplied TLB entry was 0!\n",
> +                      __func__);
> +        return 0;
> +    }
> +    tlb_pgsize_t size = ctz64(entry);
> +    g_assert(size < NUM_PGSIZE_TYPES);
> +    return size;
> +}
> +
> +static inline uint64_t hex_tlb_page_size_bytes(uint64_t entry)
> +{
> +    return 1ull << (TARGET_PAGE_BITS + 2 * hex_tlb_pgsize_type(entry));
> +}
> +
> +static inline uint64_t hex_tlb_phys_page_num(uint64_t entry)
> +{
> +    uint32_t ppd = GET_PPD(entry);
> +    return ppd >> 1;
> +}
> +
> +static inline uint64_t hex_tlb_phys_addr(uint64_t entry)
> +{
> +    uint64_t pagemask = encmask_2_mask[hex_tlb_pgsize_type(entry)];
> +    uint64_t pagenum = hex_tlb_phys_page_num(entry);
> +    uint64_t PA = (pagenum << TARGET_PAGE_BITS) & (~pagemask);

We are replacing all TARGET_PAGE_BITS uses by qemu_target_page_bits().

> +    return PA;
> +}
> +
> +static inline uint64_t hex_tlb_virt_addr(uint64_t entry)
> +{
> +    return (uint64_t)GET_PTE_VPN(entry) << TARGET_PAGE_BITS;
> +}
> +
> +bool hexagon_tlb_dump_entry(FILE *f, uint64_t entry)
> +{

Prefer Monitor* instead of FILE*.

> +    if (GET_PTE_V(entry)) {
> +        fprintf(f, "0x%016" PRIx64 ": ", entry);
> +        uint64_t PA = hex_tlb_phys_addr(entry);
> +        uint64_t VA = hex_tlb_virt_addr(entry);
> +        fprintf(f, "V:%" PRId64 " G:%" PRId64
> +                " A1:%" PRId64 " A0:%" PRId64,
> +                GET_PTE_V(entry),
> +                GET_PTE_G(entry),
> +                GET_PTE_ATR1(entry),
> +                GET_PTE_ATR0(entry));
> +        fprintf(f, " ASID:0x%02" PRIx64 " VA:0x%08" PRIx64,
> +                GET_PTE_ASID(entry), VA);
> +        fprintf(f,
> +                " X:%" PRId64 " W:%" PRId64 " R:%" PRId64
> +                " U:%" PRId64 " C:%" PRId64,
> +                GET_PTE_X(entry),
> +                GET_PTE_W(entry),
> +                GET_PTE_R(entry),
> +                GET_PTE_U(entry),
> +                GET_PTE_C(entry));
> +        fprintf(f, " PA:0x%09" PRIx64 " SZ:%s (0x%" PRIx64 ")", PA,
> +                pgsize_str[hex_tlb_pgsize_type(entry)],
> +                hex_tlb_page_size_bytes(entry));
> +        fprintf(f, "\n");
> +        return true;
> +    }
> +
> +    /* Not valid */
> +    return false;
> +}
> +
> +static inline bool hex_tlb_entry_match_noperm(uint64_t entry, uint32_t asid,
> +                                              uint64_t VA)
> +{
> +    if (GET_PTE_V(entry)) {
> +        if (GET_PTE_G(entry)) {
> +            /* Global entry - ignore ASID */
> +        } else if (asid != NO_ASID) {
> +            uint32_t tlb_asid = GET_PTE_ASID(entry);
> +            if (tlb_asid != asid) {
> +                return false;
> +            }
> +        }
> +
> +        uint64_t page_size = hex_tlb_page_size_bytes(entry);
> +        uint64_t page_start =
> +            ROUND_DOWN(hex_tlb_virt_addr(entry), page_size);
> +        if (page_start <= VA && VA < page_start + page_size) {
> +            return true;
> +        }
> +    }
> +    return false;
> +}
> +
> +static inline void hex_tlb_entry_get_perm(uint64_t entry,
> +                                          MMUAccessType access_type,
> +                                          int mmu_idx, int *prot,
> +                                          int32_t *excp, int *cause_code)
> +{
> +    bool perm_x = GET_PTE_X(entry);
> +    bool perm_w = GET_PTE_W(entry);
> +    bool perm_r = GET_PTE_R(entry);
> +    bool perm_u = GET_PTE_U(entry);
> +    bool user_idx = mmu_idx == MMU_USER_IDX;
> +
> +    if (mmu_idx == MMU_KERNEL_IDX) {
> +        *prot = PAGE_VALID | PAGE_READ | PAGE_WRITE | PAGE_EXEC;
> +        return;
> +    }
> +
> +    *prot = PAGE_VALID;
> +    switch (access_type) {
> +    case MMU_INST_FETCH:
> +        if (user_idx && !perm_u) {
> +            *excp = HEX_EVENT_PRECISE;
> +            *cause_code = HEX_CAUSE_FETCH_NO_UPAGE;
> +        } else if (!perm_x) {
> +            *excp = HEX_EVENT_PRECISE;
> +            *cause_code = HEX_CAUSE_FETCH_NO_XPAGE;
> +        }
> +        break;
> +    case MMU_DATA_LOAD:
> +        if (user_idx && !perm_u) {
> +            *excp = HEX_EVENT_PRECISE;
> +            *cause_code = HEX_CAUSE_PRIV_NO_UREAD;
> +        } else if (!perm_r) {
> +            *excp = HEX_EVENT_PRECISE;
> +            *cause_code = HEX_CAUSE_PRIV_NO_READ;
> +        }
> +        break;
> +    case MMU_DATA_STORE:
> +        if (user_idx && !perm_u) {
> +            *excp = HEX_EVENT_PRECISE;
> +            *cause_code = HEX_CAUSE_PRIV_NO_UWRITE;
> +        } else if (!perm_w) {
> +            *excp = HEX_EVENT_PRECISE;
> +            *cause_code = HEX_CAUSE_PRIV_NO_WRITE;
> +        }
> +        break;
> +    }
> +
> +    if (!user_idx || perm_u) {
> +        if (perm_x) {
> +            *prot |= PAGE_EXEC;
> +        }
> +        if (perm_r) {
> +            *prot |= PAGE_READ;
> +        }
> +        if (perm_w) {
> +            *prot |= PAGE_WRITE;
> +        }
> +    }
> +}
> +
> +static inline bool hex_tlb_entry_match(uint64_t entry, uint8_t asid,
> +                                       uint32_t VA,
> +                                       MMUAccessType access_type, hwaddr *PA,
> +                                       int *prot, uint64_t *size,
> +                                       int32_t *excp, int *cause_code,
> +                                       int mmu_idx)
> +{
> +    if (hex_tlb_entry_match_noperm(entry, asid, VA)) {
> +        hex_tlb_entry_get_perm(entry, access_type, mmu_idx, prot, excp,
> +                               cause_code);
> +        *PA = hex_tlb_phys_addr(entry);
> +        *size = hex_tlb_page_size_bytes(entry);
> +        return true;
> +    }
> +    return false;
> +}
> +
> +static bool hex_tlb_is_match(uint64_t entry1, uint64_t entry2,
> +                             bool consider_gbit)
> +{
> +    bool valid1 = GET_PTE_V(entry1);
> +    bool valid2 = GET_PTE_V(entry2);
> +    uint64_t size1 = hex_tlb_page_size_bytes(entry1);
> +    uint64_t vaddr1 = ROUND_DOWN(hex_tlb_virt_addr(entry1), size1);
> +    uint64_t size2 = hex_tlb_page_size_bytes(entry2);
> +    uint64_t vaddr2 = ROUND_DOWN(hex_tlb_virt_addr(entry2), size2);
> +    int asid1 = GET_PTE_ASID(entry1);
> +    int asid2 = GET_PTE_ASID(entry2);
> +    bool gbit1 = GET_PTE_G(entry1);
> +    bool gbit2 = GET_PTE_G(entry2);
> +
> +    if (!valid1 || !valid2) {
> +        return false;
> +    }
> +
> +    if (((vaddr1 <= vaddr2) && (vaddr2 < (vaddr1 + size1))) ||
> +        ((vaddr2 <= vaddr1) && (vaddr1 < (vaddr2 + size2)))) {
> +        if (asid1 == asid2) {
> +            return true;
> +        }
> +        if ((consider_gbit && gbit1) || gbit2) {
> +            return true;
> +        }
> +    }
> +    return false;
> +}
> +
> +/* Public API */
> +
> +uint64_t hexagon_tlb_read(HexagonTLBState *tlb, uint32_t index)
> +{
> +    g_assert(index < tlb->num_entries);
> +    return tlb->entries[index];
> +}
> +
> +void hexagon_tlb_write(HexagonTLBState *tlb, uint32_t index, uint64_t value)
> +{
> +    g_assert(index < tlb->num_entries);
> +    tlb->entries[index] = value;
> +}
> +
> +bool hexagon_tlb_find_match(HexagonTLBState *tlb, uint32_t asid,
> +                            uint32_t VA, MMUAccessType access_type,
> +                            hwaddr *PA, int *prot, uint64_t *size,
> +                            int32_t *excp, int *cause_code, int mmu_idx)
> +{
> +    *PA = 0;
> +    *prot = 0;
> +    *size = 0;
> +    *excp = 0;
> +    *cause_code = 0;
> +
> +    for (uint32_t i = 0; i < tlb->num_entries; i++) {
> +        if (hex_tlb_entry_match(tlb->entries[i], asid, VA, access_type,
> +                                PA, prot, size, excp, cause_code, mmu_idx)) {
> +            return true;
> +        }
> +    }
> +    return false;
> +}
> +
> +uint32_t hexagon_tlb_lookup(HexagonTLBState *tlb, uint32_t asid,
> +                            uint32_t VA, int *cause_code)
> +{
> +    uint32_t not_found = 0x80000000;
> +    uint32_t idx = not_found;
> +
> +    for (uint32_t i = 0; i < tlb->num_entries; i++) {
> +        uint64_t entry = tlb->entries[i];
> +        if (hex_tlb_entry_match_noperm(entry, asid, VA)) {
> +            if (idx != not_found) {
> +                *cause_code = HEX_CAUSE_IMPRECISE_MULTI_TLB_MATCH;
> +                break;
> +            }
> +            idx = i;
> +        }
> +    }
> +
> +    if (idx == not_found) {
> +        qemu_log_mask(CPU_LOG_MMU,
> +                      "%s: 0x%" PRIx32 ", 0x%08" PRIx32 " => NOT FOUND\n",
> +                      __func__, asid, VA);
> +    } else {
> +        qemu_log_mask(CPU_LOG_MMU,
> +                      "%s: 0x%" PRIx32 ", 0x%08" PRIx32 " => %d\n",
> +                      __func__, asid, VA, idx);
> +    }
> +
> +    return idx;
> +}
> +
> +/*
> + * Return codes:
> + * 0 or positive             index of match
> + * -1                        multiple matches
> + * -2                        no match
> + */
> +int hexagon_tlb_check_overlap(HexagonTLBState *tlb, uint64_t entry,
> +                              uint64_t index)
> +{
> +    int matches = 0;
> +    int last_match = 0;
> +
> +    for (uint32_t i = 0; i < tlb->num_entries; i++) {
> +        if (hex_tlb_is_match(entry, tlb->entries[i], false)) {
> +            matches++;
> +            last_match = i;
> +        }
> +    }
> +
> +    if (matches == 1) {
> +        return last_match;
> +    }
> +    if (matches == 0) {
> +        return -2;
> +    }
> +    return -1;
> +}
> +
> +void hexagon_tlb_dump(HexagonTLBState *tlb)
> +{
> +    for (uint32_t i = 0; i < tlb->num_entries; i++) {
> +        hexagon_tlb_dump_entry(stdout, tlb->entries[i]);
> +    }
> +}
> +
> +uint32_t hexagon_tlb_get_num_entries(HexagonTLBState *tlb)
> +{
> +    return tlb->num_entries;
> +}
> +
> +/* QOM lifecycle */
> +
> +static void hexagon_tlb_init(Object *obj)
> +{
> +}
> +
> +static void hexagon_tlb_realize(DeviceState *dev, Error **errp)
> +{
> +    HexagonTLBState *s = HEXAGON_TLB(dev);
> +
> +    if (s->num_entries == 0 || s->num_entries > MAX_TLB_ENTRIES) {
> +        error_setg(errp, "Invalid TLB num-entries: %" PRIu32,
> +                   s->num_entries);
> +        return;
> +    }
> +    s->entries = g_new0(uint64_t, s->num_entries);
> +}
> +
> +static void hexagon_tlb_finalize(Object *obj)
> +{
> +    HexagonTLBState *s = HEXAGON_TLB(obj);
> +    g_free(s->entries);

This should be done in the unrealize() handler.

> +    s->entries = NULL;
> +}
> +
> +static void hexagon_tlb_reset_hold(Object *obj, ResetType type)
> +{
> +    HexagonTLBState *s = HEXAGON_TLB(obj);
> +    if (s->entries) {
> +        memset(s->entries, 0, sizeof(uint64_t) * s->num_entries);
> +    }
> +}
> +
> +static const VMStateDescription vmstate_hexagon_tlb = {
> +    .name = "hexagon-tlb",
> +    .version_id = 0,
> +    .minimum_version_id = 0,
> +    .fields = (const VMStateField[]) {
> +        VMSTATE_UINT32(num_entries, HexagonTLBState),
> +        VMSTATE_VARRAY_UINT32_ALLOC(entries, HexagonTLBState, num_entries,
> +                                    0, vmstate_info_uint64, uint64_t),
> +        VMSTATE_END_OF_LIST()
> +    },
> +};
> +
> +static const Property hexagon_tlb_properties[] = {
> +    DEFINE_PROP_UINT32("num-entries", HexagonTLBState, num_entries,
> +                       MAX_TLB_ENTRIES),
> +};
> +
> +static void hexagon_tlb_class_init(ObjectClass *klass, const void *data)
> +{
> +    DeviceClass *dc = DEVICE_CLASS(klass);
> +    ResettableClass *rc = RESETTABLE_CLASS(klass);
> +
> +    dc->realize = hexagon_tlb_realize;
> +    rc->phases.hold = hexagon_tlb_reset_hold;
> +    dc->vmsd = &vmstate_hexagon_tlb;
> +    dc->user_creatable = false;
> +    device_class_set_props(dc, hexagon_tlb_properties);
> +}
> +
> +static const TypeInfo hexagon_tlb_info = {
> +    .name = TYPE_HEXAGON_TLB,
> +    .parent = TYPE_SYS_BUS_DEVICE,
> +    .instance_size = sizeof(HexagonTLBState),
> +    .instance_init = hexagon_tlb_init,
> +    .instance_finalize = hexagon_tlb_finalize,
> +    .class_init = hexagon_tlb_class_init,
> +};
> +
> +static void hexagon_tlb_register_types(void)
> +{
> +    type_register_static(&hexagon_tlb_info);
> +}
> +
> +type_init(hexagon_tlb_register_types)
> diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c
> index b1317f83ef4..32d158684a0 100644
> --- a/target/hexagon/cpu.c
> +++ b/target/hexagon/cpu.c
> @@ -23,6 +23,7 @@
>   #include "qapi/error.h"
>   #include "hw/core/qdev-properties.h"
>   #include "fpu/softfloat-helpers.h"
> +#include "hw/hexagon/hexagon_tlb.h"
>   #include "tcg/tcg.h"
>   #include "exec/gdbstub.h"
>   #include "accel/tcg/cpu-ops.h"
> @@ -50,6 +51,10 @@ static ObjectClass *hexagon_cpu_class_by_name(const char *cpu_model)
>   }
>   
>   static const Property hexagon_cpu_properties[] = {
> +#if !defined(CONFIG_USER_ONLY)
> +    DEFINE_PROP_LINK("tlb", HexagonCPU, tlb, TYPE_HEXAGON_TLB,
> +                     HexagonTLBState *),

Not used at this point, maybe add later?

> +#endif
>       DEFINE_PROP_BOOL("lldb-compat", HexagonCPU, lldb_compat, false),
>       DEFINE_PROP_UNSIGNED("lldb-stack-adjust", HexagonCPU, lldb_stack_adjust, 0,
>                            qdev_prop_uint32, target_ulong),



  reply	other threads:[~2026-03-25 19:38 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11  3:48 [PATCH v5 00/35] Hexagon system emulation, Part 1/3 Brian Cain
2026-03-11  3:48 ` [PATCH v5 01/35] docs: Add hexagon sysemu docs Brian Cain
2026-03-11  3:48 ` [PATCH v5 02/35] docs/system: Add hexagon CPU emulation Brian Cain
2026-03-11  3:48 ` [PATCH v5 03/35] target/hexagon: Fix badva reference, delete CAUSE Brian Cain
2026-03-11  3:48 ` [PATCH v5 04/35] target/hexagon: Add missing A_CALL attr, hintjumpr to multi_cof Brian Cain
2026-03-11  3:48 ` [PATCH v5 05/35] target/hexagon: Handle system/guest registers in gen_analyze_funcs.py and hex_common.py Brian Cain
2026-03-11  3:48 ` [PATCH v5 06/35] target/hexagon: Suppress unused-variable warnings for sysemu source regs Brian Cain
2026-03-12 21:03   ` Taylor Simpson
2026-03-11  3:48 ` [PATCH v5 07/35] target/hexagon: Make gen_exception_end_tb non-static Brian Cain
2026-03-11  3:48 ` [PATCH v5 08/35] target/hexagon: Switch to tag_ignore(), generate via get_{user, sys}_tags() Brian Cain via qemu development
2026-03-11  3:48 ` [PATCH v5 09/35] target/hexagon: Add privilege check, use tag_ignore() Brian Cain
2026-03-11  3:48 ` [PATCH v5 10/35] target/hexagon: Add a placeholder fp exception Brian Cain
2026-03-11  3:48 ` [PATCH v5 11/35] target/hexagon: Add guest, system reg number defs Brian Cain
2026-03-11  3:49 ` [PATCH v5 12/35] target/hexagon: Add guest, system reg number state Brian Cain
2026-03-11  3:49 ` [PATCH v5 13/35] target/hexagon: Add TCG values for sreg, greg Brian Cain
2026-03-11  3:49 ` [PATCH v5 14/35] target/hexagon: Add guest/sys reg writes to DisasContext Brian Cain
2026-03-11  3:49 ` [PATCH v5 15/35] target/hexagon: Add imported macro, attr defs for sysemu Brian Cain
2026-03-11  3:49 ` [PATCH v5 16/35] target/hexagon: Add new macro definitions " Brian Cain
2026-03-11  3:49 ` [PATCH v5 17/35] target/hexagon: Add handlers for guest/sysreg r/w Brian Cain
2026-03-11  3:49 ` [PATCH v5 18/35] target/hexagon: Add placeholder greg/sreg r/w helpers Brian Cain
2026-03-11  3:49 ` [PATCH v5 19/35] target/hexagon: Add vmstate representation Brian Cain
2026-03-25 19:21   ` Philippe Mathieu-Daudé
2026-03-11  3:49 ` [PATCH v5 20/35] target/hexagon: Make A_PRIV, "J2_trap*" insts need_env() Brian Cain
2026-03-11  3:49 ` [PATCH v5 21/35] target/hexagon: Define register fields for system regs Brian Cain
2026-03-11  3:49 ` [PATCH v5 22/35] target/hexagon: Implement do_raise_exception() Brian Cain
2026-03-11  3:49 ` [PATCH v5 23/35] target/hexagon: Add system reg insns Brian Cain
2026-03-11  3:49 ` [PATCH v5 24/35] target/hexagon: Add sysemu TCG overrides Brian Cain
2026-03-25 19:24   ` Philippe Mathieu-Daudé
2026-03-11  3:49 ` [PATCH v5 25/35] target/hexagon: Add implicit attributes to sysemu macros Brian Cain
2026-03-11  3:49 ` [PATCH v5 26/35] target/hexagon: Add TCG overrides for int handler insts Brian Cain
2026-03-11  3:49 ` [PATCH v5 27/35] target/hexagon: Add TCG overrides for thread ctl Brian Cain
2026-03-11  3:49 ` [PATCH v5 28/35] target/hexagon: Add TCG overrides for rte, nmi Brian Cain
2026-03-11  3:49 ` [PATCH v5 29/35] target/hexagon: Add sreg_{read,write} helpers Brian Cain
2026-03-25 19:26   ` Philippe Mathieu-Daudé
2026-03-11  3:49 ` [PATCH v5 30/35] target/hexagon: Add cpu modes, mmu indices, next_PC to state Brian Cain
2026-03-11  3:49 ` [PATCH v5 31/35] hw/hexagon: Introduce hexagon TLB device Brian Cain
2026-03-25 19:38   ` Philippe Mathieu-Daudé [this message]
2026-03-11  3:49 ` [PATCH v5 32/35] target/hexagon: Add stubs for modify_ssr/get_exe_mode Brian Cain
2026-03-11  3:49 ` [PATCH v5 33/35] target/hexagon: Add clear_wait_mode() definition Brian Cain
2026-03-11  3:49 ` [PATCH v5 34/35] target/hexagon: Define f{S,G}ET_FIELD macros Brian Cain
2026-03-11  3:49 ` [PATCH v5 35/35] target/hexagon: Add hex_interrupts support Brian Cain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f62c8fe-60ac-4d1c-a0e6-6139e9c334dc@linaro.org \
    --to=philmd@linaro.org \
    --cc=ale@rev.ng \
    --cc=anjo@rev.ng \
    --cc=brian.cain@oss.qualcomm.com \
    --cc=ltaylorsimpson@gmail.com \
    --cc=marco.liebel@oss.qualcomm.com \
    --cc=matheus.bernardino@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quic_mburton@quicinc.com \
    --cc=sid.manning@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox