diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-08-13 17:52:19 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-08-13 17:52:19 +0100 |
commit | 2edf8ac5bdd0ae1624dea2a8d5784f7a33745901 (patch) | |
tree | f9519be39f6566f737e1039a66108cd4c4d12365 | |
parent | 703e8cd6189cf699c8d5c094bc68b5f3afa6ad71 (diff) | |
parent | ea0aa1752ca88f7856cbf40eef0db62f90f28dcd (diff) | |
download | qemu-2edf8ac5bdd0ae1624dea2a8d5784f7a33745901.zip qemu-2edf8ac5bdd0ae1624dea2a8d5784f7a33745901.tar.gz qemu-2edf8ac5bdd0ae1624dea2a8d5784f7a33745901.tar.bz2 |
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
Fixes for -smp, and for x86 TCG on Windows.
# gpg: Signature made Fri 13 Aug 2021 13:43:46 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:
hw/core: fix error checking in smp_parse
hw/core: Add missing return on error
target/i386: Fixed size of constant for Windows
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/core/machine.c | 3 | ||||
-rw-r--r-- | target/i386/tcg/sysemu/misc_helper.c | 2 | ||||
-rw-r--r-- | target/i386/tcg/sysemu/svm_helper.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index 943974d..54e0405 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -752,6 +752,7 @@ static void smp_parse(MachineState *ms, SMPConfiguration *config, Error **errp) if (config->has_dies && config->dies != 0 && config->dies != 1) { error_setg(errp, "dies not supported by this machine's CPU topology"); + return; } /* compute missing values, prefer sockets over cores over threads */ @@ -832,7 +833,7 @@ static void machine_set_smp(Object *obj, Visitor *v, const char *name, } mc->smp_parse(ms, config, errp); - if (errp) { + if (*errp) { goto out_free; } diff --git a/target/i386/tcg/sysemu/misc_helper.c b/target/i386/tcg/sysemu/misc_helper.c index d347af2..e7a2ebd 100644 --- a/target/i386/tcg/sysemu/misc_helper.c +++ b/target/i386/tcg/sysemu/misc_helper.c @@ -97,7 +97,7 @@ void helper_write_crN(CPUX86State *env, int reg, target_ulong t0) break; case 3: if ((env->efer & MSR_EFER_LMA) && - (t0 & ((~0UL) << env_archcpu(env)->phys_bits))) { + (t0 & ((~0ULL) << env_archcpu(env)->phys_bits))) { cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC()); } if (!(env->efer & MSR_EFER_LMA)) { diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/svm_helper.c index e151104..0d549b3 100644 --- a/target/i386/tcg/sysemu/svm_helper.c +++ b/target/i386/tcg/sysemu/svm_helper.c @@ -264,7 +264,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend) } new_cr3 = x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save.cr3)); if ((env->efer & MSR_EFER_LMA) && - (new_cr3 & ((~0UL) << cpu->phys_bits))) { + (new_cr3 & ((~0ULL) << cpu->phys_bits))) { cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC()); } new_cr4 = x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save.cr4)); |