Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1160951 > unrolled thread
| Started by | Xiao Guangrong <guangrong.xiao@linux.intel.com> |
|---|---|
| First post | 2015-06-09 05:40 +0200 |
| Last post | 2015-06-18 06:50 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2015-06-09 05:40 +0200
Re: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2015-06-18 06:50 +0200
| From | Xiao Guangrong <guangrong.xiao@linux.intel.com> |
|---|---|
| Date | 2015-06-09 05:40 +0200 |
| Subject | Re: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap |
| Message-ID | <pziyl-2Hk-11@gated-at.bofh.it> |
On 05/28/2015 01:05 AM, Paolo Bonzini wrote: > This is always available (with one exception in the auditing code). > Later we will also use the role to look up the right memslots array. > return; > @@ -191,11 +191,15 @@ static void audit_write_protection(struct kvm *kvm, struct kvm_mmu_page *sp) > unsigned long *rmapp; > u64 *sptep; > struct rmap_iterator iter; > + struct kvm_memslots *slots; > + struct kvm_memory_slot *slot; > > if (sp->role.direct || sp->unsync || sp->role.invalid) > return; > > - rmapp = gfn_to_rmap(kvm, sp->gfn, PT_PAGE_TABLE_LEVEL); > + slots = kvm_memslots(kvm); > + slot = __gfn_to_memslot(slots, sp->gfn); > + rmapp = __gfn_to_rmap(sp->gfn, PT_PAGE_TABLE_LEVEL, slot); > Why @sp is not available here? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Xiao Guangrong <guangrong.xiao@linux.intel.com> |
|---|---|
| Date | 2015-06-18 06:50 +0200 |
| Message-ID | <pCzW1-6qb-1@gated-at.bofh.it> |
| In reply to | #1160951 |
On 06/17/2015 04:15 PM, Paolo Bonzini wrote: > > > On 09/06/2015 05:28, Xiao Guangrong wrote: >>> >>> - rmapp = gfn_to_rmap(kvm, sp->gfn, PT_PAGE_TABLE_LEVEL); >>> + slots = kvm_memslots(kvm); >>> + slot = __gfn_to_memslot(slots, sp->gfn); >>> + rmapp = __gfn_to_rmap(sp->gfn, PT_PAGE_TABLE_LEVEL, slot); >>> >> >> Why @sp is not available here? > > Because the function forces the level to be PT_PAGE_TABLE_LEVEL rather > than sp->level. Oh, right, thanks for your explanation. :) Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web