]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/kvm/kvm_main.c
KVM: Hoist SVM's get_cs_db_l_bits into core code.
[mirror_ubuntu-artful-kernel.git] / drivers / kvm / kvm_main.c
index 7341c0949340e0083469cff085f7dd915c582f49..9dffbbea46a77ae720127ecbe8ee8e4b90b9f4da 100644 (file)
@@ -2270,6 +2270,16 @@ static int kvm_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
        return 0;
 }
 
+void kvm_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l)
+{
+       struct kvm_segment cs;
+
+       get_segment(vcpu, &cs, VCPU_SREG_CS);
+       *db = cs.db;
+       *l = cs.l;
+}
+EXPORT_SYMBOL_GPL(kvm_get_cs_db_l_bits);
+
 /*
  * List of msr numbers which we expose to userspace through KVM_GET_MSRS
  * and KVM_SET_MSRS, and KVM_GET_MSR_INDEX_LIST.