aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-01-08 14:27:40 +0000
committerPeter Maydell <peter.maydell@linaro.org>2023-01-08 14:27:40 +0000
commit3d83b78285d6e96636130f7d449fd02e2d4deee0 (patch)
tree75883256ddfbb8e21873cb7dfa9bde142378fe5b /target
parent528d9f33cad5245c1099d77084c78bb2244d5143 (diff)
parentfb418b51b7b43c34873f4b9af3da7031b7452115 (diff)
downloadqemu-3d83b78285d6e96636130f7d449fd02e2d4deee0.zip
qemu-3d83b78285d6e96636130f7d449fd02e2d4deee0.tar.gz
qemu-3d83b78285d6e96636130f7d449fd02e2d4deee0.tar.bz2
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* Atomic memslot updates for KVM (Emanuele, David) * Always send errors to logfile when daemonized (Greg) * Add support for IDE CompactFlash card (Lubomir) * First round of build system cleanups (myself) * First round of feature removals (myself) * Reduce "qemu/accel.h" inclusion (Philippe) # gpg: Signature made Thu 05 Jan 2023 23:51:09 GMT # 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 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (24 commits) i386: SGX: remove deprecated member of SGXInfo target/i386: Add SGX aex-notify and EDECCSSA support util: remove support -chardev tty and -chardev parport util: remove support for hex numbers with a scaling suffix KVM: remove support for kernel-irqchip=off docs: do not talk about past removal as happening in the future meson: accept relative symlinks in "meson introspect --installed" data meson: cleanup compiler detection meson: support meson 0.64 -Doptimization=plain configure: test all warnings tests/qapi-schema: remove Meson workaround meson: cleanup dummy-cpus.c rules meson: tweak hardening options for Windows configure: remove backwards-compatibility and obsolete options configure: preserve qemu-ga variables configure: cleanup $cpu tests configure: remove dead function configure: remove useless write_c_skeleton ide: Add "ide-cf" driver, a CompactFlash card ide: Add 8-bit data mode ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/i386/cpu-sysemu.c15
-rw-r--r--target/i386/cpu.c4
2 files changed, 13 insertions, 6 deletions
diff --git a/target/i386/cpu-sysemu.c b/target/i386/cpu-sysemu.c
index fc97213..28115ed 100644
--- a/target/i386/cpu-sysemu.c
+++ b/target/i386/cpu-sysemu.c
@@ -247,12 +247,16 @@ void x86_cpu_machine_reset_cb(void *opaque)
cpu_reset(CPU(cpu));
}
-APICCommonClass *apic_get_class(void)
+APICCommonClass *apic_get_class(Error **errp)
{
const char *apic_type = "apic";
/* TODO: in-kernel irqchip for hvf */
- if (kvm_apic_in_kernel()) {
+ if (kvm_enabled()) {
+ if (!kvm_apic_in_kernel()) {
+ error_setg(errp, "KVM does not support userspace APIC");
+ return NULL;
+ }
apic_type = "kvm-apic";
} else if (xen_enabled()) {
apic_type = "xen-apic";
@@ -266,10 +270,13 @@ APICCommonClass *apic_get_class(void)
void x86_cpu_apic_create(X86CPU *cpu, Error **errp)
{
APICCommonState *apic;
- ObjectClass *apic_class = OBJECT_CLASS(apic_get_class());
+ APICCommonClass *apic_class = apic_get_class(errp);
- cpu->apic_state = DEVICE(object_new_with_class(apic_class));
+ if (!apic_class) {
+ return;
+ }
+ cpu->apic_state = DEVICE(object_new_with_class(OBJECT_CLASS(apic_class)));
object_property_add_child(OBJECT(cpu), "lapic",
OBJECT(cpu->apic_state));
object_unref(OBJECT(cpu->apic_state));
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 3410e5e..4d2b8d0 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1233,7 +1233,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
.feat_names = {
"sgx1", "sgx2", NULL, NULL,
NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, "sgx-edeccssa",
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
@@ -1273,7 +1273,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
.feat_names = {
NULL, "sgx-debug", "sgx-mode64", NULL,
"sgx-provisionkey", "sgx-tokenkey", NULL, "sgx-kss",
- NULL, NULL, NULL, NULL,
+ NULL, NULL, "sgx-aex-notify", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,