qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] i386: EFER vs 32-bit CPU


From: Pavel Dovgalyuk
Subject: Re: [Qemu-devel] i386: EFER vs 32-bit CPU
Date: Wed, 29 May 2019 17:03:06 +0300

> From: Dr. David Alan Gilbert [mailto:address@hidden
> * Pavel Dovgalyuk (address@hidden) wrote:
> > > From: Paolo Bonzini [mailto:address@hidden
> > > On 29/05/19 13:30, Dr. David Alan Gilbert wrote:
> > > >> Should we add a section for i386, which duplicates efer, or just 
> > > >> version_id of the main
> > > VMSD should
> > > >> be updated?
> > > >
> > > > You could do:
> > > >
> > > > #ifdef TARGET_X86_64
> > > >         VMSTATE_UINT64(env.efer, X86CPU),
> > > >         VMSTATE_UINT64(env.star, X86CPU),
> > > > ...
> > > >
> > > > to become:
> > > >
> > > >         VMSTATE_UINT64_TEST(env.efer, X86CPU, efer_needed)
> > > > #ifdef TARGET_X86_64
> > > >         VMSTATE_UINT64(env.star, X86CPU),
> > > >
> > > >
> > > > and then make efer_needed a function that returns true if
> > > > TARGET_X86_64 or it's a new machine type that knows about whatever
> > > > you're going to do with it.
> > >
> > > I prefer adding a subsection for 32-bit, so that EFER is saved/restored
> > > if nonzero.
> >
> > The question is: should we remove EFER from the original VMSD?
> 
> No, because that would break 64bit compat.

Thanks. Already posted a patch here:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06796.html

Pavel Dovgalyuk




reply via email to

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