qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 2/7] Use TARGET_VIRT_ADDR_SPACE_BITS in h2g_valid.
Date: Sun, 28 Feb 2010 14:11:42 +0000	[thread overview]
Message-ID: <201002281411.42381.paul@codesourcery.com> (raw)
In-Reply-To: <61c1b83df6256642fb1b23f1e0a7a070bf0dfcfb.1266267595.git.rth@twiddle.net>


>  /* All direct uses of g2h and h2g need to go away for usermode softmmu. 
>  */ #define g2h(x) ((void *)((unsigned long)(x) + GUEST_BASE))
> +
> +#if HOST_LONG_BITS == TARGET_VIRT_ADDR_SPACE_BITS

Shouldn't this be <= ? 
1ul << T_V_A_S_B is undefined for 64-bit guests on 32-bit hosts.

> +#define h2g_valid(x) 1
> +#else
> +#define h2g_valid(x) ({ \
> +    unsigned long __guest = (unsigned long)(x) - GUEST_BASE; \
> +    __guest < (1ul << TARGET_VIRT_ADDR_SPACE_BITS); \


Paul

  reply	other threads:[~2010-02-28 14:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12  0:15 [Qemu-devel] [PATCH 0/6] Multi-level page tables and userland mapping fixes Richard Henderson
2010-02-11 22:20 ` [Qemu-devel] [PATCH 1/6] Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h Richard Henderson
2010-02-12 20:01   ` Blue Swirl
2010-02-12 20:25     ` Richard Henderson
2010-02-11 22:47 ` [Qemu-devel] [PATCH 2/6] Use TARGET_VIRT_ADDR_SPACE_BITS in h2g_valid Richard Henderson
2010-02-11 22:57 ` [Qemu-devel] [PATCH 3/6] Fix last page errors in page_set_flags and page_check_range Richard Henderson
2010-02-12 19:47   ` Blue Swirl
2010-02-12 20:16     ` Richard Henderson
2010-02-12 20:37       ` Blue Swirl
2010-02-11 23:11 ` [Qemu-devel] [PATCH 5/6] linux-user: Use h2g_valid in qemu_vmalloc Richard Henderson
2010-02-11 23:29 ` [Qemu-devel] [PATCH 6/6] linux-user: Fix mmap_find_vma returning invalid addresses Richard Henderson
2010-02-11 23:51 ` [Qemu-devel] [PATCH 4/6] Implement multi-level page tables Richard Henderson
2010-02-15 20:59 ` [Qemu-devel] [PATCH 0/7] Multi-level page tables and userland mapping fixes, v2 Richard Henderson
2010-02-11 22:47   ` [Qemu-devel] [PATCH 2/7] Use TARGET_VIRT_ADDR_SPACE_BITS in h2g_valid Richard Henderson
2010-02-28 14:11     ` Paul Brook [this message]
2010-02-11 23:11   ` [Qemu-devel] [PATCH 5/7] linux-user: Use h2g_valid in qemu_vmalloc Richard Henderson
2010-02-11 23:29   ` [Qemu-devel] [PATCH 6/7] linux-user: Fix mmap_find_vma returning invalid addresses Richard Henderson
2010-02-11 23:51   ` [Qemu-devel] [PATCH 4/7] Implement multi-level page tables Richard Henderson
2010-02-12 21:38   ` [Qemu-devel] [PATCH 1/7] Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h Richard Henderson
2010-02-12 22:03   ` [Qemu-devel] [PATCH 3/7] Fix last page errors in page_set_flags and page_check_range Richard Henderson
2010-02-15 19:58   ` [Qemu-devel] [PATCH 7/7] Assert arguments in range for guest address space Richard Henderson
2010-02-28 23:23 ` [Qemu-devel] [PATCH 0/6] Multi-level page tables and userland mapping fixes 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=201002281411.42381.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=blauwirbel@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 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).