[PATCH V6 1/2] perf ignore LBR and extra_rsp

2014-07-14 Thread kan . liang
From: Kan Liang x86, perf: Protect LBR and extra_regs against KVM lying With -cpu host, KVM reports LBR and extra_regs support, if the host has support. When the guest perf driver tries to access LBR or extra_regs MSR, it #GPs all MSR accesses,since KVM doesn't handle LBR and extra_regs su

[PATCH V6 2/2] kvm: ignore LBR and extra rsp

2014-07-14 Thread kan . liang
From: Kan Liang With -cpu host KVM reports LBR and extra_regs support, so the perf driver may accesses the LBR and extra_regs MSRs. However, there is no LBR and extra_regs virtualization support yet. This could causes guest to crash. As a workaround, KVM just simply ignore the LBR and extra_regs

[PATCH V5 2/2] kvm: ignore LBR and extra_reg

2014-07-10 Thread kan . liang
From: Kan Liang With -cpu host KVM reports LBR and extra_regs support, so the perf driver may accesses the LBR and extra_regs MSRs. However, there is no LBR and extra_regs virtualization support yet. This could causes guest to crash. As a workaround, KVM just simply ignore the LBR and

[PATCH V5 1/2] perf ignore LBR and extra_regs

2014-07-10 Thread kan . liang
From: Kan Liang x86, perf: Protect LBR and extra_regs against KVM lying With -cpu host, KVM reports LBR and extra_regs support, if the host has support. When the guest perf driver tries to access LBR or extra_regs MSR, it #GPs all MSR accesses,since KVM doesn't handle LBR and extra_regs su

[PATCH V4 2/2] kvm: ignore LBR and extra_regs

2014-07-08 Thread kan . liang
From: Kan Liang With -cpu host KVM reports LBR and extra_regs support, so the perf driver may accesses the LBR and extra_regs MSRs. However, there is no LBR and extra_regs virtualization support yet. This could causes guest to crash. As a workaround, KVM just simply ignore the LBR and

[PATCH V4 1/2] perf ignore LBR and extra_regs.

2014-07-08 Thread kan . liang
From: Kan Liang x86, perf: Protect LBR and extra_regs against KVM lying With -cpu host, KVM reports LBR and extra_regs support, if the host has support. When the guest perf driver tries to access LBR or extra_regs MSR, it #GPs all MSR accesses,since KVM doesn't handle LBR and extra_regs su

[PATCH V3 2/2] kvm: ignore LBR and offcore rsp

2014-07-07 Thread kan . liang
From: Kan Liang With -cpu host KVM reports LBR and offcore support, so the perf driver may accesses the LBR and offcore MSRs. However, there is no LBR and offcore virtualization support yet. This could causes guest to crash. As a workaround, KVM just simply ignore the LBR and offcore_rsp MSRs

[PATCH V3 1/2] perf ignore LBR and offcore_rsp.

2014-07-07 Thread kan . liang
From: Kan Liang x86, perf: Protect LBR and offcore rsp against KVM lying With -cpu host, KVM reports LBR and offcore support, if the host has support. When the guest perf driver tries to access LBR or offcore_rsp MSR, it #GPs all MSR accesses,since KVM doesn't handle LBR and offcore suppor

[PATCH V2 2/3] perf protect LBR when Intel PT is enabled.

2014-07-02 Thread kan . liang
From: Kan Liang If RTIT_CTL.TraceEn=1, any attempt to read or write the LBR or LER MSRs, including LBR_TOS, will result in a #GP. Since Intel PT can be enabled/disabled at runtime, LBR MSRs have to be protected by _safe() at runtime. Signed-off-by: Kan Liang --- arch/x86/kernel/cpu

[PATCH V2 1/3] perf ignore LBR and offcore_rsp.

2014-07-02 Thread kan . liang
From: Kan Liang x86, perf: Protect LBR and offcore rsp against KVM lying With -cpu host, KVM reports LBR and offcore support, if the host has support. When the guest perf driver tries to access LBR or offcore_rsp MSR, it #GPs all MSR accesses,since KVM doesn't handle LBR and offcore suppor

[PATCH V2 3/3] kvm: ignore LBR and offcore rsp

2014-07-02 Thread kan . liang
From: Kan Liang With -cpu host KVM reports LBR and offcore support, so the perf driver may accesses the LBR and offcore MSRs. However, there is no LBR and offcore virtualization support yet. This could causes guest to crash. As a workaround, KVM just simply ignore the LBR and offcore_rsp MSRs