[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
Re: [Qemu-devel] [PATCH v4 1/9] target-avr: AVR cores support is added. 1. basic CPU structure 2. registers 3. no instructions, Peter Maydell, 2016/06/06
[Qemu-devel] [PATCH v4 9/9] target-avr: updating translate.c to use instructions translation, Michael Rolnik, 2016/06/06
[Qemu-devel] [PATCH v4 7/9] target-avr: adding instruction decoder, Michael Rolnik, 2016/06/06
[Qemu-devel] [PATCH v4 8/9] target-avr: adding instruction translation, Michael Rolnik, 2016/06/06
Re: [Qemu-devel] [PATCH v4 0/9] 8bit AVR cores, Richard Henderson, 2016/06/06