qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Joelle van Dyne <j@getutm.app>,
	qemu-devel@nongnu.org, Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: Re: [PATCH 04/11] tpm_crb: use a single read-as-mem/write-as-mmio mapping
Date: Thu, 13 Jul 2023 13:16:36 -0400	[thread overview]
Message-ID: <c5b44af5-e737-d899-5ea1-3d7debe760a4@linux.ibm.com> (raw)
In-Reply-To: <CAFEAcA9Z5wHRuMmeogoyrN=C4OtoKObxNu58nQaOXdYwzq_gpw@mail.gmail.com>



On 7/13/23 13:07, Peter Maydell wrote:
> On Thu, 13 Jul 2023 at 17:54, Stefan Berger <stefanb@linux.ibm.com> wrote:
>>
>>
>>
>> On 7/13/23 11:55, Peter Maydell wrote:
>>> On Thu, 13 Jul 2023 at 16:46, Stefan Berger <stefanb@linux.ibm.com> wrote:
>>>> On 7/13/23 11:34, Peter Maydell wrote:
>>>>> On Thu, 13 Jul 2023 at 16:28, Stefan Berger <stefanb@linux.ibm.com> wrote:
>>>>>> On 7/13/23 10:50, Peter Maydell wrote:
>>>>>>> I'm not a super-fan of hacking around the fact that LDP
>>>>>>> to hardware registers isn't supported in specific device
>>>>>>> models, though...
>>>>>>
>>>>>> What does this mean for this effort here?
>>>>>
>>>>> Usually we say "fix the guest to not try to access hardware
>>>>> registers with silly load/store instruction types". The other
>>>>> option would be "put in a large amount of effort to support
>>>>> emulating those instructions in QEMU userspace when KVM/HVF/etc
>>>>> trap and punt them to us". For the last decade or so we have
>>>>> taken the first of these approaches :-)
>>>>
>>>> Is Microsoft likely to react to use telling them "fix the guest"?
>>>
>>> They have on occasion in the past, yes.
>>>
>>> The other outstanding question here is if this TPM device
>>> should be a sysbus one at all (i.e. not i2c), which might
>>> render this part moot.
>>
>> Does the aarch64 virt VM support an i2c bus? Would it support the aspeed i2c bus? Does Windows then accept this i2c bus? Maybe the faster answer comes via this device that Joelle presumably has working on AARCH64 Windows.
> 
> The aim is not "get Windows booting as fast as possible", though.
> It's to end up with a QEMU virt board that (a) is maintainable
> (b) is reasonably congruent with what real hardware does
> (c) works in a way that will also work with what other
> guest OSes are expecting.
> 
> I don't want to accept changes to the virt board that are
> hard to live with in future, because changing virt in
> non-backward compatible ways is painful.
> 

I guess the first point would be to decide whether to support an i2c bus on the virt board and then whether we can use the aspeed bus that we know that the tpm_tis_i2c device model works with but we don't know how Windows may react to it.

It seems sysbus is already supported there so ... we may have a 'match'?

     dev = qdev_new("arm-gicv2m");
     sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, vms->memmap[VIRT_GIC_V2M].base);
     qdev_prop_set_uint32(dev, "base-spi", irq);
     qdev_prop_set_uint32(dev, "num-spi", NUM_GICV2M_SPIS);
     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);


    Stefan

> thanks
> -- PMM


  reply	other threads:[~2023-07-13 17:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  3:51 [PATCH 00/11] tpm: introduce TPM CRB SysBus device Joelle van Dyne
2023-07-13  3:51 ` [PATCH 01/11] tpm_crb: refactor common code Joelle van Dyne
2023-07-13 13:22   ` Stefan Berger
2023-07-13  3:51 ` [PATCH 02/11] tpm_crb: CTRL_RSP_ADDR is 64-bits wide Joelle van Dyne
2023-07-13 15:31   ` Stefan Berger
2023-07-13  3:51 ` [PATCH 03/11] tpm_ppi: refactor memory space initialization Joelle van Dyne
2023-07-13 16:00   ` Stefan Berger
2023-07-13  3:51 ` [PATCH 04/11] tpm_crb: use a single read-as-mem/write-as-mmio mapping Joelle van Dyne
2023-07-13 14:17   ` Stefan Berger
2023-07-13 14:50     ` Peter Maydell
2023-07-13 15:28       ` Stefan Berger
2023-07-13 15:34         ` Peter Maydell
2023-07-13 15:46           ` Stefan Berger
2023-07-13 15:55             ` Peter Maydell
2023-07-13 16:53               ` Stefan Berger
2023-07-13 17:07                 ` Peter Maydell
2023-07-13 17:16                   ` Stefan Berger [this message]
2023-07-13 17:18                     ` Peter Maydell
2023-07-13 18:43                       ` Stefan Berger
2023-07-14 10:05                         ` Peter Maydell
2023-07-14 11:56                           ` Stefan Berger
2023-07-14 17:38                             ` Joelle van Dyne
2023-07-13  3:51 ` [PATCH 05/11] tpm_crb: use the ISA bus Joelle van Dyne
2023-07-13 18:35   ` Stefan Berger
2023-07-13  3:51 ` [PATCH 06/11] tpm_crb: move ACPI table building to device interface Joelle van Dyne
2023-07-13 16:08   ` Stefan Berger
2023-07-13 18:10     ` Joelle van Dyne
2023-07-13 18:30       ` Stefan Berger
2023-07-13  3:51 ` [PATCH 07/11] hw/arm/virt: add plug handler for TPM on SysBus Joelle van Dyne
2023-07-13 13:13   ` Stefan Berger
2023-07-13 15:31   ` Peter Maydell
2023-07-13 18:07     ` Joelle van Dyne
2023-07-13  3:51 ` [PATCH 08/11] hw/loongarch/virt: " Joelle van Dyne
2023-07-13  3:51 ` [PATCH 09/11] tpm_tis_sysbus: fix crash when PPI is enabled Joelle van Dyne
2023-07-13 16:49   ` Stefan Berger
2023-07-13 18:15     ` Joelle van Dyne
2023-07-13 18:31       ` Stefan Berger
2023-07-13  3:51 ` [PATCH 10/11] tpm_tis_sysbus: move DSDT AML generation to device Joelle van Dyne
2023-07-13  3:51 ` [PATCH 11/11] tpm_crb_sysbus: introduce TPM CRB SysBus device Joelle van Dyne
2023-07-13 13:07 ` [PATCH 00/11] tpm: " Stefan Berger
2023-07-13 17:35   ` Joelle van Dyne

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=c5b44af5-e737-d899-5ea1-3d7debe760a4@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=j@getutm.app \
    --cc=peter.maydell@linaro.org \
    --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).