From nobody Thu Sep 19 01:17:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1720047040; cv=none; d=zohomail.com; s=zohoarc; b=KWLza7rivJapla5FRCoePyY35qrwfqlunneSNTg5J+u6lksITHpsX5WlOduteG0UPo4LMcBSdpnuV0eXFnQO+VgGnveV8QG7XV2QW5lvw5OSo3n5RhFjFKlkZh/kItkDQjfG/J3vhccXof0YC/9+C59W/tCctgNF/T8HfIKZNlg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1720047040; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DMkazJvXlCFuPVFo5zwsqgTLcz0EAKKfqUw3BcILaOs=; b=FALGLb6iSf2HUmMVzvpHmgfVcKE6x3e6mrcikWowlQlfb2BQh65LDRP981HtLIW6ddvWMhN8kspAwc5qlubNWYwqeVK4q1/LkGBwXaDKfyEjLVyTQGoUnVRJ+ACZOJQsAi8FDWjprme2ZD920S3nGJxgT4oIkF6Oc8PKs7pVBzU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1720047040611882.1479613747007; Wed, 3 Jul 2024 15:50:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sP8nz-0004Eq-N0; Wed, 03 Jul 2024 18:50:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sP8nx-0003xS-8W for qemu-devel@nongnu.org; Wed, 03 Jul 2024 18:50:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sP8nt-0007UB-Ks for qemu-devel@nongnu.org; Wed, 03 Jul 2024 18:50:23 -0400 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-220-2fItBZLdPeeP1VmiJOks3g-1; Wed, 03 Jul 2024 18:50:20 -0400 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-366e0a4c965so37627f8f.1 for ; Wed, 03 Jul 2024 15:50:19 -0700 (PDT) Received: from redhat.com ([2a0d:6fc7:441:91a8:a47d:5a9:c02f:92f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3678eb6593bsm4188588f8f.93.2024.07.03.15.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 15:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720047021; 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: in-reply-to:in-reply-to:references:references; bh=DMkazJvXlCFuPVFo5zwsqgTLcz0EAKKfqUw3BcILaOs=; b=AdZvQWvyyJXX3dqBB5/ARhMTF1R8i7n5UdD4IRvnMo93vDKYMgzbyiJpGMg5jJiILhGXOk AHL2q1wjfkmiuBNB8h7ue/4bd3+JN1SC0PXWoPLXzCDHwL8J2pqoSs8v/2OWvxNGxc3dBZ lgODEP1vN/Va6gHkcZCi+Ptj1u279fI= X-MC-Unique: 2fItBZLdPeeP1VmiJOks3g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720047018; x=1720651818; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DMkazJvXlCFuPVFo5zwsqgTLcz0EAKKfqUw3BcILaOs=; b=nl+Ph5nxFzu0gcHYaSJqiXSKdwGOuOIHEhkTndElFaxJk3W6sPrXard2mllEuXNFTA LaJTQdeeQxjtl7L+dG9PKOLUbRSp4IXRbp+gyxsN2LCGYhu5Olw871On8fZraJaI7RRo FdNkEpQB1H+YntV1OBHWgmh3/kPGoimv8+wOVQyz+7ij943Xvn6Mr8UIu7Ot9MWPoGt/ TGZWGoQlKQ0DoJLmKeAK3ii1WCSaHXtgnc3mhPRqVPcqnR1bFsygM+b/KNVKtXxqLHYx msPSyKygNp0Yb+vHGoIph7+x7FDUlgIZy5Jim0IPOho0Evo4u05nyowjNmMtgLFvam/s +BFQ== X-Gm-Message-State: AOJu0YxDy3/ReKvMgGnLTYsnpH3LX+h6uwgHGUW8NRfCRZSPABz3Sj0B Pizu9kRzDslQzFh7z1F7xnLX7mn/KZCmraHUDBl+xPQStvLPol40rmVxIKGNKoQzUsla+xzg7VK uU73gnVAqCmcdbzxngj+dv7Gp9F51BOxe7ucXjbzXasxIUn6uCoW1VYfsxHhBPD4/p2klR14Z65 QXzGIikqBiQKU9OgbGjz4m2MjnO0qIag== X-Received: by 2002:adf:fccd:0:b0:366:ebd2:662f with SMTP id ffacd0b85a97d-3679dd34163mr9149f8f.30.1720047018140; Wed, 03 Jul 2024 15:50:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEaooaPw282ZT5JS2s5r681ut3H6DUwmgSQ+036eoYeugyGzbJ1HayzLRizzhHO1CsgMTAyxw== X-Received: by 2002:adf:fccd:0:b0:366:ebd2:662f with SMTP id ffacd0b85a97d-3679dd34163mr9136f8f.30.1720047017589; Wed, 03 Jul 2024 15:50:17 -0700 (PDT) Date: Wed, 3 Jul 2024 18:50:13 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Akihiko Odaki , Nicholas Piggin , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , qemu-ppc@nongnu.org Subject: [PULL v3 78/85] hw/ppc/spapr_pci: Do not reject VFs created after a PF Message-ID: <26f86093ec989cb73ad03e8a234f5dc321e1e267.1720046570.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1720047042034100011 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki A PF may automatically create VFs and the PF may be function 0. Signed-off-by: Akihiko Odaki Message-Id: <20240627-reuse-v10-3-7ca0b8ed3d9f@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/ppc/spapr_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index f63182a03c..ed4454bbf7 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1573,7 +1573,9 @@ static void spapr_pci_pre_plug(HotplugHandler *plug_h= andler, * hotplug, we do not allow functions to be hotplugged to a * slot that already has function 0 present */ - if (plugged_dev->hotplugged && bus->devices[PCI_DEVFN(slotnr, 0)] && + if (plugged_dev->hotplugged && + !pci_is_vf(pdev) && + bus->devices[PCI_DEVFN(slotnr, 0)] && PCI_FUNC(pdev->devfn) !=3D 0) { error_setg(errp, "PCI: slot %d function 0 already occupied by %s," " additional functions can no longer be exposed to gues= t.", --=20 MST