diff options
-rw-r--r-- | drivers/kvm/x86.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index 6deb052b5f93..9db4e3242b62 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c | |||
@@ -2236,6 +2236,8 @@ unsigned long realmode_get_cr(struct kvm_vcpu *vcpu, int cr) | |||
2236 | return vcpu->cr3; | 2236 | return vcpu->cr3; |
2237 | case 4: | 2237 | case 4: |
2238 | return vcpu->cr4; | 2238 | return vcpu->cr4; |
2239 | case 8: | ||
2240 | return get_cr8(vcpu); | ||
2239 | default: | 2241 | default: |
2240 | vcpu_printf(vcpu, "%s: unexpected cr %u\n", __FUNCTION__, cr); | 2242 | vcpu_printf(vcpu, "%s: unexpected cr %u\n", __FUNCTION__, cr); |
2241 | return 0; | 2243 | return 0; |
@@ -2259,6 +2261,9 @@ void realmode_set_cr(struct kvm_vcpu *vcpu, int cr, unsigned long val, | |||
2259 | case 4: | 2261 | case 4: |
2260 | set_cr4(vcpu, mk_cr_64(vcpu->cr4, val)); | 2262 | set_cr4(vcpu, mk_cr_64(vcpu->cr4, val)); |
2261 | break; | 2263 | break; |
2264 | case 8: | ||
2265 | set_cr8(vcpu, val & 0xfUL); | ||
2266 | break; | ||
2262 | default: | 2267 | default: |
2263 | vcpu_printf(vcpu, "%s: unexpected cr %u\n", __FUNCTION__, cr); | 2268 | vcpu_printf(vcpu, "%s: unexpected cr %u\n", __FUNCTION__, cr); |
2264 | } | 2269 | } |