qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, Auger Eric <eric.auger@redhat.com>,
	marcandre.lureau@redhat.com, pbonzini@redhat.com,
	philmd@redhat.com, mkedzier@redhat.com
Subject: Re: [PATCH v3 5/8] acpi: Enable TPM IRQ
Date: Thu, 18 Jun 2020 16:57:16 -0400	[thread overview]
Message-ID: <b339f310-a54c-7816-e5d1-f8183b3aaa0d@linux.ibm.com> (raw)
In-Reply-To: <20200618161045-mutt-send-email-mst@kernel.org>

On 6/18/20 4:12 PM, Michael S. Tsirkin wrote:
> On Wed, Jun 17, 2020 at 07:59:51AM -0400, Stefan Berger wrote:
>> On 6/17/20 4:22 AM, Auger Eric wrote:
>>> Hi Stefan,
>>>
>>> On 6/16/20 10:57 PM, Stefan Berger wrote:
>>>> From: Stefan Berger <stefanb@linux.ibm.com>
>>>>
>>>> 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.
>>>>
>>>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>>>> CC: Michael S. Tsirkin <mst@redhat.com>
>>>> ---
>>>>    hw/i386/acpi-build.c  | 11 +++++------
>>>>    include/hw/acpi/tpm.h |  2 +-
>>>>    2 files changed, 6 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
>>>> index 900f786d08..bb9a7f8497 100644
>>>> --- a/hw/i386/acpi-build.c
>>>> +++ b/hw/i386/acpi-build.c
>>>> @@ -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) {
>>> Out of curiosity what is the goal to expose the irq num as a property
>>> settable by the end-user if only 13 is known to work in all cases. At
>>> least shouldn't we warn the end-user in case he attempts to change the
>>> default value?
>> For Windows only IRQ 13 works (and I am not sure whether this has always
>> been like this), Linux accepts several other ones. As for exposing it to the
>> end-user, I may have taken this from soundblaster (sb16.c), which also
>> exposes it. If someone plays around with the irq numbers I would say they
>> must have some more Pc knowledge than  just trying random numbers.
>>
>>
>>    Stefan
> So is this useful to anyone? If no I'd say drop it.


So we can remove command line options?


> I'm guessing sb16 has it since it is useful for running extremely old OSes which might
> have weird quirks for a specific hardware.
>



  reply	other threads:[~2020-06-18 20:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 20:57 [PATCH v3 0/8] tpm: Enable usage of TPM TIS with interrupts Stefan Berger
2020-06-16 20:57 ` [PATCH v3 1/8] tpm_tis: Allow lowering of IRQ also when locality is not active Stefan Berger
2020-06-17  7:37   ` Marc-André Lureau
2020-06-16 20:57 ` [PATCH v3 2/8] tpm: Extend TPMIfClass with get_irqnum() function Stefan Berger
2020-06-17  7:38   ` Marc-André Lureau
2020-06-16 20:57 ` [PATCH v3 3/8] tests: Temporarily ignore DSDT table differences Stefan Berger
2020-06-17  7:38   ` Marc-André Lureau
2020-06-16 20:57 ` [PATCH v3 4/8] tpm: Split TPM_TIS_IRQ into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ Stefan Berger
2020-06-17  7:39   ` Marc-André Lureau
2020-06-17  8:12   ` Auger Eric
2020-06-17 12:06     ` Stefan Berger
2020-06-17 13:09       ` Auger Eric
2020-06-16 20:57 ` [PATCH v3 5/8] acpi: Enable TPM IRQ Stefan Berger
2020-06-17  7:39   ` Marc-André Lureau
2020-06-17  8:22   ` Auger Eric
2020-06-17 11:59     ` Stefan Berger
2020-06-18 20:12       ` Michael S. Tsirkin
2020-06-18 20:57         ` Stefan Berger [this message]
2020-06-16 20:57 ` [PATCH v3 6/8] tests: Add updated DSDT Stefan Berger
2020-06-17  7:40   ` Marc-André Lureau
2020-06-16 20:57 ` [PATCH v3 7/8] tpm: Guard irq related ops in case interrupts are disabled Stefan Berger
2020-06-16 20:57 ` [PATCH v3 8/8] tpm: Disable interrupt support for TIS on sysbus Stefan Berger
2020-06-17  7:39   ` Marc-André Lureau
2020-06-16 22:58 ` [PATCH v3 0/8] tpm: Enable usage of TPM TIS with interrupts no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b339f310-a54c-7816-e5d1-f8183b3aaa0d@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=eric.auger@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mkedzier@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).