On 01/26/2011 09:19 PM, Richard Henderson wrote:
On 01/26/2011 12:17 PM, Lluís wrote:
Richard Henderson writes:
On 01/26/2011 03:07 AM, Stefano Bonifazi wrote:
P.S. Please just answer that last question, whether it is possible to
have a variable showing the upper bound of heap (some brk_end
On 01/26/2011 04:38 PM, Richard Henderson wrote:
On 01/26/2011 03:07 AM, Stefano Bonifazi wrote:
P.S. Please just answer that last question, whether it is possible to
have a variable showing the upper bound of heap (some brk_end) for a
target process
No, the heap grows until it reaches some
On 01/25/2011 02:36 AM, Richard Henderson wrote:
On 01/24/2011 01:44 PM, Stefano Bonifazi wrote:
Wow wonderful! So you fixed the code for PIC (ET_DYN) support?
Yes.
how can I get your sources?
I was mistaken -- a later version of the patch set was in fact merged.
I simply forgot to delete
On 01/25/2011 05:26 PM, Richard Henderson wrote:
On 01/25/2011 03:06 AM, Stefano Bonifazi wrote:
start_brk 0x
end_code0x400102e0
start_code 0x4000
start_data 0x4001024c
end_data0x400102e0
start_stack 0x40811438
brk 0x400102e4
entry 0x40828c24
that is
On 01/25/2011 05:22 PM, Richard Henderson wrote:
On 01/25/2011 02:47 AM, Stefano Bonifazi wrote:
You keep getting the name of the dynamic linker from the PT_INTERP program
segment, but that gives you the absolute position of the dynamic linker inside
the machine the target binary was created
On 01/25/2011 09:53 AM, Mike Frysinger wrote:
On Tue, Jan 25, 2011 at 03:47, Stefano Bonifazi wrote:
On 01/25/2011 02:36 AM, Richard Henderson wrote:
On 01/24/2011 01:44 PM, Stefano Bonifazi wrote:
Wow wonderful! So you fixed the code for PIC (ET_DYN) support?
Yes.
how can I get your
On 01/25/2011 09:53 AM, Mike Frysinger wrote:
On Tue, Jan 25, 2011 at 03:47, Stefano Bonifazi wrote:
On 01/25/2011 02:36 AM, Richard Henderson wrote:
On 01/24/2011 01:44 PM, Stefano Bonifazi wrote:
Wow wonderful! So you fixed the code for PIC (ET_DYN) support?
Yes.
how can I get your
Sorry.. merged with qemu? What version? I have qemu.0.13.0 and there are no
your fixes..
How can I get the fixed qemu sources?
you probably want to use the latest git tree
http://git.qemu.org/qemu.git/
-mike
Wow man! I got your work through the git!
Very good job! Now everything is much cleare
On 01/25/2011 10:05 AM, Edgar E. Iglesias wrote:
On Tue, Jan 25, 2011 at 10:04:39AM +0100, Stefano Bonifazi wrote:
Again wow!! Is that really possible? Some sort of callback triggered at
every instruction execution?
Yes, this mechanism works. I have written a code to count different
kinds of
Again wow!! Is that really possible? Some sort of callback triggered at
every instruction execution?
Yes, this mechanism works. I have written a code to count different
kinds of instructions.
Great! that opens a lot of possibilities!.
It exists in file qemu/target-i386/translate.c
Ops right! I
That said, QEMU's currently working fairly well on this front too, so
studying either should work pretty well...
Mr Richard Henderson's patch on elfload.c says I was right.. at least
the version I am working on (qemu-0.13.0) had some bugs and weaknesses
though it worked smoothly for most case
On 01/25/2011 01:18 AM, Mike Frysinger wrote:
On Mon, Jan 24, 2011 at 19:06, Mike Frysinger wrote:
On Mon, Jan 24, 2011 at 11:29, Mulyadi Santosa wrote:
I wrote an article about understanding ELF years ago, here is the URL:
http://www.linuxforums.org/articles/understanding-elf-using-readelf-and
On 01/25/2011 02:36 AM, Richard Henderson wrote:
On 01/24/2011 01:44 PM, Stefano Bonifazi wrote:
Wow wonderful! So you fixed the code for PIC (ET_DYN) support?
Yes.
how can I get your sources?
I was mistaken -- a later version of the patch set was in fact merged.
I simply forgot to delete
On 01/25/2011 12:32 AM, Mike Frysinger wrote:
On Mon, Jan 24, 2011 at 16:44, Stefano Bonifazi wrote:
http://lists.gnu.org/archive/html/qemu-devel/2010-07/msg01626.html
A noob question, how can I get your sources? Is there a simpler solution
than "copy&paste" all the code from
On 01/25/2011 01:06 AM, Mike Frysinger wrote:
On Mon, Jan 24, 2011 at 11:29, Mulyadi Santosa wrote:
I wrote an article about understanding ELF years ago, here is the URL:
http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html
i also highly recommend Linkers& L
Yes. Have a look at
http://lists.gnu.org/archive/html/qemu-devel/2010-07/msg01626.html
where I tried to clean this up last year. The patch never got properly
reviewed, however.
All that said, unless you have an executable that's been properly
prepared for relocation, e.g. an ET_DYN binar
how can the ldso possibly prevent clashes ? it has no idea what
addresses an app will ask for at runtime.
plus, if the kernel is employing ASLR (which isnt uncommon nowadays),
the load addresses could be anywhere.
-mike
Well not alone, in my mind ld.so asks the memory manager through calling
On 01/24/2011 10:27 PM, Mike Frysinger wrote:
On Mon, Jan 24, 2011 at 16:06, Stefano Bonifazi wrote:
I don't understand.. what is the difference between pie binary for pcc and
for your architecture?
as i said, i think this is all irrelevant to what you want to do. but
since you asked
but that can happen with the app running natively too, so any app not
handling MAP_FIXED failures is buggy and not qemu's problem.
-mike
How? For what I learned each process executing on a OS with an mmu sees
its virtual address space, and normally only its code is loaded there
(well I am lear
Hi! Thanks for replying me!
The thing is, the kernel currently _does_ work, so studying the relevant
kernel code (and possibly the dynamic loader code) is one way to learn
how it currently works.
Sorry what kernel? Qemu's? Linux's?
On 01/24/2011 08:11 PM, Mike Frysinger wrote:
On Mon, Jan 24, 2011 at 08:34, Stefano Bonifazi wrote:
Is FDPIC something different than simply PIC code (position independent
code)?
FDPIC ELF is the ELF PIE format used on NOMMU systems so that both the
text and data regions may be located
Hi!
Thank you for your answer!
he is telling you what ELF_START_MMAP is all about. it is the base
address that the linux kernel for that architecture will start giving
out addresses. so when running Linux on an x86 system, the first
mmap() a process does will start at 0x8000 and move up.
On 01/24/2011 07:02 PM, Dushyant Bansal wrote:
On Monday 24 January 2011 08:26 PM, Stefano Bonifazi wrote:
On 01/24/2011 03:32 PM, Peter Maydell wrote:
Being a JIT doesn't prohibit counting target instructions executed.
It just means that counting them generally requires generating
code
Hi!
Thank you for answering me!
Start address in which address the ELF code section, in reality (not
under qemu-user) should be mapped. in x86 32 bit it's 08048000, you
can check it by yourself by executing:
cat /proc/self/maps
Wait, like that I don't understand anything more.. As far as I
und
Hi!
Thank you for answering me!
If I understand this correctly, the execution of one of your PPC cores
is oblivious of the others (they share no guest physical memory).
No! They do share the same address space.. the way I am loading the
different qemu-ppc instances divides their namespaces al
On 01/24/2011 03:32 PM, Peter Maydell wrote:
Being a JIT doesn't prohibit counting target instructions executed.
It just means that counting them generally requires generating
code to do the counting at runtime, so it's a more complicated
change to make than it would be in a non-JIT emulator.
W
On 01/24/2011 02:36 PM, Lluís wrote:
Stefano Bonifazi writes:
Do you mean what is my final goal?
Exactly. A higher level perspective of what is our ultimate goal might
help others figure out better ways to do it.
Right now I don't remember what you posted your where technically trying
On 01/09/2011 09:48 AM, Mike Frysinger wrote:
This is a PoC at this point, but it seems to be working for me. At
least, all the current crashes I'm seeing are due to my Blackfin port
being incomplete. All of the FDPIC table parsing seems to be OK ...
If someone with a more functional target wo
On 01/16/2011 08:24 PM, Peter Maydell wrote:
2011/1/16 Stefano Bonifazi:
I need to make the different instances of qemu-user exchange data ..
obviously keeping all of them in the same address space would be the easiest
way (unless I have to change all qemu code ;) )
The problem is that you
On 01/16/2011 10:08 PM, Raphaël Lefèvre wrote:
2011/1/17 Stefano Bonifazi:
Hi!
In case you are interested in helping me, I'll give you a big piece of news
I've just got (even my teacher is not informed yet! :) )
I've just managed to make more than one instance of qemu-user
On 01/17/2011 12:59 PM, Lluís wrote:
Stefano Bonifazi writes:
Hi!
In case you are interested in helping me, I'll give you a big piece of news
I've just got (even my teacher is not informed yet! :) )
I still don't understand what is your high-level objective...
Lluis
On 01/24/2011 12:40 AM, Rob Landley wrote:
On 01/23/2011 04:25 PM, Stefano Bonifazi wrote:
I am trying to shift in memory the target executable .. now the code is
"supposed" to be loaded by the elfloader at the exact start address set
at link time ..
Ah, elf loading. That's
Hi!
I am working on a project based on qemu-user. More exactly it is
qemu-ppc (version 0.13.0) with x86 host.
All the project and documentation about qemu will be open for everybody
as it is a project for my university that is a public one..
I have the need to relocate the target code in the me
On 01/23/2011 10:50 PM, Rob Landley wrote:
On 01/16/2011 10:01 AM, Raphaël Lefèvre wrote:
On Sun, Jan 16, 2011 at 11:21 PM, Stefano Bonifazi
wrote:
2. "how can I check the number of target cpu cycles or target
instructions executed inside qemu-user (i.e. qemu-ppc)?
Is there any variable
On 01/18/2011 06:17 PM, Blue Swirl wrote:
On Tue, Jan 18, 2011 at 9:29 AM, Stefano Bonifazi
wrote:
Hi all!
I am working on qemu-user (qemu-ppc).
I'd like to edit the values of target registers during the execution. Can I
do that by simply changing the content of env->gpr[] or do th
Hi all!
I am working on qemu-user (qemu-ppc).
I'd like to edit the values of target registers during the execution.
Can I do that by simply changing the content of env->gpr[] or do these
only contain a copy of the values of the registers?
In this last case, where are the real values of the targ
e code
section (-Ttext address of ld).
It works fine and this proves my idea that the problem is within the elf
loader..
Making it relocate the target code properly would fix the problem ;)
Now let's work on it :)
Regards,
Stefano B.
On 01/16/2011 08:02 PM, Stefano Bonifazi wrote:
Thank yo
Thank you very much for Your fast reply!
On 01/16/2011 07:29 PM, Peter Maydell wrote:
Linux doesn't seem to have dlmopen
http://www.unix.com/man-page/All/3c/dlmopen/
#define __USE_GNU
#include
lib_handle1 = dlmopen(LM_ID_NEWLM,"./libqemu-ppc.so", RTLD_NOW);
I am developing that on a clean
Sorry for my belated on this discussion, after I searched for the
topics you posted, it seems two main problems are unsolved? (Am I
right?? I'm not sure...)
1. "I edited QEMU user, more exactly qemu-ppc launching the main function
(inside main.c) from another c function I created, passing it th
On 01/16/2011 03:46 PM, Raphael Lefevre wrote:
On Wed, Dec 15, 2010 at 4:17 AM, Stefano Bonifazi
wrote:
> On 12/11/2010 03:44 PM, Blue Swirl wrote:
>
> Hi!
> Thank you very much! Knowing exactly where I should check, in a so big
> project helped me very much!!
> A
Hi!
First of all Happy new year to everybody! :) Wish you all to realize
all your dreams! :)
I edited QEMU user, more exactly qemu-ppc launching the main function
(inside main.c) from another c function I created, passing it the
appropriate parameters.
I also caught the syscall 1 preventing it
On 12/23/2010 06:42 PM, Andreas Färber wrote:
Hi,
Am 22.12.2010 um 13:19 schrieb Stefano Bonifazi:
how can I check the number of target cpu cycles or target
instructions executed inside qemu-user (i.e. qemu-ppc)?
Is there any variable I can inspect for such informations?
QEMU's emul
Hi all! :)
how can I check the number of target cpu cycles or target instructions
executed inside qemu-user (i.e. qemu-ppc)?
Is there any variable I can inspect for such informations?
Thank you very much in advance!
Stefano B.
On 12/20/2010 07:31 PM, Blue Swirl wrote:
Are you aware of QEMU-SystemC:
http://www.greensocs.com/projects/QEMUSystemC
Perhaps that would be a better starting point than plain QEMU.
Hi!
Thank you! Sure I already checked this project! I googled all the web
for QEMU technical documents:) Even Ch
On 12/19/2010 04:38 PM, Alexander Graf wrote:
On 19.12.2010, at 15:19, Mulyadi Santosa wrote:
Hi :)
On Sun, Dec 19, 2010 at 03:29, Stefano Bonifazi wrote:
Hi!
I am answering myself hoping that my solution may help somebody other who
has to face the same problem:
I am not PPC user by
On 12/19/2010 06:03 PM, Andreas Färber wrote:
In particular, on some platforms libqemu.a would seem to compile okay
but the resulting QEMU executable would simply crash. We got around
these --whole-archive issues by putting together lists of object files
in Makefile.objs et al. that we can link
On 12/19/2010 05:51 PM, Andreas Färber wrote:
Am 19.12.2010 um 17:32 schrieb Stefano Bonifazi:
I need to create an application that execute a PPC binary on a i386
host with some input, and get the result from that binary.. I thought
I could use libqemu in some "user mode" way (i d
On 12/19/2010 05:10 PM, Blue Swirl wrote:
On Sun, Dec 19, 2010 at 2:29 PM, Stefano Bonifazi
wrote:
Hi all!
version 0.13 of qemu does not make libqemu.a
Is this some choice of developers, or due to any problem?
The API provided by libqemu.a is not supported, so when the compile
system was
Hi all!
version 0.13 of qemu does not make libqemu.a
Is this some choice of developers, or due to any problem?
How to fix that?
Thank you in advance!
Stefano B.
Hi!
I am answering myself hoping that my solution may help somebody other
who has to face the same problem:
In QEMU home page, under downloads section you can find QEMU Linux user
mode tests: http://wiki.qemu.org/download/linux-user-test-0.3.tar.gz
Inside there are also examples for qemu-ppc
Hi all!
May someone help me running qemu-ppc?
Executing:
> qemu-ppc hello
with hello a PPC binary, I get:
/lib/ld.so.1: No such file or directory
executing qemu-ppc without argument I get this:
[...]
-L path set the elf interpreter prefix
(default=/usr/gnemul/qemu-ppc)
[...]
but /u
On 12/16/2010 04:41 PM, Peter Maydell wrote:
Some hints:
* go and look up the C syntax for function pointers and
casting things to function pointers
Yup! See the reply to Mr. Santosa, thank you!
* code_gen_prologue[] contains code which has been generated
once on startup -- go and find the
On 12/16/2010 04:57 PM, Mulyadi Santosa wrote:
With my limited C knowledge, I saw that as a instruction jump (to
tb_ptr). The "code_gen_prologue" seems to me like a cast. casting
each opcode in tb_ptr as uint8_t with maximum length=1024
Hi! Thank you for your reply!
I've got an explanat
Hi all!
I am a student, trying to understand QEMU, specifically TCG
translation/execution.
After spending much time on the code I still have big doubts. I think my
doubts are due to the classic idea I have of an emulator.
Actually as a student, I've never developed even a simple classic
emu
On 12/11/2010 03:44 PM, Blue Swirl wrote:
On Sat, Dec 11, 2010 at 2:32 PM, Stefano Bonifazi
wrote:
Where does the execution of host binary take place in the previous list of
events? Between point 5) and 6) ?
After 6) ? In what QEMU source code file/function does the final execution of
host
-Original Message-
From: Paolo Bonzini [mailto:pbonz...@redhat.com]
Sent: venerdì 10 dicembre 2010 22:49
To: Stefano Bonifazi
Subject: Re: [PATCH] fix qruncom compilation problems
>For runcom (without the "q") this wouldn't work, because it runs the code
in vm86 mode.
-Original Message-
From: Blue Swirl [mailto:blauwir...@gmail.com]
Sent: sabato 11 dicembre 2010 14:12
To: Stefano Bonifazi
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] TCG flow vs dyngen
>There's a large buffer for generated code, allocated in exec.c. This is filled
&g
Thank you very very much! I'd take months for understanding everything
myself from the source code! :)
On 12/11/2010 12:02 PM, Blue Swirl wrote:
On Fri, Dec 10, 2010 at 9:26 PM, Stefano Bonifazi
wrote:
[..]
- So, I think that the technical documentation is now obsolete, isn't it?
On 12/10/2010 09:53 AM, Paolo Bonzini wrote:
On 12/09/2010 06:29 PM, Stefano Bonifazi wrote:
how can one think that addresses around zero are free for a mapping??
Addresses around zero are always free, because if they weren't you
couldn't detect NULL pointer dereferences reliably.
Hi all!
From the technical documentation
(http://www.usenix.org/publications/library/proceedings/usenix05/tech/freenix/bellard.html)
I read:
The first step is to split each target CPU instruction into fewer
simpler instructions called /micro operations/. Each micro operation
is implemented
Hi All!
I am new in QEMU developing and I am not sure if I can use this
mailing list for asking general questions about QEMU source code as I
could not find any guidelines about it.
I noticed that, usually, questions about the source code in the QEMU
forum never receive answers.
Surely the bes
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
On 12/08/2010 01:49 PM, Paolo Bonzini wrote:
Signed-off-by: Paolo Bonzini
---
I had this patch lying around but I don't think I ever got
qruncom to work completely.
Makefile.target |3 ++
tests/Makefile |7 ++--
tests/qruncom.c | 93 ++
Hi All!
I am trying to study how libqemu works starting from the example qruncom.c
I don't know why, but libqemu.a is not built with QEMU 0.13.
I downloaded and built QEMU 0.12.5. And found libqemu.a inside
i386-linux-user.
The tests programs (inside folder tests) were not built with QEMU. Then
On 12/07/2010 10:01 PM, Stefan Weil wrote:
Hi Stefano,
you found this mailing list, so I assume you read everything which is
available on http://wiki.qemu.org/Main_Page, and you also tried hard
to find the answers to your questions yourself, didn't you?
If there remain concrete questions, you
Hi All!
I am new in QEMU developing and I am not sure if I can use this
mailing list for asking general questions about QEMU source code as I
could not find any guidelines about it.
I noticed that, usually, questions about the source code in the QEMU
forum never receive answers.
Surely the bes
66 matches
Mail list logo