All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Avi Kivity <avi@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Rename target_phys_addr_t to Phys
Date: Thu, 05 Jan 2012 09:17:34 +0100	[thread overview]
Message-ID: <4F055C9E.60401@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA_z-dCiiCC3qbEcgjtNeh-Q7geg3XL07YtZPUT6ANyJSw@mail.gmail.com>

Am 05.01.2012 01:24, schrieb Peter Maydell:
> On 5 January 2012 00:16, Anthony Liguori <anthony@codemonkey.ws> wrote:
>> On 01/04/2012 05:33 PM, Peter Maydell wrote:
>>> A lot of the usage of target_phys_addr_t in hw/ is actually not
>>> handling addresses at all, but merely offsets into device IO regions
>>> (ie as parameters to device read/write functions)...
>>
>> Exactly, which is why using target_phys_addr_t (and subsequently building
>> the device twice) doesn't make a lot of sense.
>
> So should we have a hw_offset type for this? That would cut out a lot
> of the noise and let us find out how much code in hw/ is actually
> using physaddrs...
>
> -- PMM

Hardware offsets are hardware: you can count the address lines
or get the values from the vendor's manual (you cannot count when
serial protocolsare used). A 32 bit PCI card will take 32 bit
offsets (or smaller), even when itis used in a 64 bit host.

It should be possible to model that in QEMU, too. uint8_t,
uint16_t, uint32_t and uint64_t are good enough to describe
the typical offset ranges of any hardware.

Cheers,
Stefan Weil

  reply	other threads:[~2012-01-07 12:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 19:32 [Qemu-devel] [PATCH] Rename target_phys_addr_t to Phys Avi Kivity
2012-01-04 19:50 ` Peter Maydell
2012-01-04 19:54   ` Avi Kivity
2012-01-04 22:09   ` Anthony Liguori
2012-01-04 23:33     ` Peter Maydell
2012-01-05  0:16       ` Anthony Liguori
2012-01-05  0:24         ` Peter Maydell
2012-01-05  8:17           ` Stefan Weil [this message]
2012-01-07 17:44     ` Blue Swirl
2012-01-08 10:24       ` Avi Kivity

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=4F055C9E.60401@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=avi@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.