From: Halil Pasic <pasic@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>,
Boris Fiuczynski <fiuczy@linux.ibm.com>,
Pierre Morel <pmorel@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
Cornelia Huck <cohuck@redhat.com>,
qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Viktor Mihajlovski <mihajlov@linux.ibm.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v2 1/1] virtio-ccw: auto-manage VIRTIO_F_IOMMU_PLATFORM if PV
Date: Thu, 28 May 2020 20:49:56 +0200 [thread overview]
Message-ID: <20200528204956.657e4a05.pasic@linux.ibm.com> (raw)
In-Reply-To: <eb340fdb-9453-2227-53f1-c507b3698f32@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 3555 bytes --]
On Thu, 28 May 2020 16:42:49 +0200
Janosch Frank <frankja@linux.ibm.com> wrote:
> On 5/28/20 1:21 PM, Cornelia Huck wrote:
> >> I think we have "allow protected" already expressed via cpu models. I'm
> >> also not sure how libvirt would react to the idea of a new machine
> >> property for this. You did mean "allow protected" as machine property,
> >> or?
> >
> > "Unpack facility in cpu model" means "guest may transition into pv
> > mode", right? What does it look like when the guest actually has
> > transitioned?
>
> Well, we don't sync the features that the protected guest has back into
> QEMU. So basically the VM doesn't really change except for ms->pv now
> being true.
>
The features as observed by the guest do change, some quite drastically,
it is just that the CPU model maintained by QEMU does not change. That
is the changes can not be inspected.
Unfortunately I'm not very familiar with the details, but my guess is
that
a) the ultravisor does what needs to be done with regards to features
that are obligatory or not prohibited in PV mode.
b) either the initial CPU model determines the CPU model after the
conversion fully, or we will need to express something more via
the QEMU cpu model. But we will have to do a fair amount of work
before we get migration, and I would hate to wait with this until
then.
Important for me is the following.
1) The user asks for a VM with certain
characteristics including cpu features. E.g. AP and unpack facilities.
2) The specified VM is sane, and gets started.
3) The OS decides to go secure.
4) Certain characteristics of the VM get changed as observed by the OS
(e.g. gains the ability to do uv calls, but also loses stuff).
5) The changes are not reflected via QEMU interfaces.
Compared to this my patch introduces a very similar behavior, in a sense
that the characteristics as observed by the guest change during the
transition, and that in a sense, after the transition the user gets
something different than she has asked for. The differences are that
this change ain't enforced by the ultravisor, and can be inspected
through the QEMU property 'iommu_platform'.
We can IMHO clam that the user opted in for this weird override of
featues with 'unpack' and with DIAG 308 subcode 10. That is what I mean
by 'already expressed': the machine property would be redundant and
add extra complexity. Conny do you agree?
>
>
> >
> >>
> >> AFAIU "allow protected" would be required for the !PV to PV switch, and
> >> we would have to reject paravirtualized devices with iommu_platform='off'
> >> on VM construction or hotplug (iommu_platform='auto/on' would be fine).
> >>
> >> Could you please confirm that I understood this correctly?
> >>
> >>
> >>> This will come handy for other things like migrating to hosts without
> >>> protected memory support.
> >>>
> >>
> >> This is already covered by cpu model AFAIK.
> >
> > I don't think we'd want to migrate between pv and non-pv anyway?
>
> What exactly do you mean by that?
> I'd expect that the VM can either be migrated in PV or non-PV mode and
> not in a transition phase.
>
I agree. I don't think migrating an in transition VM is practicable.
Currently migration is inhibited. We would probably need to inhibit
migration during transition, and make ms->pv conceptually a part of
the migration state. Both the source and the target would need to do
some things differently if the migration is requested while in PV
mode.
Regards,
Halil
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2020-05-28 18:51 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 22:11 [PATCH v2 1/1] virtio-ccw: auto-manage VIRTIO_F_IOMMU_PLATFORM if PV Halil Pasic
2020-05-20 12:16 ` Halil Pasic
2020-05-20 16:23 ` Michael S. Tsirkin
2020-05-22 21:04 ` Halil Pasic
2020-05-28 11:21 ` Cornelia Huck
2020-05-28 14:42 ` Janosch Frank
2020-05-28 18:49 ` Halil Pasic [this message]
2020-05-28 17:52 ` Halil Pasic
2020-06-05 23:32 ` Halil Pasic
2020-06-08 16:14 ` Cornelia Huck
2020-06-08 17:00 ` Halil Pasic
2020-06-09 6:44 ` Cornelia Huck
2020-06-09 9:41 ` Halil Pasic
2020-06-09 14:02 ` Pierre Morel
2020-06-09 15:47 ` Claudio Imbrenda
2020-06-09 16:05 ` Cornelia Huck
2020-06-09 16:41 ` Halil Pasic
2020-06-10 13:34 ` Halil Pasic
2020-06-09 16:28 ` Halil Pasic
2020-06-09 16:44 ` Michael S. Tsirkin
2020-06-10 4:31 ` David Gibson
2020-06-10 7:22 ` David Hildenbrand
2020-06-10 10:07 ` David Gibson
2020-06-10 10:24 ` David Hildenbrand
2020-06-10 13:00 ` Halil Pasic
2020-06-10 13:19 ` Viktor Mihajlovski
2020-06-10 14:00 ` David Hildenbrand
2020-06-19 0:36 ` David Gibson
2020-06-19 0:33 ` David Gibson
2020-06-10 13:15 ` Halil Pasic
2020-06-10 4:29 ` David Gibson
2020-06-10 13:57 ` Halil Pasic
2020-06-19 0:59 ` David Gibson
2020-06-09 16:41 ` Michael S. Tsirkin
2020-06-10 4:25 ` David Gibson
2020-06-10 21:37 ` Halil Pasic
2020-06-19 1:01 ` David Gibson
2020-06-08 16:53 ` Michael S. Tsirkin
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=20200528204956.657e4a05.pasic@linux.ibm.com \
--to=pasic@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=fiuczy@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=mihajlov@linux.ibm.com \
--cc=mst@redhat.com \
--cc=pmorel@linux.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).