static int svm_get_lbr_msr(struct vcpu_svm *svm, u32 index)
{
	/*
	 * If the LBR virtualization is disabled, the LBR msrs are always
	 * kept in the vmcb01 to avoid copying them on nested guest entries.
	 *
	 * If nested, and the LBR virtualization is enabled/disabled, the msrs
	 * are moved between the vmcb01 and vmcb02 as needed.
	 */
	struct vmcb *vmcb =
		(svm->vmcb->control.virt_ext & LBR_CTL_ENABLE_MASK) ?
			svm->vmcb : svm->vmcb01.ptr;

	switch (index) {
	case MSR_IA32_DEBUGCTLMSR:
		return vmcb->save.dbgctl;
	case MSR_IA32_LASTBRANCHFROMIP:
		return vmcb->save.br_from;
	case MSR_IA32_LASTBRANCHTOIP:
		return vmcb->save.br_to;
	case MSR_IA32_LASTINTFROMIP:
		return vmcb->save.last_excp_from;
	case MSR_IA32_LASTINTTOIP:
		return vmcb->save.last_excp_to;
	default:
		KVM_BUG(false, svm->vcpu.kvm,
			"%s: Unknown MSR 0x%x", __func__, index);
		return 0;
	}
}
static int svm_get_lbr_msr(struct vcpu_svm *svm, u32 index)
{
	 
	struct vmcb *vmcb =
		(svm->vmcb->control.virt_ext & LBR_CTL_ENABLE_MASK) ?
			svm->vmcb : svm->vmcb01.ptr;

	switch (index) {
	case MSR_IA32_DEBUGCTLMSR:
		return vmcb->save.dbgctl;
	case MSR_IA32_LASTBRANCHFROMIP:
		return vmcb->save.br_from;
	case MSR_IA32_LASTBRANCHTOIP:
		return vmcb->save.br_to;
	case MSR_IA32_LASTINTFROMIP:
		return vmcb->save.last_excp_from;
	case MSR_IA32_LASTINTTOIP:
		return vmcb->save.last_excp_to;
	default:
		KVM_BUG(false, svm->vcpu.kvm,
			"%s: Unknown MSR 0x%x", __func__, index);
		return 0;
	}
}