2011-03-04 14:50:21

by Francis Moreau

[permalink] [raw]
Subject: 2.6.38-rc6: general protection error inside KVM 64 bits guest

Hello,

I'm running kernel 2.6.38-rc6 with qemu-kvm 0.12.3.

Doing this inside the guest:

int main(void)
{
if (ioperm(0x3e0, 4, 1) < 0) {
perror("ioperm");
exit(1);
}

outb(0, 0x3e0);
inb(0x3e1);
printf("exiting succesfully\n");
return 0;
}

make a general protection error.

Looking for the faulty instruction with gdb and found that's the 'inb'
instruction the culprit.

Running the same program on the host works fine.

Could anybody tell me what's wrong ?

Thanks
--
Francis