[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] kvm decode cache and guest memory
From: |
Xin Tong |
Subject: |
[Qemu-devel] kvm decode cache and guest memory |
Date: |
Fri, 11 Nov 2011 17:51:59 -0500 |
When kvm encounters a trapping instruction, it will vmexits the guest
and vmenters the host. the host then emulates the instruction on the
vm guest register-saving area. I have a few questions regarding this.
1. There is an emulation context
struct x86_emulate_ctxt {
struct x86_emulate_ops *ops;
/* Register state before/after emulation. */
struct kvm_vcpu *vcpu;
...
/* decode cache */
struct decode_cache decode;
};
What is the decode_cache here and where does it get filled out ?
2. When the host is emulating instructions for the guest, it may need
to access the guest memory, I guess there are really 2 questions here.
1. is the guest memory physically contiguous ?
2. how does the host access the guest memory ? there must be
some functions or macros ?
Thanks
Xin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] kvm decode cache and guest memory,
Xin Tong <=