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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 21215C25B67 for ; Fri, 27 Oct 2023 09:47:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJQd-00044w-7O; Fri, 27 Oct 2023 05:46:55 -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 1qwJQb-00043y-5o; Fri, 27 Oct 2023 05:46:53 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwJQZ-0004u2-EI; Fri, 27 Oct 2023 05:46:52 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32d9effe314so1284041f8f.3; Fri, 27 Oct 2023 02:46:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698400009; x=1699004809; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:reply-to:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=jzLwa1GntXahp5+i4Iu7OMe0oRp7S0Pb5ddkQlqpbTs=; b=P49vfxrOWQL4T5RdhOnYtgK8bwXfcfRf/bG6o/Bf/bOzmarMO3CwgQbhseVMo2glwG RlqY/iF8nsMxMJckhuLvBuuGWlo66tO0upMCQ6N1OZwrgo8phIm0ERofhDS2yy/KPhdo FZXK3qoJ9PZeUkhlKL7jmXe6c/mHNAvBIrsmXDc6X3ox7Lt65TRqPGoJGZSQCGV0yUhX GOocTvjZU4cxXf0I4XnCVhnpT5DO5/gc6Nd9g4ZwQMHDsUEiAXHMFVCjstHwjO20Gkvc ijgzUMaa8rhOVqXSsntuEPtVoPMFyNN9h859TcHSuT0nJOm7CEDWtjCZIpuQN4z0cxk/ HiYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698400009; x=1699004809; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:reply-to:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jzLwa1GntXahp5+i4Iu7OMe0oRp7S0Pb5ddkQlqpbTs=; b=iyZMbhWxPe2KQPPgezh5g2BhpnbMTk0gyv1ZCpTorZzwjQpOvi//2lLsA49wiHfKr7 qJ1aSOCAMQho9T/ML3HGqCn0HPuO7QNMGJXb61dQ9VymCsVsIjzvWvJ02gziBx43yWq4 9RU3arrAIcE6vV0c7jmG6GBQvL9GYb6U229qYQLmefjJdGYMGQ3d6cKimZxch9TA+Txx I/WZFpYms5Alzf3I00DTfW+BpWP04fvXbzBEJbVVbjds60A54nq76cwoQI1dMSghI+XX YceVT6R/irV29THyGoIhSegH419NwpkNa9dHYJzvSqducI8bgmMRIS9ScVOoAmE9WTjb Pn8Q== X-Gm-Message-State: AOJu0YzQw0IAxmeKTH9hUbr9iCqjmFfRpvaV2I1wKur4S6Lmv/qgB78f +EWcemXnCR0vPtv6FKNsglA= X-Google-Smtp-Source: AGHT+IF+xd8cuMtFJ/cywAMdwJALH04PvtMGn/mtI5e9KZNkVRA1ttigVPEIA2v+rqX3cz0pRpds5w== X-Received: by 2002:a5d:68c1:0:b0:32d:a022:8559 with SMTP id p1-20020a5d68c1000000b0032da0228559mr1762750wrw.47.1698400009412; Fri, 27 Oct 2023 02:46:49 -0700 (PDT) Received: from [192.168.10.177] (54-240-197-235.amazon.com. [54.240.197.235]) by smtp.gmail.com with ESMTPSA id e9-20020a5d5949000000b00326f5d0ce0asm1389222wri.21.2023.10.27.02.46.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Oct 2023 02:46:49 -0700 (PDT) Message-ID: Date: Fri, 27 Oct 2023 10:46:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 25/28] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot() Content-Language: en-US To: David Woodhouse , qemu-devel@nongnu.org Cc: Kevin Wolf , Hanna Reitz , Stefano Stabellini , Anthony Perard , Paul Durrant , =?UTF-8?Q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , "Michael S. Tsirkin" , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Jason Wang , Marcelo Tosatti , qemu-block@nongnu.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, Bernhard Beschow , Joel Upham References: <20231025145042.627381-1-dwmw2@infradead.org> <20231025145042.627381-26-dwmw2@infradead.org> From: "Durrant, Paul" In-Reply-To: <20231025145042.627381-26-dwmw2@infradead.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=xadimgnik@gmail.com; helo=mail-wr1-x435.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: paul@xen.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 25/10/2023 15:50, David Woodhouse wrote: > From: David Woodhouse > > The loop over nd_table[] to add PCI NICs is repeated in quite a few > places. Add a helper function to do it. > > Some platforms also try to instantiate a specific model in a specific > slot, to match the real hardware. Add pci_init_nic_in_slot() for that > purpose. > > Signed-off-by: David Woodhouse > --- > hw/pci/pci.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ > include/hw/pci/pci.h | 4 +++- > 2 files changed, 48 insertions(+), 1 deletion(-) > Reviewed-by: Paul Durrant