WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] vtd: fix Dom0 S3 when VT-d is enabled.

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] vtd: fix Dom0 S3 when VT-d is enabled.
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Fri, 20 Mar 2009 17:29:12 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc:
Delivery-date: Fri, 20 Mar 2009 02:31:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmpPlSZVUkH2SHqQ2WuE4FFn8vXkg==
Thread-topic: [PATCH] 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
Invalidatin was enabled before S3 becauese at this point of S3 resume,  Queued
Invalidatin 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@xxxxxxxxx>

Attachment: fix_dom0_s3.patch
Description: fix_dom0_s3.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] vtd: fix Dom0 S3 when VT-d is enabled., Cui, Dexuan <=