All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Alexander Graf <agraf@suse.de>
Cc: "Richard Henderson" <rth@twiddle.net>,
	"Andreas Färber" <afaerber@suse.de>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
Date: Sun, 12 Apr 2015 12:45:45 +0100	[thread overview]
Message-ID: <CAFEAcA_pyzMy9HDJsToZR0F=WYsA2MqgBeaJ1=ZBETQ_3-7peA@mail.gmail.com> (raw)
In-Reply-To: <263F0FD9-0CC8-428D-A72D-B119ED3D983F@suse.de>

On 12 April 2015 at 09:34, Alexander Graf <agraf@suse.de> wrote:
>
>
>> Am 11.04.2015 um 23:46 schrieb Andreas Färber <afaerber@suse.de>:
>>
>>> Am 11.04.2015 um 23:33 schrieb Peter Maydell:
>>>> On 11 April 2015 at 21:28, Andreas Färber <afaerber@suse.de> wrote:
>>>> Are you sure that QEMU / runcom / pi_10.com still try to map to that
>>>> address zero?
>>>
>>> It's the first thing runcom.c's main() does after checking you've
>>> passed it enough command line arguments.
>>
>> This?
>>
>>    vm86_mem = mmap((void *)0x00000000, 0x110000,
>>                    PROT_WRITE | PROT_READ | PROT_EXEC,
>>                    MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0);
>>    if (vm86_mem == MAP_FAILED) {
>>        perror("mmap");
>>        exit(1);
>>    }
>>
>> For whatever reason it does not take the MAP_FAILED path here...
>
> Wasn't a NULL argument for the address a hint saying "map wherever
> you please"?

Only if you don't also say MAP_FIXED.

That aside, I've now looked more carefully at the makefile,
and we're not running 'runcom' directly, we're running it
within QEMU's user-mode. So a guest allocation at vaddr 0
isn't going to turn into a host mmap at vaddr 0 (we actually
query the host mmap_min_addr parameter in linux-user/main.c).

So I think the issue noted in the comment on the makefile
(back in 2010) would have been a bug which we've presumably
fixed in the meantime by adding support for guest_base and
making sure it works correctly. (Looking at the revision
log suggests that guest_base should in theory have already
supported adjustment based on mmap_min_addr at the point
when runcom was taken out of the makefile, but presumably
there was a bug.)

-- PMM

  parent reply	other threads:[~2015-04-12 11:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 1/7] tests/tcg: Fix test_path build Andreas Färber
2015-04-13 11:57   ` Alex Bennée
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 2/7] tests/tcg: Fix linux-test build Andreas Färber
2015-04-13 15:34   ` Alex Bennée
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 3/7] tests/tcg: Disable hanging test-mmap runs Andreas Färber
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 4/7] tests/tcg: Fix running x86_64 tests Andreas Färber
2015-04-13 15:35   ` Alex Bennée
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 5/7] tests/tcg: Fix run-runcom target Andreas Färber
2015-04-13 15:36   ` Alex Bennée
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 6/7] tests/tcg: Prettify run-runcom output Andreas Färber
2015-04-13 15:37   ` Alex Bennée
2015-04-13 15:38     ` Peter Maydell
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default Andreas Färber
2015-04-11 20:22   ` Peter Maydell
2015-04-11 20:28     ` Andreas Färber
2015-04-11 21:33       ` Peter Maydell
2015-04-11 21:46         ` Andreas Färber
2015-04-12  8:34           ` Alexander Graf
2015-04-12  8:39             ` Andreas Färber
2015-04-12 11:45             ` Peter Maydell [this message]
2015-04-13 11:36 ` [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Peter Maydell
2015-04-13 14:00   ` Peter Maydell
2015-06-24 14:19 ` Andreas Färber

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='CAFEAcA_pyzMy9HDJsToZR0F=WYsA2MqgBeaJ1=ZBETQ_3-7peA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --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.