From: Blue Swirl <blauwirbel@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Reorganize option rom (+linux kernel) loading.
Date: Wed, 30 Sep 2009 22:51:06 +0300 [thread overview]
Message-ID: <f43fc5580909301251k63bb5fbqa623ec2aa9045275@mail.gmail.com> (raw)
In-Reply-To: <1254325401-18777-1-git-send-email-kraxel@redhat.com>
On Wed, Sep 30, 2009 at 6:43 PM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> This patch adds infrastructure to maintain memory regions which must be
> restored on reset. That includes roms (vga bios and option roms on pc),
> but is also used when loading linux kernels directly. Features:
>
> - loading files is supported.
> - passing blobs is supported.
> - target address range is supported (for optionrom area).
> - fixed target memory address is supported (linux kernel).
>
> The final memory layout is created once all memory regions are
> registered. The option roms get addresses assigned and the
> registered regions are checked against overlaps. Finally all data
> is copyed to the guest memory.
>
> Advantages:
>
> (1) Filling memory on initial boot and on reset takes the same
> code path, making reset more robust.
> (2) The need to keep track of the option rom load address is gone.
> (3) Due to (2) option roms can be loaded outside pc_init(). This
> allows to move the pxe rom loading into the nic drivers for
> example.
>
> Additional bonus: There is a 'info roms' monitor command now.
>
> The patch also switches over pc.c and removes the
> option_rom_setup_reset() and load_option_rom() functions.
Nice idea. The implementation seems to be buggy, I only ever see one
rom and for example sparc-test crashes when issuing 'info roms'.
Perhaps 'info roms' could also check whether the rom has been changed?
On most platforms roms are really read only memories.
> + fd = open(rom->path, O_RDONLY);
> + if (-1 == fd) {
Not again!
> + rom->align = align;
> + rom->min = min;
> + rom->max = max;
> + rom->romsize = lseek(fd, 0, SEEK_END);
> + rom->data = qemu_mallocz(rom->romsize);
There are plenty of extra spaces.
next prev parent reply other threads:[~2009-09-30 19:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 15:43 [Qemu-devel] [PATCH] Reorganize option rom (+linux kernel) loading Gerd Hoffmann
[not found] ` <m34oqkmf0n.fsf@neno.mitica>
2009-09-30 19:07 ` [Qemu-devel] " Gerd Hoffmann
2009-09-30 19:51 ` Blue Swirl [this message]
2009-10-01 9:11 ` [Qemu-devel] " Gerd Hoffmann
2009-10-01 16:25 ` Blue Swirl
2009-10-02 11:40 ` Gerd Hoffmann
2009-10-02 15:19 ` Gerd Hoffmann
2009-10-02 17:58 ` Blue Swirl
2009-10-06 21:18 ` Gerd Hoffmann
2009-10-02 17:56 ` Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
2009-10-01 14:42 Gerd Hoffmann
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=f43fc5580909301251k63bb5fbqa623ec2aa9045275@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.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 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).