qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 1/9] target-avr: AVR cores support is added.


From: Michael Rolnik
Subject: Re: [Qemu-devel] [PATCH v4 1/9] target-avr: AVR cores support is added. 1. basic CPU structure 2. registers 3. no instructions
Date: Wed, 8 Jun 2016 22:49:10 +0300

Hi Richard.

how can I test it?

On Tue, Jun 7, 2016 at 5:28 PM, Richard Henderson <address@hidden> wrote:

> On 06/06/2016 11:32 PM, Michael Rolnik wrote:
> > Hi Richard,
> >
> > /Consider making the vm save state reflect the actual hardware format.
> That
> > way you can change the qemu internal format while retaining migration
> > compatibility./
> >
> > How it can be done? how can I modify a value passed to VMSTATE_UINT32?
>
> There are two different ways.  You can see both of them in use in
> target-i386.
>
> The first is to manually describe the field, using custom get and put
> fields.
> For example:
>
> static const VMStateInfo vmstate_fpreg = {
>     .name = "fpreg",
>     .get  = get_fpreg,
>     .put  = put_fpreg,
> };
>
>
> The second is to reserve extra space for the external representation and
> then
> use the pre_save / post_load hooks.  For i386, see the cpu_pre_save, where
> we
> take the fpus, fpstt, and fptags fields and store them into the
> fpus_vmstate
> field.  It is then the vmstate field that is mentioned in vmstate_x86_cpu.
>
> I personally prefer the get/put fields, but I admit they can be tricky to
> use.
>
>
> r~
>



-- 
Best Regards,
Michael Rolnik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]