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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <23d9b009-2b48-d93c-3c24-711c4757ca1b@redhat.com>
Date:   Fri, 22 Oct 2021 12:12:35 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, Maxim Levitsky <mlevitsk@...hat.com>
Subject: Re: [PATCH v2 0/4] KVM: x86: APICv cleanups

On 22/10/21 02:49, Sean Christopherson wrote:
> APICv cleanups and a dissertation on handling concurrent APIC access page
> faults and APICv inhibit updates.
> 
> I've tested this but haven't hammered the AVIC stuff, I'd appreciate it if
> someone with the Hyper-V setup can beat on the AVIC toggling.
> 
> Sean Christopherson (4):
>    KVM: x86/mmu: Use vCPU's APICv status when handling APIC_ACCESS
>      memslot
>    KVM: x86: Move SVM's APICv sanity check to common x86
>    KVM: x86: Move apicv_active flag from vCPU to in-kernel local APIC
>    KVM: x86: Use rw_semaphore for APICv lock to allow vCPU parallelism
> 
>   arch/x86/include/asm/kvm_host.h |  3 +-
>   arch/x86/kvm/hyperv.c           |  4 +--
>   arch/x86/kvm/lapic.c            | 46 ++++++++++---------------
>   arch/x86/kvm/lapic.h            |  5 +--
>   arch/x86/kvm/mmu/mmu.c          | 29 ++++++++++++++--
>   arch/x86/kvm/svm/avic.c         |  2 +-
>   arch/x86/kvm/svm/svm.c          |  2 --
>   arch/x86/kvm/vmx/vmx.c          |  4 +--
>   arch/x86/kvm/x86.c              | 59 ++++++++++++++++++++++-----------
>   9 files changed, 93 insertions(+), 61 deletions(-)
> 

Queued, thanks.  I only made small edits to the comment in patch
1, to make it very slightly shorter.

	 * 2a. APICv is globally disabled but locally enabled, and this
	 *     vCPU acquires mmu_lock before __kvm_request_apicv_update
	 *     calls kvm_zap_gfn_range().  This vCPU will install a stale
	 *     SPTE, but no one will consume it as (a) no vCPUs can be
	 *     running due to the kick from KVM_REQ_APICV_UPDATE, and
	 *     (b) because KVM_REQ_APICV_UPDATE is raised before the VM
	 *     state is update, vCPUs attempting to service the request
	 *     will block on apicv_update_lock.  The update flow will
	 *     then zap the SPTE and release the lock.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ