tpm: Enable usage of TPM TIS with interrupts
v4 cover tpm: Enable usage of TPM TIS with interrupts
This series of patches enables the usage of the TPM TIS with interrupts. We use the unused IRQ 13, which is the only one accepted by Windows.
Stefan
v3->v4:
- Changed TPM_IRQ_DISABLED from -1 to ~0
v2->v3:
- Extended series to disable IRQ for TIS on sysbus
v1->v2:
- Added updated DSDT
Stefan Berger (8):
tpm_tis: Allow lowering of IRQ also when locality is not active
tpm: Extend TPMIfClass with get_irqnum() function
tests: Temporarily ignore DSDT table differences
tpm: Split TPM_TIS_IRQ into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ
acpi: Enable TPM IRQ
tests: Add updated DSDT
tpm: Guard irq related ops in case interrupts are disabled
tpm: Disable interrupt support for TIS on sysbus
hw/i386/acpi-build.c | 11 +++++------ hw/tpm/tpm_tis_common.c | 12 +++++++++--- hw/tpm/tpm_tis_isa.c | 17 ++++++++++++++--- hw/tpm/tpm_tis_sysbus.c | 12 +++++++++++- include/hw/acpi/tpm.h | 3 ++- include/sysemu/tpm.h | 12 ++++++++++++ tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes 7 files changed, 53 insertions(+), 14 deletions(-)
Signature · 1 line
2.24.1
PATCH v4 1/8 tpm_tis: Allow lowering of IRQ also when locality is not active
From: Stefan Berger <[email protected]>
This patch fixes a bug that occurs when using interrupts. It allows to lower the IRQ also when a locality is not active.
Message-id: [email protected]
--- hw/tpm/tpm_tis_common.c | 4 ---- 1 file changed, 4 deletions(-)
hw/tpm/tpm_tis_common.c +0 -4
@@ -601,10 +601,6 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,/* hard wired -- ignore */ break ;case TPM_TIS_REG_INT_STATUS : -if (s->active_locty != locty) { -break ; - } -/* clearing of interrupt flags */ if (((val &TPM_TIS_INTERRUPTS_SUPPORTED )) && (s->loc[locty].ints &TPM_TIS_INTERRUPTS_SUPPORTED )) {
Signature · 1 line
2.24.1
PATCH v4 2/8 tpm: Extend TPMIfClass with get_irqnum() function
In reply to Stefan BergerFrom: Stefan Berger <[email protected]>
Implement get_irqnum() as part of the TPMIfClass to get the assigned IRQ number or TPM_IRQ_DISABLED (~0) in case IRQs cannot be used.
Message-id: [email protected]
--- hw/tpm/tpm_tis_isa.c | 9 +++++++++ hw/tpm/tpm_tis_sysbus.c | 9 +++++++++ include/sysemu/tpm.h | 12 ++++++++++++ 3 files changed, 30 insertions(+)
hw/tpm/tpm_tis_isa.c +9 -0
@@ -80,6 +80,14 @@ static enum TPMVersion tpm_tis_isa_get_tpm_version(TPMIf *ti)return tpm_tis_get_tpm_version (s); } +static int8_t tpm_tis_isa_get_irqnum (TPMIf *ti) +{ +TPMStateISA *isadev =TPM_TIS_ISA (ti); +TPMState *s = &isadev->state; + +return s->irq_num; +} +static void tpm_tis_isa_reset (DeviceState *dev) {TPMStateISA *isadev =TPM_TIS_ISA (dev);
@@ -148,6 +156,7 @@ static void tpm_tis_isa_class_init(ObjectClass *klass, void *data) dc->reset = tpm_tis_isa_reset; tc->request_completed = tpm_tis_isa_request_completed; tc->get_version = tpm_tis_isa_get_tpm_version; + tc->get_irqnum = tpm_tis_isa_get_irqnum; }static const TypeInfo tpm_tis_isa_info = {
hw/tpm/tpm_tis_sysbus.c +9 -0
@@ -80,6 +80,14 @@ static enum TPMVersion tpm_tis_sysbus_get_tpm_version(TPMIf *ti)return tpm_tis_get_tpm_version (s); } +static int8_t tpm_tis_sysbus_get_irqnum (TPMIf *ti) +{ +TPMStateSysBus *sbdev =TPM_TIS_SYSBUS (ti); +TPMState *s = &sbdev->state; + +return s->irq_num; +} +static void tpm_tis_sysbus_reset (DeviceState *dev) {TPMStateSysBus *sbdev =TPM_TIS_SYSBUS (dev);
@@ -137,6 +145,7 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data) dc->reset = tpm_tis_sysbus_reset; tc->request_completed = tpm_tis_sysbus_request_completed; tc->get_version = tpm_tis_sysbus_get_tpm_version; + tc->get_irqnum = tpm_tis_sysbus_get_irqnum; }static const TypeInfo tpm_tis_sysbus_info = {
include/sysemu/tpm.h +12 -0
@@ -25,6 +25,8 @@ typedef enum TPMVersion {TPM_VERSION_2_0 =2 , } TPMVersion; +#define TPM_IRQ_DISABLED ~0 +#define TYPE_TPM_IF "tpm-if"#define TPM_IF_CLASS (klass) \ OBJECT_CLASS_CHECK(TPMIfClass, (klass), TYPE_TPM_IF)
@@ -41,6 +43,7 @@ typedef struct TPMIfClass {enum TpmModel model;void (*request_completed)(TPMIf *obj,int ret);enum TPMVersion (*get_version)(TPMIf *obj); +int8_t (*get_irqnum)(TPMIf *obj); } TPMIfClass;#define TYPE_TPM_TIS_ISA "tpm-tis"
@@ -74,4 +77,13 @@ static inline TPMVersion tpm_get_version(TPMIf *ti) return TPM_IF_GET_CLASS(ti)->get_version(ti); } +static inline int8_t tpm_get_irqnum (TPMIf *ti) +{ +if (!ti || !TPM_IF_GET_CLASS (ti)->get_irqnum) { +return TPM_IRQ_DISABLED ; + } + +return TPM_IF_GET_CLASS (ti)->get_irqnum (ti); +} +#endif /* QEMU_TPM_H */
Signature · 1 line
2.24.1
Re: [PATCH v4 2/8] tpm: Extend TPMIfClass with get_irqnum() function
Hi Stefan,
Quoted 8 lines · Stefan Berger
From: Stefan Berger <[email protected]>
Implement
get_irqnum()as part of the TPMIfClass to get the assigned IRQ number orTPM_IRQ_DISABLED(~0) in case IRQs cannot be used.Signed-off-by Stefan Berger <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>Message-id: [email protected]
Thanks
Eric
Quoted 96 lines
--- hw/tpm/tpm_tis_isa.c | 9 +++++++++ hw/tpm/tpm_tis_sysbus.c | 9 +++++++++ include/sysemu/tpm.h | 12 ++++++++++++ 3 files changed, 30 insertions(+)hw/tpm/tpm_tis_isa.c +9
-0@@ -80,6 +80,14 @@ static enum TPMVersion tpm_tis_isa_get_tpm_version(TPMIf *ti)return tpm_tis_get_tpm_version (s); } +static int8_t tpm_tis_isa_get_irqnum (TPMIf *ti) +{ +TPMStateISA *isadev =TPM_TIS_ISA (ti); +TPMState *s = &isadev->state; + +return s->irq_num; +} +static void tpm_tis_isa_reset (DeviceState *dev) {TPMStateISA *isadev =TPM_TIS_ISA (dev);@@ -148,6 +156,7 @@ static void tpm_tis_isa_class_init(ObjectClass *klass, void *data) dc->reset = tpm_tis_isa_reset; tc->request_completed = tpm_tis_isa_request_completed; tc->get_version = tpm_tis_isa_get_tpm_version; + tc->get_irqnum = tpm_tis_isa_get_irqnum; }static const TypeInfo tpm_tis_isa_info = {hw/tpm/tpm_tis_sysbus.c +9
-0@@ -80,6 +80,14 @@ static enum TPMVersion tpm_tis_sysbus_get_tpm_version(TPMIf *ti)return tpm_tis_get_tpm_version (s); } +static int8_t tpm_tis_sysbus_get_irqnum (TPMIf *ti) +{ +TPMStateSysBus *sbdev =TPM_TIS_SYSBUS (ti); +TPMState *s = &sbdev->state; + +return s->irq_num; +} +static void tpm_tis_sysbus_reset (DeviceState *dev) {TPMStateSysBus *sbdev =TPM_TIS_SYSBUS (dev);@@ -137,6 +145,7 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data) dc->reset = tpm_tis_sysbus_reset; tc->request_completed = tpm_tis_sysbus_request_completed; tc->get_version = tpm_tis_sysbus_get_tpm_version; + tc->get_irqnum = tpm_tis_sysbus_get_irqnum; }static const TypeInfo tpm_tis_sysbus_info = {include/sysemu/tpm.h +12
-0@@ -25,6 +25,8 @@ typedef enum TPMVersion {TPM_VERSION_2_0 =2 , } TPMVersion; +#define TPM_IRQ_DISABLED ~0 +#define TYPE_TPM_IF "tpm-if"#define TPM_IF_CLASS (klass) \ OBJECT_CLASS_CHECK(TPMIfClass, (klass), TYPE_TPM_IF)@@ -41,6 +43,7 @@ typedef struct TPMIfClass {enum TpmModel model;void (*request_completed)(TPMIf *obj,int ret);enum TPMVersion (*get_version)(TPMIf *obj); +int8_t (*get_irqnum)(TPMIf *obj); } TPMIfClass;#define TYPE_TPM_TIS_ISA "tpm-tis"@@ -74,4 +77,13 @@ static inline TPMVersion tpm_get_version(TPMIf *ti) return TPM_IF_GET_CLASS(ti)->get_version(ti); } +static inline int8_t tpm_get_irqnum (TPMIf *ti) +{ +if (!ti || !TPM_IF_GET_CLASS (ti)->get_irqnum) { +return TPM_IRQ_DISABLED ; + } + +return TPM_IF_GET_CLASS (ti)->get_irqnum (ti); +} +#endif /* QEMU_TPM_H */
PATCH v4 3/8 tests: Temporarily ignore DSDT table differences
In reply to Stefan BergerIgnore DSDT table differences before enabling IRQ support for TPM.
Message-id: [email protected]
CC: Michael S. Tsirkin <[email protected]>
--- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test-allowed-diff.h +1 -0
@@ -1 +1,2 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.tis",
Signature · 1 line
2.24.1
PATCH v4 4/8 tpm: Split TPM_TIS_IRQ into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ
In reply to Stefan BergerBefore the enablement of interrupts on PCs, split the TPM_TIS_IRQ into TPM_TIS_ISA_IRQ for PCs and TPM_TIS_SYSBUS_IRQ for ARM.
Message-id: [email protected]
--- hw/tpm/tpm_tis_isa.c | 2 +- hw/tpm/tpm_tis_sysbus.c | 3 ++- include/hw/acpi/tpm.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
hw/tpm/tpm_tis_isa.c +1 -1
@@ -97,7 +97,7 @@ static void tpm_tis_isa_reset(DeviceState *dev) }static Property tpm_tis_isa_properties[] = { -DEFINE_PROP_UINT32 ("irq" , TPMStateISA, state.irq_num,TPM_TIS_IRQ ), +DEFINE_PROP_UINT32 ("irq" , TPMStateISA, state.irq_num,TPM_TIS_ISA_IRQ ),DEFINE_PROP_TPMBE ("tpmdev" , TPMStateISA, state.be_driver),DEFINE_PROP_BOOL ("ppi" , TPMStateISA, state.ppi_enabled, true),DEFINE_PROP_END_OF_LIST (),
hw/tpm/tpm_tis_sysbus.c +2 -1
@@ -97,7 +97,8 @@ static void tpm_tis_sysbus_reset(DeviceState *dev) }static Property tpm_tis_sysbus_properties[] = { -DEFINE_PROP_UINT32 ("irq" , TPMStateSysBus, state.irq_num,TPM_TIS_IRQ ), +DEFINE_PROP_UINT32 ("irq" , TPMStateSysBus, state.irq_num, +TPM_TIS_SYSBUS_IRQ ),DEFINE_PROP_TPMBE ("tpmdev" , TPMStateSysBus, state.be_driver),DEFINE_PROP_BOOL ("ppi" , TPMStateSysBus, state.ppi_enabled, false),DEFINE_PROP_END_OF_LIST (),
include/hw/acpi/tpm.h +2 -1
@@ -24,7 +24,8 @@#define TPM_TIS_ADDR_BASE 0xFED40000#define TPM_TIS_ADDR_SIZE 0x5000 -#define TPM_TIS_IRQ 5 +#define TPM_TIS_ISA_IRQ 5 +#define TPM_TIS_SYSBUS_IRQ 5#define TPM_TIS_NUM_LOCALITIES 5/* per spec */ #define TPM_TIS_LOCALITY_SHIFT 12
Signature · 1 line
2.24.1
Re: [PATCH v4 4/8] tpm: Split TPM_TIS_IRQ into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ
Hi Stefan,
Quoted 6 lines · Stefan Berger
Before the enablement of interrupts on PCs, split the
TPM_TIS_IRQintoTPM_TIS_ISA_IRQfor PCs andTPM_TIS_SYSBUS_IRQfor ARM.Signed-off-by Stefan Berger <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>Message-id: [email protected]
Thanks
Eric
Quoted 48 lines
--- hw/tpm/tpm_tis_isa.c | 2 +- hw/tpm/tpm_tis_sysbus.c | 3 ++- include/hw/acpi/tpm.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)hw/tpm/tpm_tis_isa.c +1
-1@@ -97,7 +97,7 @@ static void tpm_tis_isa_reset(DeviceState *dev) }static Property tpm_tis_isa_properties[] = { -DEFINE_PROP_UINT32 ("irq" , TPMStateISA, state.irq_num,TPM_TIS_IRQ ), +DEFINE_PROP_UINT32 ("irq" , TPMStateISA, state.irq_num,TPM_TIS_ISA_IRQ ),DEFINE_PROP_TPMBE ("tpmdev" , TPMStateISA, state.be_driver),DEFINE_PROP_BOOL ("ppi" , TPMStateISA, state.ppi_enabled, true),DEFINE_PROP_END_OF_LIST (),hw/tpm/tpm_tis_sysbus.c +2
-1@@ -97,7 +97,8 @@ static void tpm_tis_sysbus_reset(DeviceState *dev) }static Property tpm_tis_sysbus_properties[] = { -DEFINE_PROP_UINT32 ("irq" , TPMStateSysBus, state.irq_num,TPM_TIS_IRQ ), +DEFINE_PROP_UINT32 ("irq" , TPMStateSysBus, state.irq_num, +TPM_TIS_SYSBUS_IRQ ),DEFINE_PROP_TPMBE ("tpmdev" , TPMStateSysBus, state.be_driver),DEFINE_PROP_BOOL ("ppi" , TPMStateSysBus, state.ppi_enabled, false),DEFINE_PROP_END_OF_LIST (),include/hw/acpi/tpm.h +2
-1@@ -24,7 +24,8 @@#define TPM_TIS_ADDR_BASE 0xFED40000#define TPM_TIS_ADDR_SIZE 0x5000 -#define TPM_TIS_IRQ 5 +#define TPM_TIS_ISA_IRQ 5 +#define TPM_TIS_SYSBUS_IRQ 5#define TPM_TIS_NUM_LOCALITIES 5/* per spec */ #define TPM_TIS_LOCALITY_SHIFT 12
PATCH v4 5/8 acpi: Enable TPM IRQ
In reply to Stefan BergerFrom: Stefan Berger <[email protected]>
Move the TPM TIS IRQ to unused IRQ 13, which is the only one accepted by Windows. Query for the TPM's irq number and enable the TPM IRQ unless TPM_IRQ_DISABLED is returned.
Message-id: [email protected]
CC: Michael S. Tsirkin <[email protected]>
--- hw/i386/acpi-build.c | 11 +++++------ include/hw/acpi/tpm.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-)
hw/i386/acpi-build.c +5 -6
@@ -2021,6 +2021,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,build_append_pci_bus_devices (scope, bus, pm->pcihp_bridge_en);if (TPM_IS_TIS_ISA (tpm)) { +int8_t irq =tpm_get_irqnum (tpm);if (misc->tpm_version ==TPM_VERSION_2_0 ) { dev =aml_device ("TPM" ); aml_append(dev, aml_name_decl("_HID",
@@ -2035,12 +2036,10 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, crs =aml_resource_template ();aml_append (crs,aml_memory32_fixed (TPM_TIS_ADDR_BASE ,TPM_TIS_ADDR_SIZE ,AML_READ_WRITE )); -/* -FIXME: TPM_TIS_IRQ=5 conflicts with PNP0C0F irqs, -Rewrite to take IRQ from TPM device model and -fix default IRQ value there to use some unused IRQ -*/ -/* aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ)); */ + +if (irq !=TPM_IRQ_DISABLED ) { +aml_append (crs,aml_irq_no_flags (irq)); + }aml_append (dev,aml_name_decl ("_CRS" , crs));tpm_build_ppi_acpi (tpm, dev);
include/hw/acpi/tpm.h +1 -1
@@ -24,7 +24,7 @@#define TPM_TIS_ADDR_BASE 0xFED40000#define TPM_TIS_ADDR_SIZE 0x5000 -#define TPM_TIS_ISA_IRQ 5 +#define TPM_TIS_ISA_IRQ 13/* only one possible */ #define TPM_TIS_SYSBUS_IRQ 5#define TPM_TIS_NUM_LOCALITIES 5/* per spec */
Signature · 1 line
2.24.1
Re: [PATCH v4 5/8] acpi: Enable TPM IRQ
Hi,
Quoted 10 lines · Stefan Berger
From: Stefan Berger <[email protected]>
Move the TPM TIS IRQ to unused IRQ 13, which is the only one accepted by Windows. Query for the TPM's irq number and enable the TPM IRQ unless
TPM_IRQ_DISABLEDis returned.Signed-off-by Stefan Berger <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>Message-id: [email protected]
CC: Michael S. Tsirkin <[email protected]>
Eric
Quoted 48 lines
--- hw/i386/acpi-build.c | 11 +++++------ include/hw/acpi/tpm.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-)hw/i386/acpi-build.c +5
-6@@ -2021,6 +2021,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,build_append_pci_bus_devices (scope, bus, pm->pcihp_bridge_en);if (TPM_IS_TIS_ISA (tpm)) { +int8_t irq =tpm_get_irqnum (tpm);if (misc->tpm_version ==TPM_VERSION_2_0 ) { dev =aml_device ("TPM" ); aml_append(dev, aml_name_decl("_HID",@@ -2035,12 +2036,10 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, crs =aml_resource_template ();aml_append (crs,aml_memory32_fixed (TPM_TIS_ADDR_BASE ,TPM_TIS_ADDR_SIZE ,AML_READ_WRITE )); -/* -FIXME: TPM_TIS_IRQ=5 conflicts with PNP0C0F irqs, -Rewrite to take IRQ from TPM device model and -fix default IRQ value there to use some unused IRQ -*/ -/* aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ)); */ + +if (irq !=TPM_IRQ_DISABLED ) { +aml_append (crs,aml_irq_no_flags (irq)); + }aml_append (dev,aml_name_decl ("_CRS" , crs));tpm_build_ppi_acpi (tpm, dev);include/hw/acpi/tpm.h +1
-1@@ -24,7 +24,7 @@#define TPM_TIS_ADDR_BASE 0xFED40000#define TPM_TIS_ADDR_SIZE 0x5000 -#define TPM_TIS_ISA_IRQ 5 +#define TPM_TIS_ISA_IRQ 13/* only one possible */ #define TPM_TIS_SYSBUS_IRQ 5#define TPM_TIS_NUM_LOCALITIES 5/* per spec */
Re: [PATCH v4 5/8] acpi: Enable TPM IRQ
In reply to Stefan BergerQuoted 10 lines · On Wed, 17 Jun 2020 10:23:02 -0400 Stefan Berger <[email protected]>…
From: Stefan Berger <[email protected]>
Move the TPM TIS IRQ to unused IRQ 13, which is the only one accepted by Windows. Query for the TPM's irq number and enable the TPM IRQ unless
TPM_IRQ_DISABLEDis returned.Signed-off-by Stefan Berger <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>Message-id: [email protected]
CC: Michael S. Tsirkin <[email protected]>
Quoted 47 lines
--- hw/i386/acpi-build.c | 11 +++++------ include/hw/acpi/tpm.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-)hw/i386/acpi-build.c +5
-6@@ -2021,6 +2021,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,build_append_pci_bus_devices (scope, bus, pm->pcihp_bridge_en);if (TPM_IS_TIS_ISA (tpm)) { +int8_t irq =tpm_get_irqnum (tpm);if (misc->tpm_version ==TPM_VERSION_2_0 ) { dev =aml_device ("TPM" ); aml_append(dev, aml_name_decl("_HID",@@ -2035,12 +2036,10 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, crs =aml_resource_template ();aml_append (crs,aml_memory32_fixed (TPM_TIS_ADDR_BASE ,TPM_TIS_ADDR_SIZE ,AML_READ_WRITE )); -/* -FIXME: TPM_TIS_IRQ=5 conflicts with PNP0C0F irqs, -Rewrite to take IRQ from TPM device model and -fix default IRQ value there to use some unused IRQ -*/ -/* aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ)); */ + +if (irq !=TPM_IRQ_DISABLED ) { +aml_append (crs,aml_irq_no_flags (irq)); + }aml_append (dev,aml_name_decl ("_CRS" , crs));tpm_build_ppi_acpi (tpm, dev);include/hw/acpi/tpm.h +1
-1@@ -24,7 +24,7 @@#define TPM_TIS_ADDR_BASE 0xFED40000#define TPM_TIS_ADDR_SIZE 0x5000 -#define TPM_TIS_ISA_IRQ 5 +#define TPM_TIS_ISA_IRQ 13/* only one possible */ #define TPM_TIS_SYSBUS_IRQ 5#define TPM_TIS_NUM_LOCALITIES 5/* per spec */
PATCH v4 6/8 tests: Add updated DSDT
In reply to Stefan BergerAdd the updated DSDT following the interrupt enablement.
@@ -5,13 +5,13 @@
*
* Disassembling to symbolic ASL+ operators
*
- * Disassembly of tests/data/acpi/q35/DSDT.tis, Mon Jun 15 09:57:05 2020
+ * Disassembly of /tmp/aml-Y77YL0, Mon Jun 15 09:57:05 2020 *
* Original Table Header:
* Signature "DSDT"
- * Length 0x000020A5 (8357)
+ * Length 0x000020A8 (8360)
* Revision 0x01 **** 32-bit table (V1), no 64-bit math support
- * Checksum 0xAD
+ * Checksum 0x77
* OEM ID "BOCHS "
* OEM Table ID "BXPCDSDT"
* OEM Revision 0x00000001 (1)
@@ -3162,6 +3162,8 @@
0xFED40000, // Address Base
0x00005000, // Address Length
)
+ IRQNoFlags ()
+ {13}
})
OperationRegion (TPP2, SystemMemory, 0xFED45100, 0x5A)
Field (TPP2, AnyAcc, NoLock, Preserve)**
Message-id: [email protected]
CC: Michael S. Tsirkin <[email protected]>
--- tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-)
tests/data/acpi/q35/DSDT.tis binary +0 -0
tests/qtest/bios-tables-test-allowed-diff.h +0 -1
@@ -1,2 +1 @@/* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/q35/DSDT.tis",
Signature · 1 line
2.24.1
Re: [PATCH v4 6/8] tests: Add updated DSDT
Hi,
Quoted 30 lines · Stefan Berger
Add the updated DSDT following the interrupt enablement.
(quoted diff) +5
-3@@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT.tis, Mon Jun 15 09:57:05 2020 + * Disassembly of /tmp/aml-Y77YL0, Mon Jun 15 09:57:05 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x000020A5 (8357) + * Length 0x000020A8 (8360) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xAD + * Checksum 0x77 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)@@ -3162,6 +3162,8 @@ 0xFED40000, // Address Base 0x00005000, // Address Length ) + IRQNoFlags () + {13} }) OperationRegion (TPP2, SystemMemory, 0xFED45100, 0x5A) Field (TPP2, AnyAcc, NoLock, Preserve)**
Quoted 3 lines
Signed-off-by Stefan Berger <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>Message-id: [email protected]
Eric
Quoted 25 lines
CC Michael S. Tsirkin <[email protected]>--- tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-)tests/data/acpi/q35/DSDT.tis binary +0
-0tests/qtest/bios-tables-test-allowed-diff.h +0
-1@@ -1,2 +1 @@/* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/q35/DSDT.tis",
Re: [PATCH v4 6/8] tests: Add updated DSDT
In reply to Stefan BergerQuoted 30 lines · On Wed, 17 Jun 2020 10:23:03 -0400 Stefan Berger <[email protected]>…
Add the updated DSDT following the interrupt enablement.
(quoted diff) +5
-3@@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT.tis, Mon Jun 15 09:57:05 2020 + * Disassembly of /tmp/aml-Y77YL0, Mon Jun 15 09:57:05 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x000020A5 (8357) + * Length 0x000020A8 (8360) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xAD + * Checksum 0x77 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)@@ -3162,6 +3162,8 @@ 0xFED40000, // Address Base 0x00005000, // Address Length ) + IRQNoFlags () + {13} }) OperationRegion (TPP2, SystemMemory, 0xFED45100, 0x5A) Field (TPP2, AnyAcc, NoLock, Preserve)**
Quoted 4 lines
Signed-off-by Stefan Berger <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>Message-id: [email protected]
CC: Michael S. Tsirkin <[email protected]>
Quoted 23 lines
--- tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-)tests/data/acpi/q35/DSDT.tis binary +0
-0tests/qtest/bios-tables-test-allowed-diff.h +0
-1@@ -1,2 +1 @@/* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/q35/DSDT.tis",
PATCH v4 7/8 tpm: Guard irq related ops in case interrupts are disabled
In reply to Stefan BergerCheck for irq_num having the value of TPM_IRQ_DISABLED before calling any IRQ related functions or allowing the user to try to enable interrupts. Explicitly allow the value of TPM_IRQ_DISABLED in irq_num.
Message-id: [email protected]
--- hw/tpm/tpm_tis_common.c | 12 +++++++++++- hw/tpm/tpm_tis_isa.c | 6 ++++-- 2 files changed, 15 insertions(+), 3 deletions(-)
hw/tpm/tpm_tis_common.c +11 -1
@@ -359,7 +359,11 @@ static uint64_t tpm_tis_mmio_read(void *opaque, hwaddr addr, val = s->loc[locty].inte;break ;case TPM_TIS_REG_INT_VECTOR : - val = s->irq_num; +if (s->irq_num !=TPM_IRQ_DISABLED ) { + val = s->irq_num; + }else { + val =0 ; + }break ;case TPM_TIS_REG_INT_STATUS : val = s->loc[locty].ints;
@@ -591,6 +595,9 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,if (s->active_locty != locty) {break ; } +if (s->irq_num ==TPM_IRQ_DISABLED ) { + val &= ~TPM_TIS_INT_ENABLED ; + } s->loc[locty].inte &= mask; s->loc[locty].inte |= (val & (TPM_TIS_INT_ENABLED |
@@ -601,6 +608,9 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,/* hard wired -- ignore */ break ;case TPM_TIS_REG_INT_STATUS : +if (s->irq_num ==TPM_IRQ_DISABLED ) { +break ; + }/* clearing of interrupt flags */ if (((val &TPM_TIS_INTERRUPTS_SUPPORTED )) && (s->loc[locty].ints &TPM_TIS_INTERRUPTS_SUPPORTED )) {
hw/tpm/tpm_tis_isa.c +4 -2
@@ -127,13 +127,15 @@ static void tpm_tis_isa_realizefn(DeviceState *dev, Error **errp)error_setg (errp,"'tpmdev' property is required" );return ; } -if (s->irq_num >15 ) { +if (s->irq_num >15 && s->irq_num !=TPM_IRQ_DISABLED ) {error_setg (errp,"IRQ %d is outside valid range of 0 to 15" , s->irq_num);return ; } -isa_init_irq (ISA_DEVICE (dev), &s->irq, s->irq_num); +if (s->irq_num !=TPM_IRQ_DISABLED ) { +isa_init_irq (ISA_DEVICE (dev), &s->irq, s->irq_num); + }memory_region_add_subregion (isa_address_space (ISA_DEVICE (dev)),TPM_TIS_ADDR_BASE , &s->mmio);
Signature · 1 line
2.24.1
Re: [PATCH v4 7/8] tpm: Guard irq related ops in case interrupts are disabled
Hi,
Quoted 6 lines · Stefan Berger
Check for
irq_numhaving the value ofTPM_IRQ_DISABLEDbefore calling any IRQ related functions or allowing the user to try to enable interrupts. Explicitly allow the value ofTPM_IRQ_DISABLEDinirq_num.Signed-off-by Stefan Berger <[email protected]>Message-id: [email protected]
Eric
Quoted 65 lines
--- hw/tpm/tpm_tis_common.c | 12 +++++++++++- hw/tpm/tpm_tis_isa.c | 6 ++++-- 2 files changed, 15 insertions(+), 3 deletions(-)hw/tpm/tpm_tis_common.c +11
-1@@ -359,7 +359,11 @@ static uint64_t tpm_tis_mmio_read(void *opaque, hwaddr addr, val = s->loc[locty].inte;break ;case TPM_TIS_REG_INT_VECTOR : - val = s->irq_num; +if (s->irq_num !=TPM_IRQ_DISABLED ) { + val = s->irq_num; + }else { + val =0 ; + }break ;case TPM_TIS_REG_INT_STATUS : val = s->loc[locty].ints;@@ -591,6 +595,9 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,if (s->active_locty != locty) {break ; } +if (s->irq_num ==TPM_IRQ_DISABLED ) { + val &= ~TPM_TIS_INT_ENABLED ; + } s->loc[locty].inte &= mask; s->loc[locty].inte |= (val & (TPM_TIS_INT_ENABLED |@@ -601,6 +608,9 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,/* hard wired -- ignore */ break ;case TPM_TIS_REG_INT_STATUS : +if (s->irq_num ==TPM_IRQ_DISABLED ) { +break ; + }/* clearing of interrupt flags */ if (((val &TPM_TIS_INTERRUPTS_SUPPORTED )) && (s->loc[locty].ints &TPM_TIS_INTERRUPTS_SUPPORTED )) {hw/tpm/tpm_tis_isa.c +4
-2@@ -127,13 +127,15 @@ static void tpm_tis_isa_realizefn(DeviceState *dev, Error **errp)error_setg (errp,"'tpmdev' property is required" );return ; } -if (s->irq_num >15 ) { +if (s->irq_num >15 && s->irq_num !=TPM_IRQ_DISABLED ) {error_setg (errp,"IRQ %d is outside valid range of 0 to 15" , s->irq_num);return ; } -isa_init_irq (ISA_DEVICE (dev), &s->irq, s->irq_num); +if (s->irq_num !=TPM_IRQ_DISABLED ) { +isa_init_irq (ISA_DEVICE (dev), &s->irq, s->irq_num); + }memory_region_add_subregion (isa_address_space (ISA_DEVICE (dev)),TPM_TIS_ADDR_BASE , &s->mmio);
PATCH v4 8/8 tpm: Disable interrupt support for TIS on sysbus
In reply to Stefan BergerDisable interrupt support for the TIS on sysbus.
Message-id: [email protected]
--- include/hw/acpi/tpm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/acpi/tpm.h +1 -1
@@ -25,7 +25,7 @@#define TPM_TIS_ADDR_SIZE 0x5000#define TPM_TIS_ISA_IRQ 13/* only one possible */ -#define TPM_TIS_SYSBUS_IRQ 5 +#define TPM_TIS_SYSBUS_IRQ TPM_IRQ_DISABLED#define TPM_TIS_NUM_LOCALITIES 5/* per spec */ #define TPM_TIS_LOCALITY_SHIFT 12
Signature · 1 line
2.24.1
Re: [PATCH v4 8/8] tpm: Disable interrupt support for TIS on sysbus
Hi,
Quoted 5 lines · Stefan Berger
Disable interrupt support for the TIS on sysbus.
Signed-off-by Stefan Berger <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>Message-id: [email protected]
Eric
Quoted 18 lines
--- include/hw/acpi/tpm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/hw/acpi/tpm.h +1
-1@@ -25,7 +25,7 @@#define TPM_TIS_ADDR_SIZE 0x5000#define TPM_TIS_ISA_IRQ 13/* only one possible */ -#define TPM_TIS_SYSBUS_IRQ 5 +#define TPM_TIS_SYSBUS_IRQ TPM_IRQ_DISABLED#define TPM_TIS_NUM_LOCALITIES 5/* per spec */ #define TPM_TIS_LOCALITY_SHIFT 12
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Subject: [PATCH v4 0/8] tpm: Enable usage of TPM TIS with interrupts
Type: series
Message-id: [email protected]
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
527f6a6 tpm: Disable interrupt support for TIS on sysbus 2409660 tpm: Guard irq related ops in case interrupts are disabled 727db5a tests: Add updated DSDT
9ae0b0d acpi: Enable TPM IRQ
62a659a tpm: Split TPM_TIS_IRQ into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ 4e3994a tests: Temporarily ignore DSDT table differences 651ddf0 tpm: Extend TPMIfClass with get_irqnum() function 9fe25b1 tpm_tis: Allow lowering of IRQ also when locality is not active
=== OUTPUT BEGIN ===
1/8 Checking commit 9fe25b11a231 (tpm_tis: Allow lowering of IRQ also when locality is not active) 2/8 Checking commit 651ddf03a413 (tpm: Extend TPMIfClass with get_irqnum() function)
ERROR: Macros with complex values should be enclosed in parenthesis
#77: FILE: include/sysemu/tpm.h:28:
+#define TPM_IRQ_DISABLED ~0
total: 1 errors, 0 warnings, 70 lines checked
Patch 2/8 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
3/8 Checking commit 4e3994ae9e45 (tests: Temporarily ignore DSDT table differences) 4/8 Checking commit 62a659ab5c12 (tpm: Split TPM_TIS_IRQ into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ) 5/8 Checking commit 9ae0b0d6f724 (acpi: Enable TPM IRQ)
6/8 Checking commit 727db5ac78ac (tests: Add updated DSDT)
7/8 Checking commit 240966001b86 (tpm: Guard irq related ops in case interrupts are disabled) 8/8 Checking commit 527f6a6fdb16 (tpm: Disable interrupt support for TIS on sysbus) === OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1 === TEST SCRIPT END ===
GEN docs/interop/qemu-qmp-ref.html GEN docs/interop/qemu-qmp-ref.txt GEN docs/interop/qemu-qmp-ref.7 /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) CC qga/commands.o CC qga/guest-agent-command-state.o CC qga/main.o --- AR libvhost-user.a GEN docs/interop/qemu-ga-ref.txt GEN docs/interop/qemu-ga-ref.7 /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) LINK qemu-keymap /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) LINK ivshmem-client LINK ivshmem-server AS pc-bios/optionrom/multiboot.o AS pc-bios/optionrom/linuxboot.o /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) CC pc-bios/optionrom/linuxboot_dma.o AS pc-bios/optionrom/pvh.o AS pc-bios/optionrom/kvmvapic.o --- BUILD pc-bios/optionrom/linuxboot_dma.raw BUILD pc-bios/optionrom/kvmvapic.raw SIGN pc-bios/optionrom/multiboot.bin /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) SIGN pc-bios/optionrom/linuxboot.bin SIGN pc-bios/optionrom/linuxboot_dma.bin LINK qemu-storage-daemon --- BUILD pc-bios/optionrom/pvh.img BUILD pc-bios/optionrom/pvh.raw LINK qemu-img
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
SIGN pc-bios/optionrom/pvh.bin/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK qemu-io
LINK qemu-edid/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK fsdev/virtfs-proxy-helper
LINK scsi/qemu-pr-helper/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK qemu-bridge-helper/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK virtiofsd/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK vhost-user-input/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK qemu-ga/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
GEN x86_64-softmmu/hmp-commands.h
GEN x86_64-softmmu/hmp-commands-info.h
GEN x86_64-softmmu/config-devices.h
---
CC x86_64-softmmu/hw/scsi/vhost-scsi.o
CC x86_64-softmmu/hw/scsi/vhost-user-scsi.o
CC x86_64-softmmu/hw/tpm/tpm_ppi.o
/tmp/qemu-test/src/fpu/softfloat.c:3365:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3423:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
absZ0 &= ~ ( ( (uint64_t) ( absZ1<<1 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3483:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
absZ0 &= ~(((uint64_t)(absZ1<<1) == 0) & roundNearestEven);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3606:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3760:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3987:21: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:4003:22: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:4273:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
zSig1 &= ~ ( ( zSig2 + zSig2 == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!8 errors generated.
make[1]: *** [/tmp/qemu-test/src/rules.mak:69: fpu/softfloat.o] Error 1
make[1]: *** Waiting for unfinished jobs..../tmp/qemu-test/src/migration/ram.c:919:45: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
xbzrle_counters.encoding_rate = UINT64_MAX;
~ ^~~~~~~~~~/usr/include/stdint.h:130:23: note: expanded from macro 'UINT64_MAX'
---
18446744073709551615UL
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [/tmp/qemu-test/src/rules.mak:69: migration/ram.o] Error 1
make: *** [Makefile:527: x86_64-softmmu/all] Error 2 Traceback (most recent call last):
File "./tests/docker/docker.py", line 669, in <module>
sys.exit(main())
---
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=1eb82116e25740a68f0f82e83cce66ad', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-42oji2ml/src/docker-src.2020-06-17-10.46.07.12769:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=1eb82116e25740a68f0f82e83cce66ad
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-42oji2ml/src'
make: *** [docker-run-test-debug@fedora] Error 2
real 4m7.834s
user 0m8.164s
The full log is available at
http://patchew.org/logs/[email protected]/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Hi Stefan,
Quoted 24 lines · Stefan Berger
This series of patches enables the usage of the TPM TIS with interrupts. We use the unused IRQ 13, which is the only one accepted by Windows.
Stefan
v3->v4:
- ChangedTPM_IRQ_DISABLEDfrom -1 to ~0
v2->v3:
- Extended series to disable IRQ for TIS on sysbus
v1->v2:
- Added updated DSDTStefan Berger (8):
tpm_tis: Allow lowering of IRQ also when locality is not active
tpm: Extend TPMIfClass withget_irqnum()function
tests: Temporarily ignore DSDT table differences
tpm: SplitTPM_TIS_IRQintoTPM_TIS_ISA_IRQandTPM_TIS_SYSBUS_IRQ
acpi: Enable TPM IRQ
tests: Add updated DSDT
tpm: Guard irq related ops in case interrupts are disabled
tpm: Disable interrupt support for TIS on sysbus
Quoted 9 lines
hw/i386/acpi-build.c | 11 +++++------ hw/tpm/tpm_tis_common.c | 12 +++++++++--- hw/tpm/tpm_tis_isa.c | 17 ++++++++++++++--- hw/tpm/tpm_tis_sysbus.c | 12 +++++++++++- include/hw/acpi/tpm.h | 3 ++- include/sysemu/tpm.h | 12 ++++++++++++ tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes 7 files changed, 53 insertions(+), 14 deletions(-)
I checked this series does not bring any regression on ARM TPM-TIS device. So if useful/relevant, feel free to add my T-b from the ARM pov.
Thanks
Eric
On 6/18/20 3:27 AM, Auger Eric wrote:
I have to defer this series since there are some things that don't work on the Linux level with IRQ 13 (edge) while they do work fine on the old IRQ 5 (festeoi). I know which changes to make to Linux so that it works on IRQ 13 as well, but I am not sure whether those changes are acceptable. So now we could upstream this one here:
[PATCH v4 4/8] tpm: Split TPM_TIS_IRQ into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ
Stefan
Quoted 45 lines
Hi Stefan,
Quoted 24 lines · Stefan Berger
This series of patches enables the usage of the TPM TIS with interrupts. We use the unused IRQ 13, which is the only one accepted by Windows.
Stefan
v3->v4:
- ChangedTPM_IRQ_DISABLEDfrom -1 to ~0
v2->v3:
- Extended series to disable IRQ for TIS on sysbus
v1->v2:
- Added updated DSDTStefan Berger (8):
tpm_tis: Allow lowering of IRQ also when locality is not active
tpm: Extend TPMIfClass withget_irqnum()function
tests: Temporarily ignore DSDT table differences
tpm: SplitTPM_TIS_IRQintoTPM_TIS_ISA_IRQandTPM_TIS_SYSBUS_IRQ
acpi: Enable TPM IRQ
tests: Add updated DSDT
tpm: Guard irq related ops in case interrupts are disabled
tpm: Disable interrupt support for TIS on sysbusQuoted 9 lines
hw/i386/acpi-build.c | 11 +++++------ hw/tpm/tpm_tis_common.c | 12 +++++++++--- hw/tpm/tpm_tis_isa.c | 17 ++++++++++++++--- hw/tpm/tpm_tis_sysbus.c | 12 +++++++++++- include/hw/acpi/tpm.h | 3 ++- include/sysemu/tpm.h | 12 ++++++++++++ tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes 7 files changed, 53 insertions(+), 14 deletions(-)I checked this series does not bring any regression on ARM TPM-TIS device. So if useful/relevant, feel free to add my T-b from the ARM pov.
Tested-by Eric Auger <[email protected]>Thanks
Eric
Quoted 4 lines · Stefan Berger
This series of patches enables the usage of the TPM TIS with interrupts. We use the unused IRQ 13, which is the only one accepted by Windows.
Stefan
ACPI parts:
How do we want this merged? TPM tree or mine?
Quoted 32 lines
v3->v4:
- ChangedTPM_IRQ_DISABLEDfrom -1 to ~0
v2->v3:
- Extended series to disable IRQ for TIS on sysbus
v1->v2:
- Added updated DSDTStefan Berger (8):
tpm_tis: Allow lowering of IRQ also when locality is not active
tpm: Extend TPMIfClass withget_irqnum()function
tests: Temporarily ignore DSDT table differences
tpm: SplitTPM_TIS_IRQintoTPM_TIS_ISA_IRQandTPM_TIS_SYSBUS_IRQ
acpi: Enable TPM IRQ
tests: Add updated DSDT
tpm: Guard irq related ops in case interrupts are disabled
tpm: Disable interrupt support for TIS on sysbushw/i386/acpi-build.c | 11 +++++------ hw/tpm/tpm_tis_common.c | 12 +++++++++--- hw/tpm/tpm_tis_isa.c | 17 ++++++++++++++--- hw/tpm/tpm_tis_sysbus.c | 12 +++++++++++- include/hw/acpi/tpm.h | 3 ++- include/sysemu/tpm.h | 12 ++++++++++++ tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes 7 files changed, 53 insertions(+), 14 deletions(-)Signature · 1 line
2.24.1
Stefan Berger
AppliedQuoted 11 lines · Michael S. Tsirkin
Quoted 4 lines · Stefan Berger
This series of patches enables the usage of the TPM TIS with interrupts. We use the unused IRQ 13, which is the only one accepted by Windows.
Stefan
ACPI parts:
Reviewed-by Michael S. Tsirkin <[email protected]>How do we want this merged? TPM tree or mine?
Queued it here: https://github.com/stefanberger/qemu-tpm/commits/tpm-next
Was going to send a PR later this week with this part. Will add your Rb-s.
Stefan
Quoted 33 lines
Quoted 33 lines
v3->v4:
- ChangedTPM_IRQ_DISABLEDfrom -1 to ~0
v2->v3:
- Extended series to disable IRQ for TIS on sysbus
v1->v2:
- Added updated DSDTStefan Berger (8):
tpm_tis: Allow lowering of IRQ also when locality is not active
tpm: Extend TPMIfClass withget_irqnum()function
tests: Temporarily ignore DSDT table differences
tpm: SplitTPM_TIS_IRQintoTPM_TIS_ISA_IRQandTPM_TIS_SYSBUS_IRQ
acpi: Enable TPM IRQ
tests: Add updated DSDT
tpm: Guard irq related ops in case interrupts are disabled
tpm: Disable interrupt support for TIS on sysbushw/i386/acpi-build.c | 11 +++++------ hw/tpm/tpm_tis_common.c | 12 +++++++++--- hw/tpm/tpm_tis_isa.c | 17 ++++++++++++++--- hw/tpm/tpm_tis_sysbus.c | 12 +++++++++++- include/hw/acpi/tpm.h | 3 ++- include/sysemu/tpm.h | 12 ++++++++++++ tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes 7 files changed, 53 insertions(+), 14 deletions(-)Signature · 1 line
2.24.1