mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
Accel & Exec patch queue
- Ignore writes to CNTP_CTL_EL0 on HVF ARM (Alexander) - Add '-d invalid_mem' logging option (Zoltan) - Create QOM containers explicitly (Peter) - Rename sysemu/ -> system/ (Philippe) - Re-orderning of include/exec/ headers (Philippe) Move a lot of declarations from these legacy mixed bag headers: . "exec/cpu-all.h" . "exec/cpu-common.h" . "exec/cpu-defs.h" . "exec/exec-all.h" . "exec/translate-all" to these more specific ones: . "exec/page-protection.h" . "exec/translation-block.h" . "user/cpu_loop.h" . "user/guest-host.h" . "user/page-protection.h" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmdlnyAACgkQ4+MsLN6t wN6mBw//QFWi7CrU+bb8KMM53kOU9C507tjn99LLGFb5or73/umDsw6eo/b8DHBt KIwGLgATel42oojKfNKavtAzLK5rOrywpboPDpa3SNeF1onW+99NGJ52LQUqIX6K A6bS0fPdGG9ZzEuPpbjDXlp++0yhDcdSgZsS42fEsT7Dyj5gzJYlqpqhiXGqpsn8 4Y0UMxSL21K3HEexlzw2hsoOBFA3tUm2ujNDhNkt8QASr85yQVLCypABJnuoe/// 5Ojl5wTBeDwhANET0rhwHK8eIYaNboiM9fHopJYhvyw1bz6yAu9jQwzF/MrL3s/r xa4OBHBy5mq2hQV9Shcl3UfCQdk/vDaYaWpgzJGX8stgMGYfnfej1SIl8haJIfcl VMX8/jEFdYbjhO4AeGRYcBzWjEJymkDJZoiSWp2NuEDi6jqIW+7yW1q0Rnlg9lay ShAqLK5Pv4zUw3t0Jy3qv9KSW8sbs6PQxtzXjk8p97rTf76BJ2pF8sv1tVzmsidP 9L92Hv5O34IqzBu2oATOUZYJk89YGmTIUSLkpT7asJZpBLwNM2qLp5jO00WVU0Sd +kAn324guYPkko/TVnjC/AY7CMu55EOtD9NU35k3mUAnxXT9oDUeL4NlYtfgrJx6 x1Nzr2FkS68+wlPAFKNSSU5lTjsjNaFM0bIJ4LCNtenJVP+SnRo= =cjz8 -----END PGP SIGNATURE----- Merge tag 'exec-20241220' of https://github.com/philmd/qemu into staging Accel & Exec patch queue - Ignore writes to CNTP_CTL_EL0 on HVF ARM (Alexander) - Add '-d invalid_mem' logging option (Zoltan) - Create QOM containers explicitly (Peter) - Rename sysemu/ -> system/ (Philippe) - Re-orderning of include/exec/ headers (Philippe) Move a lot of declarations from these legacy mixed bag headers: . "exec/cpu-all.h" . "exec/cpu-common.h" . "exec/cpu-defs.h" . "exec/exec-all.h" . "exec/translate-all" to these more specific ones: . "exec/page-protection.h" . "exec/translation-block.h" . "user/cpu_loop.h" . "user/guest-host.h" . "user/page-protection.h" # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmdlnyAACgkQ4+MsLN6t # wN6mBw//QFWi7CrU+bb8KMM53kOU9C507tjn99LLGFb5or73/umDsw6eo/b8DHBt # KIwGLgATel42oojKfNKavtAzLK5rOrywpboPDpa3SNeF1onW+99NGJ52LQUqIX6K # A6bS0fPdGG9ZzEuPpbjDXlp++0yhDcdSgZsS42fEsT7Dyj5gzJYlqpqhiXGqpsn8 # 4Y0UMxSL21K3HEexlzw2hsoOBFA3tUm2ujNDhNkt8QASr85yQVLCypABJnuoe/// # 5Ojl5wTBeDwhANET0rhwHK8eIYaNboiM9fHopJYhvyw1bz6yAu9jQwzF/MrL3s/r # xa4OBHBy5mq2hQV9Shcl3UfCQdk/vDaYaWpgzJGX8stgMGYfnfej1SIl8haJIfcl # VMX8/jEFdYbjhO4AeGRYcBzWjEJymkDJZoiSWp2NuEDi6jqIW+7yW1q0Rnlg9lay # ShAqLK5Pv4zUw3t0Jy3qv9KSW8sbs6PQxtzXjk8p97rTf76BJ2pF8sv1tVzmsidP # 9L92Hv5O34IqzBu2oATOUZYJk89YGmTIUSLkpT7asJZpBLwNM2qLp5jO00WVU0Sd # +kAn324guYPkko/TVnjC/AY7CMu55EOtD9NU35k3mUAnxXT9oDUeL4NlYtfgrJx6 # x1Nzr2FkS68+wlPAFKNSSU5lTjsjNaFM0bIJ4LCNtenJVP+SnRo= # =cjz8 # -----END PGP SIGNATURE----- # gpg: Signature made Fri 20 Dec 2024 11:45:20 EST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'exec-20241220' of https://github.com/philmd/qemu: (59 commits) util/qemu-timer: fix indentation meson: Do not define CONFIG_DEVICES on user emulation system/accel-ops: Remove unnecessary 'exec/cpu-common.h' header system/numa: Remove unnecessary 'exec/cpu-common.h' header hw/xen: Remove unnecessary 'exec/cpu-common.h' header target/mips: Drop left-over comment about Jazz machine target/mips: Remove tswap() calls in semihosting uhi_fstat_cb() target/xtensa: Remove tswap() calls in semihosting simcall() helper accel/tcg: Un-inline translator_is_same_page() accel/tcg: Include missing 'exec/translation-block.h' header accel/tcg: Move tcg_cflags_has/set() to 'exec/translation-block.h' accel/tcg: Restrict curr_cflags() declaration to 'internal-common.h' qemu/coroutine: Include missing 'qemu/atomic.h' header exec/translation-block: Include missing 'qemu/atomic.h' header accel/tcg: Declare cpu_loop_exit_requested() in 'exec/cpu-common.h' exec/cpu-all: Include 'cpu.h' earlier so MMU_USER_IDX is always defined target/sparc: Move sparc_restore_state_to_opc() to cpu.c target/sparc: Uninline cpu_get_tb_cpu_state() target/loongarch: Declare loongarch_cpu_dump_state() locally user: Move various declarations out of 'exec/exec-all.h' ... Conflicts: hw/char/riscv_htif.c hw/intc/riscv_aplic.c target/s390x/cpu.c Apply sysemu header path changes to not in the pull request. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
commit
65cb7129f4
1080 changed files with 2575 additions and 2312 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "block/block-common.h"
|
||||
#include "block/block-global-state.h"
|
||||
#include "block/snapshot.h"
|
||||
#include "qemu/clang-tsa.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "qemu/rcu.h"
|
||||
#include "qemu/stats64.h"
|
||||
|
|
|
@ -64,39 +64,7 @@
|
|||
|
||||
/* MMU memory access macros */
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
#include "user/abitypes.h"
|
||||
|
||||
/*
|
||||
* If non-zero, the guest virtual address space is a contiguous subset
|
||||
* of the host virtual address space, i.e. '-R reserved_va' is in effect
|
||||
* either from the command-line or by default. The value is the last
|
||||
* byte of the guest address space e.g. UINT32_MAX.
|
||||
*
|
||||
* If zero, the host and guest virtual address spaces are intermingled.
|
||||
*/
|
||||
extern unsigned long reserved_va;
|
||||
|
||||
/*
|
||||
* Limit the guest addresses as best we can.
|
||||
*
|
||||
* When not using -R reserved_va, we cannot really limit the guest
|
||||
* to less address space than the host. For 32-bit guests, this
|
||||
* acts as a sanity check that we're not giving the guest an address
|
||||
* that it cannot even represent. For 64-bit guests... the address
|
||||
* might not be what the real kernel would give, but it is at least
|
||||
* representable in the guest.
|
||||
*
|
||||
* TODO: Improve address allocation to avoid this problem, and to
|
||||
* avoid setting bits at the top of guest addresses that might need
|
||||
* to be used for tags.
|
||||
*/
|
||||
#define GUEST_ADDR_MAX_ \
|
||||
((MIN_CONST(TARGET_VIRT_ADDR_SPACE_BITS, TARGET_ABI_BITS) <= 32) ? \
|
||||
UINT32_MAX : ~0ul)
|
||||
#define GUEST_ADDR_MAX (reserved_va ? : GUEST_ADDR_MAX_)
|
||||
|
||||
#else
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
|
||||
#include "exec/hwaddr.h"
|
||||
|
||||
|
@ -136,7 +104,7 @@ static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val
|
|||
#endif
|
||||
|
||||
/* page related stuff */
|
||||
|
||||
#include "exec/cpu-defs.h"
|
||||
#ifdef TARGET_PAGE_BITS_VARY
|
||||
# include "exec/page-vary.h"
|
||||
extern const TargetPageBits target_page;
|
||||
|
@ -158,84 +126,6 @@ extern const TargetPageBits target_page;
|
|||
|
||||
#define TARGET_PAGE_ALIGN(addr) ROUND_UP((addr), TARGET_PAGE_SIZE)
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
void page_dump(FILE *f);
|
||||
|
||||
typedef int (*walk_memory_regions_fn)(void *, target_ulong,
|
||||
target_ulong, unsigned long);
|
||||
int walk_memory_regions(void *, walk_memory_regions_fn);
|
||||
|
||||
int page_get_flags(target_ulong address);
|
||||
|
||||
/**
|
||||
* page_set_flags:
|
||||
* @start: first byte of range
|
||||
* @last: last byte of range
|
||||
* @flags: flags to set
|
||||
* Context: holding mmap lock
|
||||
*
|
||||
* Modify the flags of a page and invalidate the code if necessary.
|
||||
* The flag PAGE_WRITE_ORG is positioned automatically depending
|
||||
* on PAGE_WRITE. The mmap_lock should already be held.
|
||||
*/
|
||||
void page_set_flags(target_ulong start, target_ulong last, int flags);
|
||||
|
||||
void page_reset_target_data(target_ulong start, target_ulong last);
|
||||
|
||||
/**
|
||||
* page_check_range
|
||||
* @start: first byte of range
|
||||
* @len: length of range
|
||||
* @flags: flags required for each page
|
||||
*
|
||||
* Return true if every page in [@start, @start+@len) has @flags set.
|
||||
* Return false if any page is unmapped. Thus testing flags == 0 is
|
||||
* equivalent to testing for flags == PAGE_VALID.
|
||||
*/
|
||||
bool page_check_range(target_ulong start, target_ulong last, int flags);
|
||||
|
||||
/**
|
||||
* page_check_range_empty:
|
||||
* @start: first byte of range
|
||||
* @last: last byte of range
|
||||
* Context: holding mmap lock
|
||||
*
|
||||
* Return true if the entire range [@start, @last] is unmapped.
|
||||
* The memory lock must be held so that the caller will can ensure
|
||||
* the result stays true until a new mapping can be installed.
|
||||
*/
|
||||
bool page_check_range_empty(target_ulong start, target_ulong last);
|
||||
|
||||
/**
|
||||
* page_find_range_empty
|
||||
* @min: first byte of search range
|
||||
* @max: last byte of search range
|
||||
* @len: size of the hole required
|
||||
* @align: alignment of the hole required (power of 2)
|
||||
*
|
||||
* If there is a range [x, x+@len) within [@min, @max] such that
|
||||
* x % @align == 0, then return x. Otherwise return -1.
|
||||
* The memory lock must be held, as the caller will want to ensure
|
||||
* the returned range stays empty until a new mapping can be installed.
|
||||
*/
|
||||
target_ulong page_find_range_empty(target_ulong min, target_ulong max,
|
||||
target_ulong len, target_ulong align);
|
||||
|
||||
/**
|
||||
* page_get_target_data(address)
|
||||
* @address: guest virtual address
|
||||
*
|
||||
* Return TARGET_PAGE_DATA_SIZE bytes of out-of-band data to associate
|
||||
* with the guest page at @address, allocating it if necessary. The
|
||||
* caller should already have verified that the address is valid.
|
||||
*
|
||||
* The memory will be freed when the guest page is deallocated,
|
||||
* e.g. with the munmap system call.
|
||||
*/
|
||||
void *page_get_target_data(target_ulong address)
|
||||
__attribute__((returns_nonnull));
|
||||
#endif
|
||||
|
||||
CPUArchState *cpu_copy(CPUArchState *env);
|
||||
|
||||
/* Flags for use in ENV->INTERRUPT_PENDING.
|
||||
|
@ -290,8 +180,12 @@ CPUArchState *cpu_copy(CPUArchState *env);
|
|||
| CPU_INTERRUPT_TGT_EXT_3 \
|
||||
| CPU_INTERRUPT_TGT_EXT_4)
|
||||
|
||||
#include "cpu.h"
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
|
||||
static inline int cpu_mmu_index(CPUState *cs, bool ifetch);
|
||||
|
||||
/*
|
||||
* Allow some level of source compatibility with softmmu. We do not
|
||||
* support any of the more exotic features, so only invalid pages may
|
||||
|
@ -381,7 +275,6 @@ static inline bool tlb_hit(uint64_t tlb_addr, vaddr addr)
|
|||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
/* Validate correct placement of CPUArchState. */
|
||||
#include "cpu.h"
|
||||
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0);
|
||||
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));
|
||||
|
||||
|
|
|
@ -186,12 +186,7 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
|
|||
void list_cpus(void);
|
||||
|
||||
#ifdef CONFIG_TCG
|
||||
|
||||
bool tcg_cflags_has(CPUState *cpu, uint32_t flags);
|
||||
void tcg_cflags_set(CPUState *cpu, uint32_t flags);
|
||||
|
||||
/* current cflags for hashing/comparison */
|
||||
uint32_t curr_cflags(CPUState *cpu);
|
||||
#include "qemu/atomic.h"
|
||||
|
||||
/**
|
||||
* cpu_unwind_state_data:
|
||||
|
@ -218,6 +213,23 @@ bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data);
|
|||
*/
|
||||
bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc);
|
||||
|
||||
/**
|
||||
* cpu_loop_exit_requested:
|
||||
* @cpu: The CPU state to be tested
|
||||
*
|
||||
* Indicate if somebody asked for a return of the CPU to the main loop
|
||||
* (e.g., via cpu_exit() or cpu_interrupt()).
|
||||
*
|
||||
* This is helpful for architectures that support interruptible
|
||||
* instructions. After writing back all state to registers/memory, this
|
||||
* call can be used to check if it makes sense to return to the main loop
|
||||
* or to continue executing the interruptible instruction.
|
||||
*/
|
||||
static inline bool cpu_loop_exit_requested(CPUState *cpu)
|
||||
{
|
||||
return (int32_t)qatomic_read(&cpu->neg.icount_decr.u32) < 0;
|
||||
}
|
||||
|
||||
G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu);
|
||||
G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc);
|
||||
#endif /* CONFIG_TCG */
|
||||
|
|
|
@ -23,14 +23,6 @@
|
|||
#error cpu.h included from common code
|
||||
#endif
|
||||
|
||||
#include "qemu/host-utils.h"
|
||||
#include "qemu/thread.h"
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#include "exec/hwaddr.h"
|
||||
#endif
|
||||
#include "exec/memattrs.h"
|
||||
#include "hw/core/cpu.h"
|
||||
|
||||
#include "cpu-param.h"
|
||||
|
||||
#ifndef TARGET_LONG_BITS
|
||||
|
|
|
@ -67,57 +67,13 @@
|
|||
#endif
|
||||
|
||||
#include "exec/memopidx.h"
|
||||
#include "exec/vaddr.h"
|
||||
#include "exec/abi_ptr.h"
|
||||
#include "exec/mmu-access-type.h"
|
||||
#include "qemu/int128.h"
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
|
||||
#include "user/guest-base.h"
|
||||
|
||||
#ifndef TARGET_TAGGED_ADDRESSES
|
||||
static inline abi_ptr cpu_untagged_addr(CPUState *cs, abi_ptr x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* All direct uses of g2h and h2g need to go away for usermode softmmu. */
|
||||
static inline void *g2h_untagged(abi_ptr x)
|
||||
{
|
||||
return (void *)((uintptr_t)(x) + guest_base);
|
||||
}
|
||||
|
||||
static inline void *g2h(CPUState *cs, abi_ptr x)
|
||||
{
|
||||
return g2h_untagged(cpu_untagged_addr(cs, x));
|
||||
}
|
||||
|
||||
static inline bool guest_addr_valid_untagged(abi_ulong x)
|
||||
{
|
||||
return x <= GUEST_ADDR_MAX;
|
||||
}
|
||||
|
||||
static inline bool guest_range_valid_untagged(abi_ulong start, abi_ulong len)
|
||||
{
|
||||
return len - 1 <= GUEST_ADDR_MAX && start <= GUEST_ADDR_MAX - len + 1;
|
||||
}
|
||||
|
||||
#define h2g_valid(x) \
|
||||
(HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS || \
|
||||
(uintptr_t)(x) - guest_base <= GUEST_ADDR_MAX)
|
||||
|
||||
#define h2g_nocheck(x) ({ \
|
||||
uintptr_t __ret = (uintptr_t)(x) - guest_base; \
|
||||
(abi_ptr)__ret; \
|
||||
})
|
||||
|
||||
#define h2g(x) ({ \
|
||||
/* Check if given address fits target address space */ \
|
||||
assert(h2g_valid(x)); \
|
||||
h2g_nocheck(x); \
|
||||
})
|
||||
|
||||
#include "user/guest-host.h"
|
||||
#endif /* CONFIG_USER_ONLY */
|
||||
|
||||
uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr ptr);
|
||||
|
@ -375,7 +331,7 @@ static inline void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr,
|
|||
return g2h(env_cpu(env), addr);
|
||||
}
|
||||
#else
|
||||
void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr,
|
||||
void *tlb_vaddr_to_host(CPUArchState *env, vaddr addr,
|
||||
MMUAccessType access_type, int mmu_idx);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,29 +22,10 @@
|
|||
|
||||
#include "cpu.h"
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
#include "exec/abi_ptr.h"
|
||||
#include "exec/cpu_ldst.h"
|
||||
#endif
|
||||
#include "exec/mmu-access-type.h"
|
||||
#include "exec/translation-block.h"
|
||||
#include "qemu/clang-tsa.h"
|
||||
|
||||
/**
|
||||
* cpu_loop_exit_requested:
|
||||
* @cpu: The CPU state to be tested
|
||||
*
|
||||
* Indicate if somebody asked for a return of the CPU to the main loop
|
||||
* (e.g., via cpu_exit() or cpu_interrupt()).
|
||||
*
|
||||
* This is helpful for architectures that support interruptible
|
||||
* instructions. After writing back all state to registers/memory, this
|
||||
* call can be used to check if it makes sense to return to the main loop
|
||||
* or to continue executing the interruptible instruction.
|
||||
*/
|
||||
static inline bool cpu_loop_exit_requested(CPUState *cpu)
|
||||
{
|
||||
return (int32_t)qatomic_read(&cpu->neg.icount_decr.u32) < 0;
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
|
||||
/* cputlb.c */
|
||||
|
@ -519,75 +500,7 @@ static inline tb_page_addr_t get_page_addr_code(CPUArchState *env,
|
|||
return get_page_addr_code_hostp(env, addr, NULL);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
void TSA_NO_TSA mmap_lock(void);
|
||||
void TSA_NO_TSA mmap_unlock(void);
|
||||
bool have_mmap_lock(void);
|
||||
|
||||
static inline void mmap_unlock_guard(void *unused)
|
||||
{
|
||||
mmap_unlock();
|
||||
}
|
||||
|
||||
#define WITH_MMAP_LOCK_GUARD() \
|
||||
for (int _mmap_lock_iter __attribute__((cleanup(mmap_unlock_guard))) \
|
||||
= (mmap_lock(), 0); _mmap_lock_iter == 0; _mmap_lock_iter = 1)
|
||||
|
||||
/**
|
||||
* adjust_signal_pc:
|
||||
* @pc: raw pc from the host signal ucontext_t.
|
||||
* @is_write: host memory operation was write, or read-modify-write.
|
||||
*
|
||||
* Alter @pc as required for unwinding. Return the type of the
|
||||
* guest memory access -- host reads may be for guest execution.
|
||||
*/
|
||||
MMUAccessType adjust_signal_pc(uintptr_t *pc, bool is_write);
|
||||
|
||||
/**
|
||||
* handle_sigsegv_accerr_write:
|
||||
* @cpu: the cpu context
|
||||
* @old_set: the sigset_t from the signal ucontext_t
|
||||
* @host_pc: the host pc, adjusted for the signal
|
||||
* @host_addr: the host address of the fault
|
||||
*
|
||||
* Return true if the write fault has been handled, and should be re-tried.
|
||||
*/
|
||||
bool handle_sigsegv_accerr_write(CPUState *cpu, sigset_t *old_set,
|
||||
uintptr_t host_pc, abi_ptr guest_addr);
|
||||
|
||||
/**
|
||||
* cpu_loop_exit_sigsegv:
|
||||
* @cpu: the cpu context
|
||||
* @addr: the guest address of the fault
|
||||
* @access_type: access was read/write/execute
|
||||
* @maperr: true for invalid page, false for permission fault
|
||||
* @ra: host pc for unwinding
|
||||
*
|
||||
* Use the TCGCPUOps hook to record cpu state, do guest operating system
|
||||
* specific things to raise SIGSEGV, and jump to the main cpu loop.
|
||||
*/
|
||||
G_NORETURN void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr,
|
||||
MMUAccessType access_type,
|
||||
bool maperr, uintptr_t ra);
|
||||
|
||||
/**
|
||||
* cpu_loop_exit_sigbus:
|
||||
* @cpu: the cpu context
|
||||
* @addr: the guest address of the alignment fault
|
||||
* @access_type: access was read/write/execute
|
||||
* @ra: host pc for unwinding
|
||||
*
|
||||
* Use the TCGCPUOps hook to record cpu state, do guest operating system
|
||||
* specific things to raise SIGBUS, and jump to the main cpu loop.
|
||||
*/
|
||||
G_NORETURN void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr,
|
||||
MMUAccessType access_type,
|
||||
uintptr_t ra);
|
||||
|
||||
#else
|
||||
static inline void mmap_lock(void) {}
|
||||
static inline void mmap_unlock(void) {}
|
||||
#define WITH_MMAP_LOCK_GUARD()
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
|
||||
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length);
|
||||
void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length);
|
||||
|
|
|
@ -38,4 +38,28 @@
|
|||
*/
|
||||
#define PAGE_PASSTHROUGH 0x0800
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
|
||||
#include "qemu/clang-tsa.h"
|
||||
|
||||
void TSA_NO_TSA mmap_lock(void);
|
||||
void TSA_NO_TSA mmap_unlock(void);
|
||||
bool have_mmap_lock(void);
|
||||
|
||||
static inline void mmap_unlock_guard(void *unused)
|
||||
{
|
||||
mmap_unlock();
|
||||
}
|
||||
|
||||
#define WITH_MMAP_LOCK_GUARD() \
|
||||
for (int _mmap_lock_iter __attribute__((cleanup(mmap_unlock_guard))) \
|
||||
= (mmap_lock(), 0); _mmap_lock_iter == 0; _mmap_lock_iter = 1)
|
||||
#else
|
||||
|
||||
static inline void mmap_lock(void) {}
|
||||
static inline void mmap_unlock(void) {}
|
||||
#define WITH_MMAP_LOCK_GUARD()
|
||||
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,13 +21,16 @@
|
|||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#include "cpu.h"
|
||||
#include "sysemu/xen.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "system/xen.h"
|
||||
#include "system/tcg.h"
|
||||
#include "exec/ramlist.h"
|
||||
#include "exec/ramblock.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "qemu/rcu.h"
|
||||
|
||||
#include "exec/hwaddr.h"
|
||||
#include "exec/cpu-common.h"
|
||||
|
||||
extern uint64_t total_dirty_pages;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Translated block handling
|
||||
*
|
||||
* Copyright (c) 2003 Fabrice Bellard
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef TRANSLATE_ALL_H
|
||||
#define TRANSLATE_ALL_H
|
||||
|
||||
#include "exec/exec-all.h"
|
||||
|
||||
|
||||
/* translate-all.c */
|
||||
void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
void page_protect(tb_page_addr_t page_addr);
|
||||
int page_unprotect(target_ulong address, uintptr_t pc);
|
||||
#endif
|
||||
|
||||
#endif /* TRANSLATE_ALL_H */
|
|
@ -7,8 +7,10 @@
|
|||
#ifndef EXEC_TRANSLATION_BLOCK_H
|
||||
#define EXEC_TRANSLATION_BLOCK_H
|
||||
|
||||
#include "qemu/atomic.h"
|
||||
#include "qemu/thread.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "exec/vaddr.h"
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#include "qemu/interval-tree.h"
|
||||
#endif
|
||||
|
@ -152,4 +154,7 @@ static inline uint32_t tb_cflags(const TranslationBlock *tb)
|
|||
return qatomic_read(&tb->cflags);
|
||||
}
|
||||
|
||||
bool tcg_cflags_has(CPUState *cpu, uint32_t flags);
|
||||
void tcg_cflags_set(CPUState *cpu, uint32_t flags);
|
||||
|
||||
#endif /* EXEC_TRANSLATION_BLOCK_H */
|
||||
|
|
|
@ -267,16 +267,15 @@ bool translator_st(const DisasContextBase *db, void *dest,
|
|||
*/
|
||||
size_t translator_st_len(const DisasContextBase *db);
|
||||
|
||||
#ifdef COMPILING_PER_TARGET
|
||||
/*
|
||||
* Return whether addr is on the same page as where disassembly started.
|
||||
/**
|
||||
* translator_is_same_page
|
||||
* @db: disassembly context
|
||||
* @addr: virtual address within TB
|
||||
*
|
||||
* Return whether @addr is on the same page as where disassembly started.
|
||||
* Translators can use this to enforce the rule that only single-insn
|
||||
* translation blocks are allowed to cross page boundaries.
|
||||
*/
|
||||
static inline bool is_same_page(const DisasContextBase *db, vaddr addr)
|
||||
{
|
||||
return ((addr ^ db->pc_first) & TARGET_PAGE_MASK) == 0;
|
||||
}
|
||||
#endif
|
||||
bool translator_is_same_page(const DisasContextBase *db, vaddr addr);
|
||||
|
||||
#endif /* EXEC__TRANSLATOR_H */
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "qemu/units.h"
|
||||
#include "hw/registerfields.h"
|
||||
#include "hw/acpi/aml-build.h"
|
||||
#include "sysemu/tpm.h"
|
||||
#include "system/tpm.h"
|
||||
|
||||
#ifdef CONFIG_TPM
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "hw/i2c/allwinner-i2c.h"
|
||||
#include "hw/ssi/allwinner-a10-spi.h"
|
||||
#include "hw/watchdog/allwinner-wdt.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "system/block-backend.h"
|
||||
|
||||
#include "target/arm/cpu.h"
|
||||
#include "qom/object.h"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "hw/i2c/allwinner-i2c.h"
|
||||
#include "hw/watchdog/allwinner-wdt.h"
|
||||
#include "target/arm/cpu.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "system/block-backend.h"
|
||||
|
||||
/**
|
||||
* Allwinner H3 device list
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "hw/usb/hcd-ehci.h"
|
||||
#include "hw/watchdog/allwinner-wdt.h"
|
||||
#include "target/arm/cpu.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "system/block-backend.h"
|
||||
|
||||
enum {
|
||||
AW_R40_DEV_SRAM_A1,
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "hw/arm/boot.h"
|
||||
#include "hw/arm/bsa.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "system/kvm.h"
|
||||
#include "hw/intc/arm_gicv3_common.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#define HW_BOARDS_H
|
||||
|
||||
#include "exec/memory.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "system/hostmem.h"
|
||||
#include "system/blockdev.h"
|
||||
#include "qapi/qapi-types-machine.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object.h"
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef SYSEMU_CPU_OPS_H
|
||||
#define SYSEMU_CPU_OPS_H
|
||||
#ifndef SYSTEM_CPU_OPS_H
|
||||
#define SYSTEM_CPU_OPS_H
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
|
||||
|
@ -89,4 +89,4 @@ typedef struct SysemuCPUOps {
|
|||
|
||||
} SysemuCPUOps;
|
||||
|
||||
#endif /* SYSEMU_CPU_OPS_H */
|
||||
#endif /* SYSTEM_CPU_OPS_H */
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/register.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/dma.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define ZDMA_R_MAX (0x204 / 4)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "hw/sysbus.h"
|
||||
#include "ui/console.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/dma.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define XLNX_DPDMA_REG_ARRAY_SIZE (0x1000 >> 2)
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#ifndef HW_HYPERV_VMBUS_H
|
||||
#define HW_HYPERV_VMBUS_H
|
||||
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/system.h"
|
||||
#include "system/dma.h"
|
||||
#include "hw/qdev-core.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "hw/hyperv/vmbus-proto.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifndef QEMU_HOSTMEM_EPC_H
|
||||
#define QEMU_HOSTMEM_EPC_H
|
||||
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "system/hostmem.h"
|
||||
|
||||
#define TYPE_MEMORY_BACKEND_EPC "memory-backend-epc"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef IDE_DEV_H
|
||||
#define IDE_DEV_H
|
||||
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/dma.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "hw/block/block.h"
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#ifndef HW_ISA_SUPERIO_H
|
||||
#define HW_ISA_SUPERIO_H
|
||||
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "system/system.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "exec/hwaddr.h"
|
||||
#include "standard-headers/linux/qemu_fw_cfg.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/dma.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_FW_CFG "fw_cfg"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef XLNX_BBRAM_H
|
||||
#define XLNX_BBRAM_H
|
||||
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "system/block-backend.h"
|
||||
#include "hw/qdev-core.h"
|
||||
#include "hw/irq.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#ifndef XLNX_EFUSE_H
|
||||
#define XLNX_EFUSE_H
|
||||
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "system/block-backend.h"
|
||||
#include "hw/qdev-core.h"
|
||||
|
||||
#define TYPE_XLNX_EFUSE "xlnx-efuse"
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#define QEMU_PCI_H
|
||||
|
||||
#include "exec/memory.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "sysemu/host_iommu_device.h"
|
||||
#include "system/dma.h"
|
||||
#include "system/host_iommu_device.h"
|
||||
|
||||
/* PCI includes legacy ISA access. */
|
||||
#include "hw/isa/isa.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "exec/memory.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/dma.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define HW_SPAPR_H
|
||||
|
||||
#include "qemu/units.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/dma.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/ppc/spapr_drc.h"
|
||||
#include "hw/mem/pc-dimm.h"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <libfdt.h>
|
||||
#include "qom/object.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "system/runstate.h"
|
||||
#include "hw/qdev-core.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "hw/ppc/spapr.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/dma.h"
|
||||
#include "hw/irq.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
#ifndef PPC_XIVE_H
|
||||
#define PPC_XIVE_H
|
||||
|
||||
#include "sysemu/kvm.h"
|
||||
#include "system/kvm.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/ppc/xive_regs.h"
|
||||
#include "qom/object.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "hw/boards.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "sysemu/numa.h"
|
||||
#include "system/numa.h"
|
||||
|
||||
/**
|
||||
* riscv_socket_count:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "hw/s390x/adapter.h"
|
||||
#include "hw/s390x/s390_flic.h"
|
||||
#include "hw/s390x/ioinst.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "system/kvm.h"
|
||||
#include "target/s390x/cpu-qom.h"
|
||||
|
||||
/* Channel subsystem constants. */
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#define HW_S390_PCI_INST_H
|
||||
|
||||
#include "s390-pci-bus.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "system/dma.h"
|
||||
|
||||
/* Load/Store status codes */
|
||||
#define ZPCI_PCI_ST_FUNC_NOT_ENABLED 4
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "qapi/error.h"
|
||||
#include "hw/boards.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "system/system.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
#ifdef CONFIG_LINUX
|
||||
#include <linux/vfio.h>
|
||||
#endif
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "system/system.h"
|
||||
#include "hw/vfio/vfio-container-base.h"
|
||||
#include "sysemu/host_iommu_device.h"
|
||||
#include "sysemu/iommufd.h"
|
||||
#include "system/host_iommu_device.h"
|
||||
#include "system/iommufd.h"
|
||||
|
||||
#define VFIO_MSG_PREFIX "vfio %s: "
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "standard-headers/linux/virtio_balloon.h"
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "sysemu/iothread.h"
|
||||
#include "system/iothread.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_VIRTIO_BALLOON "virtio-balloon-device"
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
#include "standard-headers/linux/virtio_blk.h"
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "hw/block/block.h"
|
||||
#include "sysemu/iothread.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/block-ram-registrar.h"
|
||||
#include "system/iothread.h"
|
||||
#include "system/block-backend.h"
|
||||
#include "system/block-ram-registrar.h"
|
||||
#include "qom/object.h"
|
||||
#include "qapi/qapi-types-virtio.h"
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
#include "standard-headers/linux/virtio_crypto.h"
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "sysemu/iothread.h"
|
||||
#include "sysemu/cryptodev.h"
|
||||
#include "system/iothread.h"
|
||||
#include "system/cryptodev.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "ui/console.h"
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "qemu/log.h"
|
||||
#include "sysemu/vhost-user-backend.h"
|
||||
#include "system/vhost-user-backend.h"
|
||||
|
||||
#include "standard-headers/linux/virtio_gpu.h"
|
||||
#include "standard-headers/linux/virtio_ids.h"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "hw/virtio/vhost-user.h"
|
||||
#include "hw/virtio/vhost-user-base.h"
|
||||
#include "ui/input.h"
|
||||
#include "sysemu/vhost-user-backend.h"
|
||||
#include "system/vhost-user-backend.h"
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* virtio input protocol */
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#include "qom/object.h"
|
||||
#include "qapi/qapi-types-virtio.h"
|
||||
#include "sysemu/host_iommu_device.h"
|
||||
#include "system/host_iommu_device.h"
|
||||
|
||||
#define TYPE_VIRTIO_IOMMU "virtio-iommu-device"
|
||||
#define TYPE_VIRTIO_IOMMU_PCI "virtio-iommu-pci"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "hw/resettable.h"
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "qapi/qapi-types-misc.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "system/hostmem.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_VIRTIO_MEM "virtio-mem"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#define QEMU_VIRTIO_RNG_H
|
||||
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "sysemu/rng.h"
|
||||
#include "system/rng.h"
|
||||
#include "standard-headers/linux/virtio_rng.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "hw/virtio/virtio.h"
|
||||
#include "hw/scsi/scsi.h"
|
||||
#include "chardev/char-fe.h"
|
||||
#include "sysemu/iothread.h"
|
||||
#include "system/iothread.h"
|
||||
|
||||
#define TYPE_VIRTIO_SCSI_COMMON "virtio-scsi-common"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(VirtIOSCSICommon, VIRTIO_SCSI_COMMON)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "hw/xen/xen-bus.h"
|
||||
#include "hw/block/block.h"
|
||||
#include "hw/block/dataplane/xen-block.h"
|
||||
#include "sysemu/iothread.h"
|
||||
#include "system/iothread.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef enum XenBlockVdevType {
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
#include "hw/hw.h"
|
||||
#include "hw/xen/xen_native.h"
|
||||
#include "hw/xen/xen-legacy-backend.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/xen.h"
|
||||
#include "sysemu/xen-mapcache.h"
|
||||
#include "system/runstate.h"
|
||||
#include "system/system.h"
|
||||
#include "system/xen.h"
|
||||
#include "system/xen-mapcache.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include <xen/hvm/ioreq.h>
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#define __XEN_INTERFACE_VERSION__ 0x00040e00
|
||||
#endif
|
||||
|
||||
#include "exec/cpu-common.h"
|
||||
|
||||
/* xen-machine.c */
|
||||
enum xen_mode {
|
||||
XEN_DISABLED = 0, /* xen support disabled (default) */
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#define QEMU_COROUTINE_H
|
||||
|
||||
#include "qemu/coroutine-core.h"
|
||||
#include "qemu/atomic.h"
|
||||
#include "qemu/queue.h"
|
||||
#include "qemu/timer.h"
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ bool qemu_log_separate(void);
|
|||
#define LOG_PER_THREAD (1 << 20)
|
||||
#define CPU_LOG_TB_VPU (1 << 21)
|
||||
#define LOG_TB_OP_PLUGIN (1 << 22)
|
||||
#define LOG_INVALID_MEM (1 << 23)
|
||||
|
||||
/* Lock/unlock output. */
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "block/aio.h"
|
||||
#include "qom/object.h"
|
||||
#include "sysemu/event-loop-base.h"
|
||||
#include "system/event-loop-base.h"
|
||||
|
||||
#define SIG_IPI SIGUSR1
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* To avoid getting into possible circular include dependencies, this
|
||||
* file should not include any other QEMU headers, with the exceptions
|
||||
* of config-host.h, config-target.h, qemu/compiler.h,
|
||||
* sysemu/os-posix.h, sysemu/os-win32.h, glib-compat.h and
|
||||
* system/os-posix.h, system/os-win32.h, glib-compat.h and
|
||||
* qemu/typedefs.h, all of which are doing a similar job to this file
|
||||
* and are under similar constraints.
|
||||
*
|
||||
|
@ -128,7 +128,7 @@ QEMU_EXTERN_C int daemon(int, int);
|
|||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <assert.h>
|
||||
/* setjmp must be declared before sysemu/os-win32.h
|
||||
/* setjmp must be declared before system/os-win32.h
|
||||
* because it is redefined there. */
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
|
@ -161,11 +161,11 @@ QEMU_EXTERN_C int daemon(int, int);
|
|||
#include "glib-compat.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "sysemu/os-win32.h"
|
||||
#include "system/os-win32.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_POSIX
|
||||
#include "sysemu/os-posix.h"
|
||||
#include "system/os-posix.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -26,6 +26,7 @@ typedef struct InterfaceClass InterfaceClass;
|
|||
typedef struct InterfaceInfo InterfaceInfo;
|
||||
|
||||
#define TYPE_OBJECT "object"
|
||||
#define TYPE_CONTAINER "container"
|
||||
|
||||
typedef struct ObjectProperty ObjectProperty;
|
||||
|
||||
|
@ -2018,6 +2019,18 @@ int object_child_foreach_recursive(Object *obj,
|
|||
*/
|
||||
Object *container_get(Object *root, const char *path);
|
||||
|
||||
/**
|
||||
* object_property_add_new_container:
|
||||
* @obj: the parent object
|
||||
* @name: the name of the parent object's property to add
|
||||
*
|
||||
* Add a newly created container object to a parent object.
|
||||
*
|
||||
* Returns: the newly created container object. Its reference count is 1,
|
||||
* and the reference is owned by the parent object.
|
||||
*/
|
||||
Object *object_property_add_new_container(Object *obj, const char *name);
|
||||
|
||||
/**
|
||||
* object_property_help:
|
||||
* @name: the name of the property
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#ifndef ACCEL_BLOCKER_H
|
||||
#define ACCEL_BLOCKER_H
|
||||
|
||||
#include "sysemu/cpus.h"
|
||||
#include "system/cpus.h"
|
||||
|
||||
void accel_blocker_init(void);
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#ifndef ACCEL_OPS_H
|
||||
#define ACCEL_OPS_H
|
||||
|
||||
#include "exec/cpu-common.h"
|
||||
#include "exec/vaddr.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define ACCEL_OPS_SUFFIX "-ops"
|
|
@ -18,7 +18,9 @@
|
|||
#ifndef QEMU_CONFIDENTIAL_GUEST_SUPPORT_H
|
||||
#define QEMU_CONFIDENTIAL_GUEST_SUPPORT_H
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#error Cannot include system/confidential-guest-support.h from user emulation
|
||||
#endif
|
||||
|
||||
#include "qom/object.h"
|
||||
|
||||
|
@ -94,6 +96,4 @@ static inline int confidential_guest_kvm_reset(ConfidentialGuestSupport *cgs,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
#endif /* QEMU_CONFIDENTIAL_GUEST_SUPPORT_H */
|
|
@ -16,8 +16,8 @@
|
|||
* <http://www.gnu.org/licenses/gpl-2.0.html>
|
||||
*/
|
||||
|
||||
#ifndef SYSEMU_CPU_THROTTLE_H
|
||||
#define SYSEMU_CPU_THROTTLE_H
|
||||
#ifndef SYSTEM_CPU_THROTTLE_H
|
||||
#define SYSTEM_CPU_THROTTLE_H
|
||||
|
||||
#include "qemu/timer.h"
|
||||
|
||||
|
@ -79,4 +79,4 @@ void cpu_throttle_dirty_sync_timer_tick(void *opaque);
|
|||
*/
|
||||
void cpu_throttle_dirty_sync_timer(bool enable);
|
||||
|
||||
#endif /* SYSEMU_CPU_THROTTLE_H */
|
||||
#endif /* SYSTEM_CPU_THROTTLE_H */
|
|
@ -7,8 +7,8 @@
|
|||
* See the COPYING file in the top-level directory.
|
||||
*
|
||||
*/
|
||||
#ifndef SYSEMU_CPU_TIMERS_H
|
||||
#define SYSEMU_CPU_TIMERS_H
|
||||
#ifndef SYSTEM_CPU_TIMERS_H
|
||||
#define SYSTEM_CPU_TIMERS_H
|
||||
|
||||
#include "qemu/timer.h"
|
||||
|
||||
|
@ -101,4 +101,4 @@ int64_t cpus_get_virtual_clock(void);
|
|||
void cpus_set_virtual_clock(int64_t new_time);
|
||||
int64_t cpus_get_elapsed_ticks(void);
|
||||
|
||||
#endif /* SYSEMU_CPU_TIMERS_H */
|
||||
#endif /* SYSTEM_CPU_TIMERS_H */
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef QEMU_CPUS_H
|
||||
#define QEMU_CPUS_H
|
||||
|
||||
#include "sysemu/accel-ops.h"
|
||||
#include "system/accel-ops.h"
|
||||
|
||||
/* register accel-specific operations */
|
||||
void cpus_register_accel(const AccelOpsClass *i);
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CRYPTODEV_VHOST_USER_H
|
||||
#define CRYPTODEV_VHOST_USER_H
|
||||
|
||||
#include "sysemu/cryptodev-vhost.h"
|
||||
#include "system/cryptodev-vhost.h"
|
||||
|
||||
#define VHOST_USER_MAX_AUTH_KEY_LEN 512
|
||||
#define VHOST_USER_MAX_CIPHER_KEY_LEN 64
|
|
@ -28,7 +28,7 @@
|
|||
#include "hw/virtio/vhost-backend.h"
|
||||
#include "chardev/char.h"
|
||||
|
||||
#include "sysemu/cryptodev.h"
|
||||
#include "system/cryptodev.h"
|
||||
|
||||
|
||||
typedef struct CryptoDevBackendVhostOptions {
|
|
@ -39,8 +39,8 @@
|
|||
#define DUMP_LEVEL (1)
|
||||
#define DISKDUMP_HEADER_BLOCKS (1)
|
||||
|
||||
#include "sysemu/dump-arch.h"
|
||||
#include "sysemu/memory_mapping.h"
|
||||
#include "system/dump-arch.h"
|
||||
#include "system/memory_mapping.h"
|
||||
|
||||
typedef struct QEMU_PACKED MakedumpfileHeader {
|
||||
char signature[16]; /* = "makedumpfile" */
|
|
@ -10,10 +10,10 @@
|
|||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef SYSEMU_HOSTMEM_H
|
||||
#define SYSEMU_HOSTMEM_H
|
||||
#ifndef SYSTEM_HOSTMEM_H
|
||||
#define SYSTEM_HOSTMEM_H
|
||||
|
||||
#include "sysemu/numa.h"
|
||||
#include "system/numa.h"
|
||||
#include "qapi/qapi-types-machine.h"
|
||||
#include "qom/object.h"
|
||||
#include "exec/memory.h"
|
|
@ -12,10 +12,10 @@
|
|||
#define QEMU_HW_ACCEL_H
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "sysemu/hvf.h"
|
||||
#include "sysemu/whpx.h"
|
||||
#include "sysemu/nvmm.h"
|
||||
#include "system/kvm.h"
|
||||
#include "system/hvf.h"
|
||||
#include "system/whpx.h"
|
||||
#include "system/nvmm.h"
|
||||
|
||||
void cpu_synchronize_state(CPUState *cpu);
|
||||
void cpu_synchronize_post_reset(CPUState *cpu);
|
|
@ -11,13 +11,13 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef SYSEMU_IOMMUFD_H
|
||||
#define SYSEMU_IOMMUFD_H
|
||||
#ifndef SYSTEM_IOMMUFD_H
|
||||
#define SYSTEM_IOMMUFD_H
|
||||
|
||||
#include "qom/object.h"
|
||||
#include "exec/hwaddr.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "sysemu/host_iommu_device.h"
|
||||
#include "system/host_iommu_device.h"
|
||||
|
||||
#define TYPE_IOMMUFD_BACKEND "iommufd"
|
||||
OBJECT_DECLARE_TYPE(IOMMUFDBackend, IOMMUFDBackendClass, IOMMUFD_BACKEND)
|
|
@ -17,7 +17,7 @@
|
|||
#include "block/aio.h"
|
||||
#include "qemu/thread.h"
|
||||
#include "qom/object.h"
|
||||
#include "sysemu/event-loop-base.h"
|
||||
#include "system/event-loop-base.h"
|
||||
|
||||
#define TYPE_IOTHREAD "iothread"
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
#include "qapi/qapi-types-common.h"
|
||||
#include "qemu/accel.h"
|
||||
#include "qemu/queue.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "system/kvm.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/i386/topology.h"
|
||||
#include "io/channel-socket.h"
|
|
@ -9,8 +9,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef QEMU_SYSEMU_KVM_XEN_H
|
||||
#define QEMU_SYSEMU_KVM_XEN_H
|
||||
#ifndef QEMU_SYSTEM_KVM_XEN_H
|
||||
#define QEMU_SYSTEM_KVM_XEN_H
|
||||
|
||||
/* The KVM API uses these to indicate "no GPA" or "no GFN" */
|
||||
#define INVALID_GPA UINT64_MAX
|
||||
|
@ -41,4 +41,4 @@ uint16_t kvm_xen_get_evtchn_max_pirq(void);
|
|||
#define XEN_SPECIAL_PFN(x) ((XEN_SPECIAL_AREA_ADDR >> TARGET_PAGE_BITS) + \
|
||||
XEN_SPECIALPAGE_##x)
|
||||
|
||||
#endif /* QEMU_SYSEMU_KVM_XEN_H */
|
||||
#endif /* QEMU_SYSTEM_KVM_XEN_H */
|
|
@ -1,9 +1,8 @@
|
|||
#ifndef SYSEMU_NUMA_H
|
||||
#define SYSEMU_NUMA_H
|
||||
#ifndef SYSTEM_NUMA_H
|
||||
#define SYSTEM_NUMA_H
|
||||
|
||||
#include "qemu/bitmap.h"
|
||||
#include "qapi/qapi-types-machine.h"
|
||||
#include "exec/cpu-common.h"
|
||||
|
||||
struct CPUArchId;
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
* See the COPYING file in the top-level directory.
|
||||
*
|
||||
*/
|
||||
#ifndef SYSEMU_REPLAY_H
|
||||
#define SYSEMU_REPLAY_H
|
||||
#ifndef SYSTEM_REPLAY_H
|
||||
#define SYSTEM_REPLAY_H
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#error Cannot include this header from user emulation
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef QEMU_SYSEMU_RESET_H
|
||||
#define QEMU_SYSEMU_RESET_H
|
||||
#ifndef QEMU_SYSTEM_RESET_H
|
||||
#define QEMU_SYSTEM_RESET_H
|
||||
|
||||
#include "hw/resettable.h"
|
||||
#include "qapi/qapi-events-run-state.h"
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue