[Bug 201565] New: Intel Processor Trace enabling in KVM

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=201565

            Bug ID: 201565
           Summary: Intel Processor Trace enabling in KVM
           Product: Virtualization
           Version: unspecified
    Kernel Version: 4.19
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: kvm
          Assignee: virtualization_kvm@xxxxxxxxxxxxxxxxxxxx
          Reporter: luwei.kang@xxxxxxxxx
        Regression: No

Created attachment 279247
  --> https://bugzilla.kernel.org/attachment.cgi?id=279247&action=edit
architecture-instruction-set-extensions-programming-reference

Intel Processor Trace (Intel PT) is an extension of Intel Architecture that
captures information about software execution using dedicated hardware
facilities that cause only minimal performance perturbation to the software
being traced. Details on the Intel PT infrastructure and trace capabilities can
be found in the Intel 64 and IA-32 Architectures Software Developer’s Manual,
Volume 3C.

The suite of architecture changes serve to simplify the process of virtualizing
Intel PT for use by a guest software. There are two primary elements to this
new architecture support for VMX support improvements made for Intel PT.
1. Addition of a new guest IA32_RTIT_CTL value field to the VMCS.
  — This serves to speed and simplify the process of disabling trace on VM
exit, and restoring it on VM entry.
2. Enabling use of EPT to redirect PT output.
  — This enables the VMM to elect to virtualize the PT output buffer using EPT.
In this mode, the CPU will treat PT output addresses as Guest Physical
Addresses (GPAs) and translate them using EPT. This means that Intel PT output
reads (of the ToPA table) and writes (of trace output) can cause EPT
violations, and other output events.

Intel Processor Trace virtualization can be work in one of 2 possible modes by
set new option "pt_mode". Default is System-Wide mode.
a. System-Wide mode (default):
   When the host configures Intel PT to collect trace packets of the entire
system, it can leave the relevant VMX controls clear to allow VMX-specific
packets to provide information across VMX transitions.
   KVM guest will not aware this feature in this mode and both host and KVM
guest trace will output to host buffer.

b. Host-Guest mode:
   Host can configure trace-packet generation while in VMX non-root operation
for guests and root operation for native executing normally.
   Intel PT will be exposed to KVM guest in this mode, and the trace output to
respective buffer of host and guest.
   In this mode, the status of PT will be saved and disabled before VM-entry
and restored after VM-exit if trace a virtual machine.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[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