bhyve - Device field analysis
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

Comment only
 
ABCDEF
1
FieldDescriptionSnapshot valueRestore checksObservations
2
vhpet->vmBack pointer to VM dataNot savingN/AValue is set at init time
3
vhpet->mtxDevice mutexNot savingN/AValue is set at init time
4
vhpet->freq_sbtImplementation-specific frequency as sbintimeValue at snapshot timeTODO: check if value remains constantMay not need saving since it set at init
5
vhpet->configHPET General Configuration RegisterValue at snapshot timeTODO: check that unused fields are set to init values (bits 63:2);
Legacy replacement (HPET_CNF_LEG_RT) bit set to 0
Only counter enable bit HPET_CNF_ENABLE is explicitly used
6
vhpet->isrHPET General Interrupt Status RegisterValue at snapshot timeTODO: unused bits set to 0 (bits 63:32);
Check no set isrs are routed to ioapic pin 0;
In edge-triggered mode bits are set to 0
Pin routing checks can be done using `vhpet_timer_ioapic_pin`
7
vhpet->countbaseImplementation-specific main counter value for HPET:
- value of counter when timers last ran (before being disabled)
- value explicitly set by guest
Value returned by `vhpet_counter` at snapshot timeTODO: check that value is not in the future ?The actual value of the counter is computed by adding the set 'countbase' to a time delta divided by VHPET frequency.
May not be able to determine if the value set is in the future, since the guest is able to set it to any value
8
vhpet->countbase_sbtImplementation-specific auxiliary value for main counter - used to compute main counter valueNot savingN/AValue is reset at restore time using the current system uptime (from restore). This (along with the saving of the 'countbase' field) will ensure that reading the main counter value after a restore will be correctly computed as `snapshot_save('countbase') + (current_uptime - 'countbase_sbt') / 'freq_sbt' `
9
vhpet->timer[n].cap_configHPET Timer N Config and Capabilities RegisterValue at snapshot timeTODO: check that unused fields (31:16) are set to 0;
R/O bits set by init (currently HPET_TCAP_PER_INT and HPET_TCAP_FSC_INT_DEL) are set
10
vhpet->timer[n].msiregHPET FSB (Front Side Bus) Routing (using MSI)Value at snapshot timeTODO: check if the address (upper 32 out of 64 bits) is validAlternative to standard I/O APIC interrupts; interrupts must be edge-triggered
11
vhpet->timer[n].compvalImplementation-specific Timer N Comparator RegisterValue at snapshot timeN/AThe value cannot be compared to the 'countbase' field to check if it is in the future, since the value does not change when the timer interrupt is generated; instead, the interrupt is generated again when the counter wraps around
12
vhpet->timer[n].comprateImplementation-specific Timer N Periodic Comparator RegisterValue at snapshot timeN/AThe value is used as period for the timer when set in periodic mode - if the timer expires, a new value for the 'timer[n].compval' field will be set to the next multiple of 'timer[n].comprate'
13
vhpet->timer[n].calloutImplementation-specific emulation timer through the callout APINot savingN/A
14
vhpet->timer[n].callout_sbtImplementation-specific Timer N expiry moment (as sbintime)Value at snapshot timeN/AMay not need saving, is recomputed and overwritten at restore time using the 'freq_sbt', 'countbase', 'countbase_sbt' and 'timer[n].compval' fields
15
vhpet->timer[n].argHPET Timer N callback argumentNot savingN/AValue is set at init time
16
17
18
19
20
21
22
23
24
25
26
27
28
Specification: v1.0a, https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/software-developers-hpet-spec-1-0a.pdf
29
30
31
32
33
34
35
36
Loading...