Skip to contentSkip to conversation

IPC syscall emulation and glibc 2.3.x fix

Qemu-devel Derrik Pates 3 participants 4 messages Oct 28, 2003 – Oct 29, 2003

lore
Share & tools
lore
#0 lore raw

I'm working on adding emulation of the ipc syscall to qemu. I've managed to get SHM (mostly) working - at least, to the point that some X apps like it alright. I've run xwf (a simple GTK+-based file manager) and I managed to (with a lot of debug options) get Loki's port of SimCity 3000 started (though it hangs if you try to launch a game - it appears to get a SIGRTMIN and become confused by that, also the colors are obviously ordered wrong in the image, but the speed in the menu is pretty good). I intend to add support for semaphores and message queues as well, once I get the shmctl() stuff finished - still working on a few issues with getting stats on SHM segments.

Also, I've found a solution to some glibc changes that caused a build error on line 536 of cpu-exec.c (at least on PPC). However, to successfully #ifdef that so that it can still work with older glibc versions, I need to be able to fix the original configure.in that the configure script is generated from. Can that be added to CVS, so that it can be fixed as well?

Once I have this stuff ready (as well as possibly wrapping the _sysctl syscall), I'll submit a patch with all my changes.

--
Derrik Pates
[email protected]

#1 lore raw
Quoted 5 lines · Derrik Pates

I'm working on adding emulation of the ipc syscall to qemu. I've managed to get SHM (mostly) working - at least, to the point that some X apps like it alright. I've run xwf (a simple GTK+-based file manager) and I managed to (with a lot of debug options) get Loki's port of SimCity 3000 started (though it hangs if you try to launch a game - it appears to get a SIGRTMIN and become confused by that, also the colors are obviously ordered wrong in the image, but the speed in the menu is pretty good). I intend to add support for semaphores and message queues as well, once I get the shmctl() stuff finished - still working on a few issues with getting stats on SHM segments.

Also, I've found a solution to some glibc changes that caused a build error on line 536 of cpu-exec.c (at least on PPC). However, to successfully #ifdef that so that it can still work with older glibc versions, I need to be able to fix the original configure.in that the configure script is generated from. Can that be added to CVS, so that it can be fixed as well?

Once I have this stuff ready (as well as possibly wrapping the _sysctl syscall), I'll submit a patch with all my changes.

Thank you for the work ! Don't forget to patch 'linux-test.c' so that it is possible to test automatically the ipc syscalls implementation.

Fabrice.

#2 lore raw
Quoted 1 line · Fabrice Bellard

Thank you for the work ! Don't forget to patch 'linux-test.c' so that it is possible to test automatically the ipc syscalls implementation.

I'll have to check that out. Will you be including the configure.in that is used to generate the qemu configure script in CVS, so that I can add the necessary configure-time check for the 'gregs' member in the uc->uc_mcontext structure? I definitely would like to see qemu built out-of-the-box on glibc 2.3.x systems, and I've seen at least one other message to the mailing list from someone who ran into the same problem, but wasn't able to find a solution.

--
Derrik Pates
[email protected]

#3 lore raw
Quoted 11 lines · Derrik Pates
Quoted 2 lines · Fabrice Bellard

Thank you for the work ! Don't forget to patch 'linux-test.c' so that it is possible to test automatically the ipc syscalls implementation.

I'll have to check that out. Will you be including the configure.in that is used to generate the qemu configure script in CVS, so that I can add the necessary configure-time check for the 'gregs' member in the uc->uc_mcontext structure? I definitely would like to see qemu built out-of-the-box on glibc 2.3.x systems, and I've seen at least one other message to the mailing list from someone who ran into the same problem, but wasn't able to find a solution.

This is a bug in some versions of glibc 2.3.x, and fixed in the most recent ones (it's still broken in Debian, I need to fix that). i.e. the old form is correct.

Signature · 2 lines
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer