# HG changeset patch
# User Jerone Young <[EMAIL PROTECTED]>
# Date 1194367666 21600
# Node ID f610c78e9f363a53b3e9677aa84873b05a692acb
# Parent 7ef9d60771ef7e6d32919ace92d078a482b9d589
Move cr8 functions to libkvm-x86.c
This patch moves functions:
kvm_set_cr8
kvm_get_cr8
cr8 is an x86 only register.
Signed-off-by: Jerone Young <[EMAIL PROTECTED]>
diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c
--- a/libkvm/libkvm-x86.c
+++ b/libkvm/libkvm-x86.c
@@ -712,3 +712,19 @@ uint64_t kvm_get_apic_base(kvm_context_t
return run->apic_base;
}
+void kvm_set_cr8(kvm_context_t kvm, int vcpu, uint64_t cr8)
+{
+ struct kvm_run *run = kvm->run[vcpu];
+
+ if (kvm_abi == 10) {
+ ((struct kvm_run_abi10 *)run)->cr8 = cr8;
+ return;
+ }
+ run->cr8 = cr8;
+}
+
+__u64 kvm_get_cr8(kvm_context_t kvm, int vcpu)
+{
+ return kvm->run[vcpu]->cr8;
+}
+
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -824,22 +824,6 @@ int kvm_is_ready_for_interrupt_injection
return run->ready_for_interrupt_injection;
}
-void kvm_set_cr8(kvm_context_t kvm, int vcpu, uint64_t cr8)
-{
- struct kvm_run *run = kvm->run[vcpu];
-
- if (kvm_abi == 10) {
- ((struct kvm_run_abi10 *)run)->cr8 = cr8;
- return;
- }
- run->cr8 = cr8;
-}
-
-__u64 kvm_get_cr8(kvm_context_t kvm, int vcpu)
-{
- return kvm->run[vcpu]->cr8;
-}
-
int kvm_run(kvm_context_t kvm, int vcpu)
{
int r;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel