From: Nadav Amit <nadav.amit@gmail.com>
To: mtosatti@redhat.com, kvm@vger.kernel.org, ak@linux.intel.com
Cc: pbonzini@redhat.com, xiaoguangrong@linux.vnet.ibm.com,
gleb@kernel.org, avi@cloudius-systems.com
Subject: Re: [patch 2/5] KVM: MMU: allow pinning spte translations (TDP-only)
Date: Wed, 02 Jul 2014 03:58:58 +0300 [thread overview]
Message-ID: <53B35952.4070408@gmail.com> (raw)
In-Reply-To: <20140618231521.569025131@amt.cnet>
I tried to use the patches (regardless of PEBS).
When the host uses huge-pages, I get an a oops.
I did not delve into the patch details, but I think there is some mess
with the indexes - see below:
On 6/19/14, 2:12 AM, mtosatti@redhat.com wrote:
> +
> +static bool direct_pin_sptes(struct kvm_vcpu *vcpu, gfn_t gfn)
> +{
> + u64 *sptes[4];
> + int r, i, level;
> +
> + r = get_sptep_hierarchy(vcpu, gfn << PAGE_SHIFT, sptes);
> + if (!r)
> + return false;
> +
> + level = 5 - r;
> + if (!is_last_spte(*sptes[r-1], level))
should be *sptes[level-1]
> + return false;
> + if (!is_shadow_present_pte(*sptes[r-1]))
should be *sptes[level-1]
> + return false;
> +
> + for (i = 0; i < r; i++) {
> + u64 *sptep = sptes[i];
should be sptes[3 - i];
> + struct kvm_mmu_page *sp = page_header(__pa(sptep));
> +
> + sp->pinned = true;
> + set_bit(SPTE_PINNED_BIT, (unsigned long *)sptep);
> + }
> +
> + return true;
> +}
>
Regards,
Nadav
next prev parent reply other threads:[~2014-07-02 0:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 23:12 [patch 0/5] KVM: support for pinning sptes mtosatti
2014-06-18 23:12 ` [patch 1/5] KVM: x86: add pinned parameter to page_fault methods mtosatti
2014-06-18 23:12 ` [patch 2/5] KVM: MMU: allow pinning spte translations (TDP-only) mtosatti
2014-06-19 7:21 ` Gleb Natapov
2014-06-19 19:22 ` Marcelo Tosatti
2014-06-20 10:09 ` Gleb Natapov
2014-06-30 20:46 ` Marcelo Tosatti
2014-06-30 22:00 ` Andi Kleen
2014-06-19 8:01 ` Avi Kivity
2014-06-19 14:06 ` Andi Kleen
2014-06-19 18:26 ` Marcelo Tosatti
2014-06-22 13:35 ` Avi Kivity
2014-07-09 13:25 ` Marcelo Tosatti
2014-07-02 0:58 ` Nadav Amit [this message]
2014-06-18 23:12 ` [patch 3/5] KVM: MMU: notifiers support for pinned sptes mtosatti
2014-06-19 6:48 ` Gleb Natapov
2014-06-19 18:28 ` Marcelo Tosatti
2014-06-20 10:11 ` Gleb Natapov
2014-06-18 23:12 ` [patch 4/5] KVM: MMU: reload request from GET_DIRTY_LOG path mtosatti
2014-06-19 8:17 ` Gleb Natapov
2014-06-19 18:40 ` Marcelo Tosatti
2014-06-20 10:46 ` Gleb Natapov
2014-06-30 20:59 ` Marcelo Tosatti
2014-07-01 6:27 ` Gleb Natapov
2014-07-01 17:50 ` Marcelo Tosatti
2014-06-18 23:12 ` [patch 5/5] KVM: MMU: pinned sps are not candidates for deletion mtosatti
2014-06-19 1:44 ` [patch 0/5] KVM: support for pinning sptes Andi Kleen
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=53B35952.4070408@gmail.com \
--to=nadav.amit@gmail.com \
--cc=ak@linux.intel.com \
--cc=avi@cloudius-systems.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=xiaoguangrong@linux.vnet.ibm.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.