Re: [PATCH v3 9/9] KVM: x86: Implement Intel Processor Trace context switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/11/2017 21:24, Luwei Kang wrote:
> +	if (pt_mode == PT_MODE_HOST_GUEST) {
> +		u32 eax, ebx, ecx, edx;
> +
> +		cpuid_count(0x14, 1, &eax, &ebx, &ecx, &edx);

Since it's used in many places, it's better if you cache CPUID[14,1].EAX.

Thanks,

Paolo

> +		memset(&vmx->pt_desc, 0, sizeof(vmx->pt_desc));
> +		vmx->pt_desc.addr_num = eax & 0x7;
> +		/* Bit[6~0] are forced to 1, writes are ignored. */
> +		vmx->pt_desc.guest.output_mask = 0x7F;
> +		vmcs_write64(GUEST_IA32_RTIT_CTL, 0);
> +	}




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux