Stefan Berger
2006-Oct-24 18:48 UTC
[Xen-devel] [PATCH] [HVM] [TPM] [1/3] Add TPM TIS type of device to ACPI device list
This patch adds a TPM TIS type of device to the ACPI device list which is supported for example by the Linux TPM TIS driver. The specification describing this entry can be found here: https://www.trustedcomputinggroup.org/specs/PCClient/TCG_PCClientImplementationforBIOS_1-20_1-00.pdf Section 9 in the document describes the device entry. Signed-off-by: Stefan Berger <stefanb@us.ibm.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Oct-27 16:25 UTC
Re: [Xen-devel] [PATCH] [HVM] [TPM] [1/3] Add TPM TIS type of device toACPI device list
What if the guest isn¹t configured with a TPM device? It seems a bit dodgy to advertise a non-existent device in the BIOS tables. -- Keir On 24/10/06 7:48 pm, "Stefan Berger" <stefanb@us.ibm.com> wrote:> This patch adds a TPM TIS type of device to the ACPI device list which > is supported for example by the Linux TPM TIS driver. > The specification describing this entry can be found here: > > https://www.trustedcomputinggroup.org/specs/PCClient/TCG_PCClientImplementatio > nforBIOS_1-20_1-00.pdf > > Section 9 in the document describes the device entry. > > Signed-off-by: Stefan Berger <stefanb@us.ibm.com> > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Oct-27 16:57 UTC
Re: [Xen-devel] [PATCH] [HVM] [TPM] [1/3] Add TPM TIS type of device toACPI device list
On 27/10/06 6:02 pm, "Stefan Berger" <stefanb@us.ibm.com> wrote:> To solve this we would need one of the following > - a BIOS that probes for such devices and dynamically appends the info to the > (static) ACPI tables > - a tool that builds and compiles the ACPI tables according to the desired > configuration of the HVM VM before the HVM is started > > A later version (2.6.18) of the corresponding Linux driver allows you to > modprobe the module with a ''-force'' parameter for platforms where the correct > ACPI information is not available. [In that case if the vTPM facility is not > available, the /dev/tpm0 won''t become available.] > > I am not sure what the right solution is.I think your above proposed solution is correct: either dynamically append info to a static spartan ACPI table, or dynamically trim down a static christmas tree¹ ACPI table. Probably the former is best, and done in hvmloader. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefan Berger
2006-Oct-27 17:02 UTC
Re: [Xen-devel] [PATCH] [HVM] [TPM] [1/3] Add TPM TIS type of device toACPI device list
Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote on 10/27/2006 12:25:30 PM:> What if the guest isn?t configured with a TPM device? It seems a bit > dodgy to advertise a non-existent device in the BIOS tables.To solve this we would need one of the following - a BIOS that probes for such devices and dynamically appends the info to the (static) ACPI tables - a tool that builds and compiles the ACPI tables according to the desired configuration of the HVM VM before the HVM is started A later version (2.6.18) of the corresponding Linux driver allows you to modprobe the module with a ''-force'' parameter for platforms where the correct ACPI information is not available. [In that case if the vTPM facility is not available, the /dev/tpm0 won''t become available.] I am not sure what the right solution is. Stefan> > -- Keir > > On 24/10/06 7:48 pm, "Stefan Berger" <stefanb@us.ibm.com> wrote:> This patch adds a TPM TIS type of device to the ACPI device list which > is supported for example by the Linux TPM TIS driver. > The specification describing this entry can be found here: > > https://www.trustedcomputinggroup. > org/specs/PCClient/TCG_PCClientImplementationforBIOS_1-20_1-00.pdf > > Section 9 in the document describes the device entry. > > Signed-off-by: Stefan Berger <stefanb@us.ibm.com> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Oct-27 18:07 UTC
Re: [Xen-devel] [PATCH] [HVM] [TPM] [1/3] Add TPM TIS type of device toACPI device list
On 27/10/06 7:09 pm, "Stefan Berger" <stefanb@us.ibm.com> wrote:> Would another possibility be to disable or overwrite the existing device entry > in the static table if the hvmloader''s probing does not find the device?We need some dynamic elements in the table anyway (e.g., currently it¹s hardcoded that there are 4 CPUs!) so we¹ll soon have a framework in hvmloader for doing this kind of thing. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefan Berger
2006-Oct-27 18:09 UTC
Re: [Xen-devel] [PATCH] [HVM] [TPM] [1/3] Add TPM TIS type of device toACPI device list
xen-devel-bounces@lists.xensource.com wrote on 10/27/2006 12:57:52 PM:> On 27/10/06 6:02 pm, "Stefan Berger" <stefanb@us.ibm.com> wrote:> To solve this we would need one of the following > - a BIOS that probes for such devices and dynamically appends the > info to the (static) ACPI tables > - a tool that builds and compiles the ACPI tables according to the > desired configuration of the HVM VM before the HVM is started > > A later version (2.6.18) of the corresponding Linux driver allows > you to modprobe the module with a ''-force'' parameter for platforms > where the correct ACPI information is not available. [In that case > if the vTPM facility is not available, the /dev/tpm0 won''t becomeavailable.]> > I am not sure what the right solution is. > > I think your above proposed solution is correct: either dynamically > append info to a static spartan ACPI table, or dynamically trim down > a static ?christmas tree? ACPI table. Probably the former is best, > and done in hvmloader.I am unforunately not an expert on ACPI tables... Currently the device is part of the DSDT table. Appending this device''s entry to it would probably be possible since in the whole compiled ACPI table layout the DSDT is included as the last part and therefore there should be available unused memory after that. To implement this it would require an ACPI DSDT table parser, to change the length of the table and its checksum and if I interpret the diff of the hexadecimal array of the compiled acpi table correctly, other places as well. Now if I don''t want to change that DSDT table, what type of table would it have to create where I can put this device into? Where do I connect this table to? Would another possibility be to disable or overwrite the existing device entry in the static table if the hvmloader''s probing does not find the device? Stefan> > -- Keir_______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefan Berger
2006-Oct-27 19:48 UTC
Re: [Xen-devel] [PATCH] [HVM] [TPM] [1/3] Add TPM TIS type of device toACPI device list
xen-devel-bounces@lists.xensource.com wrote on 10/27/2006 02:07:45 PM:> > > > On 27/10/06 7:09 pm, "Stefan Berger" <stefanb@us.ibm.com> wrote:> Would another possibility be to disable or overwrite the existing > device entry in the static table if the hvmloader''s probing does not > find the device? > > We need some dynamic elements in the table anyway (e.g., currently > it?s hardcoded that there are 4 CPUs!) so we?ll soon have a > framework in hvmloader for doing this kind of thing.I guess for additional devices we will need an SSDT table. Is this type of table also part of the framework or should I look into this? Stefan> > -- Keir_______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Oct-27 19:52 UTC
Re: [Xen-devel] [PATCH] [HVM] [TPM] [1/3] Add TPM TIS type of device toACPI device list
On 27/10/06 8:48 pm, "Stefan Berger" <stefanb@us.ibm.com> wrote:>> > We need some dynamic elements in the table anyway (e.g., currently >> > it¹s hardcoded that there are 4 CPUs!) so we¹ll soon have a >> > framework in hvmloader for doing this kind of thing. > > I guess for additional devices we will need an SSDT table. Is this type of > table also part of the framework or should I look into this?Well, either hvmloader will extend the DSDT or it will create a new SSDT, whichever turns out to be easiest. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel