From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: anthony.perard@citrix.com,
xen-devel <xen-devel@lists.xenproject.org>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: gross qemu behavior
Date: Sat, 29 Mar 2014 08:31:13 +0100 [thread overview]
Message-ID: <533676C1.2080203@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1403281827570.20764@kaball.uk.xensource.com>
Il 28/03/2014 19:30, Stefano Stabellini ha scritto:
> On Fri, 28 Mar 2014, Paolo Bonzini wrote:
>> Il 28/03/2014 18:52, Stefano Stabellini ha scritto:
>>>> This is a thorny issue, fixing this behavior is not going to be trivial:
>>>>
>>>> - The hypervisor/libxc does not currently expose a
>>>> xc_domain_remove_from_physmap function.
>>>>
>>>> - QEMU works by allocating memory regions at the end of the guest
>>>> physmap and then moving them at the right place.
>>>>
>>>> - QEMU can destroy a memory region and in that case we could free the
>>>> memory and remove it from the physmap, however that is NOT what QEMU
>>>> does with the vga ROM. In that case it calls
>>>> memory_region_del_subregion, so we can't be sure that the ROM won't be
>>>> mapped again, therefore we cannot free it. We need to move it
>>>> somewhere else, hence the problem.
>>
>> Right; QEMU cannot know either if the ROM will be mapped again (examples
>> include "cd /sys/bus/pci/devices/0000:0:03.0 && echo 1 > rom && cat rom" or a
>> warm reset).
>>
>>>> But fortunately we don't actually need to add the VGA ROM to the guest
>>>> physmap for it to work, QEMU can trap and emulate. In fact even today we
>>>> are not mapping it at the right place anyway, see xen_set_memory:
>>
>> But how can you execute from the VGA ROM then?
>
> I don't know, I guess we don't? In that case why does it work today?
Right, the ROM is copied down to low memory by firmware (hvmloader?).
>> Also, how do you migrate its contents?
>
> That would also not work. We would have to re-initialize it in QEMU on
> the receiving end.
That is problematic. It would mean that a system reset after migration
may auto-upgrade some parts of the firmware.
Paolo
next prev parent reply other threads:[~2014-03-29 7:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 7:48 gross qemu behavior Jan Beulich
2014-03-28 9:21 ` Jan Beulich
2014-03-28 9:30 ` Fabio Fantoni
2014-03-28 10:37 ` Jan Beulich
2014-03-28 17:46 ` Stefano Stabellini
2014-03-28 17:52 ` Stefano Stabellini
2014-03-28 18:01 ` Paolo Bonzini
2014-03-28 18:30 ` Stefano Stabellini
2014-03-29 7:31 ` Paolo Bonzini [this message]
2014-03-30 7:57 ` Fabio Fantoni
2014-03-31 9:07 ` Jan Beulich
2014-04-03 16:12 ` Stefano Stabellini
2014-04-04 6:45 ` Jan Beulich
2014-04-04 9:34 ` Paolo Bonzini
2014-04-04 9:45 ` Jan Beulich
2014-04-04 13:53 ` Stefano Stabellini
2014-04-04 14:58 ` Jan Beulich
2014-04-04 15:32 ` Stefano Stabellini
2014-04-04 16:00 ` Jan Beulich
2014-04-04 16:54 ` Stefano Stabellini
2014-05-05 10:04 ` Fabio Fantoni
2014-05-05 10:35 ` Jan Beulich
2014-05-05 11:10 ` Fabio Fantoni
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=533676C1.2080203@redhat.com \
--to=pbonzini@redhat.com \
--cc=JBeulich@suse.com \
--cc=anthony.perard@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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.