[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [patch 3/3] VT-d cleanup: correct way to submit command to GCMD register


  • To: "Han, Weidong" <weidong.han@xxxxxxxxx>, 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>
  • From: "Han, Weidong" <weidong.han@xxxxxxxxx>
  • Date: Fri, 5 Jun 2009 10:03:46 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: 'xen-devel' <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 04 Jun 2009 19:05:53 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acnlf+eVlArWSSJwTmOWBRdrUNUbfQAAXcMw
  • Thread-topic: [Xen-devel] [patch 3/3] VT-d cleanup: correct way to submit command to GCMD register

The patch attached in previous mail is obsolete. Attached the right one. Thanks.

Regards,
Weidong


Han, Weidong wrote:
> 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>

Attachment: gcmd-2.patch
Description: gcmd-2.patch

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.