From: Alexander Graf <agraf@suse.de>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, Michael Roth <mdroth@linux.vnet.ibm.com>,
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2] spapr: Fix RTAS token numbers
Date: Mon, 23 Jun 2014 15:31:47 +0200 [thread overview]
Message-ID: <53A82C43.8010807@suse.de> (raw)
In-Reply-To: <1403529992-30766-1-git-send-email-aik@ozlabs.ru>
On 23.06.14 15:26, Alexey Kardashevskiy wrote:
> At the moment spapr_rtas_register() allocates a new token number for every
> new RTAS callback so numbers are not fixed and depend on the number of
> supported RTAS handlers and the exact order of spapr_rtas_register() calls.
> These tokens are copied into the device tree and remain the same during
> the guest lifetime.
>
> When we start another guest to receive a migration, it calls
> spapr_rtas_register() as well. If the number of RTAS handlers or their
> order is different in QEMU on source and destination sides, the "/rtas"
> node in the device tree will differ. Since migration overwrites the device
> tree (as it overwrites the entire RAM), the actual RTAS config on
> the destination side gets broken.
>
> This defines global contant values for every RTAS token which QEMU
> is using today.
>
> This changes spapr_rtas_register() to accept a token number instead of
> allocating one. This changes all users of spapr_rtas_register().
>
> This changes XICS-KVM not to cache tokens registered with KVM as they
> constant now.
>
> This makes TOKEN_BASE global as RTAS_XXX use TOKEN_BASE as
> a base. TOKEN_MAX is moved and renamed too and its value is changed
> to the last token + 1. Boundary checks for token values are adjusted.
>
> This reserves token numbers for "os-term" handlers and PCI hotplug
> which we are working on.
>
> Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
> Cc: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Very nice. I'll apply it as soon as patchworks has it ;).
Alex
next prev parent reply other threads:[~2014-06-23 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 13:26 [Qemu-devel] [PATCH v2] spapr: Fix RTAS token numbers Alexey Kardashevskiy
2014-06-23 13:31 ` Alexander Graf [this message]
2014-06-23 13:37 ` Alexander Graf
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=53A82C43.8010807@suse.de \
--to=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=mdroth@linux.vnet.ibm.com \
--cc=nikunj@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 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.