diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-10-14 05:22:50 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:23:12 -0500 |
commit | 344d9588a9df06182684168be4f1408b55c7da3e (patch) | |
tree | 16890e3f0f10ac767265e650a1d6d38b78780040 /Documentation/kvm/msr.txt | |
parent | ca3f10172eea9b95bbb66487656f3c3e93855702 (diff) |
KVM: Add PV MSR to enable asynchronous page faults delivery.
Guest enables async PF vcpu functionality using this MSR.
Reviewed-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 'Documentation/kvm/msr.txt')
-rw-r--r-- | Documentation/kvm/msr.txt | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/Documentation/kvm/msr.txt b/Documentation/kvm/msr.txt index 8ddcfe84c09a..e67b4a8783df 100644 --- a/Documentation/kvm/msr.txt +++ b/Documentation/kvm/msr.txt | |||
@@ -3,7 +3,6 @@ Glauber Costa <glommer@redhat.com>, Red Hat Inc, 2010 | |||
3 | ===================================================== | 3 | ===================================================== |
4 | 4 | ||
5 | KVM makes use of some custom MSRs to service some requests. | 5 | KVM makes use of some custom MSRs to service some requests. |
6 | At present, this facility is only used by kvmclock. | ||
7 | 6 | ||
8 | Custom MSRs have a range reserved for them, that goes from | 7 | Custom MSRs have a range reserved for them, that goes from |
9 | 0x4b564d00 to 0x4b564dff. There are MSRs outside this area, | 8 | 0x4b564d00 to 0x4b564dff. There are MSRs outside this area, |
@@ -151,3 +150,37 @@ MSR_KVM_SYSTEM_TIME: 0x12 | |||
151 | return PRESENT; | 150 | return PRESENT; |
152 | } else | 151 | } else |
153 | return NON_PRESENT; | 152 | return NON_PRESENT; |
153 | |||
154 | MSR_KVM_ASYNC_PF_EN: 0x4b564d02 | ||
155 | data: Bits 63-6 hold 64-byte aligned physical address of a | ||
156 | 64 byte memory area which must be in guest RAM and must be | ||
157 | zeroed. Bits 5-1 are reserved and should be zero. Bit 0 is 1 | ||
158 | when asynchronous page faults are enabled on the vcpu 0 when | ||
159 | disabled. | ||
160 | |||
161 | First 4 byte of 64 byte memory location will be written to by | ||
162 | the hypervisor at the time of asynchronous page fault (APF) | ||
163 | injection to indicate type of asynchronous page fault. Value | ||
164 | of 1 means that the page referred to by the page fault is not | ||
165 | present. Value 2 means that the page is now available. Disabling | ||
166 | interrupt inhibits APFs. Guest must not enable interrupt | ||
167 | before the reason is read, or it may be overwritten by another | ||
168 | APF. Since APF uses the same exception vector as regular page | ||
169 | fault guest must reset the reason to 0 before it does | ||
170 | something that can generate normal page fault. If during page | ||
171 | fault APF reason is 0 it means that this is regular page | ||
172 | fault. | ||
173 | |||
174 | During delivery of type 1 APF cr2 contains a token that will | ||
175 | be used to notify a guest when missing page becomes | ||
176 | available. When page becomes available type 2 APF is sent with | ||
177 | cr2 set to the token associated with the page. There is special | ||
178 | kind of token 0xffffffff which tells vcpu that it should wake | ||
179 | up all processes waiting for APFs and no individual type 2 APFs | ||
180 | will be sent. | ||
181 | |||
182 | If APF is disabled while there are outstanding APFs, they will | ||
183 | not be delivered. | ||
184 | |||
185 | Currently type 2 APF will be always delivered on the same vcpu as | ||
186 | type 1 was, but guest should not rely on that. | ||