qemu/target/i386
Roman Kagan 9b4cf107b0 hyperv: only add SynIC in compatible configurations
Certain configurations do not allow SynIC to be used in QEMU.  In
particular,

- when hyperv_vpindex is off, SINT routes can't be used as they refer to
  the destination vCPU by vp_index

- older KVM (which doesn't expose KVM_CAP_HYPERV_SYNIC2) zeroes out
  SynIC message and event pages on every msr load, breaking migration

OTOH in-KVM users of SynIC -- SynIC timers -- do work in those
configurations, and we shouldn't stop the guest from using them.

To cover both scenarios, introduce an X86CPU property that makes CPU
init code to skip creation of the SynIC object (and thus disables any
SynIC use in QEMU) but keeps the KVM part of the SynIC working.
The property is clear by default but is set via compat logic for older
machine types.

As a result, when hv_synic and a modern machine type are specified, QEMU
will refuse to run unless vp_index is on and the kernel is recent
enough.  OTOH with an older machine type QEMU will run fine with
hv_synic=on against an older kernel and/or without vp_index enabled but
will disallow the in-QEMU uses of SynIC (in e.g. VMBus).

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Message-Id: <20180921082217.29481-4-rkagan@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-10-19 13:44:14 +02:00
..
hvf i386: hvf: Remove hvf_disabled 2018-10-19 13:44:12 +02:00
arch_dump.c dump: add kernel_gs_base to QEMU CPU state 2018-07-16 16:13:34 +02:00
arch_memory_mapping.c
bpt_helper.c
cc_helper_template.h
cc_helper.c
cpu-qom.h
cpu.c hyperv: only add SynIC in compatible configurations 2018-10-19 13:44:14 +02:00
cpu.h hyperv: only add SynIC in compatible configurations 2018-10-19 13:44:14 +02:00
excp_helper.c target/i386: rename HF_SVMI_MASK to HF_GUEST_MASK 2018-10-02 19:09:12 +02:00
fpu_helper.c
gdbstub.c
hax-all.c
hax-darwin.c
hax-darwin.h
hax-i386.h
hax-interface.h
hax-mem.c
hax-windows.c
hax-windows.h
helper.c
helper.h
hyperv-proto.h hyperv: split hyperv-proto.h into x86 and arch-independent parts 2018-10-19 13:44:13 +02:00
hyperv-stub.c hyperv: qom-ify SynIC 2018-10-19 13:44:14 +02:00
hyperv.c hyperv: qom-ify SynIC 2018-10-19 13:44:14 +02:00
hyperv.h hyperv: qom-ify SynIC 2018-10-19 13:44:14 +02:00
int_helper.c
kvm_i386.h hyperv: ensure VP index equal to QEMU cpu_index 2018-07-16 16:58:16 +02:00
kvm-stub.c hyperv: ensure VP index equal to QEMU cpu_index 2018-07-16 16:58:16 +02:00
kvm.c hyperv: only add SynIC in compatible configurations 2018-10-19 13:44:14 +02:00
machine.c hyperv: qom-ify SynIC 2018-10-19 13:44:14 +02:00
Makefile.objs i386: add hyperv-stub for CONFIG_HYPERV=n 2018-10-19 13:44:14 +02:00
mem_helper.c target-i386: Add NPT support 2018-07-02 15:41:18 +02:00
misc_helper.c i386: implement MSR_SMI_COUNT for TCG 2018-07-30 14:00:11 +02:00
monitor.c i386/monitor.c: make addresses canonical for "info mem" and "info tlb" 2018-07-02 15:41:18 +02:00
mpx_helper.c
ops_sse_header.h
ops_sse.h
seg_helper.c target/i386: rename HF_SVMI_MASK to HF_GUEST_MASK 2018-10-02 19:09:12 +02:00
sev_i386.h
sev-stub.c
sev.c
shift_helper_template.h
smm_helper.c i386: implement MSR_SMI_COUNT for TCG 2018-07-30 14:00:11 +02:00
svm_helper.c target/i386: rename HF_SVMI_MASK to HF_GUEST_MASK 2018-10-02 19:09:12 +02:00
svm.h target-i386: Add NPT support 2018-07-02 15:41:18 +02:00
TODO
trace-events
translate.c target/i386: fix translation for icount mode 2018-10-02 19:09:13 +02:00
whp-dispatch.h whpx: commit missing file 2018-06-28 19:05:31 +02:00
whpx-all.c WHPX: register for unrecognized MSR exits 2018-06-28 19:05:36 +02:00
xsave_helper.c