diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-03-20 09:36:57 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-03-20 09:36:57 +0000 |
commit | 155cd37d8b9253a29e6319be178c5da5616afa18 (patch) | |
tree | 3b1795fbcd22a06a2885752a500cfbaa22e81682 /tools/examples | |
parent | 18b0268f1960c4c6610b3548757edba8a89920db (diff) | |
download | xen-155cd37d8b9253a29e6319be178c5da5616afa18.tar.gz xen-155cd37d8b9253a29e6319be178c5da5616afa18.tar.bz2 xen-155cd37d8b9253a29e6319be178c5da5616afa18.zip |
vtd: fix Dom0 S3 when VT-d is enabled.
On some platforms that support Queued Invalidation and Interrupt
Remapping, Dom0 S3 doesn't work. The patch fixes the issue.
1) In device_power_down(), we should invoke iommu_suspend() after
ioapic_suspend(); in device_power_up(), we should invoke
iommu_resume() before ioapic_resume().
2) Add 2 functions: disable_qinval() and disable_intremap(); in
iommu_suspend(), we invoke them and iommu_disable_translation().
Rename qinval_setup() to enable_qinval() and rename
intremap_setup() to enable_intremap().
3) In iommu_resume(), remove the unnecessary
iommu_flush_{context, iotlb}_global() -- actually we mustn't do that
if Queued Invalidation was enabled before S3 because at this point of
S3 resume, Queued Invalidation hasn't been re-enabled.
4) Add a static global array ioapic_pin_to_intremap_index[] to
remember what intremap_index an ioapic pin uses -- during S3 resume,
ioapic_resume() re-writes all the ioapic RTEs, so we can use the array
to re-use the previously-allocated IRTE;
5) Some cleanups:
a) Change some failure handlings in enable_intremap() to panic().
b) Remove the unnecessary local variable iec_cap in
__iommu_flush_iec().
c) Add a dmar_writeq(iommu->reg, DMAR_IQT_REG, 0) in
enable_qinval().
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'tools/examples')
0 files changed, 0 insertions, 0 deletions