* [parisc-linux] QEMU Port (Help needed) @ 2006-06-04 16:04 Stuart Brady 2006-06-04 21:48 ` Carlos O'Donell 0 siblings, 1 reply; 5+ messages in thread From: Stuart Brady @ 2006-06-04 16:04 UTC (permalink / raw) To: parisc-linux Hi, I've had a stab at porting QEMU to PA-RISC... I've uploaded a patch against QEMU 0.8.1 to: http://homepage.ntlworld.com/wholehog/stuart/qemu/qemu-hppa-guest.diff It compiles, but I can't figure out why it's crashing. Any ideas? Cheers, -- Stuart Brady _______________________________________________ parisc-linux mailing list parisc-linux@lists.parisc-linux.org http://lists.parisc-linux.org/mailman/listinfo/parisc-linux ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] QEMU Port (Help needed) 2006-06-04 16:04 [parisc-linux] QEMU Port (Help needed) Stuart Brady @ 2006-06-04 21:48 ` Carlos O'Donell 2006-06-04 23:13 ` Stuart Brady 2006-06-04 23:19 ` Matthew Wilcox 0 siblings, 2 replies; 5+ messages in thread From: Carlos O'Donell @ 2006-06-04 21:48 UTC (permalink / raw) To: Stuart Brady; +Cc: parisc-linux On 6/4/06, Stuart Brady <sdbrady@ntlworld.com> wrote: > Hi, > > I've had a stab at porting QEMU to PA-RISC... I've uploaded a patch > against QEMU 0.8.1 to: > > http://homepage.ntlworld.com/wholehog/stuart/qemu/qemu-hppa-guest.diff > > It compiles, but I can't figure out why it's crashing. Any ideas? That's awesome to hear that you are working on QEMU for PARISC! It would rock to have a fast simulator. Even a semi-hosted environment would be a cool toy to play with. Does QEMU crash? Does the emulated userspace crash? A couple of comments about your patch: 1. Remember 32-bit PARISC executables have both function pointers and function descriptors. 2. The "gp" is r19, the "dp" is r27. I don't know what your reference to the "__dlt" is? 3. You can copy testandset from glibc linuxthreads pthread.h 4. flush_icache_range can probably be copied from the kernel implementation. Other than that, there are *all* sorts of things which could be wrong :) Cheers, Carlos. _______________________________________________ parisc-linux mailing list parisc-linux@lists.parisc-linux.org http://lists.parisc-linux.org/mailman/listinfo/parisc-linux ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] QEMU Port (Help needed) 2006-06-04 21:48 ` Carlos O'Donell @ 2006-06-04 23:13 ` Stuart Brady 2006-06-04 23:19 ` Matthew Wilcox 1 sibling, 0 replies; 5+ messages in thread From: Stuart Brady @ 2006-06-04 23:13 UTC (permalink / raw) To: Carlos O'Donell; +Cc: parisc-linux On Sun, Jun 04, 2006 at 05:48:17PM -0400, Carlos O'Donell wrote: > On 6/4/06, Stuart Brady <sdbrady@ntlworld.com> wrote: > >I've had a stab at porting QEMU to PA-RISC... I've uploaded a patch > >against QEMU 0.8.1 to: > > > > http://homepage.ntlworld.com/wholehog/stuart/qemu/qemu-hppa-guest.diff > > > >It compiles, but I can't figure out why it's crashing. Any ideas? > > That's awesome to hear that you are working on QEMU for PARISC! > It would rock to have a fast simulator. Even a semi-hosted environment > would be a cool toy to play with. It would be nice. But I'm not sure if I _can_ finish this. :( > Does QEMU crash? > Does the emulated userspace crash? QEMU crashes. So far, I've only tried system emulation, not userspace emulation. An illegal instruction is being executed, and this appears to be for the very first instruction that is emulated. I get the following: Program received signal SIGILL, Illegal instruction. [Switching to Thread 16384 (LWP 6905)] 0x00b30f40 in stdout () (gdb) bt makes gdb hang! :( Unfortunately, my gdb-fu is pretty weak. > A couple of comments about your patch: > > 1. Remember 32-bit PARISC executables have both function pointers and > function descriptors. Ow. I really have no idea about how this works. > 2. The "gp" is r19, the "dp" is r27. I don't know what your reference > to the "__dlt" is? I don't know, either. I was mainly guessing, based on what I saw in the PA ELF supplement. After changing it to use r19, gcc warns that r19 is call-clobbered, but I don't know whether that's relevant. I see the same behaviour as before, though... > 3. You can copy testandset from glibc linuxthreads pthread.h Okay, I will do. (I don't think this is the immediate problem, though.) > 4. flush_icache_range can probably be copied from the kernel implementation. Probably. Much of QEMU is LGPLed, though... but I can certainly try using the kernel implementation. > Other than that, there are *all* sorts of things which could be wrong :) Hmm... and they probably *are* wrong, too! :) Thanks, -- Stuart Brady _______________________________________________ parisc-linux mailing list parisc-linux@lists.parisc-linux.org http://lists.parisc-linux.org/mailman/listinfo/parisc-linux ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] QEMU Port (Help needed) 2006-06-04 21:48 ` Carlos O'Donell 2006-06-04 23:13 ` Stuart Brady @ 2006-06-04 23:19 ` Matthew Wilcox 2006-06-04 23:22 ` Carlos O'Donell 1 sibling, 1 reply; 5+ messages in thread From: Matthew Wilcox @ 2006-06-04 23:19 UTC (permalink / raw) To: Carlos O'Donell; +Cc: parisc-linux On Sun, Jun 04, 2006 at 05:48:17PM -0400, Carlos O'Donell wrote: > 4. flush_icache_range can probably be copied from the kernel implementation. Why are we still talking about doing flush_icache_range() in userspace? Why does qemu not use mprotect() to set either PROT_EXEC or PROT_WRITE (and never both at the same time)? The kernel will flush userspace appopriately (and if it doesn't, that's a bug). _______________________________________________ parisc-linux mailing list parisc-linux@lists.parisc-linux.org http://lists.parisc-linux.org/mailman/listinfo/parisc-linux ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] QEMU Port (Help needed) 2006-06-04 23:19 ` Matthew Wilcox @ 2006-06-04 23:22 ` Carlos O'Donell 0 siblings, 0 replies; 5+ messages in thread From: Carlos O'Donell @ 2006-06-04 23:22 UTC (permalink / raw) To: Matthew Wilcox; +Cc: parisc-linux On 6/4/06, Matthew Wilcox <matthew@wil.cx> wrote: > On Sun, Jun 04, 2006 at 05:48:17PM -0400, Carlos O'Donell wrote: > > 4. flush_icache_range can probably be copied from the kernel implementation. > > Why are we still talking about doing flush_icache_range() in userspace? > Why does qemu not use mprotect() to set either PROT_EXEC or PROT_WRITE > (and never both at the same time)? The kernel will flush userspace > appopriately (and if it doesn't, that's a bug). > Blame QEMU for letting you override the default implementation! It's always tempting to see if you can do it faster in userspace? Cheers, Carlos. _______________________________________________ parisc-linux mailing list parisc-linux@lists.parisc-linux.org http://lists.parisc-linux.org/mailman/listinfo/parisc-linux ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-04 23:22 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-06-04 16:04 [parisc-linux] QEMU Port (Help needed) Stuart Brady 2006-06-04 21:48 ` Carlos O'Donell 2006-06-04 23:13 ` Stuart Brady 2006-06-04 23:19 ` Matthew Wilcox 2006-06-04 23:22 ` Carlos O'Donell
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.