Lines Matching refs:shr
24 struct vtpm_shared_page *shr; member
103 switch (priv->shr->state) { in vtpm_status()
124 priv->shr->state = VTPM_STATE_CANCEL; in vtpm_cancel()
129 static unsigned int shr_data_offset(struct vtpm_shared_page *shr) in shr_data_offset() argument
131 return sizeof(*shr) + sizeof(u32) * shr->nr_extra_pages; in shr_data_offset()
137 struct vtpm_shared_page *shr = priv->shr; in vtpm_send() local
138 unsigned int offset = shr_data_offset(shr); in vtpm_send()
156 memcpy(offset + (u8 *)shr, buf, count); in vtpm_send()
157 shr->length = count; in vtpm_send()
159 shr->state = VTPM_STATE_SUBMIT; in vtpm_send()
179 struct vtpm_shared_page *shr = priv->shr; in vtpm_recv() local
180 unsigned int offset = shr_data_offset(shr); in vtpm_recv()
181 size_t length = shr->length; in vtpm_recv()
183 if (shr->state == VTPM_STATE_IDLE) in vtpm_recv()
202 memcpy(buf, offset + (u8 *)shr, length); in vtpm_recv()
221 switch (priv->shr->state) { in tpmif_interrupt()
258 priv->shr = (void *)__get_free_page(GFP_KERNEL|__GFP_ZERO); in setup_ring()
259 if (!priv->shr) { in setup_ring()
264 rv = xenbus_grant_ring(dev, priv->shr, 1, &gref); in setup_ring()
336 (unsigned long)priv->shr); in ring_free()
338 free_page((unsigned long)priv->shr); in ring_free()