diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2013-06-07 04:51:24 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-06-27 07:18:15 -0400 |
commit | f2fd125d32822ee32779551a70d256a7c27dbe40 (patch) | |
tree | 76c09c50170f32db0587b3e5883f8e1b1b4f245e /arch/x86/kvm/mmutrace.h | |
parent | 885032b91042288f98d3888c2aaf3a108d348d5c (diff) |
KVM: MMU: store generation-number into mmio spte
Store the generation-number into bit3 ~ bit11 and bit52 ~ bit61, totally
19 bits can be used, it should be enough for nearly all most common cases
In this patch, the generation-number is always 0, it will be changed in
the later patch
[Gleb: masking generation bits from spte in get_mmio_spte_gfn() and
get_mmio_spte_access()]
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmutrace.h')
-rw-r--r-- | arch/x86/kvm/mmutrace.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h index eb444dd374af..ad24757041ad 100644 --- a/arch/x86/kvm/mmutrace.h +++ b/arch/x86/kvm/mmutrace.h | |||
@@ -199,23 +199,25 @@ DEFINE_EVENT(kvm_mmu_page_class, kvm_mmu_prepare_zap_page, | |||
199 | 199 | ||
200 | TRACE_EVENT( | 200 | TRACE_EVENT( |
201 | mark_mmio_spte, | 201 | mark_mmio_spte, |
202 | TP_PROTO(u64 *sptep, gfn_t gfn, unsigned access), | 202 | TP_PROTO(u64 *sptep, gfn_t gfn, unsigned access, unsigned int gen), |
203 | TP_ARGS(sptep, gfn, access), | 203 | TP_ARGS(sptep, gfn, access, gen), |
204 | 204 | ||
205 | TP_STRUCT__entry( | 205 | TP_STRUCT__entry( |
206 | __field(void *, sptep) | 206 | __field(void *, sptep) |
207 | __field(gfn_t, gfn) | 207 | __field(gfn_t, gfn) |
208 | __field(unsigned, access) | 208 | __field(unsigned, access) |
209 | __field(unsigned int, gen) | ||
209 | ), | 210 | ), |
210 | 211 | ||
211 | TP_fast_assign( | 212 | TP_fast_assign( |
212 | __entry->sptep = sptep; | 213 | __entry->sptep = sptep; |
213 | __entry->gfn = gfn; | 214 | __entry->gfn = gfn; |
214 | __entry->access = access; | 215 | __entry->access = access; |
216 | __entry->gen = gen; | ||
215 | ), | 217 | ), |
216 | 218 | ||
217 | TP_printk("sptep:%p gfn %llx access %x", __entry->sptep, __entry->gfn, | 219 | TP_printk("sptep:%p gfn %llx access %x gen %x", __entry->sptep, |
218 | __entry->access) | 220 | __entry->gfn, __entry->access, __entry->gen) |
219 | ); | 221 | ); |
220 | 222 | ||
221 | TRACE_EVENT( | 223 | TRACE_EVENT( |