mirror of https://gitee.com/openkylin/qemu.git
Small patches, without the one that introduces -fwrapv.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJWVynlAAoJEL/70l94x66DcpQIAIyRx1xF3P1XyhYhWTK6Xdul 8pNs2PrlpyArqUBqoDbHK/IwnDWN1F49N/3tPEFE/71foIUKSJp8oF3J5m7SbXoQ Nn19xKBpAZ1OMfpXxMbu3X2K+gr5XyPpeUzZWqDgDdDVPPf7Lt+NEabCPNTeKCJr HZz73YO1Fvs3/6Llm8oBAC0IfW2jzMP6rABB2Tm+hOU7BZoy22eNuaPxZpO22oq5 CxDbc9wN2tbjGFW0Tp4N87D2QqOSxYpA4tSoUSHOtXBaoL7NM7aWinZIb3V/4sHk Zqmn+nOvASMKEBinP03yw5LtzGkz4R7QOI2ytmD1DEJIjJ+RyS/rkQNtYnDc/J8= =2/j1 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging Small patches, without the one that introduces -fwrapv. # gpg: Signature made Thu 26 Nov 2015 15:48:53 GMT using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" * remotes/bonzini/tags/for-upstream: target-i386: kvm: Print warning when clearing mcg_cap bits target-i386: kvm: Use env->mcg_cap when setting up MCE target-i386: kvm: Abort if MCE bank count is not supported by host virtio-scsi: don't crash without a valid device target-sparc: fix 32-bit truncation in fpackfix exec: remove warning about mempath and hugetlbfs Revert "exec: silence hugetlbfs warning under qtest" call bdrv_drain_all() even if the vm is stopped MAINTAINERS: Update TCG CPU cores section Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
317e4db6e9
17
MAINTAINERS
17
MAINTAINERS
|
@ -62,14 +62,22 @@ Guest CPU cores (TCG):
|
|||
----------------------
|
||||
Overall
|
||||
L: qemu-devel@nongnu.org
|
||||
S: Odd fixes
|
||||
M: Paolo Bonzini <pbonzini@redhat.com>
|
||||
M: Peter Crosthwaite <crosthwaite.peter@gmail.com>
|
||||
M: Richard Henderson <rth@twiddle.net>
|
||||
S: Maintained
|
||||
F: cpu-exec.c
|
||||
F: cpu-exec-common.c
|
||||
F: cpus.c
|
||||
F: cputlb.c
|
||||
F: exec.c
|
||||
F: softmmu_template.h
|
||||
F: translate-all.c
|
||||
F: include/exec/cpu_ldst.h
|
||||
F: include/exec/cpu_ldst_template.h
|
||||
F: translate-all.*
|
||||
F: translate-common.c
|
||||
F: include/exec/cpu*.h
|
||||
F: include/exec/exec-all.h
|
||||
F: include/exec/helper*.h
|
||||
F: include/exec/tb-hash.h
|
||||
|
||||
Alpha
|
||||
M: Richard Henderson <rth@twiddle.net>
|
||||
|
@ -1042,6 +1050,7 @@ S: Supported
|
|||
F: include/exec/ioport.h
|
||||
F: ioport.c
|
||||
F: include/exec/memory.h
|
||||
F: include/exec/ram_addr.h
|
||||
F: memory.c
|
||||
F: include/exec/memory-internal.h
|
||||
F: exec.c
|
||||
|
|
2
cpus.c
2
cpus.c
|
@ -1415,6 +1415,8 @@ int vm_stop_force_state(RunState state)
|
|||
return vm_stop(state);
|
||||
} else {
|
||||
runstate_set(state);
|
||||
|
||||
bdrv_drain_all();
|
||||
/* Make sure to return an error if the flush in a previous vm_stop()
|
||||
* failed. */
|
||||
return bdrv_flush_all();
|
||||
|
|
6
exec.c
6
exec.c
|
@ -51,7 +51,6 @@
|
|||
#include "qemu/main-loop.h"
|
||||
#include "translate-all.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "sysemu/qtest.h"
|
||||
|
||||
#include "exec/memory-internal.h"
|
||||
#include "exec/ram_addr.h"
|
||||
|
@ -1197,11 +1196,6 @@ static long gethugepagesize(const char *path, Error **errp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!qtest_driver() &&
|
||||
fs.f_type != HUGETLBFS_MAGIC) {
|
||||
fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path);
|
||||
}
|
||||
|
||||
return fs.f_bsize;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ static int virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req)
|
|||
int target;
|
||||
int ret = 0;
|
||||
|
||||
if (s->dataplane_started) {
|
||||
if (s->dataplane_started && d) {
|
||||
assert(blk_get_aio_context(d->conf.blk) == s->ctx);
|
||||
}
|
||||
/* Here VIRTIO_SCSI_S_OK means "FUNCTION COMPLETE". */
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
#define MCE_CAP_DEF (MCG_CTL_P|MCG_SER_P)
|
||||
#define MCE_BANKS_DEF 10
|
||||
|
||||
#define MCG_CAP_BANKS_MASK 0xff
|
||||
|
||||
#define MCG_STATUS_RIPV (1ULL<<0) /* restart ip valid */
|
||||
#define MCG_STATUS_EIPV (1ULL<<1) /* ip points to correct instruction */
|
||||
#define MCG_STATUS_MCIP (1ULL<<2) /* machine check in progress */
|
||||
|
|
|
@ -774,7 +774,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
|||
&& (env->features[FEAT_1_EDX] & (CPUID_MCE | CPUID_MCA)) ==
|
||||
(CPUID_MCE | CPUID_MCA)
|
||||
&& kvm_check_extension(cs->kvm_state, KVM_CAP_MCE) > 0) {
|
||||
uint64_t mcg_cap;
|
||||
uint64_t mcg_cap, unsupported_caps;
|
||||
int banks;
|
||||
int ret;
|
||||
|
||||
|
@ -784,18 +784,24 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (banks > MCE_BANKS_DEF) {
|
||||
banks = MCE_BANKS_DEF;
|
||||
if (banks < (env->mcg_cap & MCG_CAP_BANKS_MASK)) {
|
||||
error_report("kvm: Unsupported MCE bank count (QEMU = %d, KVM = %d)",
|
||||
(int)(env->mcg_cap & MCG_CAP_BANKS_MASK), banks);
|
||||
return -ENOTSUP;
|
||||
}
|
||||
mcg_cap &= MCE_CAP_DEF;
|
||||
mcg_cap |= banks;
|
||||
ret = kvm_vcpu_ioctl(cs, KVM_X86_SETUP_MCE, &mcg_cap);
|
||||
|
||||
unsupported_caps = env->mcg_cap & ~(mcg_cap | MCG_CAP_BANKS_MASK);
|
||||
if (unsupported_caps) {
|
||||
error_report("warning: Unsupported MCG_CAP bits: 0x%" PRIx64,
|
||||
unsupported_caps);
|
||||
}
|
||||
|
||||
env->mcg_cap &= mcg_cap | MCG_CAP_BANKS_MASK;
|
||||
ret = kvm_vcpu_ioctl(cs, KVM_X86_SETUP_MCE, &env->mcg_cap);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "KVM_X86_SETUP_MCE: %s", strerror(-ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
env->mcg_cap = mcg_cap;
|
||||
}
|
||||
|
||||
qemu_add_vm_change_state_handler(cpu_update_state, env);
|
||||
|
|
|
@ -447,7 +447,7 @@ uint32_t helper_fpackfix(uint64_t gsr, uint64_t rs2)
|
|||
for (word = 0; word < 2; word++) {
|
||||
uint32_t val;
|
||||
int32_t src = rs2 >> (word * 32);
|
||||
int64_t scaled = src << scale;
|
||||
int64_t scaled = (int64_t)src << scale;
|
||||
int64_t from_fixed = scaled >> 16;
|
||||
|
||||
val = (from_fixed < -32768 ? -32768 :
|
||||
|
|
28
vl.c
28
vl.c
|
@ -4291,26 +4291,17 @@ int main(int argc, char **argv, char **envp)
|
|||
page_size_init();
|
||||
socket_init();
|
||||
|
||||
if (qemu_opts_foreach(qemu_find_opts("chardev"),
|
||||
chardev_init_func, NULL, NULL)) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (qtest_chrdev) {
|
||||
Error *local_err = NULL;
|
||||
qtest_init(qtest_chrdev, qtest_log, &local_err);
|
||||
if (local_err) {
|
||||
error_report_err(local_err);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (qemu_opts_foreach(qemu_find_opts("object"),
|
||||
object_create,
|
||||
object_create_initial, NULL)) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (qemu_opts_foreach(qemu_find_opts("chardev"),
|
||||
chardev_init_func, NULL, NULL)) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_VIRTFS
|
||||
if (qemu_opts_foreach(qemu_find_opts("fsdev"),
|
||||
fsdev_init_func, NULL, NULL)) {
|
||||
|
@ -4337,6 +4328,15 @@ int main(int argc, char **argv, char **envp)
|
|||
|
||||
configure_accelerator(current_machine);
|
||||
|
||||
if (qtest_chrdev) {
|
||||
Error *local_err = NULL;
|
||||
qtest_init(qtest_chrdev, qtest_log, &local_err);
|
||||
if (local_err) {
|
||||
error_report_err(local_err);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
machine_opts = qemu_get_machine_opts();
|
||||
kernel_filename = qemu_opt_get(machine_opts, "kernel");
|
||||
initrd_filename = qemu_opt_get(machine_opts, "initrd");
|
||||
|
|
Loading…
Reference in New Issue