From: Anthony Liguori <anthony@codemonkey.ws>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: blauwirbel@gmail.com, jes.sorensen@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pc: Fix e820 fw_cfg for big endian
Date: Tue, 16 Nov 2010 16:26:07 -0600 [thread overview]
Message-ID: <4CE304FF.9020804@codemonkey.ws> (raw)
In-Reply-To: <20101108035143.26532.81891.stgit@s20.home>
On 11/07/2010 09:57 PM, Alex Williamson wrote:
> Signed-off-by: Alex Williamson<alex.williamson@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
>
> Compile tested only. Only current user is kvm, no cross-arch users.
>
> hw/pc.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index 0264e3d..cc8ec14 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -467,19 +467,19 @@ static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
>
> int e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
> {
> - int index = e820_table.count;
> + int index = le32_to_cpu(e820_table.count);
> struct e820_entry *entry;
>
> if (index>= E820_NR_ENTRIES)
> return -EBUSY;
> - entry =&e820_table.entry[index];
> + entry =&e820_table.entry[index++];
>
> - entry->address = address;
> - entry->length = length;
> - entry->type = type;
> + entry->address = cpu_to_le64(address);
> + entry->length = cpu_to_le64(length);
> + entry->type = cpu_to_le32(type);
>
> - e820_table.count++;
> - return e820_table.count;
> + e820_table.count = cpu_to_le32(index);
> + return index;
> }
>
> static void *bochs_bios_init(void)
>
>
>
>
prev parent reply other threads:[~2010-11-16 22:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 3:57 [Qemu-devel] [PATCH] pc: Fix e820 fw_cfg for big endian Alex Williamson
2010-11-09 10:57 ` [Qemu-devel] " Jes Sorensen
2010-11-09 12:42 ` Alexander Graf
2010-11-09 12:44 ` Jes Sorensen
2010-11-16 22:26 ` Anthony Liguori [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=4CE304FF.9020804@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=alex.williamson@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=jes.sorensen@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 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.