repository: /home/avi/kvm branch: (no branch) commit 2055c3dea01f9e1761d9389d4e1892a3bdfcbf8d Author: Jerone Young <[EMAIL PROTECTED]> Date: Tue Nov 6 10:48:56 2007 -0600
kvm: libkvm: 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]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c index 76606b8..223ff88 100644 --- a/libkvm/libkvm-x86.c +++ b/libkvm/libkvm-x86.c @@ -712,3 +712,19 @@ uint64_t kvm_get_apic_base(kvm_context_t kvm, int vcpu) 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 index 1632ee9..73d358f 100644 --- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -795,22 +795,6 @@ int kvm_is_ready_for_interrupt_injection(kvm_context_t kvm, int vcpu) 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-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits