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 X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FF85C433ED for ; Fri, 30 Apr 2021 01:54:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 0AD27613C1 for ; Fri, 30 Apr 2021 01:54:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AD27613C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcIMp-0004xa-5c for qemu-devel@archiver.kernel.org; Thu, 29 Apr 2021 21:54:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcILd-0004RB-Qm; Thu, 29 Apr 2021 21:53:42 -0400 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]:42767) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcILZ-0003GZ-M9; Thu, 29 Apr 2021 21:53:41 -0400 Received: by mail-qv1-xf36.google.com with SMTP id b14so8100508qvf.9; Thu, 29 Apr 2021 18:53:36 -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; bh=/WeHNQM4YeIxm6H6MmkPHOSXNgZ6OSgnXlcWAmZzkiQ=; b=sO0Za5d7oIzdjVHNDt6j4r7MD22lHPBAX24+JbUVU79euOxseaJay7U2goV3pZE9P/ lzr6hqNnZ/v2VEs5GIqSbjVT0fMChLCR2Zsea/qBijaW6a40fkakHPayGwAmUi8F9t6J 6+naI51287iPUdjwhsj2lqmOoeMgxYatzJ9Ggm7vy2fqhogicTkJHdzYVk16IEzgy6I7 wQwiQd+/qzz/idoeZkxnFrV+qQwPB92EGHFuTdZ/XJhKRCdKIA4Jdu07MnfKGtNlLcIP +LtJfgE4XYfdQsrzbXhG+NqbR/vYIWzZjJ0h1Cj5R9VoaiMhe2c6f4+82i/a1Qjnu29p CD+Q== 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; bh=/WeHNQM4YeIxm6H6MmkPHOSXNgZ6OSgnXlcWAmZzkiQ=; b=WCJTEQ0SWo7M/TuTO8mccVdGVEVBaSEUwSUvVAE2gw31fgjq3gHOBB0HRhJg7Lusyn RuEvA8Yr6I/1HRoVPgnIeYNjmOXS+ae2dDUjwJT050shgG6Vn6SmGuH2Yvs8RC9tFdAB jvDmLO2gItKxuaI8G10tHVDC9YOjSvVCA8JhXyoTR/PXnDfYpJ91w0ZmwLINCPKc5+Ek i1Lx3E+4/XJgY2g2wjVeti3bKG0MPqwCVEd/YhcAF22jwWvk1BRe/2zS5NbGDxXLAm43 w9ZsPeBdGIrTJgYk45mKN55v9AxiUp5pDMbvthq2W+Xm0TuxsbhrDWDsJKR/CoVqNKkS OEIQ== X-Gm-Message-State: AOAM533T5fAX307hj/LNfziqqGAH6o/DeIJ/LnZjGcJ+FH/oVfxyfNGQ J28mIGmsQ8LoR6kc9nODXMtk7D/ZrTjlIcUH5YA= X-Google-Smtp-Source: ABdhPJwMyp+D/mgtFyF/psD2hgPjc2K3bgLOAs16HqDPji16Gab5E28anJ34bxBjT/7wWf1eJBjxTptVQGZJRbH+zAg= X-Received: by 2002:a0c:ff06:: with SMTP id w6mr3137817qvt.51.1619747615810; Thu, 29 Apr 2021 18:53:35 -0700 (PDT) MIME-Version: 1.0 References: <161952458744.148285.11534763593153102355.stgit@jupiter> <20210429090223.ywdscwrhfxam66j6@in.ibm.com> In-Reply-To: <20210429090223.ywdscwrhfxam66j6@in.ibm.com> From: "Oliver O'Halloran" Date: Fri, 30 Apr 2021 11:53:24 +1000 Message-ID: Subject: Re: [PATCH] spapr: Modify ibm, get-config-addr-info2 to set DEVNUM in PE config address. To: Mahesh J Salgaonkar Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::f36; envelope-from=oohall@gmail.com; helo=mail-qv1-xf36.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , Daniel Henrique Barboza , Qemu-ppc , Qemu-devel Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, Apr 29, 2021 at 7:02 PM Mahesh J Salgaonkar wrote: > > On 2021-04-28 22:33:45 Wed, Oliver O'Halloran wrote: > > On Tue, Apr 27, 2021 at 9:56 PM Mahesh Salgaonkar wrote: > > > > > > With upstream kernel, especially after commit 98ba956f6a389 > > > ("powerpc/pseries/eeh: Rework device EEH PE determination") we see that KVM > > > guest isn't able to enable EEH option for PCI pass-through devices anymore. > > > > How are you passing the devices through to the guest? > > I am using libvirt with below xml section to add pass-through: > > > > >
> >
> > > > >
> >
> > > Looks like libvirt does not allow pass through device in slot zero, and > throws following error. > > error: XML error: Invalid PCI address 0000:01:00.0. slot must be >= 1 > Failed. Try again? [y,n,i,f,?]: That's pretty odd and I have no idea why that's happening. I seem to remember being able to use slot 0 for vfio devices when doing the passthru manually with the qemu command line so this might be a libvirt quirk. > *snip* > > Agree. I realize my fix is not correctly handling this. The current code > under ibm,set-eeh-option is checking for individual PCI device presence. > Better fix should be to check if there is any PCI device (vfio-pci) > present under specified bus and enable the EEH if found. And no change > in return value of get-config-addr-info2. What do you say ? That sounds reasonable. You would however need to verify that all the devices on that bus are within the same PE on the hypervisor side.