From: Marc Zyngier <marc.zyngier@arm.com>
To: Manish Jaggi <mjaggi@caviumnetworks.com>
Cc: "Nair, Jayachandran" <Jayachandran.Nair@cavium.com>,
"quintela@redhat.com" <quintela@redhat.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"dgilbert@redhat.com" <dgilbert@redhat.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Jaggi, Manish" <Manish.Jaggi@cavium.com>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"Nowicki, Tomasz" <Tomasz.Nowicki@cavium.com>
Subject: Re: [RFC] [PATCH] kvm: arm: Introduce error code KVM_EINVARIANT
Date: Sun, 11 Nov 2018 11:36:44 +0000 [thread overview]
Message-ID: <86o9avetgz.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <4bbb4e76-b714-eafe-f95b-aca1a258e9fe@caviumnetworks.com>
On Sat, 10 Nov 2018 22:18:47 +0000,
Manish Jaggi <mjaggi@caviumnetworks.com> wrote:
>
>
> CCing a larger audience.
> Please review.
>
> On 10/23/2018 03:51 PM, Jaggi, Manish wrote:
> > From: Manish Jaggi <manish.jaggi@cavium.com>
> >
> > This patch introduces an error code KVM_EINVARIANT which is returned
> > by KVM when userland tries to set an invariant register.
> >
> > The need for this error code is in VM Migration for arm64.
> > ARM64 systems use mainly -machine virt -cpu host as parameter to qemu.
> > Migration requires both Source and destination machines to have same
> > physical cpu. There are cases where the overall architecture of CPU is
> > same but the next version of the chip with some bug fixes which have no
> > effect on qemu operation. In such cases invariant registers like MIDR
> > have a different value.
> > Currently Migration fails in such cases.
> >
> > Rather than sending a EINVAL, a specifc error code will help
> > userland program the guest invariant register by querying the migrated
> > host machines invariant registers.
But failing migration is a good thing, right? How do you expect that
the guest will be happy to see a new CPU revision right in the middle
of its execution? Do you also propose that QEMU starts doing that for
big-little systems? After all, if ignoring the differences in some
registers is harmless for migration, surely that should be the case in
a single system, right?
> >
> > Qemu will have a parameter -hostinvariant along with checking of this
> > error code. So it can be safely assumed that the feature is opt-in
You're changing the ABI without any buy in from userspace, which is
not acceptable.
As it stands, this patch creates a number of issues without solving
any. Things to think about:
- How does errata management works when migrating to a different
system?
- big-little, as mentioned above
- Are all invariant registers equal? A different MIDR has the same
effect as a different MMFR0?
Instead of papering over architectural constants i a system, how about
allowing the relevant ID registers to be overloaded when not
incompatible?
Thanks,
M.
--
Jazz is not dead, it just smell funny.
next prev parent reply other threads:[~2018-11-11 11:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1540290099-146109-1-git-send-email-mjaggi@caviumnetworks.com>
2018-11-10 22:18 ` [RFC] [PATCH] kvm: arm: Introduce error code KVM_EINVARIANT Manish Jaggi
2018-11-11 11:36 ` Marc Zyngier [this message]
2018-11-12 10:09 ` [Qemu-devel] " Andrew Jones
2018-11-12 9:06 ` Christoffer Dall
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=86o9avetgz.wl-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=Jayachandran.Nair@cavium.com \
--cc=Manish.Jaggi@cavium.com \
--cc=Tomasz.Nowicki@cavium.com \
--cc=catalin.marinas@arm.com \
--cc=dgilbert@redhat.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mjaggi@caviumnetworks.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=will.deacon@arm.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