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 0/3] VT-d: code cleanup

To: 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [patch 0/3] VT-d: code cleanup
From: "Han, Weidong" <weidong.han@xxxxxxxxx>
Date: Fri, 5 Jun 2009 09:48:36 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: 'xen-devel' <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 04 Jun 2009 18:50:18 -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: Acnlf73sgYUE7SNjRreu7+e/h5cvtA==
Thread-topic: [Xen-devel] [patch 0/3] VT-d: code cleanup
We started to do some cleanup on VT-d code. You will see more cleanup patches 
in coming weeks.

This patchset includes following patches:

1. remove-useless.patch: 
  remove global variable "vtd_enabled", which is redundant. "iommu_enabled" is 
enough. And also removed useless global variables qi_ctrl and ir_ctrl, which 
are not used at all.

2. iommu-wait-op.patch:
  when set some registers of VT-d, it must wait for hardware completion. There 
are lots of duplicated code to do that. This patch defines a macro for it, thus 
it is much cleaner.

3. gcmd.patch: 
  per VT-d spec, software should submit only one "incremental" command at a 
time to Global Command reigster. Current implementation uses a variable (gcmd) 
to record the state of Global Status register. It's error prone. A good 
algorithm to use is as follows, whenver software needs to submit a command:
        Read current value of Global Status Register (X);               //  
This tells what is the current state of commands enabled in hardware
        X = Bitwise OR the new command bit to X;                // The only new 
bit set in X is the one new command we are going to issue
        Write X  to Global Command register;                    // Submit the 
command
        Poll Global Status register until it has new value of X ;       // Poll 
until command is done


Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch 0/3] VT-d: code cleanup, Han, Weidong <=