qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Avi Kivity <avi@redhat.com>
Cc: Jia Liu <proljc@gmail.com>,
	qemu-devel@nongnu.org, Blue Swirl <blauwirbel@gmail.com>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Michael Walle <michael@walle.cc>,
	Paul Brook <paul@codesourcery.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH v2] Make target_phys_addr_t 64 bits unconditionally
Date: Thu, 04 Oct 2012 20:15:12 +0200	[thread overview]
Message-ID: <506DD230.70509@weilnetz.de> (raw)
In-Reply-To: <1349346964-4151-1-git-send-email-avi@redhat.com>

Am 04.10.2012 12:36, schrieb Avi Kivity:
> The hassle and compile time overhead of maintaining both 32-bit and 64-bit
> capable source isn't worth the tiny performance advantage which is seen on
> a minority of configurations.  Switch to compiling libhw only once, with
> target_phys_addr_t unconditionally typedefed to uint64_t.
>
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
>
> v2: no changes, but copied the maintainers of architectures that will
>      see their target_phys_addr_t changed as a result.  Please view and/or
>      test.
>
>   .gitignore              |  1 +
>   Makefile                |  2 +-
>   Makefile.hw             |  1 -
>   Makefile.target         |  3 ---
>   configure               | 34 ++++------------------------------
>   cpu-common.h            |  2 +-
>   dma.h                   |  2 +-
>   hw/hw.h                 |  2 +-
>   hw/intel-hda.c          |  8 +-------
>   hw/rtl8139.c            |  6 +-----
>   monitor.c               |  4 ----
>   target-ppc/mmu_helper.c |  4 +---
>   targphys.h              | 19 +------------------
>   13 files changed, 13 insertions(+), 75 deletions(-)
>


Hi,

I noticed that you replaced target_phys_addr_t by uint64_t in two lines.
Are there plans to replace target_phys_addr_t everywhere?
Should new code use uint64_t, or should it continue to use 
target_phys_addr_t?

Using target_phys_addr_t might make support for 128 bit in some years easier
because it allows identifying critical code,
although I think it will be difficult to avoid wrong use of either 
target_phys_addr_t
or uint64_t as long as both are the same size.

Regards

Stefan W.


> -#if TARGET_PHYS_ADDR_BITS > 32
> -    return low | ((target_phys_addr_t)high << 32);
> -#else
> -    return low;
> -#endif
> +    return low | ((uint64_t)high << 32);
>

> -        *raddrp |= (target_phys_addr_t)(tlb->RPN & 0xF) << 32;
> +        *raddrp |= (uint64_t)(tlb->RPN & 0xF) << 32;

  parent reply	other threads:[~2012-10-04 18:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04 10:36 [Qemu-devel] [PATCH v2] Make target_phys_addr_t 64 bits unconditionally Avi Kivity
2012-10-04 10:42 ` Edgar E. Iglesias
2012-10-04 11:42 ` Max Filippov
2012-10-04 13:56 ` Anthony Liguori
2012-10-04 16:54 ` Blue Swirl
2012-10-04 17:08 ` Michael Walle
2012-10-04 18:15 ` Stefan Weil [this message]
2012-10-07 10:25   ` Avi Kivity
2012-10-05  2:10 ` Anthony Liguori
2012-10-05  5:39   ` Stefan Weil
2012-10-05 15:46     ` Blue Swirl
2012-10-05 16:07       ` Anthony Liguori
2012-10-05 16:45 ` Peter Maydell
2012-10-07 13:16   ` 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=506DD230.70509@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=anthony@codemonkey.ws \
    --cc=aurelien@aurel32.net \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=michael@walle.cc \
    --cc=paul@codesourcery.com \
    --cc=proljc@gmail.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).