diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-10-14 05:22:53 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:23:17 -0500 |
commit | 7c90705bf2a373aa238661bdb6446f27299ef489 (patch) | |
tree | d3d00b4413b0d33254d53bbb3285be82444494d9 /include/trace | |
parent | 631bc4878220932fe67fc46fc7cf7cccdb1ec597 (diff) |
KVM: Inject asynchronous page fault into a PV guest if page is swapped out.
Send async page fault to a PV guest if it accesses swapped out memory.
Guest will choose another task to run upon receiving the fault.
Allow async page fault injection only when guest is in user mode since
otherwise guest may be in non-sleepable context and will not be able
to reschedule.
Vcpu will be halted if guest will fault on the same page again or if
vcpu executes kernel code.
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/kvm.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index a78a5e574632..9c2cc6a96e82 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
@@ -204,34 +204,39 @@ TRACE_EVENT( | |||
204 | 204 | ||
205 | TRACE_EVENT( | 205 | TRACE_EVENT( |
206 | kvm_async_pf_not_present, | 206 | kvm_async_pf_not_present, |
207 | TP_PROTO(u64 gva), | 207 | TP_PROTO(u64 token, u64 gva), |
208 | TP_ARGS(gva), | 208 | TP_ARGS(token, gva), |
209 | 209 | ||
210 | TP_STRUCT__entry( | 210 | TP_STRUCT__entry( |
211 | __field(__u64, token) | ||
211 | __field(__u64, gva) | 212 | __field(__u64, gva) |
212 | ), | 213 | ), |
213 | 214 | ||
214 | TP_fast_assign( | 215 | TP_fast_assign( |
216 | __entry->token = token; | ||
215 | __entry->gva = gva; | 217 | __entry->gva = gva; |
216 | ), | 218 | ), |
217 | 219 | ||
218 | TP_printk("gva %#llx not present", __entry->gva) | 220 | TP_printk("token %#llx gva %#llx not present", __entry->token, |
221 | __entry->gva) | ||
219 | ); | 222 | ); |
220 | 223 | ||
221 | TRACE_EVENT( | 224 | TRACE_EVENT( |
222 | kvm_async_pf_ready, | 225 | kvm_async_pf_ready, |
223 | TP_PROTO(u64 gva), | 226 | TP_PROTO(u64 token, u64 gva), |
224 | TP_ARGS(gva), | 227 | TP_ARGS(token, gva), |
225 | 228 | ||
226 | TP_STRUCT__entry( | 229 | TP_STRUCT__entry( |
230 | __field(__u64, token) | ||
227 | __field(__u64, gva) | 231 | __field(__u64, gva) |
228 | ), | 232 | ), |
229 | 233 | ||
230 | TP_fast_assign( | 234 | TP_fast_assign( |
235 | __entry->token = token; | ||
231 | __entry->gva = gva; | 236 | __entry->gva = gva; |
232 | ), | 237 | ), |
233 | 238 | ||
234 | TP_printk("gva %#llx ready", __entry->gva) | 239 | TP_printk("token %#llx gva %#llx ready", __entry->token, __entry->gva) |
235 | ); | 240 | ); |
236 | 241 | ||
237 | TRACE_EVENT( | 242 | TRACE_EVENT( |