Re: [PATCH 1/2] KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created

2021-02-26 Thread Sean Christopherson
On Wed, Feb 24, 2021, Xu, Like wrote: > On 2021/2/24 1:15, Sean Christopherson wrote: > > On Tue, Feb 23, 2021, Like Xu wrote: > > > If lbr_desc->event is successfully created, the intel_pmu_create_ > > > guest_lbr_event() will return 0, otherwise it will return -ENOENT, > > > and then jump to LBR

Re: [PATCH 1/2] KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created

2021-02-23 Thread Xu, Like
On 2021/2/24 1:15, Sean Christopherson wrote: On Tue, Feb 23, 2021, Like Xu wrote: If lbr_desc->event is successfully created, the intel_pmu_create_ guest_lbr_event() will return 0, otherwise it will return -ENOENT, and then jump to LBR msrs dummy handling. Fixes: 1b5ac3226a1a ("KVM: vmx/pmu: P

Re: [PATCH 1/2] KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created

2021-02-23 Thread Paolo Bonzini
On 23/02/21 18:15, Sean Christopherson wrote: If event creation fails in that flow, I would think KVM would do its best to create an event in future runs without waiting for additional actions from the guest. Also, this bug suggests there's a big gaping hole in the test coverage. AFAICT, event

Re: [PATCH 1/2] KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created

2021-02-23 Thread Sean Christopherson
On Tue, Feb 23, 2021, Like Xu wrote: > If lbr_desc->event is successfully created, the intel_pmu_create_ > guest_lbr_event() will return 0, otherwise it will return -ENOENT, > and then jump to LBR msrs dummy handling. > > Fixes: 1b5ac3226a1a ("KVM: vmx/pmu: Pass-through LBR msrs when the guest LBR

Re: [PATCH 1/2] KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created

2021-02-23 Thread Paolo Bonzini
On 23/02/21 02:39, Like Xu wrote: If lbr_desc->event is successfully created, the intel_pmu_create_ guest_lbr_event() will return 0, otherwise it will return -ENOENT, and then jump to LBR msrs dummy handling. Fixes: 1b5ac3226a1a ("KVM: vmx/pmu: Pass-through LBR msrs when the guest LBR event is

[PATCH 1/2] KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created

2021-02-22 Thread Like Xu
If lbr_desc->event is successfully created, the intel_pmu_create_ guest_lbr_event() will return 0, otherwise it will return -ENOENT, and then jump to LBR msrs dummy handling. Fixes: 1b5ac3226a1a ("KVM: vmx/pmu: Pass-through LBR msrs when the guest LBR event is ACTIVE") Signed-off-by: Like Xu ---