All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Richard Henderson <rth@twiddle.net>,
	Pranith Kumar <bobby.prani@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] alpha: Fix build error for linux-user
Date: Fri, 17 Jun 2016 20:04:59 +0200	[thread overview]
Message-ID: <7c681e78-7a0b-827d-059d-30e2a3903afe@redhat.com> (raw)
In-Reply-To: <64e568b4-863d-fa79-185e-0da4c719d10d@twiddle.net>



On 16/06/2016 21:07, Richard Henderson wrote:
>>              && ((addr >> 41) & 3) == 2
>> -            && addr >> TARGET_VIRT_ADDR_SPACE_BITS == addr >> 63);
>> +            && addr >> TARGET_VIRT_ADDR_SPACE_BITS == 1);

What you want here is

+		addr >> TARGET_VIRT_ADDR_SPACE_BITS == -1

since that's what addr >> 63 is.  With this change the patch should be fine.

Alternatively, combining this condition with addr < 0 should be

	(uint64_t)addr >= (-1ull << TARGET_VIRT_ADDR_SPACE_BITS)

I think (I might have an off by one here, sorry).  If you go this way,
it's of course nicer to change the argument type to uint64_t.

Paolo

  parent reply	other threads:[~2016-06-17 18:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 18:56 [Qemu-devel] [PATCH] alpha: Fix build error for linux-user Pranith Kumar
2016-06-16 19:07 ` Richard Henderson
2016-06-16 19:15   ` Pranith Kumar
2016-06-17  0:43     ` Laurent Vivier
2016-06-17 17:20       ` Pranith Kumar
2016-06-17 18:04   ` Paolo Bonzini [this message]
2016-06-17 18:07     ` Pranith Kumar
2016-06-17 18:09       ` Richard Henderson
2016-06-17 18:12         ` Pranith Kumar

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=7c681e78-7a0b-827d-059d-30e2a3903afe@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bobby.prani@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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.