From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AC89C433FE for ; Wed, 27 Oct 2021 16:16:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67A7A60F38 for ; Wed, 27 Oct 2021 16:16:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 67A7A60F38 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UB8+W/qKk8bPu5ZFK4EIn9SL1wJiSewHnLW0HIWpkRw=; b=ZjCsEHeP8phjX9 iuxHG//re6ZG17/QagAc2zfvR5Mh52K3TDOPPxH8fuGaDrkd1f9/Wuwiqb/1rSJ4X4gGhzFi9Xhwd Y4f75vnsCLu/DkSWx+K/dVHtm2JvljB36G6zphO9DMQYQKQym9/vGE/Shq5U2rccDqhktjHxld0B/ c2D3XskerqRiLwHv5aUIFHRx7Yfe9uaoAVDpTOl358hyYpM/gzUFW+B0yeT2Qpjb8diezvUOkcKYI wdZUWw2MiiST4SwkpHvn6MgeZ7ofxZSG9+1k6IfJ3PROzVjLRto17/Pdv5SjlNiM5QwwoYjDhD/IS Uv4s2Ew5t46f9iyDlo9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mflZq-005Qro-UC; Wed, 27 Oct 2021 16:14:59 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mflZk-005Qpb-1h for linux-arm-kernel@lists.infradead.org; Wed, 27 Oct 2021 16:14:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635351289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YJ1AvjILyDHE6A0xH65m+vjqkknvkqBvDuAHk95niU8=; b=NNZezK5I92wtIcPstDA/xymm972gQZ9WtIC5LNxfA9/cKxuo+jbIJpAKxG+WhoLmdVV01i NfPQgaZ9mJOfSB0HBcNLWZgEKlOhbZu9FMixihVNRp0ciu5gnbRZwRTQfUaUFD0slfDuBp DgWNhhGjuOT8NzyXPJVCkv+W8CekUrs= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-415-kyOLEfzfNOame18Fkn33Vw-1; Wed, 27 Oct 2021 12:14:48 -0400 X-MC-Unique: kyOLEfzfNOame18Fkn33Vw-1 Received: by mail-ed1-f70.google.com with SMTP id s12-20020a50dacc000000b003dbf7a78e88so2839762edj.2 for ; Wed, 27 Oct 2021 09:14:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=YJ1AvjILyDHE6A0xH65m+vjqkknvkqBvDuAHk95niU8=; b=fLtarpg9iBvSmowEDXNR1q0uaA4e1k7iwZh9RUMAGKmXOxyeX0nepx4aiQ3Ywh75tI qgnHasHTzfiJcobVBcIQ4wZOcuBFqIDVoBz1bSEnXlXUhKPFR9yWYObA2mh41wjwuH/J +PRwbbikXclopIwn8Qwn8k0io363SoKsvtAGRFjGqL9nB/qkbONgQquDJmBda7z4E4iE OE8nhhw7+Z5o3USPOq7f7f2DNrfd14vfd7cpBkS/+fZwDJmBI8D2HUHvnEiNFLVBmWP4 zenE/+hBge5kmE4za+sFzJdQ/yVhGL/ah9yYClb97/RQxlSID9xxSJahCGMaKGzjbKYk CeCA== X-Gm-Message-State: AOAM5316Cmk1aIEQ5YIFVfHNSjvwWVlvyprFD/QN4CSFwOkrqzCU5Ruz hlw3jZJ2XKAmCH/7c/H+iMIWojkjtCY/VeUaIdMIpr7xuoOw5vkyvS6j86NCjw1Gj+h/GpkFDNZ 9QfYVHRy3aCfMsb3BpWcZP2RiPk6evy9QY5c= X-Received: by 2002:a17:907:16a7:: with SMTP id hc39mr22891331ejc.214.1635351287184; Wed, 27 Oct 2021 09:14:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzO/QgQ5GMyh0vFS/oBYQIX6qwD3vL9k6RGrSUIXFucShmCvNWLSsmfmRBNY3o+Ac+4bg3ipQ== X-Received: by 2002:a17:907:16a7:: with SMTP id hc39mr22891269ejc.214.1635351286915; Wed, 27 Oct 2021 09:14:46 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id sb30sm195562ejc.45.2021.10.27.09.14.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Oct 2021 09:14:46 -0700 (PDT) Message-ID: Date: Wed, 27 Oct 2021 18:14:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH v2 35/43] KVM: SVM: Signal AVIC doorbell iff vCPU is in guest mode To: Sean Christopherson Cc: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, David Matlack , Oliver Upton , Jing Zhang References: <20211009021236.4122790-1-seanjc@google.com> <20211009021236.4122790-36-seanjc@google.com> <0333be2a-76d8-657a-6c82-3bb5c9ff2e3b@redhat.com> <185502d7-861e-fa5c-b225-419710fe77ed@redhat.com> From: Paolo Bonzini In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211027_091452_211043_5F2FF6BD X-CRM114-Status: GOOD ( 14.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27/10/21 18:08, Sean Christopherson wrote: >> Right, so should we drop the "if (running)" check in this patch, at the same >> time as it's adding the IN_GUEST_MODE check? > LOL, I think we have a Three^WTwo Stooges routine going on. This patch does > remove avic_vcpu_is_running() and replaces it with the vcpu->mode check. Or am > I completely misunderstanding what your referring to? > > - if (avic_vcpu_is_running(vcpu)) { > + /* > + * Signal the doorbell to tell hardware to inject the IRQ if the vCPU > + * is in the guest. If the vCPU is not in the guest, hardware will > + * automatically process AVIC interrupts at VMRUN. > + */ > + if (vcpu->mode == IN_GUEST_MODE) { > int cpu = READ_ONCE(vcpu->cpu); Nevermind, I confused svm_deliver_avic_intr with avic_kick_target_vcpus, which anyway you are handling in patch 36. Paolo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel