[for-4.14,0/8] x86/vpt: fixes for vpt and enable vPIT for PVH dom0
mbox series

Message ID 20200612155640.4101-1-roger.pau@citrix.com
Headers show
Series
  • x86/vpt: fixes for vpt and enable vPIT for PVH dom0
Related show

Message

Roger Pau Monné June 12, 2020, 3:56 p.m. UTC
Hello,

The first 6 patches on this series are fixes for HVM virtual timers or
for the handling of the emulated PIT. I think they are all candidates
for 4.14 since without those PIT is not usable (and likely other
emulated timers will also experience issues) unless the OS happens to
make a very specific use of it, ie: timers must be configured from vCPU
0 and the destination must also be set to vCPU 0. FreeBSD for example
doesn't follow such rules, as it will usually configure PIT timers from
vCPU 0 and the destination will be set to a random vCPU in the system,
and as a result gets a non functional PIT.

Patches 7 and 8 enable the usage of the emulated vPIT for PVH dom0,
which is said to be required for certain video BIOS. As I mostly test
PVH dom0 on headless systems I'm not able to assert how common this is,
but given that it's already enabled for a classic PV dom0 let's try to
not regress and also provide a working PIT for PVH dom0.

I think the whole batch is also a candidate for backporting.

Thanks, Roger.

Roger Pau Monne (8):
  x86/hvm: fix vIO-APIC build without IRQ0_SPECIAL_ROUTING
  x86/hvm: don't force vCPU 0 for IRQ 0 when using fixed destination
    mode
  x86/hvm: fix ISA IRQ 0 handling when set as lowest priority mode in IO
    APIC
  x86/vpt: only try to resume timers belonging to enabled devices
  x86/hvm: only translate ISA interrupts to GSIs in virtual timers
  x86/vpt: fix injection to remote vCPU
  x86/hvm: add hardware domain support to hvm_isa_irq_to_gsi
  x86/hvm: enable emulated PIT for PVH dom0

 xen/arch/x86/domain.c         |   5 +-
 xen/arch/x86/emul-i8254.c     |  12 +++-
 xen/arch/x86/hvm/irq.c        |  20 ++++++-
 xen/arch/x86/hvm/vioapic.c    |  47 +++++++---------
 xen/arch/x86/hvm/vpic.c       |   7 ++-
 xen/arch/x86/hvm/vpt.c        | 102 ++++++++++++++++++----------------
 xen/arch/x86/io_apic.c        |  16 +++---
 xen/include/asm-x86/hvm/irq.h |   2 +-
 xen/include/asm-x86/io_apic.h |   3 +
 9 files changed, 121 insertions(+), 93 deletions(-)