Messages in this thread | | | From | Alexander Shishkin <> | Subject | Re: [PATCH v13 08/12] KVM: x86: Add Intel PT context switch for each vcpu | Date | Wed, 24 Oct 2018 13:13:44 +0300 |
| |
Luwei Kang <luwei.kang@intel.com> writes:
> +static void pt_guest_enter(struct vcpu_vmx *vmx) > +{ > + if (pt_mode == PT_MODE_SYSTEM) > + return; > + > + /* Save host state before VM entry */ > + rdmsrl(MSR_IA32_RTIT_CTL, vmx->pt_desc.host.ctl); > + > + /* > + * Set guest state of MSR_IA32_RTIT_CTL MSR (PT will be disabled > + * on VM entry when it has been disabled in guest before). > + */ > + vmcs_write64(GUEST_IA32_RTIT_CTL, vmx->pt_desc.guest.ctl); > + > + if (vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) { > + wrmsrl(MSR_IA32_RTIT_CTL, 0); > + pt_save_msr(&vmx->pt_desc.host, vmx->pt_desc.addr_range); > + pt_load_msr(&vmx->pt_desc.guest, vmx->pt_desc.addr_range); > + } > +}
From my side this is still a NAK, because [1].
[1] https://marc.info/?l=kvm&m=153847567226248&w=2
Thanks, -- Alex
| |