All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@qumranet.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@qumranet.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: KVM: MMU: large page update_pte issue with non-PAE 32-bit guests
Date: Tue, 10 Jun 2008 00:33:49 +0200	[thread overview]
Message-ID: <20080609223349.GQ8047@duo.random> (raw)
In-Reply-To: <20080609023549.GA11092@dmt.cnet>

On Sun, Jun 08, 2008 at 11:35:49PM -0300, Marcelo Tosatti wrote:
> 
> kvm_mmu_pte_write() does not handle 32-bit non-PAE large page backed
> guests properly. It will instantiate two 2MB sptes pointing to the same
> physical 2MB page when a guest large pte update is trapped.
> 
> Instead of duplicating code to handle this, disallow directory level
> updates to happen through kvm_mmu_pte_write(), so the two 2MB sptes
> emulating one guest 4MB pte can be correctly created by the page fault
> handling path.

This fix reminded me of this stack trace I looked some time ago, it
was also related to a 4M user pte IIRC, may they be related? In such a
case we can should update the bug status.

http://sourceforge.net/tracker/index.php?func=detail&aid=1929279&group_id=180599&atid=893831

7916:Mar 30 11:18:59 hmf kernel: RIP: 0010:[<ffffffff8882c99d>]  [<ffffffff8882c99d>] :kvm:rmap_remove+0x12d/0x1e0
7917:Mar 30 11:18:59 hmf kernel: RSP: 0018:ffff8100715a1a98  EFLAGS: 00010296
7918:Mar 30 11:18:59 hmf kernel: RAX: 0000000000000031 RBX: ffff810001a62f98 RCX: ffffffff80b04168
7919:Mar 30 11:18:59 hmf kernel: RDX: ffffffff80b04168 RSI: 0000000000000006 RDI: ffffffff80b04160
7920:Mar 30 11:18:59 hmf kernel: RBP: ffff810005fb2000 R08: 000000e1aeb7ed38 R09: 0000000000000000
7921:Mar 30 11:18:59 hmf kernel: R10: ffff810002c13b60 R11: 0000000000000001 R12: ffff810039518b30
7922:Mar 30 11:18:59 hmf kernel: R13: ffff81007cc78000 R14: 000000002f7b5063 R15: ffff810039518b30
7923:Mar 30 11:18:59 hmf kernel: FS:  00000000ffdff000(0000) GS:ffffffff80b8f000(0000) knlGS:0000000000000000
7924:Mar 30 11:18:59 hmf kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
7925:Mar 30 11:18:59 hmf kernel: CR2: 00002aaaaaafb000 CR3: 000000007dfc0000 CR4: 00000000000006e0
7926:Mar 30 11:18:59 hmf kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
7927:Mar 30 11:18:59 hmf kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
7928:Mar 30 11:18:59 hmf kernel: Process qemu-system-x86 (pid: 6262, threadinfo ffff8100715a0000, task ffff81000e90a810)
7929:Mar 30 11:18:59 hmf kernel: Stack:  ffff810079af4fa0 0000000000000000 ffff810005fb2000 ffff81000e99c040
7930:Mar 30 11:18:59 hmf kernel:  ffff81000e99c040 ffffffff8882e870 00000000040df863 ffffffff8882f3fe
7931:Mar 30 11:18:59 hmf kernel:  ffff810000000001 000000000000000f 0000000000000000 00000000c0600000
7932:Mar 30 11:18:59 hmf kernel: Call Trace:
7933:Mar 30 11:18:59 hmf kernel:  [<ffffffff8882e870>] :kvm:kvm_mmu_pte_write+0x220/0x850
7934:Mar 30 11:18:59 hmf kernel:  [<ffffffff8882f3fe>] :kvm:paging64_walk_addr+0x29e/0x340
7935:Mar 30 11:18:59 hmf kernel:  [<ffffffff88827cf4>] :kvm:__emulator_write_phys+0x44/0x70
7936:Mar 30 11:18:59 hmf kernel:  [<ffffffff8882966a>] :kvm:emulator_write_emulated_onepage+0xba/0x150
7937:Mar 30 11:18:59 hmf kernel:  [<ffffffff88831819>] :kvm:x86_emulate_insn+0x419/0x4430
7938:Mar 30 11:18:59 hmf kernel:  [<ffffffff8884716b>] :kvm_amd:svm_get_segment+0xb/0xa0
7939:Mar 30 11:18:59 hmf kernel:  [<ffffffff888264ee>] :kvm:kvm_get_cs_db_l_bits+0x1e/0x40
7940:Mar 30 11:18:59 hmf kernel:  [<ffffffff88827b4f>] :kvm:emulate_instruction+0x1df/0x340
7941:Mar 30 11:18:59 hmf kernel:  [<ffffffff8882e618>] :kvm:kvm_mmu_page_fault+0x58/0x90

Thanks!

  reply	other threads:[~2008-06-09 22:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-09  2:35 KVM: MMU: large page update_pte issue with non-PAE 32-bit guests Marcelo Tosatti
2008-06-09 22:33 ` Andrea Arcangeli [this message]
2008-06-10 16:44   ` Marcelo Tosatti

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=20080609223349.GQ8047@duo.random \
    --to=andrea@qumranet.com \
    --cc=avi@qumranet.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.