Lines Matching refs:pt_desc
1088 !(vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN); in pt_can_write_msr()
1134 rdmsrl(MSR_IA32_RTIT_CTL, vmx->pt_desc.host.ctl); in pt_guest_enter()
1135 if (vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) { in pt_guest_enter()
1137 pt_save_msr(&vmx->pt_desc.host, vmx->pt_desc.num_address_ranges); in pt_guest_enter()
1138 pt_load_msr(&vmx->pt_desc.guest, vmx->pt_desc.num_address_ranges); in pt_guest_enter()
1147 if (vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) { in pt_guest_exit()
1148 pt_save_msr(&vmx->pt_desc.guest, vmx->pt_desc.num_address_ranges); in pt_guest_exit()
1149 pt_load_msr(&vmx->pt_desc.host, vmx->pt_desc.num_address_ranges); in pt_guest_exit()
1156 if (vmx->pt_desc.host.ctl) in pt_guest_exit()
1157 wrmsrl(MSR_IA32_RTIT_CTL, vmx->pt_desc.host.ctl); in pt_guest_exit()
1497 if (data & vmx->pt_desc.ctl_bitmask) in vmx_rtit_ctl_check()
1504 if ((vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) && in vmx_rtit_ctl_check()
1505 ((vmx->pt_desc.guest.ctl ^ data) & ~RTIT_CTL_TRACEEN)) in vmx_rtit_ctl_check()
1515 !intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_rtit_ctl_check()
1523 value = intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_mtc_periods); in vmx_rtit_ctl_check()
1524 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_mtc) && in vmx_rtit_ctl_check()
1528 value = intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_rtit_ctl_check()
1530 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_psb_cyc) && in vmx_rtit_ctl_check()
1534 value = intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_psb_periods); in vmx_rtit_ctl_check()
1535 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_psb_cyc) && in vmx_rtit_ctl_check()
1545 if ((value && (vmx->pt_desc.num_address_ranges < 1)) || (value > 2)) in vmx_rtit_ctl_check()
1548 if ((value && (vmx->pt_desc.num_address_ranges < 2)) || (value > 2)) in vmx_rtit_ctl_check()
1551 if ((value && (vmx->pt_desc.num_address_ranges < 3)) || (value > 2)) in vmx_rtit_ctl_check()
1554 if ((value && (vmx->pt_desc.num_address_ranges < 4)) || (value > 2)) in vmx_rtit_ctl_check()
1956 msr_info->data = vmx->pt_desc.guest.ctl; in vmx_get_msr()
1961 msr_info->data = vmx->pt_desc.guest.status; in vmx_get_msr()
1965 !intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_get_msr()
1968 msr_info->data = vmx->pt_desc.guest.cr3_match; in vmx_get_msr()
1972 (!intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_get_msr()
1974 !intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_get_msr()
1977 msr_info->data = vmx->pt_desc.guest.output_base; in vmx_get_msr()
1981 (!intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_get_msr()
1983 !intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_get_msr()
1986 msr_info->data = vmx->pt_desc.guest.output_mask; in vmx_get_msr()
1991 (index >= 2 * vmx->pt_desc.num_address_ranges)) in vmx_get_msr()
1994 msr_info->data = vmx->pt_desc.guest.addr_b[index / 2]; in vmx_get_msr()
1996 msr_info->data = vmx->pt_desc.guest.addr_a[index / 2]; in vmx_get_msr()
2287 vmx->pt_desc.guest.ctl = data; in vmx_set_msr()
2295 vmx->pt_desc.guest.status = data; in vmx_set_msr()
2300 if (!intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_set_msr()
2303 vmx->pt_desc.guest.cr3_match = data; in vmx_set_msr()
2308 if (!intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_set_msr()
2310 !intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_set_msr()
2315 vmx->pt_desc.guest.output_base = data; in vmx_set_msr()
2320 if (!intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_set_msr()
2322 !intel_pt_validate_cap(vmx->pt_desc.caps, in vmx_set_msr()
2325 vmx->pt_desc.guest.output_mask = data; in vmx_set_msr()
2331 if (index >= 2 * vmx->pt_desc.num_address_ranges) in vmx_set_msr()
2336 vmx->pt_desc.guest.addr_b[index / 2] = data; in vmx_set_msr()
2338 vmx->pt_desc.guest.addr_a[index / 2] = data; in vmx_set_msr()
3983 bool flag = !(vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN); in pt_update_intercept_for_msr()
3990 for (i = 0; i < vmx->pt_desc.num_address_ranges; i++) { in pt_update_intercept_for_msr()
4681 memset(&vmx->pt_desc, 0, sizeof(vmx->pt_desc)); in init_vmcs()
4683 vmx->pt_desc.guest.output_mask = 0x7F; in init_vmcs()
7548 vmx->pt_desc.caps[CPUID_EAX + i*PT_CPUID_REGS_NUM] = best->eax; in update_intel_pt_cfg()
7549 vmx->pt_desc.caps[CPUID_EBX + i*PT_CPUID_REGS_NUM] = best->ebx; in update_intel_pt_cfg()
7550 vmx->pt_desc.caps[CPUID_ECX + i*PT_CPUID_REGS_NUM] = best->ecx; in update_intel_pt_cfg()
7551 vmx->pt_desc.caps[CPUID_EDX + i*PT_CPUID_REGS_NUM] = best->edx; in update_intel_pt_cfg()
7555 vmx->pt_desc.num_address_ranges = intel_pt_validate_cap(vmx->pt_desc.caps, in update_intel_pt_cfg()
7559 vmx->pt_desc.ctl_bitmask = ~(RTIT_CTL_TRACEEN | RTIT_CTL_OS | in update_intel_pt_cfg()
7567 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_cr3_filtering)) in update_intel_pt_cfg()
7568 vmx->pt_desc.ctl_bitmask &= ~RTIT_CTL_CR3EN; in update_intel_pt_cfg()
7574 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_psb_cyc)) in update_intel_pt_cfg()
7575 vmx->pt_desc.ctl_bitmask &= ~(RTIT_CTL_CYCLEACC | in update_intel_pt_cfg()
7581 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_mtc)) in update_intel_pt_cfg()
7582 vmx->pt_desc.ctl_bitmask &= ~(RTIT_CTL_MTC_EN | in update_intel_pt_cfg()
7586 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_ptwrite)) in update_intel_pt_cfg()
7587 vmx->pt_desc.ctl_bitmask &= ~(RTIT_CTL_FUP_ON_PTW | in update_intel_pt_cfg()
7591 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_power_event_trace)) in update_intel_pt_cfg()
7592 vmx->pt_desc.ctl_bitmask &= ~RTIT_CTL_PWR_EVT_EN; in update_intel_pt_cfg()
7595 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_topa_output)) in update_intel_pt_cfg()
7596 vmx->pt_desc.ctl_bitmask &= ~RTIT_CTL_TOPA; in update_intel_pt_cfg()
7599 if (intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_output_subsys)) in update_intel_pt_cfg()
7600 vmx->pt_desc.ctl_bitmask &= ~RTIT_CTL_FABRIC_EN; in update_intel_pt_cfg()
7603 for (i = 0; i < vmx->pt_desc.num_address_ranges; i++) in update_intel_pt_cfg()
7604 vmx->pt_desc.ctl_bitmask &= ~(0xfULL << (32 + i * 4)); in update_intel_pt_cfg()