mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
HW core patch queue
. Deprecate unmaintained SH-4 models (Samuel) . HPET: Convert DPRINTF calls to trace events (Daniel) . Implement buffered block writes in Intel PFlash (Gerd) . Ignore ELF loadable segments with zero size (Bin) . ESP/NCR53C9x: PCI DMA fixes (Mark) . PIIX: Simplify Xen PCI IRQ routing (Bernhard) . Restrict CPU 'start-powered-off' property to sysemu (Phil) . target/alpha: Only build sys_helper.c on system emulation (Phil) . target/xtensa: Use generic instruction breakpoint API & add test (Max) . Restrict icount to system emulation (Phil) . Do not set CPUState TCG-specific flags in non-TCG accels (Phil) . Cleanup TCG tb_invalidate API (Phil) . Correct LoongArch/KVM include path (Bibo) . Do not ignore throttle errors in crypto backends (Phil) . MAINTAINERS updates (Raphael, Zhao) -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmWqXbkACgkQ4+MsLN6t wN6VVBAAkP/Bs2JfQYobPZVV868wceM97KeUJMXP2YWf6dSLpHRCQN5KtuJcACM9 y3k3R7nMeVJSGmzl/1gF1G9JhjoCLoVLX/ejeBppv4Wq//9sEdggaQfdCwkhWw2o IK/gPjTZpimE7Er4hPlxmuhSRuM1MX4duKFRRfuZpE7XY14Y7/Hk12VIG7LooO0x 2Sl8CaU0DN7CWmRVDoUkwVx7JBy28UVarRDsgpBim7oKmjjBFnCJkH6B6NJXEiYr z1BmIcHa87S09kG1ek+y8aZpG9iPC7nUWjPIQyJGhnfrnBuO7hQHwCLIjHHp5QBR BoMr8YQNTI34/M/D8pBfg96LrGDjkQOfwRyRddkMP/jJcNPMAPMNGbfVaIrfij1e T+jFF4gQenOvy1XKCY3Uk/a11P3tIRFBEeOlzzQg4Aje9W2MhUNwK2HTlRfBbrRr V30R764FDmHlsyOu6/E3jqp4GVCgryF1bglPOBjVEU5uytbQTP8jshIpGVnxBbF+ OpFwtsoDbsousNKVcO5+B0mlHcB9Ru9h11M5/YD/jfLMk95Ga90JGdgYpqQ5tO5Y aqQhKfCKbfgKuKhysxpsdWAwHZzVrlSf+UrObF0rl2lMXXfcppjCqNaw4QJ0oedc DNBxTPcCE2vWhUzP3A60VH7jLh4nLaqSTrxxQKkbx+Je1ERGrxs= =KmQh -----END PGP SIGNATURE----- Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging HW core patch queue . Deprecate unmaintained SH-4 models (Samuel) . HPET: Convert DPRINTF calls to trace events (Daniel) . Implement buffered block writes in Intel PFlash (Gerd) . Ignore ELF loadable segments with zero size (Bin) . ESP/NCR53C9x: PCI DMA fixes (Mark) . PIIX: Simplify Xen PCI IRQ routing (Bernhard) . Restrict CPU 'start-powered-off' property to sysemu (Phil) . target/alpha: Only build sys_helper.c on system emulation (Phil) . target/xtensa: Use generic instruction breakpoint API & add test (Max) . Restrict icount to system emulation (Phil) . Do not set CPUState TCG-specific flags in non-TCG accels (Phil) . Cleanup TCG tb_invalidate API (Phil) . Correct LoongArch/KVM include path (Bibo) . Do not ignore throttle errors in crypto backends (Phil) . MAINTAINERS updates (Raphael, Zhao) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmWqXbkACgkQ4+MsLN6t # wN6VVBAAkP/Bs2JfQYobPZVV868wceM97KeUJMXP2YWf6dSLpHRCQN5KtuJcACM9 # y3k3R7nMeVJSGmzl/1gF1G9JhjoCLoVLX/ejeBppv4Wq//9sEdggaQfdCwkhWw2o # IK/gPjTZpimE7Er4hPlxmuhSRuM1MX4duKFRRfuZpE7XY14Y7/Hk12VIG7LooO0x # 2Sl8CaU0DN7CWmRVDoUkwVx7JBy28UVarRDsgpBim7oKmjjBFnCJkH6B6NJXEiYr # z1BmIcHa87S09kG1ek+y8aZpG9iPC7nUWjPIQyJGhnfrnBuO7hQHwCLIjHHp5QBR # BoMr8YQNTI34/M/D8pBfg96LrGDjkQOfwRyRddkMP/jJcNPMAPMNGbfVaIrfij1e # T+jFF4gQenOvy1XKCY3Uk/a11P3tIRFBEeOlzzQg4Aje9W2MhUNwK2HTlRfBbrRr # V30R764FDmHlsyOu6/E3jqp4GVCgryF1bglPOBjVEU5uytbQTP8jshIpGVnxBbF+ # OpFwtsoDbsousNKVcO5+B0mlHcB9Ru9h11M5/YD/jfLMk95Ga90JGdgYpqQ5tO5Y # aqQhKfCKbfgKuKhysxpsdWAwHZzVrlSf+UrObF0rl2lMXXfcppjCqNaw4QJ0oedc # DNBxTPcCE2vWhUzP3A60VH7jLh4nLaqSTrxxQKkbx+Je1ERGrxs= # =KmQh # -----END PGP SIGNATURE----- # gpg: Signature made Fri 19 Jan 2024 11:32:09 GMT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'hw-cpus-20240119' of https://github.com/philmd/qemu: (36 commits) configure: Add linux header compile support for LoongArch MAINTAINERS: Update hw/core/cpu.c entry MAINTAINERS: Update Raphael Norwitz email hw/elf_ops: Ignore loadable segments with zero size hw/scsi/esp-pci: set DMA_STAT_BCMBLT when BLAST command issued hw/scsi/esp-pci: synchronise setting of DMA_STAT_DONE with ESP completion interrupt hw/scsi/esp-pci: generate PCI interrupt from separate ESP and PCI sources hw/scsi/esp-pci: use correct address register for PCI DMA transfers target/riscv: Rename tcg_cpu_FOO() to include 'riscv' target/i386: Rename tcg_cpu_FOO() to include 'x86' hw/s390x: Rename cpu_class_init() to include 'sclp' hw/core/cpu: Rename cpu_class_init() to include 'common' accel: Rename accel_init_ops_interfaces() to include 'system' cpus: Restrict 'start-powered-off' property to system emulation system/watchpoint: Move TCG specific code to accel/tcg/ system/replay: Restrict icount to system emulation hw/pflash: implement update buffer for block writes hw/pflash: use ldn_{be,le}_p and stn_{be,le}_p hw/pflash: refactor pflash_data_write() hw/i386/pc_piix: Make piix_intx_routing_notifier_xen() more device independent ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
3f2a357b95
50 changed files with 603 additions and 520 deletions
|
@ -518,11 +518,6 @@ static inline void tb_set_page_addr1(TranslationBlock *tb,
|
|||
uint32_t curr_cflags(CPUState *cpu);
|
||||
|
||||
/* TranslationBlock invalidate API */
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
void tb_invalidate_phys_addr(hwaddr addr);
|
||||
#else
|
||||
void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs);
|
||||
#endif
|
||||
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
|
||||
void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t last);
|
||||
void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr);
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
|
||||
/* translate-all.c */
|
||||
void tb_invalidate_phys_page(tb_page_addr_t addr);
|
||||
void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
|
|
|
@ -427,6 +427,16 @@ static ssize_t glue(load_elf, SZ)(const char *name, int fd,
|
|||
file_size = ph->p_filesz; /* Size of the allocated data */
|
||||
data_offset = ph->p_offset; /* Offset where the data is located */
|
||||
|
||||
/*
|
||||
* Some ELF files really do have segments of zero size;
|
||||
* just ignore them rather than trying to set the wrong addr,
|
||||
* or create empty ROM blobs, because the zero-length blob can
|
||||
* falsely trigger the overlapping-ROM-blobs check.
|
||||
*/
|
||||
if (mem_size == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file_size > 0) {
|
||||
if (g_mapped_file_get_length(mapped_file) <
|
||||
file_size + data_offset) {
|
||||
|
@ -530,45 +540,38 @@ static ssize_t glue(load_elf, SZ)(const char *name, int fd,
|
|||
*pentry = ehdr.e_entry - ph->p_vaddr + ph->p_paddr;
|
||||
}
|
||||
|
||||
/* Some ELF files really do have segments of zero size;
|
||||
* just ignore them rather than trying to create empty
|
||||
* ROM blobs, because the zero-length blob can falsely
|
||||
* trigger the overlapping-ROM-blobs check.
|
||||
*/
|
||||
if (mem_size != 0) {
|
||||
if (load_rom) {
|
||||
g_autofree char *label =
|
||||
g_strdup_printf("%s ELF program header segment %d",
|
||||
name, i);
|
||||
if (load_rom) {
|
||||
g_autofree char *label =
|
||||
g_strdup_printf("%s ELF program header segment %d",
|
||||
name, i);
|
||||
|
||||
/*
|
||||
* rom_add_elf_program() takes its own reference to
|
||||
* 'mapped_file'.
|
||||
*/
|
||||
rom_add_elf_program(label, mapped_file, data, file_size,
|
||||
mem_size, addr, as);
|
||||
} else {
|
||||
MemTxResult res;
|
||||
/*
|
||||
* rom_add_elf_program() takes its own reference to
|
||||
* 'mapped_file'.
|
||||
*/
|
||||
rom_add_elf_program(label, mapped_file, data, file_size,
|
||||
mem_size, addr, as);
|
||||
} else {
|
||||
MemTxResult res;
|
||||
|
||||
res = address_space_write(as ? as : &address_space_memory,
|
||||
addr, MEMTXATTRS_UNSPECIFIED,
|
||||
data, file_size);
|
||||
res = address_space_write(as ? as : &address_space_memory,
|
||||
addr, MEMTXATTRS_UNSPECIFIED,
|
||||
data, file_size);
|
||||
if (res != MEMTX_OK) {
|
||||
goto fail;
|
||||
}
|
||||
/*
|
||||
* We need to zero'ify the space that is not copied
|
||||
* from file
|
||||
*/
|
||||
if (file_size < mem_size) {
|
||||
res = address_space_set(as ? as : &address_space_memory,
|
||||
addr + file_size, 0,
|
||||
mem_size - file_size,
|
||||
MEMTXATTRS_UNSPECIFIED);
|
||||
if (res != MEMTX_OK) {
|
||||
goto fail;
|
||||
}
|
||||
/*
|
||||
* We need to zero'ify the space that is not copied
|
||||
* from file
|
||||
*/
|
||||
if (file_size < mem_size) {
|
||||
res = address_space_set(as ? as : &address_space_memory,
|
||||
addr + file_size, 0,
|
||||
mem_size - file_size,
|
||||
MEMTXATTRS_UNSPECIFIED);
|
||||
if (res != MEMTX_OK) {
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,18 +17,24 @@ void cpu_timers_init(void);
|
|||
|
||||
/* icount - Instruction Counter API */
|
||||
|
||||
/*
|
||||
* icount enablement state:
|
||||
/**
|
||||
* ICountMode: icount enablement state:
|
||||
*
|
||||
* 0 = Disabled - Do not count executed instructions.
|
||||
* 1 = Enabled - Fixed conversion of insn to ns via "shift" option
|
||||
* 2 = Enabled - Runtime adaptive algorithm to compute shift
|
||||
* @ICOUNT_DISABLED: Disabled - Do not count executed instructions.
|
||||
* @ICOUNT_PRECISE: Enabled - Fixed conversion of insn to ns via "shift" option
|
||||
* @ICOUNT_ADAPTATIVE: Enabled - Runtime adaptive algorithm to compute shift
|
||||
*/
|
||||
#ifdef CONFIG_TCG
|
||||
extern int use_icount;
|
||||
typedef enum {
|
||||
ICOUNT_DISABLED = 0,
|
||||
ICOUNT_PRECISE,
|
||||
ICOUNT_ADAPTATIVE,
|
||||
} ICountMode;
|
||||
|
||||
#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
|
||||
extern ICountMode use_icount;
|
||||
#define icount_enabled() (use_icount)
|
||||
#else
|
||||
#define icount_enabled() 0
|
||||
#define icount_enabled() ICOUNT_DISABLED
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -50,8 +56,14 @@ int64_t icount_get(void);
|
|||
*/
|
||||
int64_t icount_to_ns(int64_t icount);
|
||||
|
||||
/* configure the icount options, including "shift" */
|
||||
void icount_configure(QemuOpts *opts, Error **errp);
|
||||
/**
|
||||
* icount_configure: configure the icount options, including "shift"
|
||||
* @opts: Options to parse
|
||||
* @errp: pointer to a NULL-initialized error object
|
||||
*
|
||||
* Return: true on success, else false setting @errp with error
|
||||
*/
|
||||
bool icount_configure(QemuOpts *opts, Error **errp);
|
||||
|
||||
/* used by tcg vcpu thread to calc icount budget */
|
||||
int64_t icount_round(int64_t count);
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
#ifndef SYSEMU_REPLAY_H
|
||||
#define SYSEMU_REPLAY_H
|
||||
|
||||
/*
|
||||
* QEMU replay (system interface)
|
||||
*
|
||||
|
@ -11,6 +8,12 @@
|
|||
* See the COPYING file in the top-level directory.
|
||||
*
|
||||
*/
|
||||
#ifndef SYSEMU_REPLAY_H
|
||||
#define SYSEMU_REPLAY_H
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#error Cannot include this header from user emulation
|
||||
#endif
|
||||
|
||||
#include "exec/replay-core.h"
|
||||
#include "qapi/qapi-types-misc.h"
|
||||
|
@ -84,12 +87,14 @@ int64_t replay_save_clock(ReplayClockKind kind, int64_t clock,
|
|||
int64_t replay_read_clock(ReplayClockKind kind, int64_t raw_icount);
|
||||
/*! Saves or reads the clock depending on the current replay mode. */
|
||||
#define REPLAY_CLOCK(clock, value) \
|
||||
!icount_enabled() ? (value) : \
|
||||
(replay_mode == REPLAY_MODE_PLAY \
|
||||
? replay_read_clock((clock), icount_get_raw()) \
|
||||
: replay_mode == REPLAY_MODE_RECORD \
|
||||
? replay_save_clock((clock), (value), icount_get_raw()) \
|
||||
: (value))
|
||||
#define REPLAY_CLOCK_LOCKED(clock, value) \
|
||||
!icount_enabled() ? (value) : \
|
||||
(replay_mode == REPLAY_MODE_PLAY \
|
||||
? replay_read_clock((clock), icount_get_raw_locked()) \
|
||||
: replay_mode == REPLAY_MODE_RECORD \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue