From: Auger Eric <eric.auger@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Eduardo Habkost <ehabkost@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] hw: add compat machines for 5.1
Date: Mon, 27 Apr 2020 11:58:28 +0200 [thread overview]
Message-ID: <4166d3fc-58e9-405d-71a1-2270ced75e7d@redhat.com> (raw)
In-Reply-To: <20200427110609.36ecaac6.cohuck@redhat.com>
Hi Connie,
On 4/27/20 11:06 AM, Cornelia Huck wrote:
> On Mon, 27 Apr 2020 09:43:33 +0200
> Auger Eric <eric.auger@redhat.com> wrote:
>
>> Hi Connie,
>>
>> On 4/24/20 11:03 AM, Cornelia Huck wrote:
>>> Add 5.1 machine types for arm/i440fx/q35/s390x/spapr.
>>>
>>> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
>>> ---
>>>
>>> Still keeping the default cpu model version on x86 at v1.
>>>
>>> I'll queue this to my s390-next branch, as I'm planning to send a pull
>>> req as soon as 5.0 is out; if someone else wants to queue this, we'll
>>> figure it out :)
>>>
>>> ---
>>> hw/arm/virt.c | 9 ++++++++-
>>> hw/core/machine.c | 3 +++
>>> hw/i386/pc.c | 3 +++
>>> hw/i386/pc_piix.c | 14 +++++++++++++-
>>> hw/i386/pc_q35.c | 13 ++++++++++++-
>>> hw/ppc/spapr.c | 15 +++++++++++++--
>>> hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++-
>>> include/hw/boards.h | 3 +++
>>> include/hw/i386/pc.h | 3 +++
>>> 9 files changed, 71 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>>> index 7dc96abf72cf..5e84c09402dd 100644
>>> --- a/hw/arm/virt.c
>>> +++ b/hw/arm/virt.c
>>> @@ -2309,15 +2309,22 @@ static void machvirt_machine_init(void)
>>> }
>>> type_init(machvirt_machine_init);
>>>
>>> +static void virt_machine_5_1_options(MachineClass *mc)
>>> +{
>>> +}
>>> +DEFINE_VIRT_MACHINE_AS_LATEST(5, 1)
>>> +
>>> static void virt_machine_5_0_options(MachineClass *mc)
>>> {
>>> static GlobalProperty compat[] = {
>>> { TYPE_TPM_TIS_SYSBUS, "ppi", "false" },
>>> };
>>>
>>> + virt_machine_5_1_options(mc);
>>> + compat_props_add(mc->compat_props, hw_compat_5_0, hw_compat_5_0_len);
>>> compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
>> As spotted by patchew we need { TYPE_TPM_TIS_SYSBUS, "ppi", "false" } to
>> be applied for all machine types 5_0 onwards as our tpm-tis-device does
>> not support PPI. So I guess we need to move compat[] declaration outside
>> of virt_machine_5_0_options and call
>> "compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));"
>> for each virt_machine_5_*_options? Or is a misuse of compats?
>
> Ah, that was the error (I could not really make sense of it).
>
> So, if I understand it correctly, ppi needs to be disabled for all virt
> machines.
ppi property of tpm-tis-sysbus device needs to be disabled for all virt
machines whose version >= 5.0. tpm-tis-sysbus device is supported from
5.0 onwards.
Looking again at the code, I should rather set the default value of the
ppi property to false in tpm_tis_sysbus_properties. Before we shared the
same device with x86, hence the compat but now we have a separate one. I
guess that should work directly without the pain of that compat :-( Let
me check ...
Thanks
Eric
I think the correct way to do this would be to add the
> "compat" prop in virt_machine_class_init() (even if it is not strictly
> compat, as it always needs to be disabled). It can be removed there and
> added to a compat machine should support be added in the future.
>
> Or does anyone have a better idea?
>
>
next prev parent reply other threads:[~2020-04-27 10:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 9:03 [PATCH] hw: add compat machines for 5.1 Cornelia Huck
2020-04-24 11:03 ` no-reply
2020-04-26 0:59 ` David Gibson
2020-04-26 18:05 ` Michael S. Tsirkin
2020-04-27 7:43 ` Auger Eric
2020-04-27 9:06 ` Cornelia Huck
2020-04-27 9:58 ` Auger Eric [this message]
2020-04-27 10:09 ` Cornelia Huck
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=4166d3fc-58e9-405d-71a1-2270ced75e7d@redhat.com \
--to=eric.auger@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/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).