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-changelog

[Xen-changelog] [xen-unstable] [VTPM][HVM] Transmit the locality in whic

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [VTPM][HVM] Transmit the locality in which the command was sent in the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 08 Dec 2006 13:20:15 +0000
Delivery-date: Fri, 08 Dec 2006 05:20:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 49bb6b82654aa5e1aa51da306138076dcfff2b2d
# Parent  0c1e2abc18884c7ec4edd39bd55867f6ea6e1056
[VTPM][HVM] Transmit the locality in which the command was sent in the
highest 3 bits of the 4 bytes prepended to each packet.
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 tools/ioemu/hw/tpm_tis.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff -r 0c1e2abc1888 -r 49bb6b82654a tools/ioemu/hw/tpm_tis.c
--- a/tools/ioemu/hw/tpm_tis.c  Thu Dec 07 11:16:17 2006 +0000
+++ b/tools/ioemu/hw/tpm_tis.c  Thu Dec 07 11:17:28 2006 +0000
@@ -132,7 +132,7 @@ typedef struct TPMState {
 
 
 /* local prototypes */
-static int TPM_Send(tpmState *s, tpmBuffer *buffer, char *msg);
+static int TPM_Send(tpmState *s, tpmBuffer *buffer, uint8_t locty, char *msg);
 static int TPM_Receive(tpmState *s, tpmBuffer *buffer);
 static uint32_t vtpm_instance_from_xenstore(void);
 static void tis_poll_timer(void *opaque);
@@ -271,6 +271,8 @@ static int create_local_socket(tpmState 
 /*
  * the 'write' method for sending requests to the vTPM
  * four bytes with the vTPM instance number are prepended to each request
+ * the locality in which the command was sent is transmitted in the
+ * highest 3 bits
  */
 static int write_local_socket(tpmState *s, const tpmBuffer *buffer)
 {
@@ -608,7 +610,7 @@ static void tis_mem_writel(void *opaque,
             }
         }
         if (val & STS_TPM_GO) {
-            n = TPM_Send(s, &s->buffer,"tpm_data_write");
+            n = TPM_Send(s, &s->buffer, locty, "tpm_data_write");
             if (n > 0) {
                 /* sending of data was successful */
                 s->offset = 0;
@@ -915,7 +917,7 @@ const static unsigned char tpm_failure[]
 /*
  * Send a TPM request.
  */
-static int TPM_Send(tpmState *s, tpmBuffer *buffer, char *msg)
+static int TPM_Send(tpmState *s, tpmBuffer *buffer, uint8_t locty, char *msg)
 {
     int len;
     uint32_t size = tpm_get_size_from_buffer(buffer->buf);
@@ -944,6 +946,10 @@ static int TPM_Send(tpmState *s, tpmBuff
 #ifdef DEBUG_TPM
     showBuff(buffer->buf, "To TPM");
 #endif
+
+    /* transmit the locality in the highest 3 bits */
+    buffer->instance[0] &= 0x1f;
+    buffer->instance[0] |= (locty << 5);
 
     len = vTPMTransmit[s->Transmitlayer].write(s, buffer);
     if (len < 0) {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [VTPM][HVM] Transmit the locality in which the command was sent in the, Xen patchbot-unstable <=