qemu-e2k/include/hw/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
..
apic_internal.h Revert "apic: save apic_delivered flag" 2017-03-27 14:41:01 +02:00
apic-msidef.h i386/msi: Correct mask of destination ID in MSI address 2017-12-01 18:28:15 +02:00
apic.h apic: add function to apic that will be used by hvf 2017-12-22 15:01:19 +01:00
ich9.h tco: do not generate an NMI 2017-04-05 17:23:52 +02:00
intel_iommu.h intel-iommu: rework the page walk logic 2018-05-23 17:34:05 +03:00
ioapic_internal.h ioapic: support "info irq" 2018-06-28 19:05:37 +02:00
ioapic.h
pc.h hyperv: only add SynIC in compatible configurations 2018-10-19 13:44:14 +02:00
topology.h
x86-iommu.h intel_iommu: remove X86_IOMMU_PCI_DEVFN_MAX 2017-12-22 01:42:03 +02:00