From: Gerd Hoffmann <kraxel@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm@vger.kernel.org
Subject: Re: lapic & npt
Date: Mon, 30 Jun 2008 12:21:04 +0200 [thread overview]
Message-ID: <4868B390.2020606@redhat.com> (raw)
In-Reply-To: <4846BFE0.8070507@qumranet.com>
[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]
Avi Kivity wrote:
> Gerd Hoffmann wrote:
>> Hi,
>>
>> I've just noticed that xenner doesn't work for 64bit xen guest kernels
>> on my new shiny barcelona box. The VM crashes when trying to access the
>> lapic. lapic setup is done before idt setup, register dump looks like
>> init state, thus it most likely is a triple fault resetting the vcpu.
>> Turning off npt fixes it.
>>
>> xenner maps the lapic to ffff820000000000 (64bit guests) or fe900000
>> (32bit guests). 32bit works fine even with npt enabled.
>>
>> host kernel is fedora 9 with kvm-69 modules.
>>
>> ideas anyone?
>
> Turn on logging in lapic.c. See if something turns up.
It doesn't come that far according to kvmtrace.
> If not, the page tables are probably set up incorrectly, but in a way
> that kvm doesn't notice.
Dunno. Tried kvmtrace and got the results attached without and with
NTP. Cutted down to the important sequence, starting with the apic MSR
read. After the msr access there are some page faults (some page table
pages are allocated and used to map the apic, thus likely triggering
shadow pt updates). Then the apic access (id register).
With npt kvm doesn't see the apic access at all. Also the TDP_FAULT
line looks fishy to me. The "virt = ... " isn't a (guest) virtual address.
btw: the iowrite to 0x00ea is console output.
ideas anyone?
Gerd
--
http://kraxel.fedorapeople.org/xenner/
[-- Attachment #2: no-npt --]
[-- Type: text/plain, Size: 1705 bytes --]
1673786946412 (+ 6068) VMEXIT vcpu = 0x00000000 pid = 0x0000102d [ exitcode = 0x0000007c, rip = 0xffff8300 0000a1d2 ]
0 (+ 0) MSR_READ vcpu = 0x00000000 pid = 0x0000102d [ MSR# = 0x0000001b, data = 0x00000000 fee00900 ]
1673786950748 (+ 4336) VMENTRY vcpu = 0x00000000 pid = 0x0000102d
1673786957068 (+ 6320) VMEXIT vcpu = 0x00000000 pid = 0x0000102d [ exitcode = 0x00000003, rip = 0xffff8300 00006ceb ]
0 (+ 0) CR_READ vcpu = 0x00000000 pid = 0x0000102d [ CR# = 3, value = 0x00000000 017a3000 ]
1673786966522 (+ 9454) VMENTRY vcpu = 0x00000000 pid = 0x0000102d
1673786973678 (+ 7156) VMEXIT vcpu = 0x00000000 pid = 0x0000102d [ exitcode = 0x0000004e, rip = 0xffff8300 00004023 ]
0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x0000102d [ errorcode = 0x00000002, virt = 0xffff8300 00048000 ]
1673787002404 (+ 28726) VMENTRY vcpu = 0x00000000 pid = 0x0000102d
1673787034034 (+ 31630) VMEXIT vcpu = 0x00000000 pid = 0x0000102d [ exitcode = 0x0000004e, rip = 0xffff8300 00004023 ]
0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x0000102d [ errorcode = 0x00000002, virt = 0xffff8300 00049000 ]
1673787049388 (+ 15354) VMENTRY vcpu = 0x00000000 pid = 0x0000102d
1673787080890 (+ 31502) VMEXIT vcpu = 0x00000000 pid = 0x0000102d [ exitcode = 0x0000004e, rip = 0xffff8300 0000a1ef ]
0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x0000102d [ errorcode = 0x00000000, virt = 0xffff8200 00000020 ]
0 (+ 0) APIC_ACCESS vcpu = 0x00000000 pid = 0x0000102d [ offset = 0x00000020 ]
1673787096270 (+ 15380) VMENTRY vcpu = 0x00000000 pid = 0x0000102d
[-- Attachment #3: npt --]
[-- Type: text/plain, Size: 1603 bytes --]
1834321779170 (+ 6312) VMEXIT vcpu = 0x00000000 pid = 0x00001080 [ exitcode = 0x0000007c, rip = 0xffff8300 0000a1d2 ]
0 (+ 0) MSR_READ vcpu = 0x00000000 pid = 0x00001080 [ MSR# = 0x0000001b, data = 0x00000000 fee00900 ]
1834321783872 (+ 4702) VMENTRY vcpu = 0x00000000 pid = 0x00001080
1834321793790 (+ 9918) VMEXIT vcpu = 0x00000000 pid = 0x00001080 [ exitcode = 0x00000400, rip = 0xffff8300 00004023 ]
0 (+ 0) TDP_FAULT vcpu = 0x00000000 pid = 0x00001080 [ errorcode = 0x00000006, virt = 0x00000000 00048000 ]
1834321818582 (+ 24792) VMENTRY vcpu = 0x00000000 pid = 0x00001080
1834321851480 (+ 32898) VMEXIT vcpu = 0x00000000 pid = 0x00001080 [ exitcode = 0x00000400, rip = 0xffff8300 00004023 ]
0 (+ 0) TDP_FAULT vcpu = 0x00000000 pid = 0x00001080 [ errorcode = 0x00000006, virt = 0x00000000 00049000 ]
1834321870858 (+ 19378) VMENTRY vcpu = 0x00000000 pid = 0x00001080
1834321906650 (+ 35792) VMEXIT vcpu = 0x00000000 pid = 0x00001080 [ exitcode = 0x00000400, rip = 0xffff8300 000053b1 ]
0 (+ 0) TDP_FAULT vcpu = 0x00000000 pid = 0x00001080 [ errorcode = 0x00000004, virt = 0x00000000 0000d000 ]
1834321912818 (+ 6168) VMENTRY vcpu = 0x00000000 pid = 0x00001080
1834321931382 (+ 18564) VMEXIT vcpu = 0x00000000 pid = 0x00001080 [ exitcode = 0x0000007b, rip = 0xffff8300 0000b256 ]
0 (+ 0) IO_WRITE vcpu = 0x00000000 pid = 0x00001080 [ port = 0x00ea, size = 1 ]
1834322090822 (+ 159440) VMENTRY vcpu = 0x00000000 pid = 0x00001080
next prev parent reply other threads:[~2008-06-30 10:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 16:11 lapic & npt Gerd Hoffmann
2008-06-04 16:16 ` Avi Kivity
2008-06-06 14:45 ` Gerd Hoffmann
2008-06-06 16:30 ` Avi Kivity
2008-06-27 14:42 ` Gerd Hoffmann
2008-06-30 10:21 ` Gerd Hoffmann [this message]
2008-06-04 18:56 ` Vringfd Dong, Eddie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4868B390.2020606@redhat.com \
--to=kraxel@redhat.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox