vdev hpet

Provide the guest with an HPET device.

Synopsis:

vdev hpet options

Options:

frequency value
Use the given frequency instead of the default 14318180 Hz.
Currently, the virtual device uses an integer divisor to match with the hypervisor's internal counter, which will introduce a skew.
intr intr_def[,intr_def[,intr_def[,...]]]
Define timers and assign interrupt lines to them. For complex reasons and to support legacy operations, a Linux guest will expect the first timer to be on IRQ 0, and a QNX guest will expect it to be on IRQ 2. The second timer should be set to IRQ 8 in both cases, and any additional timer can use any other interrupt.

If you specify multiple interrupts (timers), you can:

  • Specify the intr option once, followed by multiple definitions; for example:

    vdev hpet intr ioapic:2,ioapic:6
  • Specify an new intr option for each definition; for example:

    vdev hpet intr ioapic:2 intr ioapic:6
  • Mix the two forms; for example:

    vdev hpet intr ioapic:2,ioapic:6 intr ioapic:10
legacy-free
Clear the “legacy” bit (LEG_RT_CA) in the main ID register. Specifically, clearing or not clearing the bit determines where Timer0 interrupts may be routed.
If you specify this option, the guest can't make any assumptions about routing of Timer0 and Timer1.

If you don't specify this option, the guest can assume that Timer0 will be routed to IRQ2 and Timer1 to IRQ8. Note the following, however:

  • Not specifying the legacy-free option doesn't enforce the assumed routing (Timer0 to IRQ2, Timer1 to IRQ8). You must ensure that your configuration specifies the correct routing.
  • A Linux guest will always assume that Timer0 is routed to IRQ0, because this is usually the case. Though this routing warrants a redirection entry in the Multiple APIC Description Table from ACPI, Linux ignores the absence of this redirection entry.

  • The above means that if you don't specify the legacy-free option, the first two intr instances in the hpet vdev configuration should be as follows, for QNX:

    vdev hpet intr ioapic_name:2,ioapic_name:8

    and for Linux:

    vdev hpet intr ioapic_name:0,ioapic_name:8
loc
The base address of the HPET registers.

For a list of options available to all vdevs, see Common vdev options at the beginning of this chapter.

Description:

x86 only. The hpet vdev provides a High-Precision Event Timer (HPET) device to the guest. It is exposed to the guest through an ACPI device. If this device is provided in the VM (qvm process instance), the guest may use HPET services. For example, for a QNX Neutrino 7.0 guest, the startup-apic in a boot image will search for and use the virtualized HPET timer if it exists.

Currently, only the first HPET vdev is exposed, and there is no way for the guest to discover the address of any additional HPET vdev.

This vdev supports up to 32 timers. The guest can't change the IRQ assignment of each timer, but MSI is supported.