Skip to contentSkip to conversation

kernel kqemu and interrupt handler

Qemu-devel Samuel Thibault 1 participant 1 message Apr 26, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

I'm trying to make GNU Mach work with -kernel-kqemu, and the only problem I'm having is with IRQ handling while from kernel context: the handler roughly does

entry:
cld
pushl %ds
pushl %es
pushl %fs
pushl %gs
etc. call handler
popl %gs
popl %fs
popl %es
popl %ds

I get a General protection fault on popl %gs. Looking at the stack shows me that pushl %gs has pushed 0x13 instead of 0x10. While I understand why this is so (we're running in CPL 3 anyway), I wonder how this is supposed to work, and even more, how linux works (since it roughly does the same)...

Samuel