* How to trace every memory access
@ 2013-11-20 7:55 Arthur Chunqi Li
2013-11-20 10:41 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Arthur Chunqi Li @ 2013-11-20 7:55 UTC (permalink / raw)
To: kvm, Paolo Bonzini
Hi Paolo,
Currently I can trap every first write/read to a memory page from
guest VM (add codes in tdp_page_fault). If I want to trace every
memory access to a page, how can I achieve such goal in KVM?
Thanks,
Arthur
--
Arthur Chunqi Li
Department of Computer Science
School of EECS
Peking University
Beijing, China
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to trace every memory access
2013-11-20 7:55 How to trace every memory access Arthur Chunqi Li
@ 2013-11-20 10:41 ` Paolo Bonzini
2013-12-20 9:15 ` Arthur Chunqi Li
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2013-11-20 10:41 UTC (permalink / raw)
To: Arthur Chunqi Li; +Cc: kvm
Il 20/11/2013 08:55, Arthur Chunqi Li ha scritto:
> Hi Paolo,
>
> Currently I can trap every first write/read to a memory page from
> guest VM (add codes in tdp_page_fault). If I want to trace every
> memory access to a page, how can I achieve such goal in KVM?
You don't. :)
If you are looking for something like this, a dynamic recompilation
engine (such as QEMU's TCG) probably ends up being faster.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to trace every memory access
2013-11-20 10:41 ` Paolo Bonzini
@ 2013-12-20 9:15 ` Arthur Chunqi Li
2013-12-20 11:58 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Arthur Chunqi Li @ 2013-12-20 9:15 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm
Hi Paolo,
When using EPT in KVM, does every vcpu has an EPT paging structure or
all vcpus share one?
Thanks,
Arthur
On Wed, Nov 20, 2013 at 6:41 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 20/11/2013 08:55, Arthur Chunqi Li ha scritto:
>> Hi Paolo,
>>
>> Currently I can trap every first write/read to a memory page from
>> guest VM (add codes in tdp_page_fault). If I want to trace every
>> memory access to a page, how can I achieve such goal in KVM?
>
> You don't. :)
>
> If you are looking for something like this, a dynamic recompilation
> engine (such as QEMU's TCG) probably ends up being faster.
>
> Paolo
--
Arthur Chunqi Li
Department of Computer Science
School of EECS
Peking University
Beijing, China
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to trace every memory access
2013-12-20 9:15 ` Arthur Chunqi Li
@ 2013-12-20 11:58 ` Paolo Bonzini
2013-12-20 14:02 ` Arthur Chunqi Li
2013-12-21 7:25 ` Arthur Chunqi Li
0 siblings, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2013-12-20 11:58 UTC (permalink / raw)
To: Arthur Chunqi Li; +Cc: kvm
Il 20/12/2013 10:15, Arthur Chunqi Li ha scritto:
> Hi Paolo,
>
> When using EPT in KVM, does every vcpu has an EPT paging structure or
> all vcpus share one?
All MMU structures are in vcpu->arch.mmu and vcpu->arch.nested_mmu, so
they're per-VCPU.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to trace every memory access
2013-12-20 11:58 ` Paolo Bonzini
@ 2013-12-20 14:02 ` Arthur Chunqi Li
2013-12-21 7:25 ` Arthur Chunqi Li
1 sibling, 0 replies; 6+ messages in thread
From: Arthur Chunqi Li @ 2013-12-20 14:02 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm
Hi Paolo,
I want to rebuild the EPT paging structure, so I use kvm_mmu_unload()
followed with kvm_mmu_reload(). But it seems fail because I cannot
trap EPT_VIOLATION I want after the rebuild.
How could I totally rebuild the EPT paging structure?
Arthur
On Fri, Dec 20, 2013 at 7:58 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 20/12/2013 10:15, Arthur Chunqi Li ha scritto:
>> Hi Paolo,
>>
>> When using EPT in KVM, does every vcpu has an EPT paging structure or
>> all vcpus share one?
>
> All MMU structures are in vcpu->arch.mmu and vcpu->arch.nested_mmu, so
> they're per-VCPU.
>
> Paolo
--
Arthur Chunqi Li
Department of Computer Science
School of EECS
Peking University
Beijing, China
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to trace every memory access
2013-12-20 11:58 ` Paolo Bonzini
2013-12-20 14:02 ` Arthur Chunqi Li
@ 2013-12-21 7:25 ` Arthur Chunqi Li
1 sibling, 0 replies; 6+ messages in thread
From: Arthur Chunqi Li @ 2013-12-21 7:25 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm
On Fri, Dec 20, 2013 at 7:58 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 20/12/2013 10:15, Arthur Chunqi Li ha scritto:
>> Hi Paolo,
>>
>> When using EPT in KVM, does every vcpu has an EPT paging structure or
>> all vcpus share one?
>
> All MMU structures are in vcpu->arch.mmu and vcpu->arch.nested_mmu, so
> they're per-VCPU.
If an EPT entry is built by a VCPU, will this entry be propagated to
other VCPU's EPT paging structures?
Arthur
>
> Paolo
--
Arthur Chunqi Li
Department of Computer Science
School of EECS
Peking University
Beijing, China
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-12-21 7:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 7:55 How to trace every memory access Arthur Chunqi Li
2013-11-20 10:41 ` Paolo Bonzini
2013-12-20 9:15 ` Arthur Chunqi Li
2013-12-20 11:58 ` Paolo Bonzini
2013-12-20 14:02 ` Arthur Chunqi Li
2013-12-21 7:25 ` Arthur Chunqi Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox