From: Alex Williamson <alex.williamson@hp.com>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: Beth Kon <eak@us.ibm.com>
Subject: Re: [Qemu-devel] [PATCH RESEND] bios: Fix multiple calls into smbios_load_external()
Date: Tue, 7 Jul 2009 08:59:58 -0600 [thread overview]
Message-ID: <7162ab20907070759m4aec611dtf4d5b37e615f1e83@mail.gmail.com> (raw)
In-Reply-To: <1245080492.4851.29.camel@lappy>
Bump.
On Mon, Jun 15, 2009 at 9:41 AM, Alex Williamson<alex.williamson@hp.com> wrote:
> We're marking the used entry bitmap in smbios_load_external() for each
> type we check, regardless of whether we loaded anything. This makes
> subsequent calls behave as if we've already loaded the tables from qemu
> and can result in missing tables (ex. multiple type4 entries on an SMP
> guest). Only mark the bitmap if we actually load something.
>
> Signed-off-by: Alex Williamson <alex.williamson@hp.com>
> --
>
> diff --git a/bios/rombios32.c b/bios/rombios32.c
> index f861f81..c869798 100644
> --- a/bios/rombios32.c
> +++ b/bios/rombios32.c
> @@ -2554,13 +2554,14 @@ smbios_load_external(int type, char **p, unsigned *nr_structs,
> *max_struct_size = *p - (char *)header;
> }
>
> - /* Mark that we've reported on this type */
> - used_bitmap[(type >> 6) & 0x3] |= (1ULL << (type & 0x3f));
> + if (start != *p) {
> + /* Mark that we've reported on this type */
> + used_bitmap[(type >> 6) & 0x3] |= (1ULL << (type & 0x3f));
> + return 1;
> + }
>
> - return (start != *p);
> -#else /* !BX_QEMU */
> +#endif /* !BX_QEMU */
> return 0;
> -#endif
> }
>
> void smbios_init(void)
>
>
>
>
>
prev parent reply other threads:[~2009-07-07 15:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 15:41 [Qemu-devel] [PATCH RESEND] bios: Fix multiple calls into smbios_load_external() Alex Williamson
2009-07-07 14:59 ` Alex Williamson [this message]
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=7162ab20907070759m4aec611dtf4d5b37e615f1e83@mail.gmail.com \
--to=alex.williamson@hp.com \
--cc=eak@us.ibm.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).