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

Re: [Xen-devel] [PATCH] [Linux] Transfer TPM locality info in the ringst

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>,<stefanb@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] [Linux] Transfer TPM locality info in the ringstructure
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 04 Jan 2008 08:56:24 +0000
Cc: keir@xxxxxxxxxxxxx
Delivery-date: Fri, 04 Jan 2008 00:56:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>--- a/drivers/xen/tpmback/tpmback.c    Thu Dec 20 16:58:14 2007 +0000
>+++ b/drivers/xen/tpmback/tpmback.c    Wed Jan 02 14:19:04 2008 -0500
>@@ -298,6 +298,18 @@ int _packet_write(struct packet *pak,
>       return rc;
> }
> 
>+
>+static u8 get_locty_ring(tpmif_t *tpmif)
>+{
>+      tpmif_tx_request_t *tx = &tpmif->tx->ring[0].req;
>+
>+      if (tx->version == 1)

Shouldn't this be >= 1?

>+              return tx->locality;
>+
>+      return 0;
>+}
>+
>+
> /*
>  * Read data from the shared memory and copy it directly into the
>  * provided buffer. Advance the read_last indicator which tells

Also, while your patch at the first glance appears to take care of backward
compatibility, I'm not sure it really does: In the old code, I can't see where
the 'unused' member of 'struct tpmif_tx_request' gets zero-initialized.
Wouldn't it be possible to clear the shared page in the backend rather than
the frontend?

Jan

Jan

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