All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexander Graf <agraf@suse.de>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org, quintela@redhat.com,
	amit.shah@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/4] target-ppc: add CPU access_type into the migration stream
Date: Wed, 27 Jan 2016 12:10:49 +1100	[thread overview]
Message-ID: <56A81919.2050807@ozlabs.ru> (raw)
In-Reply-To: <56A67171.7010004@suse.de>

On 01/26/2016 06:03 AM, Alexander Graf wrote:
>
>
> On 01/08/2016 03:29 AM, Alexey Kardashevskiy wrote:
>> On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote:
>>> This is referenced in cpu_ppc_handle_mmu_fault() and so should be included
>>> in the migration stream.
>>>
>>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>> ---
>>>   target-ppc/machine.c |    2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/target-ppc/machine.c b/target-ppc/machine.c
>>> index 322ce84..cb56423 100644
>>> --- a/target-ppc/machine.c
>>> +++ b/target-ppc/machine.c
>>> @@ -530,7 +530,7 @@ const VMStateDescription vmstate_ppc_cpu = {
>>>
>>>           /* Internal state */
>>>           VMSTATE_UINTTL(env.hflags_nmsr, PowerPCCPU),
>>> -        /* FIXME: access_type? */
>>> +        VMSTATE_INT32(env.access_type, PowerPCCPU),
>>
>>
>> VMSTATE_INT32_V and you need to change access_type's type from "int" to
>> "int32_t" (or better use "uint8_t" as it is a simple enum with 3 possible
>> values).
>
> I don't think uint8_t is going to be safe, since vmstate works with
> pointers internally and the cast would only migrate the first *byte* of the
> value (so the highest byte on BE).

I meant that both env.access_type _and_ VMSTATE_INT32 should be changed to 
uint8_t and VMSTATE_UINT8.



-- 
Alexey

  reply	other threads:[~2016-01-27  1:11 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 18:22 [Qemu-devel] [PATCH 0/4] target-ppc: migration fixups (TCG related) Mark Cave-Ayland
2016-01-06 18:22 ` [Qemu-devel] [PATCH 1/4] target-ppc: add CPU IRQ state to PPC VMStateDescription Mark Cave-Ayland
2016-01-08  2:20   ` Alexey Kardashevskiy
2016-01-06 18:22 ` [Qemu-devel] [PATCH 2/4] target-ppc: use cpu_write_xer() helper in cpu_post_load Mark Cave-Ayland
2016-01-08  2:25   ` Alexey Kardashevskiy
2016-01-18  3:12     ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-01-18  8:31       ` Mark Cave-Ayland
2016-01-19  0:11         ` David Gibson
2016-01-06 18:22 ` [Qemu-devel] [PATCH 3/4] target-ppc: add CPU access_type into the migration stream Mark Cave-Ayland
2016-01-08  2:29   ` Alexey Kardashevskiy
2016-01-25 19:03     ` Alexander Graf
2016-01-27  1:10       ` Alexey Kardashevskiy [this message]
2016-01-06 18:22 ` [Qemu-devel] [PATCH 4/4] target-ppc: ensure we include the decrementer value during migration Mark Cave-Ayland
2016-01-08  2:47   ` Alexey Kardashevskiy
2016-01-08 14:21     ` Mark Cave-Ayland
2016-01-11  1:18       ` Alexey Kardashevskiy
2016-01-11  4:55         ` David Gibson
2016-01-11  7:43           ` Mark Cave-Ayland
2016-01-12  2:44             ` David Gibson
2016-01-15 17:46               ` Mark Cave-Ayland
2016-01-18  4:51                 ` David Gibson
2016-01-25  5:48                   ` [Qemu-devel] Migrating decrementer (was: Re: [PATCH 4/4] target-ppc: ensure we include the decrementer value during migration) Mark Cave-Ayland
2016-01-25 11:10                     ` David Gibson
2016-01-25 17:20                       ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2016-01-26  5:51                         ` David Gibson
2016-01-26 22:31                       ` [Qemu-devel] Migrating decrementer Mark Cave-Ayland
2016-01-26 23:08                         ` Mark Cave-Ayland
2016-02-01  0:52                         ` David Gibson
2016-02-02 23:41                           ` Mark Cave-Ayland
2016-02-03  4:59                             ` David Gibson
2016-02-03  5:43                               ` Alexander Graf
2016-02-23 21:27                               ` Mark Cave-Ayland
2016-02-24  0:47                                 ` David Gibson
2016-02-24 12:31                                   ` Juan Quintela
2016-02-25  0:19                                     ` David Gibson
2016-02-25  4:33                                     ` Mark Cave-Ayland
2016-02-25  5:00                                       ` [Qemu-devel] [Qemu-ppc] " Mark Cave-Ayland
2016-02-25  9:50                                         ` Mark Cave-Ayland
2016-02-26  4:35                                           ` David Gibson
2016-02-26 12:29                                             ` Mark Cave-Ayland
2016-02-29  3:57                                               ` David Gibson
2016-02-29 20:21                                                 ` Mark Cave-Ayland
2016-03-10  4:57                                                   ` David Gibson

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=56A81919.2050807@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=agraf@suse.de \
    --cc=amit.shah@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@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.