qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Bonifazi <stefboombastic@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] fix qruncom compilation problems
Date: Thu, 09 Dec 2010 18:29:09 +0100	[thread overview]
Message-ID: <4D0111E5.5070702@gmail.com> (raw)
In-Reply-To: <4D008246.9070500@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1993 bytes --]

On 12/09/2010 08:16 AM, Paolo Bonzini wrote:
> On 12/08/2010 10:43 PM, Stefano Bonifazi wrote:
>>
>> Anyway running it with a com file as argument gave the error:
>>> mmap: Operation not permitted
>>
>
> You have to run it as root I think.
>
> Paolo
Thank you! Running as root worked, though it raises then the following 
error (from gdb) I am currently trying to understand:
> /home/stefano/LinuxDev/qemu-0.12.5/tcg/tcg.c:1367: tcg fatal error
>
> Program received signal SIGABRT, Aborted.
> 0x0012e416 in __kernel_vsyscall ()
Surely any hint on how to to fix this will be very welcome :)

I wish I could understand also what was wrong before, I mean /mmap/.. I 
understand you can't babysit me, but the gap between what one studies at 
university and the real world is very big and I feel lost :(
I've read pretty much about mmap trying to figure out myself but 
understanding how to map a file (what I could find in every article 
about mmap online) is not the same as understanding how it works inside 
QEMU ..
I know each process gets its own logical address space, if I understood 
fine mmap should take a portion of qruncom address space and give it to 
the emulator that should then see that as its own address space (please 
correct me if I am wrong!) ..
Now if I got fine the flag MAP_FIXED, obliges the process to give that 
portion of address space starting at its /addr/ parameter (the first).. 
or if it is not possible to give an error..
My big doubt is how can the process give exactly that portion of address 
space starting at zero by just  running it as root?.. I am expecting 
that area of address space to be taken by I dunno, code, data of the 
process itself.. honestly I don't know how things are allocated when a 
process is run(and I wish I could learn that).. but how can one think 
that addresses around zero are free for a mapping??
I'll appreciate very much any explanation, or links where to learn those 
topics! :)
Thank you very much!
Best Regards!
Stefano B.

[-- Attachment #2: Type: text/html, Size: 2799 bytes --]

  reply	other threads:[~2010-12-09 17:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 11:39 [Qemu-devel] Compiling tests/qruncom.c Stefano Bonifazi
2010-12-08 12:49 ` [Qemu-devel] [PATCH] fix qruncom compilation problems Paolo Bonzini
2010-12-08 21:43   ` [Qemu-devel] " Stefano Bonifazi
2010-12-09  7:16     ` Paolo Bonzini
2010-12-09 17:29       ` Stefano Bonifazi [this message]
2010-12-10  8:53         ` Paolo Bonzini
2010-12-10 21:43           ` Stefano Bonifazi
     [not found]             ` <4D02A030.6080400@redhat.com>
2010-12-11 14:42               ` [Qemu-devel] " Stefano Bonifazi
2010-12-13  8:27                 ` [Qemu-devel] " Paolo Bonzini
2010-12-09  3:32   ` [Qemu-devel] " Isaku Yamahata
2010-12-09  7:16     ` Paolo Bonzini

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=4D0111E5.5070702@gmail.com \
    --to=stefboombastic@gmail.com \
    --cc=pbonzini@redhat.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).