Fixes for -smp, and for x86 TCG on Windows.
-----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmEWaQIUHHBib256aW5p QHJlZGhhdC5jb20ACgkQv/vSX3jHroO0igf/SH8lcWEiqSxhS+FDfawBjfHn7m6c YOVMZHxeNE+ApHm7S8H9zc7V1LgOBk1nZdnFTZFxUY/Q5FJv1Kql/hGAkwyj+7ve ssXcg5n8uwIbWCL7i+JmVnAtORL4vhLhwqEQBIh1HzMtepkl2Y1BTKAy9RpfLENg v8/NQ1++nxCAhlOKqQVZ0etEWRsUoJ+7s3VYFLnVV0HQ3q9kt92TTBNH7fRJwyjH 3qwWhznAdTZEX/383n5Io3471WyZ2c8VAbp98Q6o6Md/orbFq6iWj9wfirJCO3+r b8knqUqDY3N4BQA1QNeJKkGI6pYEQLPWub/G6goIIhwRnMSoImO7x9rv2w== =3nSh -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
2edf8ac5bd
|
@ -752,6 +752,7 @@ static void smp_parse(MachineState *ms, SMPConfiguration *config, Error **errp)
|
||||||
|
|
||||||
if (config->has_dies && config->dies != 0 && config->dies != 1) {
|
if (config->has_dies && config->dies != 0 && config->dies != 1) {
|
||||||
error_setg(errp, "dies not supported by this machine's CPU topology");
|
error_setg(errp, "dies not supported by this machine's CPU topology");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* compute missing values, prefer sockets over cores over threads */
|
/* 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);
|
mc->smp_parse(ms, config, errp);
|
||||||
if (errp) {
|
if (*errp) {
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ void helper_write_crN(CPUX86State *env, int reg, target_ulong t0)
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if ((env->efer & MSR_EFER_LMA) &&
|
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());
|
cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC());
|
||||||
}
|
}
|
||||||
if (!(env->efer & MSR_EFER_LMA)) {
|
if (!(env->efer & MSR_EFER_LMA)) {
|
||||||
|
|
|
@ -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));
|
new_cr3 = x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save.cr3));
|
||||||
if ((env->efer & MSR_EFER_LMA) &&
|
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());
|
cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC());
|
||||||
}
|
}
|
||||||
new_cr4 = x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save.cr4));
|
new_cr4 = x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save.cr4));
|
||||||
|
|
Loading…
Reference in a new issue