Skip to contentSkip to conversation

Initilize the ring with zeroes

PATCH New Stefan Berger 1 participant 1 message Jan 7, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Initilize the ring with zeroes

Initialize the ring with zeroes on the backend side and on the frontend set the 'unused' member to zeroes.

drivers/char/tpm/tpm_xen.c +1 -0
diff -r 61c96456a3e1 drivers/char/tpm/tpm_xen.c
@@ -617,6 +617,7 @@ static int tpm_xmit(struct tpm_private *
 		tx = &tp->tx->ring[i].req;
 		tx->addr = virt_to_machine(txb->data);
 		tx->size = txb->len;
+		tx->unused = 0;
 
 		DPRINTK("First 4 characters sent by TPM-FE are "
 			"0x%02x 0x%02x 0x%02x 0x%02x\n",
drivers/xen/tpmback/interface.c +1 -0
diff -r 61c96456a3e1 drivers/xen/tpmback/interface.c
@@ -126,6 +126,7 @@ int tpmif_map(tpmif_t *tpmif, unsigned l
 	}
 
 	tpmif->tx = (tpmif_tx_interface_t *)tpmif->tx_area->addr;
+	memset(tpmif->tx, 0x0, PAGE_SIZE);
 
 	err = bind_interdomain_evtchn_to_irqhandler(
 		tpmif->domid, evtchn, tpmif_be_int, 0, tpmif->devname, tpmif);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel