Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3931806pxu; Tue, 20 Oct 2020 04:29:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzETOOehjEeE9309uY3hzRYSQb3Suq/zs/qfXVAyfHOwizjcHVfTwlzGZ66jmVvpmZRCMqH X-Received: by 2002:aa7:c305:: with SMTP id l5mr2199239edq.364.1603193355744; Tue, 20 Oct 2020 04:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603193355; cv=none; d=google.com; s=arc-20160816; b=wbQzRkjTSHzqHTzJGIymPwp3V8Oxf/89nTaJUzlXXPtKpr9tiSnmJvmPBipZjd9IzV aJqS0wyyLBqVjKgVk2jbik9pNpKIL7kxf4+ck8mFCfJZGd+Aw7dE/rgYfh6sylTGWHZW yQZRbdloX/2SETGWNQdIPLIXcrRD3I57IaoCwxxUkU0cFC+S7cEwxZvmuZuW4Ayr/D4X pDY3dT51AeQkyE8zTlnhiTbhuRpr2Ig6TVdmH54I1g9yHJMN/F1K87YH2GP2rkfgkzQ3 gJsz2uF7zYW31VnUo/xPiNDspSDMROyJyRagUFCQvi2lrqA4CaN1AgR30Q9SPVOVGqoL KmnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=YKO69m9GIUyAgq9zP8NOSQHmVAdJ/gUS0MMiKmKZ6jg=; b=p5JRYGRtBZRWIEeOVj3mwl+YiiytYWSKeYXt53mAsflxCtjeHLjggMclYolnBk0RiW 8Xe4gn6YVdEJ0moz4xOPBxTYce/EfGsFhxOPU7KUCLySWsvtU3T4621jA8ckmfpzma6H QAKqqPQXZtNOiCrFUwDwDxpKBdMj+F4R15Vl/aTWq9rh2iKhiLS0LF8BxzhSiGCQoLfr LfUAdegT5W/wEQzsTxD4yFpsAFsZuBz2pZzyxULs4euefuZWHFxW3T2RkSyJG1kAT6ue 4ycdUaMfzy+wLs6ipK4vicwQDHfNGOFxFGFiSfeXryuUDmUQH63blkEgjBgocMmNrPiH cPHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qOrMe8Hq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si1027157ejf.509.2020.10.20.04.28.53; Tue, 20 Oct 2020 04:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qOrMe8Hq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405923AbgJTKFa (ORCPT + 99 others); Tue, 20 Oct 2020 06:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729133AbgJTKFa (ORCPT ); Tue, 20 Oct 2020 06:05:30 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2030DC061755; Tue, 20 Oct 2020 03:05:30 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id 184so1386627lfd.6; Tue, 20 Oct 2020 03:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YKO69m9GIUyAgq9zP8NOSQHmVAdJ/gUS0MMiKmKZ6jg=; b=qOrMe8Hq+6G5pM2CoZ63NLIZNnwaOnlTKIVr7oi0qiWzq9EW2VxVzZvLFUSeNAoqNb b0DHM2tW8EGGk1WP1V27VaAqCme6xeSbd06kPDSxLhXxmrVqjPqeRQc5l+cO8ce2xIWg JaeEowfzYSccwxpZfNY7bxBUu2n/7h3UtKkiSWjWsUvqdSWEPPzlbgRBSnVgBTxmZuyq AixqQe0zAG8CTn+qyuGukx5+q8fhqJUpSoctvD2ESiyDYRRbYxrXl2Vyhf0SER27fKdB 3M0s3NfpMJiT6sGekyLEebzzDu2WEkbROH2lDReLAVOne+ul1hBGWOAKH/x3lzhjGi5p 53wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YKO69m9GIUyAgq9zP8NOSQHmVAdJ/gUS0MMiKmKZ6jg=; b=B296+a1sp+dlMarrZRq/gbyo18IoMJxUzTBkfhqWSrxj7RDh7dOCgytHPPHxhbnVIE CtHG2wNDN5uVBcqaEDsf3vXu8qR4hSi0+xRgyAnuTo4vEqUXAAVwFYXDNeB8lpUsJ+af 9qIWucN4Xws0lF69auqMYTOGAJjTu9CMULf+SVMTmW/hEfmssYwscKbxxEq4I5A9unOp ecii3MXvARzL5Wn8NNMnFuyQtsCLx1pZ5K+bpHSpjEl3CFuJtBQDJbV6xK339faDb68x iGOINWJixODVeAOUPpDFK9vX/cn7t+Na1wL3fqwnxvIhheEssqkDdQw6oyb+Myl3SYw8 oimg== X-Gm-Message-State: AOAM531phyWNg0TAw7QDwceDsGn6rOGgVW+q9nufcquNgPJ/sGKaXR+0 6EScIonTBTaGILQjV1pjrF/+ZGf8n6321JJ/BKU= X-Received: by 2002:a19:f207:: with SMTP id q7mr639182lfh.588.1603188328643; Tue, 20 Oct 2020 03:05:28 -0700 (PDT) MIME-Version: 1.0 References: <20201019090657.131-1-zhenzhong.duan@gmail.com> <7ef3b498-bdc5-4a3d-d23b-ad58205ae1b7@redhat.com> In-Reply-To: <7ef3b498-bdc5-4a3d-d23b-ad58205ae1b7@redhat.com> From: Zhenzhong Duan Date: Tue, 20 Oct 2020 18:05:16 +0800 Message-ID: Subject: Re: [PATCH 1/2] KVM: not register a IRQ bypass producer if unsupported or disabled To: Jason Wang Cc: linux-kernel , virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, netdev@vger.kernel.org, pbonzini@redhat.com, sean.j.christopherson@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , mst@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 20, 2020 at 2:23 PM Jason Wang wrote: > > > On 2020/10/19 =E4=B8=8B=E5=8D=885:06, Zhenzhong Duan wrote: > > If Post interrupt is disabled due to hardware limit or forcely disabled > > by "intremap=3Dnopost" parameter, return -EINVAL so that the legacy mod= e IRQ > > isn't registered as IRQ bypass producer. > > > Is there any side effect if it was still registered? Not much side effect in theory, just some legacy mode IRQs in producer list and it's not easy to distinguish them with PI interrupt mode IRQ. The main purpose of this patch is to provide a way for people to know if a device IRQ is really offloaded from kernel by a print. > > > > > > With this change, below message is printed: > > "vfio-pci 0000:db:00.0: irq bypass producer (token 0000000060c8cda5) re= gistration fails: -22" > > > I may miss something, but the patch only touches vhost-vDPA instead of VF= IO? VFIO already has above print in vfio_msi_set_vector_signal() but vhost-vDPA= not. Regards Zhenzhong