Hi all, I'm Initializing the Local and IO APIC for a propeitary operating system running in Virtualized Environment . Im facing some problem with qemu-kvm but the code runs fine with qemu. when i run my kernel image with qemu-kvm it gives emulation error failure trying to execute the code outside ROM or RAM at fec00000(IO APIC base address) but the same code runs fine with qemu. can anyone please point me where might be the problem or how to find out this one? Warm Regards, Ravi Kulkarni.
On 2011-02-04 14:35, Ravi Kumar Kulkarni wrote:
Hi all, I'm Initializing the Local and IO APIC for a propeitary operating system running in Virtualized Environment . Im facing some problem with qemu-kvm but the code runs fine with qemu.
Does it also run fine with qemu-kvm and -no-kvm-irqchip? What versions of the kernel and qemu-kvm are you using? If not the latest git, does updating change the picture?
when i run my kernel image with qemu-kvm it gives emulation error failure trying to execute the code outside ROM or RAM at fec00000(IO APIC base address) but the same code runs fine with qemu. can anyone please point me where might be the problem or how to find out this one?
Start with capturing the activity of you guest via ftrace, enabling all kvm:* events. You may also try to attach gdb to qemu and analyze the different code path in both versions (specifically if you have debugging symbols for your guest).
BTW, is your OS doing any fancy [IO]APIC relocations?
Jan
On 02/04/2011 03:58 PM, Jan Kiszka wrote:
when i run my kernel image with qemu-kvm it gives emulation error failure trying to execute the code outside ROM or RAM at fec00000(IO APIC base address) but the same code runs fine with qemu. can anyone please point me where might be the problem or how to find out this one?
Please post the error message.
Start with capturing the activity of you guest via ftrace, enabling all kvm:* events. You may also try to attach gdb to qemu and analyze the different code path in both versions (specifically if you have debugging symbols for your guest).
The easy way to do that is trace-cmd (http://lwn.net/Articles/341902/):
$ trace-cmd record -e kvm -b 20000 ... ^C $ trace-cmd report
On Sun, Feb 6, 2011 at 10:50 PM, Avi Kivity avi@redhat.com wrote:
On 02/04/2011 03:58 PM, Jan Kiszka wrote:
when i run my kernel image with qemu-kvm it gives emulation error failure trying to execute the code outside ROM or RAM at fec00000(IO APIC base address) but the same code runs fine with qemu. can anyone please point me where might be the problem or how to find out this one?
Please post the error message.
Im attachin the error message in kvm.txt file with above mail.
Start with capturing the activity of you guest via ftrace, enabling all kvm:* events. You may also try to attach gdb to qemu and analyze the different code path in both versions (specifically if you have debugging symbols for your guest).
The easy way to do that is trace-cmd (http://lwn.net/Articles/341902/):
$ trace-cmd record -e kvm -b 20000 ... ^C $ trace-cmd report
please give me some time to set up the trace-cmd utility for capture. i also want to run with the latest kernel and qemu-kvm once. i will post the results soon.
the kernel version im using is 2.6.33 and qemu-kvm version is 0.12.3 and qemu version is 0.13. also im not doing any fancy relocations with the IO APIC.
-- error compiling committee.c: too many arguments to function
On 02/07/2011 10:33 AM, Ravi Kumar Kulkarni wrote:
On Sun, Feb 6, 2011 at 10:50 PM, Avi Kivityavi@redhat.com wrote:
On 02/04/2011 03:58 PM, Jan Kiszka wrote:
> when i run my kernel image with qemu-kvm it gives emulation error > failure > trying to execute the code outside ROM or RAM at fec00000(IO APIC base > address) > but the same code runs fine with qemu. can anyone please point me > where might be the problem or how to find out this one?
Please post the error message.
Im attachin the error message in kvm.txt file with above mail. KVM internal error. Suberror: 1 rax 000000000000000d rbx 000000001e2db2a6 rcx 00000000fa4bec19 rdx 0000000000000088 rsi 000000001f4de1ea rdi 0000000000000000 rsp 00000000000c0004 rbp 000000001f464fbb r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000 r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000 rip 000000001e2f3f7b rflags 00010097 cs 0008 (00000000/ffffffff p 1 dpl 0 db 1 s 1 type b l 0 g
What's the guest code at rip 0x1e2f3f7b ?
On Mon, Feb 7, 2011 at 2:19 PM, Avi Kivity avi@redhat.com wrote:
On 02/07/2011 10:33 AM, Ravi Kumar Kulkarni wrote:
On Sun, Feb 6, 2011 at 10:50 PM, Avi Kivityavi@redhat.com wrote:
On 02/04/2011 03:58 PM, Jan Kiszka wrote:
> > when i run my kernel image with qemu-kvm it gives emulation > error > > failure > > trying to execute the code outside ROM or RAM at fec00000(IO > APIC base > > address) > > but the same code runs fine with qemu. can anyone please point > me > > where might be the problem or how to find out this one?
Please post the error message.
Im attachin the error message in kvm.txt file with above mail. KVM internal error. Suberror: 1 rax 000000000000000d rbx 000000001e2db2a6 rcx 00000000fa4bec19 rdx 0000000000000088 rsi 000000001f4de1ea rdi 0000000000000000 rsp 00000000000c0004 rbp 000000001f464fbb
r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000 r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000 rip 000000001e2f3f7b rflags 00010097 cs 0008 (00000000/ffffffff p 1 dpl 0 db 1 s 1 type b l 0 g
What's the guest code at rip 0x1e2f3f7b ?
please find the code below.
(qemu) xp /20iw 0x1e2f3f83
0x000000001e2f3f83: pop %ds
0x000000001e2f3f84: jae 0x1e2f3f66
0x000000001e2f3f86: dec %ebp
0x000000001e2f3f87: pop %ds
0x000000001e2f3f88: pushf
0x000000001e2f3f89: aas
0x000000001e2f3f8a: das
0x000000001e2f3f8b: push %ds
0x000000001e2f3f8c: iret
0x000000001e2f3f8d: test $0x1e2e,%eax
0x000000001e2f3f92: add %al,(%eax)
0x000000001e2f3f94: add %al,(%eax)
0x000000001e2f3f96: add %al,(%eax)
0x000000001e2f3f98: or $0x0,%eax
0x000000001e2f3f9d: add %al,(%eax)
0x000000001e2f3f9f: add %cl,0x81e2f4c(%esi)
0x000000001e2f3fa5: add %al,(%eax)
0x000000001e2f3fa7: add %al,(%edx)
0x000000001e2f3fa9: add %al,(%ecx)
0x000000001e2f3fab: add %cl,-0x1f(%edx) Thanks, Ravi Kulkarni.
--
On 02/07/2011 11:24 AM, Ravi Kumar Kulkarni wrote:
On Mon, Feb 7, 2011 at 2:19 PM, Avi Kivityavi@redhat.com wrote:
On 02/07/2011 10:33 AM, Ravi Kumar Kulkarni wrote:
On Sun, Feb 6, 2011 at 10:50 PM, Avi Kivityavi@redhat.com wrote:
On 02/04/2011 03:58 PM, Jan Kiszka wrote:
>
>> > when i run my kernel image with qemu-kvm it gives emulation >> error >> > failure >> > trying to execute the code outside ROM or RAM at fec00000(IO >> APIC base >> > address) >> > but the same code runs fine with qemu. can anyone please point >> me >> > where might be the problem or how to find out this one?
Please post the error message.
Im attachin the error message in kvm.txt file with above mail. KVM internal error. Suberror: 1 rax
000000000000000d rbx 000000001e2db2a6 rcx 00000000fa4bec19 rdx 0000000000000088 rsi 000000001f4de1ea rdi 0000000000000000 rsp 00000000000c0004 rbp 000000001f464fbb
r8 0000000000000000 r9 0000000000000000
r10 0000000000000000 r11 0000000000000000 r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000 rip 000000001e2f3f7b rflags 00010097 cs 0008 (00000000/ffffffff p 1 dpl 0 db 1 s 1 type b l 0 g
What's the guest code at rip 0x1e2f3f7b ?
please find the code below.
(qemu) xp /20iw 0x1e2f3f83
That is not the same address. And the code you posted doesn't make any sense.
On Mon, Feb 7, 2011 at 2:59 PM, Avi Kivity avi@redhat.com wrote:
On 02/07/2011 11:24 AM, Ravi Kumar Kulkarni wrote:
On Mon, Feb 7, 2011 at 2:19 PM, Avi Kivityavi@redhat.com wrote:
On 02/07/2011 10:33 AM, Ravi Kumar Kulkarni wrote:
On Sun, Feb 6, 2011 at 10:50 PM, Avi Kivityavi@redhat.com wrote:
> On 02/04/2011 03:58 PM, Jan Kiszka wrote:
>> > > >> > when i run my kernel image with qemu-kvm it gives > emulation > >> error > >> > failure > >> > trying to execute the code outside ROM or RAM at > fec00000(IO > >> APIC base > >> > address) > >> > but the same code runs fine with qemu. can anyone > please point > >> me > >> > where might be the problem or how to find out this > one?
> > Please post the error message.
Im attachin the error message in kvm.txt file with above mail. KVM internal error. Suberror: 1
rax 000000000000000d rbx 000000001e2db2a6 rcx 00000000fa4bec19 rdx 0000000000000088 rsi 000000001f4de1ea rdi 0000000000000000 rsp 00000000000c0004 rbp 000000001f464fbb
r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000
r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000 rip 000000001e2f3f7b rflags 00010097 cs 0008 (00000000/ffffffff p 1 dpl 0 db 1 s 1 type b l 0 g
What's the guest code at rip 0x1e2f3f7b ?
please find the code below.
(qemu) xp /20iw 0x1e2f3f83
That is not the same address. And the code you posted doesn't make any sense.
sorry for the mistake. here's the correct one
(qemu) xp /20iw 0x1e2f3f7b 0x000000001e2f3f7b: (bad) 0x000000001e2f3f7c: std 0x000000001e2f3f7d: (bad) 0x000000001e2f3f7e: (bad) 0x000000001e2f3f7f: decl 0x28000000 0x000000001e2f3f85: loope 0x1e2f3f87 0x000000001e2f3f87: add %cl,0x81e2f4c(%edi) 0x000000001e2f3f8d: add %al,(%eax) 0x000000001e2f3f8f: add %al,(%edi) 0x000000001e2f3f91: add %al,(%ecx) 0x000000001e2f3f93: add %ch,(%edx) 0x000000001e2f3f95: loope 0x1e2f3fe4 0x000000001e2f3f97: pop %ds 0x000000001e2f3f98: mov %cl,%ah 0x000000001e2f3f9a: dec %ebp 0x000000001e2f3f9b: pop %ds 0x000000001e2f3f9c: or $0xb41f4de0,%eax 0x000000001e2f3fa1: aas 0x000000001e2f3fa2: das 0x000000001e2f3fa3: push %ds
Warm regards, Ravi Kulkarni.
On 02/07/2011 11:47 AM, Ravi Kumar Kulkarni wrote:
That is not the same address. And the code you posted doesn't make any sense.
sorry for the mistake. here's the correct one
(qemu) xp /20iw 0x1e2f3f7b 0x000000001e2f3f7b: (bad) 0x000000001e2f3f7c: std 0x000000001e2f3f7d: (bad) 0x000000001e2f3f7e: (bad)
That looks like garbage. Are you sure you're disassembling the right code?
On Mon, Feb 7, 2011 at 3:24 PM, Avi Kivity avi@redhat.com wrote:
On 02/07/2011 11:47 AM, Ravi Kumar Kulkarni wrote:
That is not the same address. And the code you posted doesn't make any sense.
sorry for the mistake. here's the correct one
(qemu) xp /20iw 0x1e2f3f7b 0x000000001e2f3f7b: (bad) 0x000000001e2f3f7c: std 0x000000001e2f3f7d: (bad) 0x000000001e2f3f7e: (bad)
That looks like garbage. Are you sure you're disassembling the right code?
ok . Just to be clear i ran the command qemu-kvm once and i found got the crash report below which i have attached and in that eip is at 0x1e2f3f77 and then
(qemu) xp /20iw 0x1e2f3f77 0x000000001e2f3f77: pop %ds 0x000000001e2f3f78: inc %edx 0x000000001e2f3f79: loope 0x1e2f3fc8 0x000000001e2f3f7b: pop %ds 0x000000001e2f3f7c: jnp 0x1e2f3f5e 0x000000001e2f3f7e: dec %ebp 0x000000001e2f3f7f: pop %ds 0x000000001e2f3f80: xchg %eax,%esp 0x000000001e2f3f81: aas 0x000000001e2f3f82: das 0x000000001e2f3f83: push %ds 0x000000001e2f3f84: add %eax,(%eax) 0x000000001e2f3f86: add %al,(%eax) 0x000000001e2f3f88: add %al,(%eax) 0x000000001e2f3f8a: add %al,(%eax) 0x000000001e2f3f8c: add %al,(%eax) 0x000000001e2f3f8e: add %al,(%eax) 0x000000001e2f3f90: or $0x0,%eax 0x000000001e2f3f95: add %al,(%eax) 0x000000001e2f3f97: add %cl,0x81e2f4c(%esi)
Warm Regards, Ravi Kulkarni.
On 02/07/2011 12:28 PM, Ravi Kumar Kulkarni wrote:
On Mon, Feb 7, 2011 at 3:24 PM, Avi Kivityavi@redhat.com wrote:
On 02/07/2011 11:47 AM, Ravi Kumar Kulkarni wrote:
That is not the same address. And the code you posted doesn't make any sense.
sorry for the mistake. here's the correct one
(qemu) xp /20iw 0x1e2f3f7b 0x000000001e2f3f7b: (bad) 0x000000001e2f3f7c: std 0x000000001e2f3f7d: (bad) 0x000000001e2f3f7e: (bad)
That looks like garbage. Are you sure you're disassembling the right code?
ok . Just to be clear i ran the command qemu-kvm once and i found got the crash report below which i have attached and in that eip is at 0x1e2f3f77 and then
(qemu) xp /20iw 0x1e2f3f77 0x000000001e2f3f77: pop %ds 0x000000001e2f3f78: inc %edx 0x000000001e2f3f79: loope 0x1e2f3fc8 0x000000001e2f3f7b: pop %ds 0x000000001e2f3f7c: jnp 0x1e2f3f5e 0x000000001e2f3f7e: dec %ebp 0x000000001e2f3f7f: pop %ds 0x000000001e2f3f80: xchg %eax,%esp 0x000000001e2f3f81: aas 0x000000001e2f3f82: das
This still doesn't look like real code. The problem was likely much earlier and caused a branch into a data section.
Someone with a good understanding of your OS needs to examine the trace and see what went wrong.