public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] kvm mmu: alloc shadow pages with __GFP_ZERO
Date: Wed, 18 Feb 2009 14:14:16 +0000	[thread overview]
Message-ID: <499C17B8.3030609@redhat.com> (raw)
In-Reply-To: <20090218141017.GG8751@amd.com>

Joerg Roedel wrote:
>> sp->spt is allocated using mmu_memory_cache_alloc(), which zeros the page.  How can the assertion fail?
>>     
>
> In the code I see (current kvm-git) mmu_memory_cache_alloc() does zero
> nothing. It takes the page from the preallocated pool and returns it.
> The pool itself is filled with mmu_topup_memory_caches() which calls
> mmu_topup_memory_cache_page() to fill the mmu_page_cache (from which the
> sp->spt page is allocated later). And the mmu_topup_memory_cache_page()
> function calls alloc_page() and does not zero the result. This let the
> assertion trigger.
>   

Right, I was looking at the 2.6.29 tree.  The patch is correct (and the 
others look good as well).  As usual, I'd like Marcelo to take a look as 
well.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2009-02-18 14:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 13:08 [PATCH 0/3] KVM SoftMMU fixes Joerg Roedel
2009-02-18 13:08 ` [PATCH 1/3] kvm mmu: handle compound pages in kvm_is_mmio_pfn Joerg Roedel
2009-02-18 18:10   ` Marcelo Tosatti
2009-02-18 13:08 ` [PATCH 2/3] kvm mmu: remove redundant check in mmu_set_spte Joerg Roedel
2009-02-18 18:38   ` Marcelo Tosatti
2009-02-18 13:09 ` [PATCH 3/3] kvm mmu: alloc shadow pages with __GFP_ZERO Joerg Roedel
2009-02-18 13:47   ` Avi Kivity
2009-02-18 13:54     ` Joerg Roedel
2009-02-18 14:03       ` Avi Kivity
2009-02-18 14:10         ` Joerg Roedel
2009-02-18 14:14           ` Avi Kivity [this message]
2009-02-18 18:42       ` 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=499C17B8.3030609@redhat.com \
    --to=avi@redhat.com \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox