lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZG57sKYf+8eae6+s@google.com>
Date:   Wed, 24 May 2023 14:03:44 -0700
From:   Sean Christopherson <seanjc@...gle.com>
To:     Like Xu <like.xu.linux@...il.com>
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Ravi Bangoria <ravi.bangoria@....com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] KVM: x86/pmu: Move the overflow of a normal counter
 out of PMI context

On Fri, Mar 10, 2023, Like Xu wrote:
> From: Like Xu <likexu@...cent.com>
> 
> >From the guest's point of view, vPMU's global_status bit update following
> a counter overflow is completely independent of whether it is emulated
> in the host PMI context. The guest counter overflow emulation only depends
> on whether pmc->counter has an overflow or not. Plus the counter overflow
> generated by the emulation instruction has been delayed and not been
> handled in the PMI context. This part of the logic can be unified by
> reusing pmc->prev_counter for a normal counter.

I've asked many times.  Please write changelogs that state what the patch actually
does, not what "can" be done.  The other patches in this series have similar problems,
e.g. desribe the state _after_ the patch is applied, not what the patch does.

IIUC, this is effectively deferring injection to kvm_pmu_handle_event() and
kvm_pmu_handle_pmc_overflow().  The changelog says nothing of the sort though.

> However for a PEBS counter, its buffer overflow irq still requires hardware to
> trigger PMI.

I didn't follow this.  Hardware isn't triggering the PMI the guest sees, that's
still coming from KVM.  Are you saying that KVM doesn't have a way to detect
overflow for PEBS counters, i.e. would drop the PMI as the hardware PMI is the
only notification KVM gets?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ