From: Jamie Lokier <jamie@shareable.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Juan Quintela <quintela@redhat.com>,
Paul Brook <paul@codesourcery.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: Compile files only once: some planning
Date: Thu, 25 Mar 2010 03:08:44 +0000 [thread overview]
Message-ID: <20100325030844.GD28176@shareable.org> (raw)
In-Reply-To: <4BAA98CD.4090900@codemonkey.ws>
Anthony Liguori wrote:
> It's a statement of correctness really. Devices should never deal with
> target_phys_addr_t's.
Shouldn't they? On real hardware, 64-bit PCI devices switch to being
32-bit PCI when plugged into a 32-bit motherboard slot.
> The question is, should a pci_addr_t or a sysbus_addr_t be 64 bit or
> should it be 32-bit on 32-bit platforms.
Depends what you want to emulate. It's not an accurate emulation if
all the old PCI devices provide 64-bit BARs; that could conceivably
bite some old OS, which expects NE2000-PCI to be a 32-bit device, for example.
And it's not a repeatable emulation if switching beteen 32-bit and
64-bit hosts means the guest sees a change in the PCI devices. It
should be possible to change hosts with qemu willy nilly with zero
change seen be the guest.
So perhaps the width of pci_addr_t should be a per-device property,
not a host property?
> Honestly, I am extremely sceptical that there would be any
> measurable performance difference.
You may be right, but surely the way to find out is to have a way to
build either, and then compare them. Not have it dictated by the build system.
64-bit ops on 32-bit hosts, especially x86 due to register pressure,
are noticably more expensive than 32-bit ops. The question is whether
they are sparse enough among all the other logic that it doesn't matter.
With a bit of make cleverness it should be quite easy to support a mix
of build-once files and build-few-times files according to the minimal
compile time variations those files depend on - and express those
dependencies is a simple, one-liner way. GNU Make is good for that
sort of thing.
- Jamie
next prev parent reply other threads:[~2010-03-25 3:08 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 21:43 [Qemu-devel] Compile files only once: some planning Blue Swirl
2010-03-24 9:17 ` [Qemu-devel] " Juan Quintela
2010-03-24 17:56 ` Blue Swirl
2010-03-24 19:28 ` Juan Quintela
2010-03-24 22:47 ` Paul Brook
2010-03-24 22:57 ` Anthony Liguori
2010-03-25 3:08 ` Jamie Lokier [this message]
2010-03-25 2:54 ` Jamie Lokier
2010-03-24 9:47 ` Paolo Bonzini
2010-03-24 11:19 ` Richard Henderson
2010-03-24 14:45 ` Paolo Bonzini
2010-03-24 14:56 ` Paul Brook
2010-03-24 16:18 ` Paolo Bonzini
2010-03-24 17:27 ` Paul Brook
2010-03-24 17:07 ` Richard Henderson
2010-03-24 20:12 ` Richard Henderson
2010-03-24 18:00 ` Blue Swirl
2010-03-24 19:39 ` Michael S. Tsirkin
2010-03-24 20:05 ` Blue Swirl
2010-03-24 20:08 ` Michael S. Tsirkin
2010-03-24 20:24 ` Blue Swirl
2010-03-24 20:24 ` Michael S. Tsirkin
2010-03-24 20:32 ` Blue Swirl
2010-03-24 20:28 ` Anthony Liguori
2010-03-24 21:00 ` Aurelien Jarno
2010-03-24 22:33 ` Paul Brook
2010-03-24 22:50 ` Anthony Liguori
2010-03-24 23:05 ` Paul Brook
2010-03-24 23:07 ` Anthony Liguori
2010-03-25 8:21 ` Michael S. Tsirkin
2010-03-25 12:01 ` Paul Brook
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=20100325030844.GD28176@shareable.org \
--to=jamie@shareable.org \
--cc=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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.