mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-03 10:43:28 +00:00
Bugfixes.
-----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmECY7oUHHBib256aW5p QHJlZGhhdC5jb20ACgkQv/vSX3jHroNRyggAmo+UIFjjOfUK75gb9qWFh/o3Uxga ycey2/3KmFUXLdXT5ybZ9TpBbDklIIND5iphn3+ntmJZRnkY6GXbF2StBodTX58o /K+nuEaTVV+CHsLdMIFF/ao6QBw8AFf7QMjqyHZuq6NIpnRxzX7oKajMJwlf4rMQ y0OpD/PoSsO3DnodIjnWe+WxMlmojafJVNPGMbJ6urYYZfcZN697oMFJLLWWd0ok KCKo+h+mcUkJxXEl9zAHf0GeMdI2CVwkECpeC7/1JQFvoIAVOVsUJj7LsLrnDC9D u1uaaaiha9JkGI5Q+GbWPYXyb2NmlhzBbTQA+AOKYDu4srsFKlOiBmnilg== =kLKX -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging Bugfixes. # gpg: Signature made Thu 29 Jul 2021 09:15:54 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: libvhost-user: fix -Werror=format= warnings with __u64 fields meson: fix meson 0.58 warning with libvhost-user subproject target/i386: fix typo in ctl_has_irq target/i386: Added consistency checks for event injection configure: Add -Werror to avx2, avx512 tests Makefile: ignore long options i386: assert 'cs->kvm_state' is not null Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
768832575d
8
Makefile
8
Makefile
@ -129,9 +129,11 @@ endif
|
||||
# 4. Rules to bridge to other makefiles
|
||||
|
||||
ifneq ($(NINJA),)
|
||||
MAKE.n = $(findstring n,$(firstword $(MAKEFLAGS)))
|
||||
MAKE.k = $(findstring k,$(firstword $(MAKEFLAGS)))
|
||||
MAKE.q = $(findstring q,$(firstword $(MAKEFLAGS)))
|
||||
# Filter out long options to avoid flags like --no-print-directory which
|
||||
# may result in false positive match for MAKE.n
|
||||
MAKE.n = $(findstring n,$(firstword $(filter-out --%,$(MAKEFLAGS))))
|
||||
MAKE.k = $(findstring k,$(firstword $(filter-out --%,$(MAKEFLAGS))))
|
||||
MAKE.q = $(findstring q,$(firstword $(filter-out --%,$(MAKEFLAGS))))
|
||||
MAKE.nq = $(if $(word 2, $(MAKE.n) $(MAKE.q)),nq)
|
||||
NINJAFLAGS = $(if $V,-v) $(if $(MAKE.n), -n) $(if $(MAKE.k), -k0) \
|
||||
$(filter-out -j, $(lastword -j1 $(filter -l% -j%, $(MAKEFLAGS)))) \
|
||||
|
4
configure
vendored
4
configure
vendored
@ -3882,7 +3882,7 @@ static int bar(void *a) {
|
||||
}
|
||||
int main(int argc, char *argv[]) { return bar(argv[0]); }
|
||||
EOF
|
||||
if compile_object "" ; then
|
||||
if compile_object "-Werror" ; then
|
||||
avx2_opt="yes"
|
||||
else
|
||||
avx2_opt="no"
|
||||
@ -3912,7 +3912,7 @@ int main(int argc, char *argv[])
|
||||
return bar(argv[0]);
|
||||
}
|
||||
EOF
|
||||
if ! compile_object "" ; then
|
||||
if ! compile_object "-Werror" ; then
|
||||
avx512f_opt="no"
|
||||
fi
|
||||
else
|
||||
|
1
subprojects/libvhost-user/include/atomic.h
Symbolic link
1
subprojects/libvhost-user/include/atomic.h
Symbolic link
@ -0,0 +1 @@
|
||||
../../../include/qemu/atomic.h
|
@ -40,7 +40,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include "qemu/atomic.h"
|
||||
#include "include/atomic.h"
|
||||
|
||||
#include "libvhost-user.h"
|
||||
|
||||
@ -1067,10 +1067,10 @@ vu_set_vring_addr_exec(VuDev *dev, VhostUserMsg *vmsg)
|
||||
DPRINT("vhost_vring_addr:\n");
|
||||
DPRINT(" index: %d\n", vra->index);
|
||||
DPRINT(" flags: %d\n", vra->flags);
|
||||
DPRINT(" desc_user_addr: 0x%016" PRIx64 "\n", vra->desc_user_addr);
|
||||
DPRINT(" used_user_addr: 0x%016" PRIx64 "\n", vra->used_user_addr);
|
||||
DPRINT(" avail_user_addr: 0x%016" PRIx64 "\n", vra->avail_user_addr);
|
||||
DPRINT(" log_guest_addr: 0x%016" PRIx64 "\n", vra->log_guest_addr);
|
||||
DPRINT(" desc_user_addr: 0x%016" PRIx64 "\n", (uint64_t)vra->desc_user_addr);
|
||||
DPRINT(" used_user_addr: 0x%016" PRIx64 "\n", (uint64_t)vra->used_user_addr);
|
||||
DPRINT(" avail_user_addr: 0x%016" PRIx64 "\n", (uint64_t)vra->avail_user_addr);
|
||||
DPRINT(" log_guest_addr: 0x%016" PRIx64 "\n", (uint64_t)vra->log_guest_addr);
|
||||
|
||||
vq->vra = *vra;
|
||||
vq->vring.flags = vra->flags;
|
||||
|
@ -4,21 +4,17 @@ project('libvhost-user', 'c',
|
||||
|
||||
threads = dependency('threads')
|
||||
glib = dependency('glib-2.0')
|
||||
inc = include_directories('../../include', '../../linux-headers')
|
||||
|
||||
vhost_user = static_library('vhost-user',
|
||||
files('libvhost-user.c'),
|
||||
include_directories: inc,
|
||||
dependencies: threads,
|
||||
c_args: '-D_GNU_SOURCE')
|
||||
|
||||
executable('link-test', files('link-test.c'),
|
||||
link_whole: vhost_user,
|
||||
include_directories: inc)
|
||||
link_whole: vhost_user)
|
||||
|
||||
vhost_user_glib = static_library('vhost-user-glib',
|
||||
files('libvhost-user-glib.c'),
|
||||
include_directories: inc,
|
||||
link_with: vhost_user,
|
||||
dependencies: glib)
|
||||
|
||||
|
1
subprojects/libvhost-user/standard-headers/linux
Symbolic link
1
subprojects/libvhost-user/standard-headers/linux
Symbolic link
@ -0,0 +1 @@
|
||||
../../../include/standard-headers/linux
|
@ -974,6 +974,12 @@ static struct kvm_cpuid2 *get_supported_hv_cpuid(CPUState *cs)
|
||||
do_sys_ioctl =
|
||||
kvm_check_extension(kvm_state, KVM_CAP_SYS_HYPERV_CPUID) > 0;
|
||||
|
||||
/*
|
||||
* Non-empty KVM context is needed when KVM_CAP_SYS_HYPERV_CPUID is
|
||||
* unsupported, kvm_hyperv_expand_features() checks for that.
|
||||
*/
|
||||
assert(do_sys_ioctl || cs->kvm_state);
|
||||
|
||||
/*
|
||||
* When the buffer is too small, KVM_GET_SUPPORTED_HV_CPUID fails with
|
||||
* -E2BIG, however, it doesn't report back the right size. Keep increasing
|
||||
@ -1105,6 +1111,14 @@ static uint32_t hv_cpuid_get_host(CPUState *cs, uint32_t func, int reg)
|
||||
if (kvm_check_extension(kvm_state, KVM_CAP_HYPERV_CPUID) > 0) {
|
||||
cpuid = get_supported_hv_cpuid(cs);
|
||||
} else {
|
||||
/*
|
||||
* 'cs->kvm_state' may be NULL when Hyper-V features are expanded
|
||||
* before KVM context is created but this is only done when
|
||||
* KVM_CAP_SYS_HYPERV_CPUID is supported and it implies
|
||||
* KVM_CAP_HYPERV_CPUID.
|
||||
*/
|
||||
assert(cs->kvm_state);
|
||||
|
||||
cpuid = get_supported_hv_cpuid_legacy(cs);
|
||||
}
|
||||
hv_cpuid_cache = cpuid;
|
||||
|
@ -70,7 +70,7 @@ static inline bool ctl_has_irq(uint32_t int_ctl)
|
||||
uint32_t int_prio;
|
||||
uint32_t tpr;
|
||||
|
||||
int_prio = (int_ctl & V_INTR_PRIO_MASK) >> V_INTR_MASKING_SHIFT;
|
||||
int_prio = (int_ctl & V_INTR_PRIO_MASK) >> V_INTR_PRIO_SHIFT;
|
||||
tpr = int_ctl & V_TPR_MASK;
|
||||
return (int_ctl & V_IRQ_MASK) && (int_prio >= tpr);
|
||||
}
|
||||
@ -383,6 +383,9 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
|
||||
cpu_loop_exit(cs);
|
||||
break;
|
||||
case SVM_EVTINJ_TYPE_EXEPT:
|
||||
if (vector == EXCP02_NMI || vector >= 31) {
|
||||
cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC());
|
||||
}
|
||||
cs->exception_index = vector;
|
||||
env->error_code = event_inj_err;
|
||||
env->exception_is_int = 0;
|
||||
@ -398,6 +401,9 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
|
||||
qemu_log_mask(CPU_LOG_TB_IN_ASM, "SOFT");
|
||||
cpu_loop_exit(cs);
|
||||
break;
|
||||
default:
|
||||
cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC());
|
||||
break;
|
||||
}
|
||||
qemu_log_mask(CPU_LOG_TB_IN_ASM, " %#x %#x\n", cs->exception_index,
|
||||
env->error_code);
|
||||
|
Loading…
x
Reference in New Issue
Block a user