From: David Hildenbrand <david@redhat.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cohuck@redhat.com>
Cc: Janosch Frank <frankja@linux.vnet.ibm.com>,
Thomas Huth <thuth@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>,
qemu-s390x <qemu-s390x@nongnu.org>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 2/3] s390x/kvm: Handle bpb feature
Date: Wed, 17 Jan 2018 17:16:22 +0100 [thread overview]
Message-ID: <c3e2cd72-1df6-0769-6b07-174b3c3536ce@redhat.com> (raw)
In-Reply-To: <616ff4d0-f8e0-b8f3-e631-f469b82a1735@linux.vnet.ibm.com>
On 17.01.2018 17:07, Halil Pasic wrote:
>
>
> On 01/17/2018 04:10 PM, David Hildenbrand wrote:
>>>> As soon as we enable bits for CPU models, we guarantee that migration
>>>> works. While introducing this change we already had one example where
>>>> this was not the case. Not good. (and remember having another such
>>>> exception)
>>> The point is migration continues to work. In fact I had a different version
>>> of this patch set that did it the other way around. Keep 82 a transparent
>>> and add a new cpu misc facility that takes care of the migration state.
>>>> It is easier to patch a feature in than silently enabling *anything*
>>>> somebody thinks is transparent (but its not). Especially not for the
>>>> host model. The expanded host model is migration safe.
>>> I really do not care about -cpu host (host-passthrough) for migration safety,
>>> because its not. And as you said: host-model (expanded) will work.
>>>
>> It will if the world would be perfect.
>>
>> expand "-cpu host" -> -cpu z14-base,stfle_82=on
>>
>> stfle_82 would now not be properly migrated. Yes, it might work somehow
>> right now. But it is not clean.
>>
>
Please don't only focus on this case. I had different reasons why this
is a bad idea (especially IBC and feature names). And this is still my
position.
> Based on the code (did not test) I would expect to see this in the
> scenario I think you are talking about David:
>
> 0. Libvirt uses cpu mode host (not host-passtrough).
> 1. Source: -"cpu host" expands to "-cpu z14-base,stfle_82=on" as you said
> the whole environment (host cpu, kvm, qemu) is supporting 82 inclusive migration
> 2. Target: libvirt requires "-cpu z14-base,stfle_82=on" when trying to migrate
> 2.1. If the target environment as a whole does not fully support 82 the model
> checking refuses the migration. It does not matter if the reason is QEMU missing
> patch #2 or lack of HW support or whatever.
Let's assume stfle_999, because this is obviously not a problem for 82.
If source and target blindly forward a feature they think is migration
safe, but is not (again, I am being conservative here as I was given a
counter example in the very same patch set), migration does not fail but
the guest might see a difference, because some state is not properly
migrated.
>
> Assumed my reasoning above is correct, I really don't get what is not clean.
> Except 'blindly' trusting the hardware that it works as advertised (and
> fixing the mess only if it turns out that there is a mess).
>
> On a meta level I think I understand your concerns David to some extent.
> But for my taste here you are too concerned about the user shooting herself
> into the foot (because equipment malfunction or user error).
Using the host model in QEMU shoots you in the foot. And it shouldn't.
Better safe than sorry.
>
> Let me also note, that while we might very well end up propagating bugs
> to the user, we also give the user the means to mitigate these (e.g.
> by turning the buggy features explicitly off like -cpu host,stfle_82=off).
Shoot first and then ask questions? :D
I don't see any valid reason for this risk. Forwarding "transparent"
features from KVM to QEMU - perfect idea. Forwarding "transparent"
features from QEMU to the guest - not a good idea.
New HW -> new features -> new QEMU CPU model.
Patching in CPU features is really "out of order" ( ;) )
>
> Regards,
> Halil
>
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2018-01-17 16:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 14:18 [Qemu-devel] [PATCH/RFC 0/3] s390x/kvm: implement new hardware/firmware features Christian Borntraeger
2018-01-17 14:18 ` [Qemu-devel] [PATCH 1/3] header sync Christian Borntraeger
2018-01-17 14:18 ` [Qemu-devel] [PATCH 2/3] s390x/kvm: Handle bpb feature Christian Borntraeger
2018-01-17 14:30 ` David Hildenbrand
2018-01-17 14:44 ` Christian Borntraeger
2018-01-17 14:37 ` Cornelia Huck
2018-01-17 14:50 ` David Hildenbrand
2018-01-17 14:59 ` Christian Borntraeger
2018-01-17 15:10 ` David Hildenbrand
2018-01-17 16:04 ` Christian Borntraeger
2018-01-17 16:06 ` David Hildenbrand
2018-01-17 16:28 ` Cornelia Huck
2018-01-17 16:07 ` Halil Pasic
2018-01-17 16:16 ` David Hildenbrand [this message]
2018-01-17 14:51 ` Christian Borntraeger
2018-01-17 14:18 ` [Qemu-devel] [PATCH 3/3] s390x/cpumodel: fix transparency for non-hyp STFL features Christian Borntraeger
2018-01-17 14:50 ` David Hildenbrand
2018-01-17 14:52 ` Cornelia Huck
2018-01-17 14:27 ` [Qemu-devel] [PATCH/RFC 0/3] s390x/kvm: implement new hardware/firmware features 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=c3e2cd72-1df6-0769-6b07-174b3c3536ce@redhat.com \
--to=david@redhat.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--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 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).