* [Qemu-devel] CUSE-TPM : Win 10 reports TPM device doesn't have sufficient resources
@ 2017-04-18 17:42 anshul makkar
2017-04-18 18:46 ` Stefan Berger
0 siblings, 1 reply; 3+ messages in thread
From: anshul makkar @ 2017-04-18 17:42 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanb
Hi,
I am using CUSE-TPM based on
https://github.com/stefanberger/qemu-tpmbranch: 2.4.1+tpm
https://github.com/stefanberger/swtpm
https://github.com/ts468/seabios-tpm
I am facing an issue where WIndows 10 guest device manager reports TPM
status as @
The device status is "The device cannot find enough free resources it can use (Code 12)"#
On browsing I found this page
@https://bugzilla.redhat.com/show_bug.cgi?id=1281413" that reports
exactly the same problem and the resolution patch @
https://bugzilla.redhat.com/attachment.cgi?id=1137166 .
I applied the patch on the code and verified with debug trace that the
patch code does executes.
But, I am still observingthe sameissue on Win 10 guest and on using
ACPIdump utility in Windows guest I canstill see"IRQ5 and IRQNoFlags" in
the ssdt.dsl code.
Device (ISA.TPM)
{
Name (_HID, EisaId ("PNP0C31")) // _HID: Hardware ID
Name (_STA, 0x0F) // _STA: Status
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
Memory32Fixed (ReadWrite,
0xFED40000, // Address Base
0x00005000, // Address Length
)
IRQNoFlags ()
{5}
})
I am bit confused, from my understanding, its the QEMU that builds the
SSDT table and I can also verify it from the logs. But somehow guest is
getting the old ACPI values for TPM which is not acceptable to Windows.
Just to be sure, I also verified the SeaBIOS code and couldn't find any
link to this table.
Here is the patch that I applied based on the link above:
if (misc->tpm_version != TPM_VERSION_UNSPEC) {
ACPI_BUILD_DPRINTF("TPM: add MMIO\n");
dev = aml_device("TPM");
aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C31")));
aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
crs = aml_resource_template();
aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
aml_append(dev, aml_name_decl("_CRS", crs));
aml_append(sb_scope, dev);
}
aml_append(ssdt, sb_scope);
logs once I start qemu:
CPI_BUILD: init ACPI tables
ACPI_BUILD: TPM: add MMIO
ACPI_BUILD: init ACPI tables
ACPI_BUILD: TPM: add MMIO
tpm_tis: read.4(00000f00) = 00011014
tpm_tis: write.1(00000008) = 00000000
tpm_tis: read.1(00000000) = 00000081
Commands to start vTPM:
swtpm_cuse -M 260 -m 1 -n vtpm0
qemu-system-x86_64 -enable-kvm -m 1024 -boot d -bios bios.bin -boot
menu=on -tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm0 -device
tpm-tis,tpmdev=tpm0 win.img
Please suggest if I am missing anything .
Thanks
Anshul Makkar
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] CUSE-TPM : Win 10 reports TPM device doesn't have sufficient resources
2017-04-18 17:42 [Qemu-devel] CUSE-TPM : Win 10 reports TPM device doesn't have sufficient resources anshul makkar
@ 2017-04-18 18:46 ` Stefan Berger
2017-04-21 8:03 ` Anshul Makkar
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Berger @ 2017-04-18 18:46 UTC (permalink / raw)
To: anshul.makkar; +Cc: qemu-devel
You may want to try it from this version:[1]
https://github.com/stefanberger/qemu-tpm/tree/v2.8.0+tpm
----- Original message -----
From: anshul makkar <anshul.makkar@citrix.com>
To: <qemu-devel@nongnu.org>
Cc: Stefan Berger/Watson/IBM@IBMUS
Subject: CUSE-TPM : Win 10 reports TPM device doesn't have
sufficient resources
Date: Tue, Apr 18, 2017 1:42 PM
Hi,
I am using CUSE-TPM based on
[2]https://github.com/stefanberger/qemu-tpm branch: 2.4.1+tpm
[3]https://github.com/stefanberger/swtpm
[4]https://github.com/ts468/seabios-tpm
I am facing an issue where WIndows 10 guest device manager reports
TPM status as @
The device status is "The device cannot find enough free resources it
can use (Code 12)"#
On browsing I found this page
@[5]https://bugzilla.redhat.com/show_bug.cgi?id=1281413" that
reports exactly the same problem and the resolution patch
@ [6]https://bugzilla.redhat.com/attachment.cgi?id=1137166​ .
I applied the patch on the code and verified with debug trace that
the patch code does executes.
But, I am still observing the same issue on Win 10 guest and on
using ACPIdump utility in Windows guest I can still see "IRQ 5 and
IRQNoFlags" in the ssdt.dsl code.
Device (ISA.TPM)
{
Name (_HID, EisaId ("PNP0C31")) // _HID: Hardware
ID
Name (_STA, 0x0F) // _STA: Status
Name (_CRS, ResourceTemplate () // _CRS: Current
Resource Settings
{
Memory32Fixed (ReadWrite,
0xFED40000, // Address Base
0x00005000, // Address Length
)
IRQNoFlags ()
{5}
})
I am bit confused, from my understanding, its the QEMU that builds
the SSDT table and I can also verify it from the logs. But somehow
guest is getting the old ACPI values for TPM which is not acceptable
to Windows.
Just to be sure, I also verified the SeaBIOS code and couldn't find
any link to this table.
Here is the patch that I applied based on the link above:
if (misc->tpm_version != TPM_VERSION_UNSPEC) {
ACPI_BUILD_DPRINTF("TPM: add MMIO\n");
dev = aml_device("TPM");
aml_append(dev, aml_name_decl("_HID",
aml_eisaid("PNP0C31")));
aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
crs = aml_resource_template();
aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
aml_append(dev, aml_name_decl("_CRS", crs));
aml_append(sb_scope, dev);
}
aml_append(ssdt, sb_scope);
logs once I start qemu:
CPI_BUILD: init ACPI tables
ACPI_BUILD: TPM: add MMIO
ACPI_BUILD: init ACPI tables
ACPI_BUILD: TPM: add MMIO
tpm_tis: read.4(00000f00) = 00011014
tpm_tis: write.1(00000008) = 00000000
tpm_tis: read.1(00000000) = 00000081
Commands to start vTPM:
swtpm_cuse -M 260 -m 1 -n vtpm0
qemu-system-x86_64 -enable-kvm -m 1024 -boot d -bios bios.bin -boot
menu=on -tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm0 -device
tpm-tis,tpmdev=tpm0 win.img
Please suggest if I am missing anything .
Thanks
Anshul Makkar
References
1. https://github.com/stefanberger/qemu-tpm/tree/v2.8.0+tpm
2. https://github.com/stefanberger/qemu-tpm
3. https://github.com/stefanberger/swtpm
4. https://github.com/ts468/seabios-tpm
5. https://bugzilla.redhat.com/show_bug.cgi?id=1281413
6. https://bugzilla.redhat.com/attachment.cgi?id=1137166
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] CUSE-TPM : Win 10 reports TPM device doesn't have sufficient resources
2017-04-18 18:46 ` Stefan Berger
@ 2017-04-21 8:03 ` Anshul Makkar
0 siblings, 0 replies; 3+ messages in thread
From: Anshul Makkar @ 2017-04-21 8:03 UTC (permalink / raw)
To: Stefan Berger; +Cc: qemu-devel
Yes, v2.8.0+tpm branch worked. Thanks Stefan.
Anshul
From: Stefan Berger [mailto:stefanb@us.ibm.com]
Sent: 18 April 2017 19:47
To: Anshul Makkar <anshul.makkar@citrix.com>
Cc: qemu-devel@nongnu.org
Subject: Re: CUSE-TPM : Win 10 reports TPM device doesn't have sufficient resources
You may want to try it from this version: https://github.com/stefanberger/qemu-tpm/tree/v2.8.0+tpm
----- Original message -----
From: anshul makkar <anshul.makkar@citrix.com<mailto:anshul.makkar@citrix.com>>
To: <qemu-devel@nongnu.org<mailto:qemu-devel@nongnu.org>>
Cc: Stefan Berger/Watson/IBM@IBMUS
Subject: CUSE-TPM : Win 10 reports TPM device doesn't have sufficient resources
Date: Tue, Apr 18, 2017 1:42 PM
Hi,
I am using CUSE-TPM based on
https://github.com/stefanberger/qemu-tpm branch: 2.4.1+tpm
https://github.com/stefanberger/swtpm
https://github.com/ts468/seabios-tpm
I am facing an issue where WIndows 10 guest device manager reports TPM status as @
The device status is "The device cannot find enough free resources it can use (Code 12)"#
On browsing I found this page @https://bugzilla.redhat.com/show_bug.cgi?id=1281413" that reports exactly the same problem and the resolution patch @ https://bugzilla.redhat.com/attachment.cgi?id=1137166 .
I applied the patch on the code and verified with debug trace that the patch code does executes.
But, I am still observing the same issue on Win 10 guest and on using ACPIdump utility in Windows guest I can still see "IRQ 5 and IRQNoFlags" in the ssdt.dsl code.
Device (ISA.TPM)
{
Name (_HID, EisaId ("PNP0C31")) // _HID: Hardware ID
Name (_STA, 0x0F) // _STA: Status
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
Memory32Fixed (ReadWrite,
0xFED40000, // Address Base
0x00005000, // Address Length
)
IRQNoFlags ()
{5}
})
I am bit confused, from my understanding, its the QEMU that builds the SSDT table and I can also verify it from the logs. But somehow guest is getting the old ACPI values for TPM which is not acceptable to Windows.
Just to be sure, I also verified the SeaBIOS code and couldn't find any link to this table.
Here is the patch that I applied based on the link above:
if (misc->tpm_version != TPM_VERSION_UNSPEC) {
ACPI_BUILD_DPRINTF("TPM: add MMIO\n");
dev = aml_device("TPM");
aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C31")));
aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
crs = aml_resource_template();
aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
aml_append(dev, aml_name_decl("_CRS", crs));
aml_append(sb_scope, dev);
}
aml_append(ssdt, sb_scope);
logs once I start qemu:
CPI_BUILD: init ACPI tables
ACPI_BUILD: TPM: add MMIO
ACPI_BUILD: init ACPI tables
ACPI_BUILD: TPM: add MMIO
tpm_tis: read.4(00000f00) = 00011014
tpm_tis: write.1(00000008) = 00000000
tpm_tis: read.1(00000000) = 00000081
Commands to start vTPM:
swtpm_cuse -M 260 -m 1 -n vtpm0
qemu-system-x86_64 -enable-kvm -m 1024 -boot d -bios bios.bin -boot menu=on -tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm0 -device tpm-tis,tpmdev=tpm0 win.img
Please suggest if I am missing anything .
Thanks
Anshul Makkar
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-21 8:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 17:42 [Qemu-devel] CUSE-TPM : Win 10 reports TPM device doesn't have sufficient resources anshul makkar
2017-04-18 18:46 ` Stefan Berger
2017-04-21 8:03 ` Anshul Makkar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.