<html><head></head><body dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><blockquote type="cite">On Jan 26, 2017, at 5:58 PM, Ashley Lai <ashleydlai@gmail.com> wrote:<br><br>Adding Vicky from IBM.<br><br><br>On 01/26/2017 04:05 PM, Jason Gunthorpe wrote:<br><blockquote type="cite">On Thu, Jan 26, 2017 at 09:22:48PM +0100, Michal Such??nek wrote:<br><br><blockquote type="cite">This is repeated a few times in the driver so I added memset to quiet<br>gcc and make behavior deterministic in case the unused fields get some<br>meaning in the future.<br></blockquote>Yep, reserved certainly needs to be zeroed.. Can you send a patch?<br>memset is overkill...<br><br><blockquote type="cite">However, in tpm_ibmvtpm_send the structure is initialized as<br><br><span class="Apple-tab-span" style="white-space:pre"> </span>struct ibmvtpm_crq crq;<br> __be64 *word = (__be64 *)&crq;<br>...<br> crq.valid = (u8)IBMVTPM_VALID_CMD;<br> crq.msg = (u8)VTPM_TPM_COMMAND;<br> crq.len = cpu_to_be16(count);<br> crq.data = cpu_to_be32(ibmvtpm->rtce_dma_handle);<br><br>and submitted with<br><br><span class="Apple-tab-span" style="white-space:pre"> </span>rc = ibmvtpm_send_crq(ibmvtpm->vdev, be64_to_cpu(word[0]),<br> be64_to_cpu(word[1]));<br>meaning it is swapped twice.<br></blockquote>No idea, Nayna may know.<br><br>My guess is that '__be64 *word' should be 'u64 *word'...<br><br>Jason<br></blockquote><br></blockquote><br><br>Please refer to commit 62dfd912ab3b5405b6fe72d0135c37e9648071f1<br><br><br>Vicky<br></body></html>