mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* submodule cleanups (Philippe, myself) * tiny step towards a usable preconfig mode (myself) * Kconfig and LOCK_GUARD cleanups (philippe) * new x86 CPUID feature (Yang Zhong) * "-object qtest" support (myself) * Dirty ring support for KVM (Peter) * Fixes for 6.0 command line parsing breakage (myself) * Fix for macOS 11.3 SDK (Katsuhiro) # gpg: Signature made Wed 26 May 2021 13:50:12 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (28 commits) gitlab-ci: use --meson=git for CFI jobs hw/scsi: Fix sector translation bug in scsi_unmap_complete_noio configure: Avoid error messages about missing *-config-*.h files doc: Add notes about -mon option mode=control argument. qemu-config: load modules when instantiating option groups vl: allow not specifying size in -m when using -M memory-backend replication: move include out of root directory remove qemu-options* from root directory meson: Set implicit_include_directories to false tests/qtest/fuzz: Fix build failure KVM: Dirty ring support KVM: Disable manual dirty log when dirty ring enabled KVM: Add dirty-ring-size property KVM: Cache kvm slot dirty bitmap size KVM: Simplify dirty log sync in kvm_set_phys_mem KVM: Provide helper to sync dirty bitmap from slot to ramblock KVM: Provide helper to get kvm dirty log KVM: Create the KVMSlot dirty bitmap on flag changes KVM: Use a big lock to replace per-kml slots_lock memory: Introduce log_sync_global() to memory listener ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
+2
-2
@@ -27,9 +27,9 @@ include:
|
||||
- cd build
|
||||
- if test -n "$TARGETS";
|
||||
then
|
||||
../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=internal} $CONFIGURE_ARGS --target-list="$TARGETS" ;
|
||||
../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS --target-list="$TARGETS" ;
|
||||
else
|
||||
../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=internal} $CONFIGURE_ARGS ;
|
||||
../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS ;
|
||||
fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
|
||||
- if test -n "$LD_JOBS";
|
||||
then
|
||||
|
||||
@@ -48,9 +48,11 @@ Makefile: .git-submodule-status
|
||||
|
||||
.PHONY: git-submodule-update
|
||||
git-submodule-update:
|
||||
ifneq ($(GIT_SUBMODULES_ACTION),ignore)
|
||||
$(call quiet-command, \
|
||||
(GIT="$(GIT)" "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \
|
||||
"GIT","$(GIT_SUBMODULES)")
|
||||
endif
|
||||
|
||||
# 0. ensure the build tree is okay
|
||||
|
||||
|
||||
+527
-88
File diff suppressed because it is too large
Load Diff
@@ -18,4 +18,11 @@ kvm_set_ioeventfd_pio(int fd, uint16_t addr, uint32_t val, bool assign, uint32_t
|
||||
kvm_set_user_memory(uint32_t slot, uint32_t flags, uint64_t guest_phys_addr, uint64_t memory_size, uint64_t userspace_addr, int ret) "Slot#%d flags=0x%x gpa=0x%"PRIx64 " size=0x%"PRIx64 " ua=0x%"PRIx64 " ret=%d"
|
||||
kvm_clear_dirty_log(uint32_t slot, uint64_t start, uint32_t size) "slot#%"PRId32" start 0x%"PRIx64" size 0x%"PRIx32
|
||||
kvm_resample_fd_notify(int gsi) "gsi %d"
|
||||
kvm_dirty_ring_full(int id) "vcpu %d"
|
||||
kvm_dirty_ring_reap_vcpu(int id) "vcpu %d"
|
||||
kvm_dirty_ring_page(int vcpu, uint32_t slot, uint64_t offset) "vcpu %d fetch %"PRIu32" offset 0x%"PRIx64
|
||||
kvm_dirty_ring_reaper(const char *s) "%s"
|
||||
kvm_dirty_ring_reap(uint64_t count, int64_t t) "reaped %"PRIu64" pages (took %"PRIi64" us)"
|
||||
kvm_dirty_ring_reaper_kick(const char *reason) "%s"
|
||||
kvm_dirty_ring_flush(int finished) "%d"
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
#include "replication.h"
|
||||
#include "block/replication.h"
|
||||
|
||||
typedef enum {
|
||||
BLOCK_REPLICATION_NONE, /* block replication is not started */
|
||||
|
||||
@@ -256,31 +256,11 @@ gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
|
||||
if test -e "$source_path/.git"
|
||||
then
|
||||
git_submodules_action="update"
|
||||
git_submodules="ui/keycodemapdb"
|
||||
git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
|
||||
git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
|
||||
else
|
||||
git_submodules_action="ignore"
|
||||
git_submodules=""
|
||||
|
||||
if ! test -f "$source_path/ui/keycodemapdb/README"
|
||||
then
|
||||
echo
|
||||
echo "ERROR: missing file $source_path/ui/keycodemapdb/README"
|
||||
echo
|
||||
echo "This is not a GIT checkout but module content appears to"
|
||||
echo "be missing. Do not use 'git archive' or GitHub download links"
|
||||
echo "to acquire QEMU source archives. Non-GIT builds are only"
|
||||
echo "supported with source archives linked from:"
|
||||
echo
|
||||
echo " https://www.qemu.org/download/#source"
|
||||
echo
|
||||
echo "Developers working with GIT can use scripts/archive-source.sh"
|
||||
echo "if they need to create valid source archives."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
git_submodules="ui/keycodemapdb"
|
||||
git="git"
|
||||
|
||||
# Don't accept a target_list environment variable.
|
||||
@@ -1593,6 +1573,28 @@ case $git_submodules_action in
|
||||
fi
|
||||
;;
|
||||
ignore)
|
||||
if ! test -f "$source_path/ui/keycodemapdb/README"
|
||||
then
|
||||
echo
|
||||
echo "ERROR: missing GIT submodules"
|
||||
echo
|
||||
if test -e "$source_path/.git"; then
|
||||
echo "--with-git-submodules=ignore specified but submodules were not"
|
||||
echo "checked out. Please initialize and update submodules."
|
||||
else
|
||||
echo "This is not a GIT checkout but module content appears to"
|
||||
echo "be missing. Do not use 'git archive' or GitHub download links"
|
||||
echo "to acquire QEMU source archives. Non-GIT builds are only"
|
||||
echo "supported with source archives linked from:"
|
||||
echo
|
||||
echo " https://www.qemu.org/download/#source"
|
||||
echo
|
||||
echo "Developers working with GIT can use scripts/archive-source.sh"
|
||||
echo "if they need to create valid source archives."
|
||||
fi
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'"
|
||||
@@ -2281,6 +2283,11 @@ if test "$solaris" = "yes" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$tcg" = "enabled"; then
|
||||
git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
|
||||
git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
|
||||
fi
|
||||
|
||||
if test -z "${target_list+xxx}" ; then
|
||||
default_targets=yes
|
||||
for target in $default_target_list; do
|
||||
@@ -3620,9 +3627,7 @@ fi
|
||||
case "$fdt" in
|
||||
auto | enabled | internal)
|
||||
# Simpler to always update submodule, even if not needed.
|
||||
if test "$git_submodules_action" != "ignore"; then
|
||||
git_submodules="${git_submodules} dtc"
|
||||
fi
|
||||
git_submodules="${git_submodules} dtc"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -4344,9 +4349,7 @@ fi
|
||||
case "$capstone" in
|
||||
auto | enabled | internal)
|
||||
# Simpler to always update submodule, even if not needed.
|
||||
if test "$git_submodules_action" != "ignore"; then
|
||||
git_submodules="${git_submodules} capstone"
|
||||
fi
|
||||
git_submodules="${git_submodules} capstone"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -5276,9 +5279,7 @@ fi
|
||||
case "$slirp" in
|
||||
auto | enabled | internal)
|
||||
# Simpler to always update submodule, even if not needed.
|
||||
if test "$git_submodules_action" != "ignore"; then
|
||||
git_submodules="${git_submodules} slirp"
|
||||
fi
|
||||
git_submodules="${git_submodules} slirp"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -5470,9 +5471,7 @@ if test "$cpu" = "s390x" ; then
|
||||
roms="$roms s390-ccw"
|
||||
# SLOF is required for building the s390-ccw firmware on s390x,
|
||||
# since it is using the libnet code from SLOF for network booting.
|
||||
if test "$git_submodules_action" != "ignore"; then
|
||||
git_submodules="${git_submodules} roms/SLOF"
|
||||
fi
|
||||
git_submodules="${git_submodules} roms/SLOF"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -6504,10 +6503,14 @@ fi
|
||||
|
||||
# Create list of config switches that should be poisoned in common code...
|
||||
# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special.
|
||||
sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \
|
||||
-e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \
|
||||
*-config-devices.h *-config-target.h | \
|
||||
sort -u > config-poison.h
|
||||
target_configs_h=$(ls *-config-devices.h *-config-target.h 2>/dev/null)
|
||||
if test -n "$target_configs_h" ; then
|
||||
sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \
|
||||
-e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \
|
||||
$target_configs_h | sort -u > config-poison.h
|
||||
else
|
||||
:> config-poison.h
|
||||
fi
|
||||
|
||||
# Save the configure command line for later reuse.
|
||||
cat <<EOD >config.status
|
||||
|
||||
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
|
||||
|
||||
# For pSeries
|
||||
CONFIG_PSERIES=y
|
||||
CONFIG_NVDIMM=y
|
||||
|
||||
@@ -1297,6 +1297,7 @@ ERST
|
||||
.help = "create QOM object",
|
||||
.cmd = hmp_object_add,
|
||||
.command_completion = object_add_completion,
|
||||
.flags = "p",
|
||||
},
|
||||
|
||||
SRST
|
||||
@@ -1311,6 +1312,7 @@ ERST
|
||||
.help = "destroy QOM object",
|
||||
.cmd = hmp_object_del,
|
||||
.command_completion = object_del_completion,
|
||||
.flags = "p",
|
||||
},
|
||||
|
||||
SRST
|
||||
|
||||
@@ -6,6 +6,7 @@ config ARM_VIRT
|
||||
imply VFIO_PLATFORM
|
||||
imply VFIO_XGMAC
|
||||
imply TPM_TIS_SYSBUS
|
||||
imply NVDIMM
|
||||
select ARM_GIC
|
||||
select ACPI
|
||||
select ARM_SMMUV3
|
||||
|
||||
@@ -23,6 +23,7 @@ config PC
|
||||
imply TPM_TIS_ISA
|
||||
imply VGA_PCI
|
||||
imply VIRTIO_VGA
|
||||
imply NVDIMM
|
||||
select FDC
|
||||
select I8259
|
||||
select I8254
|
||||
|
||||
@@ -7,6 +7,4 @@ config MEM_DEVICE
|
||||
|
||||
config NVDIMM
|
||||
bool
|
||||
default y
|
||||
depends on (PC || PSERIES || ARM_VIRT)
|
||||
select MEM_DEVICE
|
||||
|
||||
@@ -3,6 +3,7 @@ config PSERIES
|
||||
imply PCI_DEVICES
|
||||
imply TEST_DEVICES
|
||||
imply VIRTIO_VGA
|
||||
imply NVDIMM
|
||||
select DIMM
|
||||
select PCI
|
||||
select SPAPR_VSCSI
|
||||
|
||||
+7
-5
@@ -1582,6 +1582,7 @@ invalid_field:
|
||||
scsi_check_condition(r, SENSE_CODE(INVALID_FIELD));
|
||||
}
|
||||
|
||||
/* sector_num and nb_sectors expected to be in qdev blocksize */
|
||||
static inline bool check_lba_range(SCSIDiskState *s,
|
||||
uint64_t sector_num, uint32_t nb_sectors)
|
||||
{
|
||||
@@ -1614,11 +1615,12 @@ static void scsi_unmap_complete_noio(UnmapCBData *data, int ret)
|
||||
assert(r->req.aiocb == NULL);
|
||||
|
||||
if (data->count > 0) {
|
||||
r->sector = ldq_be_p(&data->inbuf[0])
|
||||
* (s->qdev.blocksize / BDRV_SECTOR_SIZE);
|
||||
r->sector_count = (ldl_be_p(&data->inbuf[8]) & 0xffffffffULL)
|
||||
* (s->qdev.blocksize / BDRV_SECTOR_SIZE);
|
||||
if (!check_lba_range(s, r->sector, r->sector_count)) {
|
||||
uint64_t sector_num = ldq_be_p(&data->inbuf[0]);
|
||||
uint32_t nb_sectors = ldl_be_p(&data->inbuf[8]) & 0xffffffffULL;
|
||||
r->sector = sector_num * (s->qdev.blocksize / BDRV_SECTOR_SIZE);
|
||||
r->sector_count = nb_sectors * (s->qdev.blocksize / BDRV_SECTOR_SIZE);
|
||||
|
||||
if (!check_lba_range(s, sector_num, nb_sectors)) {
|
||||
block_acct_invalid(blk_get_stats(s->qdev.conf.blk),
|
||||
BLOCK_ACCT_UNMAP);
|
||||
scsi_check_condition(r, SENSE_CODE(LBA_OUT_OF_RANGE));
|
||||
|
||||
@@ -23,7 +23,7 @@ typedef struct ReplicationOps ReplicationOps;
|
||||
typedef struct ReplicationState ReplicationState;
|
||||
|
||||
/**
|
||||
* SECTION:replication.h
|
||||
* SECTION:block/replication.h
|
||||
* @title:Base Replication System
|
||||
* @short_description: interfaces for handling replication
|
||||
*
|
||||
@@ -32,7 +32,7 @@ typedef struct ReplicationState ReplicationState;
|
||||
* <example>
|
||||
* <title>How to use replication interfaces</title>
|
||||
* <programlisting>
|
||||
* #include "replication.h"
|
||||
* #include "block/replication.h"
|
||||
*
|
||||
* typedef struct BDRVReplicationState {
|
||||
* ReplicationState *rs;
|
||||
@@ -616,6 +616,18 @@ struct MemoryListener {
|
||||
*/
|
||||
void (*log_sync)(MemoryListener *listener, MemoryRegionSection *section);
|
||||
|
||||
/**
|
||||
* @log_sync_global:
|
||||
*
|
||||
* This is the global version of @log_sync when the listener does
|
||||
* not have a way to synchronize the log with finer granularity.
|
||||
* When the listener registers with @log_sync_global defined, then
|
||||
* its @log_sync must be NULL. Vice versa.
|
||||
*
|
||||
* @listener: The #MemoryListener.
|
||||
*/
|
||||
void (*log_sync_global)(MemoryListener *listener);
|
||||
|
||||
/**
|
||||
* @log_clear:
|
||||
*
|
||||
|
||||
@@ -329,6 +329,10 @@ struct qemu_work_item;
|
||||
* @ignore_memory_transaction_failures: Cached copy of the MachineState
|
||||
* flag of the same name: allows the board to suppress calling of the
|
||||
* CPU do_transaction_failed hook function.
|
||||
* @kvm_dirty_gfns: Points to the KVM dirty ring for this CPU when KVM dirty
|
||||
* ring is enabled.
|
||||
* @kvm_fetch_index: Keeps the index that we last fetched from the per-vCPU
|
||||
* dirty ring structure.
|
||||
*
|
||||
* State of one CPU core or thread.
|
||||
*/
|
||||
@@ -400,9 +404,12 @@ struct CPUState {
|
||||
*/
|
||||
uintptr_t mem_io_pc;
|
||||
|
||||
/* Only used in KVM */
|
||||
int kvm_fd;
|
||||
struct KVMState *kvm_state;
|
||||
struct kvm_run *kvm_run;
|
||||
struct kvm_dirty_gfn *kvm_dirty_gfns;
|
||||
uint32_t kvm_fetch_index;
|
||||
|
||||
/* Used for events with 'vcpu' and *without* the 'disabled' properties */
|
||||
DECLARE_BITMAP(trace_dstate_delayed, CPU_TRACE_DSTATE_MAX_EVENTS);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef QEMU_CONFIG_FILE_H
|
||||
#define QEMU_CONFIG_FILE_H
|
||||
|
||||
|
||||
void qemu_load_module_for_opts(const char *group);
|
||||
QemuOptsList *qemu_find_opts(const char *group);
|
||||
QemuOptsList *qemu_find_opts_err(const char *group, Error **errp);
|
||||
QemuOpts *qemu_find_opts_singleton(const char *group);
|
||||
|
||||
@@ -29,8 +29,13 @@
|
||||
#define QEMU_OPTIONS_H
|
||||
|
||||
enum {
|
||||
#define QEMU_OPTIONS_GENERATE_ENUM
|
||||
#include "qemu-options-wrapper.h"
|
||||
|
||||
#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \
|
||||
opt_enum,
|
||||
#define DEFHEADING(text)
|
||||
#define ARCHHEADING(text, arch_mask)
|
||||
|
||||
#include "qemu-options.def"
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -23,12 +23,15 @@ typedef struct KVMSlot
|
||||
int old_flags;
|
||||
/* Dirty bitmap cache for the slot */
|
||||
unsigned long *dirty_bmap;
|
||||
unsigned long dirty_bmap_size;
|
||||
/* Cache of the address space ID */
|
||||
int as_id;
|
||||
/* Cache of the offset in ram address space */
|
||||
ram_addr_t ram_start_offset;
|
||||
} KVMSlot;
|
||||
|
||||
typedef struct KVMMemoryListener {
|
||||
MemoryListener listener;
|
||||
/* Protects the slots and all inside them */
|
||||
QemuMutex slots_lock;
|
||||
KVMSlot *slots;
|
||||
int as_id;
|
||||
} KVMMemoryListener;
|
||||
|
||||
@@ -2145,6 +2145,7 @@ common_all = common_ss.apply(config_all, strict: false)
|
||||
common_all = static_library('common',
|
||||
build_by_default: false,
|
||||
sources: common_all.sources() + genh,
|
||||
implicit_include_directories: false,
|
||||
dependencies: common_all.dependencies(),
|
||||
name_suffix: 'fa')
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user