From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46597 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7BQJ-0007ib-3a for qemu-devel@nongnu.org; Tue, 05 Apr 2011 14:56:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7BQC-0003ZI-CN for qemu-devel@nongnu.org; Tue, 05 Apr 2011 14:56:13 -0400 Received: from mail-vx0-f173.google.com ([209.85.220.173]:38429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7BQC-0003Z3-8c for qemu-devel@nongnu.org; Tue, 05 Apr 2011 14:56:12 -0400 Received: by vxb41 with SMTP id 41so608250vxb.4 for ; Tue, 05 Apr 2011 11:56:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4D9B606C.2090105@linux.vnet.ibm.com> References: <20110330194211.732385449@linux.vnet.ibm.com> <20110330194237.138721858@linux.vnet.ibm.com> <4D962E1C.2000203@linux.vnet.ibm.com> <4D9A79B2.2010502@linux.vnet.ibm.com> <4D9B606C.2090105@linux.vnet.ibm.com> From: Blue Swirl Date: Tue, 5 Apr 2011 21:55:51 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH V2 4/9] Add tpm_tis driver to build process Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: qemu-devel@nongnu.org On Tue, Apr 5, 2011 at 9:33 PM, Stefan Berger wrote: > On 04/05/2011 01:45 PM, Blue Swirl wrote: >> >> On Tue, Apr 5, 2011 at 5:08 AM, Stefan Berger >> =C2=A0wrote: >>> >>> On 04/03/2011 05:20 AM, Blue Swirl wrote: >>>> >>>> On Fri, Apr 1, 2011 at 10:57 PM, Stefan Berger >>>> =C2=A0 =C2=A0wrote: >>>>> >>>>> On 04/01/2011 02:14 PM, Blue Swirl wrote: >>>>> >>>>> At this point there is no compile test needed since all code is >>>>> 'there'. >>>>> It's merely adding the front-end,i.e., the TPM TIS emulation to be >>>>> compiled. >>>> >>>> If the basic device (without the tpms-devel library) can be built on >>>> any OS, the flag should go to default-configs/*86*-softmmu.mak. >>>> >>> It can be built on any OS, but it is of no use since the backend >>> (libtpms) >>> is only available on Linux and we don't support it on another OS. Unles= s >>> someone else wants to port it to other OSes, I'd say that the test for >>> Linux >>> is useful. >>> I'd actually also only compile the TIS if libtpms could be found, and >>> terminate with an error message otherwise. I would add this restriction >>> only >>> in the last patch, so that in patch 4 at least for now the TIS can be >>> built. >>> Does that sound reasonable? >> >> It should be possible to emulate the device (to some degree) without >> relying on backend. See for example the recently committed smart card >> device. >> > In case of a TPM, the specs are huge and translate into multiple 10k line= s > of code. If there was to be a dummy backend, all it could send back would= be > error messages... Then how about emulating the library instead so that all calls return failu= re? If a device is built only in special circumstances, it will be more prone to bit rot. We have a few such devices though, so it's not so big deal.