From: Cornelia Huck <cohuck@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org
Subject: Re: [PATCH 4/4] pc-bios/s390-ccw: Allow building with Clang, too
Date: Mon, 3 May 2021 11:14:57 +0200 [thread overview]
Message-ID: <20210503111457.6f8e3597.cohuck@redhat.com> (raw)
In-Reply-To: <87mttcdy4n.fsf@dusky.pond.sub.org>
On Mon, 03 May 2021 10:23:20 +0200
Markus Armbruster <armbru@redhat.com> wrote:
> David Hildenbrand <david@redhat.com> writes:
>
> > On 03.05.21 07:17, Thomas Huth wrote:
> >> On 03/05/2021 06.58, Markus Armbruster wrote:
> >>> Thomas Huth <thuth@redhat.com> writes:
> >>>
> >>>> Clang unfortunately does not support generating code for the z900
> >>>> architecture level and starts with the z10 instead. Thus to be able
> >>>> to support compiling with Clang, we have to check for the supported
> >>>> compiler flags. The disadvantage is of course that the bios image
> >>>> will only run with z10 guest CPUs upwards (which is what most people
> >>>> use anyway), so just in case let's also emit a warning in that case.
> >>>
> >>> What happens when you try to use this bios with an old CPU anyway?
> >>
> >> Interesting question. I was expecting the guest to crash since it would be
> >> using a CPU instruction that is not supported on the old CPU model. But I
> >> just gave it a try, and there was no crash. The guest booted just fine.
> >> Either Clang only emits instructions that work with the old z900 anyway, or
> >> our emulation in QEMU is imprecise and we allow newer instructions to be
> >> executed on old models, too.
> >
> > Yes, that's currently still done. We once thought about disabling that
> > (there was a patch from Richard), but decided against it because -- back
> > then -- the default QEMU model was still very basic and would have
> > essentially disabled all more recent instructions as default.
> >
> > We can most probably do that change soon as we have a "fairly new"
> > default QEMU CPU model. I can glue it to my z14 change.
>
> In case this makes the BIOS crash with old CPUs: when a guest refuses to
> start because the BIOS was compiled the wrong way for it, configure
> having told you so back then is not a nice user experience. Can we do
> better, with reasonable effort?
I fear the experience will be as bad as for any guest that is using
features from a newer cpu level (i.e. random crashes when the guest
actually tries to use that newer instruction.)
I see two options:
- Just try to start and hope that it works.
- Deprecate any cpu model older than z10.
Anyone have a better idea? I don't particularly like any of the two.
next prev parent reply other threads:[~2021-05-03 9:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-02 17:48 [PATCH 0/4] pc-bios/s390-ccw: Allow building with Clang, too Thomas Huth
2021-05-02 17:48 ` [PATCH 1/4] pc-bios/s390-ccw: Silence warning from Clang by marking panic() as noreturn Thomas Huth
2021-05-02 18:57 ` Philippe Mathieu-Daudé
2021-05-03 4:53 ` Thomas Huth
2021-05-03 7:40 ` Philippe Mathieu-Daudé
2021-05-03 4:56 ` Markus Armbruster
2021-05-03 8:54 ` Cornelia Huck
2021-05-02 17:48 ` [PATCH 2/4] pc-bios/s390-ccw: Fix the cc-option macro in the Makefile Thomas Huth
2021-05-02 17:48 ` [PATCH 3/4] pc-bios/s390-ccw: Silence GCC 11 stringop-overflow warning Thomas Huth
2021-05-03 9:00 ` Cornelia Huck
2021-05-03 9:30 ` Philippe Mathieu-Daudé
2021-05-03 9:31 ` Thomas Huth
2021-05-03 9:50 ` Philippe Mathieu-Daudé
2021-05-02 17:48 ` [PATCH 4/4] pc-bios/s390-ccw: Allow building with Clang, too Thomas Huth
2021-05-02 19:00 ` Philippe Mathieu-Daudé
2021-05-03 4:58 ` Markus Armbruster
2021-05-03 5:17 ` Thomas Huth
2021-05-03 8:10 ` David Hildenbrand
2021-05-03 8:23 ` Markus Armbruster
2021-05-03 9:14 ` Cornelia Huck [this message]
2021-05-03 9:17 ` David Hildenbrand
2021-05-03 9:23 ` Cornelia Huck
2021-05-03 9:31 ` Thomas Huth
2021-05-03 9:56 ` Cornelia Huck
2021-05-03 10:10 ` Christian Borntraeger
2021-05-03 10:00 ` 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=20210503111457.6f8e3597.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=armbru@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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 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.