From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnWH9-0000fq-QF for qemu-devel@nongnu.org; Fri, 14 Jun 2013 11:50:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnWH4-0000q2-Me for qemu-devel@nongnu.org; Fri, 14 Jun 2013 11:50:55 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:33416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnWH4-0000nc-CV for qemu-devel@nongnu.org; Fri, 14 Jun 2013 11:50:50 -0400 Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jun 2013 09:50:26 -0600 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 5AFC71FF002B for ; Fri, 14 Jun 2013 09:45:07 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r5EFo8id065206 for ; Fri, 14 Jun 2013 09:50:09 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r5EFo8Vk024704 for ; Fri, 14 Jun 2013 09:50:08 -0600 Message-ID: <51BB3BAF.6020003@linux.vnet.ibm.com> Date: Fri, 14 Jun 2013 11:50:07 -0400 From: Stefan Berger MIME-Version: 1.0 References: <1370525564-16912-1-git-send-email-coreyb@linux.vnet.ibm.com> <8738skg59o.fsf@codemonkey.ws> <51BB3127.7040708@linux.vnet.ibm.com> <87hah03do2.fsf@codemonkey.ws> In-Reply-To: <87hah03do2.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 0/3] TPM NVRAM persistent storage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kwolf@redhat.com, Corey Bryant , qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, jschopp@linux.vnet.ibm.com, stefanha@redhat.com On 06/14/2013 11:38 AM, Anthony Liguori wrote: > Corey Bryant writes: > >> On 06/14/2013 10:01 AM, Anthony Liguori wrote: >>> Corey Bryant writes: >>> >>>> This patch series provides persistent storage support that a TPM >>>> can use to store NVRAM data. It uses QEMU's block driver to store >>>> data on a drive image. The libtpms TPM 1.2 backend will be the >>>> initial user of this functionality to store data that must persist >>>> through a reboot or migration. A sample command line may look like >>>> this: >>> This should be folded into the libtpms backend series. >>> >>> There are no users for this so this would just be untestable code in the >>> tree subject to bitrot. >>> >>> Regards, >>> >>> Anthony Liguori >>> >> Fair enough. I assume you're ok with this code though? > I don't understand why it's needed to be honest. I suspect this has to > do with the fact that the libtpms implementation will need significant > reworking. libtpms does not implement a file storage layer. It neither writes data into a FILE * nor into a QEMU BDRV. Instead it provides callbacks for users to implement the file storage layer. Is there a problem with that? Regards, Stefan > > Regards, > > Anthony Liguori > >> -- >> Regards, >> Corey Bryant >> >>>> qemu-system-x86_64 ... >>>> -drive file=/path/to/nvram.qcow2,id=drive-nvram0-0-0 >>>> -tpmdev libtpms,id=tpm-tpm0 >>>> -device tpm-tis,tpmdev=tpm-tpm0,id=tpm0,drive=drive-nvram0-0-0 >>>> >>>> Thanks, >>>> Corey >>>> >>>> Corey Bryant (3): >>>> nvram: Add TPM NVRAM implementation >>>> nvram: Add tpm-tis drive support >>>> TPM NVRAM test >>>> >>>> hw/tpm/Makefile.objs | 1 + >>>> hw/tpm/tpm_int.h | 2 + >>>> hw/tpm/tpm_nvram.c | 324 ++++++++++++++++++++++++++++++++++++++++++++++ >>>> hw/tpm/tpm_nvram.h | 25 ++++ >>>> hw/tpm/tpm_passthrough.c | 85 ++++++++++++ >>>> hw/tpm/tpm_tis.c | 8 + >>>> 6 files changed, 445 insertions(+), 0 deletions(-) >>>> create mode 100644 hw/tpm/tpm_nvram.c >>>> create mode 100644 hw/tpm/tpm_nvram.h >>> >>> >>>