* [Qemu-devel] Snapshots not bound to an architecture?
@ 2008-10-02 19:07 Blue Swirl
2008-10-07 20:22 ` Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2008-10-02 19:07 UTC (permalink / raw)
To: qemu-devel
Hi,
While testing the savevm/loadvm functions, I noticed that it's
possible to attempt to load a snapshot made for entirely different
architecture. There are a lot of warnings, of course.
Could we prevent this somehow? Or is there a use case for this, for
example loading a snapshot made on i386 to an x86_64 emulator?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Snapshots not bound to an architecture?
2008-10-02 19:07 [Qemu-devel] Snapshots not bound to an architecture? Blue Swirl
@ 2008-10-07 20:22 ` Anthony Liguori
2008-10-07 20:30 ` Paul Brook
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2008-10-07 20:22 UTC (permalink / raw)
To: qemu-devel
Blue Swirl wrote:
> Hi,
>
> While testing the savevm/loadvm functions, I noticed that it's
> possible to attempt to load a snapshot made for entirely different
> architecture. There are a lot of warnings, of course.
>
> Could we prevent this somehow? Or is there a use case for this, for
> example loading a snapshot made on i386 to an x86_64 emulator?
>
I think we should introduce a machine section for save/restore that
included that information. It should also be versioned in such a way
that it could be incremented whenever a new piece of hardware is added
to the default machine type.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Snapshots not bound to an architecture?
2008-10-07 20:22 ` Anthony Liguori
@ 2008-10-07 20:30 ` Paul Brook
2008-10-07 20:39 ` Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Paul Brook @ 2008-10-07 20:30 UTC (permalink / raw)
To: qemu-devel
On Tuesday 07 October 2008, Anthony Liguori wrote:
> Blue Swirl wrote:
> > Hi,
> >
> > While testing the savevm/loadvm functions, I noticed that it's
> > possible to attempt to load a snapshot made for entirely different
> > architecture. There are a lot of warnings, of course.
> >
> > Could we prevent this somehow? Or is there a use case for this, for
> > example loading a snapshot made on i386 to an x86_64 emulator?
>
> I think we should introduce a machine section for save/restore that
> included that information. It should also be versioned in such a way
> that it could be incremented whenever a new piece of hardware is added
> to the default machine type.
Using a single version number to determine the "base" machine is IMHO a bad
idea. The base peripherals should be identified (and mismatches detected)
that same way as any other peripherals.
The simplest way to avoid loading the wrong type of machine is to give the
cpus different names (e.g. cpu_i386/cpu_amd64) instead of just calling
them "cpu".
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Snapshots not bound to an architecture?
2008-10-07 20:30 ` Paul Brook
@ 2008-10-07 20:39 ` Anthony Liguori
2008-10-08 19:06 ` Blue Swirl
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2008-10-07 20:39 UTC (permalink / raw)
To: Paul Brook; +Cc: qemu-devel
Paul Brook wrote:
> On Tuesday 07 October 2008, Anthony Liguori wrote:
>
>> Blue Swirl wrote:
>>
>>> Hi,
>>>
>>> While testing the savevm/loadvm functions, I noticed that it's
>>> possible to attempt to load a snapshot made for entirely different
>>> architecture. There are a lot of warnings, of course.
>>>
>>> Could we prevent this somehow? Or is there a use case for this, for
>>> example loading a snapshot made on i386 to an x86_64 emulator?
>>>
>> I think we should introduce a machine section for save/restore that
>> included that information. It should also be versioned in such a way
>> that it could be incremented whenever a new piece of hardware is added
>> to the default machine type.
>>
>
> Using a single version number to determine the "base" machine is IMHO a bad
> idea.
I should have said, that I expected this to be an intermediate step.
> The base peripherals should be identified (and mismatches detected)
> that same way as any other peripherals.
>
Yes. This is particularly important in the context of hot plug because
the bus/dev/fn of the plugged device may be different than if the device
were just added directly.
> The simplest way to avoid loading the wrong type of machine is to give the
> cpus different names (e.g. cpu_i386/cpu_amd64) instead of just calling
> them "cpu".
>
Yes, that works too, but it breaks backwards compatibility in a way
that's hard to reconcile. Bumping the version of "cpu" and including a
machine type identifier would also work and would be easier to do in a
backwards compatible way.
Regards,
Anthony Liguori
> Paul
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Snapshots not bound to an architecture?
2008-10-07 20:39 ` Anthony Liguori
@ 2008-10-08 19:06 ` Blue Swirl
0 siblings, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2008-10-08 19:06 UTC (permalink / raw)
To: qemu-devel
On 10/7/08, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Paul Brook wrote:
>
> > On Tuesday 07 October 2008, Anthony Liguori wrote:
> >
> >
> > > Blue Swirl wrote:
> > >
> > >
> > > > Hi,
> > > >
> > > > While testing the savevm/loadvm functions, I noticed that it's
> > > > possible to attempt to load a snapshot made for entirely different
> > > > architecture. There are a lot of warnings, of course.
> > > >
> > > > Could we prevent this somehow? Or is there a use case for this, for
> > > > example loading a snapshot made on i386 to an x86_64 emulator?
> > > >
> > > >
> > > I think we should introduce a machine section for save/restore that
> > > included that information. It should also be versioned in such a way
> > > that it could be incremented whenever a new piece of hardware is added
> > > to the default machine type.
> > >
> > >
> >
> > Using a single version number to determine the "base" machine is IMHO a
> bad idea.
> >
>
> I should have said, that I expected this to be an intermediate step.
>
>
> > The base peripherals should be identified (and mismatches detected) that
> same way as any other peripherals.
> >
> >
>
> Yes. This is particularly important in the context of hot plug because the
> bus/dev/fn of the plugged device may be different than if the device were
> just added directly.
>
>
> > The simplest way to avoid loading the wrong type of machine is to give the
> cpus different names (e.g. cpu_i386/cpu_amd64) instead of just calling them
> "cpu".
> >
> >
>
> Yes, that works too, but it breaks backwards compatibility in a way that's
> hard to reconcile. Bumping the version of "cpu" and including a machine
> type identifier would also work and would be easier to do in a backwards
> compatible way.
There could be a compatibility check in the loadvm code just for "cpu"
and "cpu_common". The check would be removed when no target wants to
handle those versions anymore.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-08 19:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 19:07 [Qemu-devel] Snapshots not bound to an architecture? Blue Swirl
2008-10-07 20:22 ` Anthony Liguori
2008-10-07 20:30 ` Paul Brook
2008-10-07 20:39 ` Anthony Liguori
2008-10-08 19:06 ` Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).