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 0244BC25B47 for ; Fri, 27 Oct 2023 09:48:57 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJS3-00058K-LV; Fri, 27 Oct 2023 05:48:23 -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 1qwJRz-0004vu-SM; Fri, 27 Oct 2023 05:48:20 -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 1qwJRw-0005zO-CQ; Fri, 27 Oct 2023 05:48:18 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32db8f8441eso1295130f8f.0; Fri, 27 Oct 2023 02:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698400095; x=1699004895; 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=30VwI2HQrqCL5YyhF8qmfbeeHlzGfWBEtfc4fCXo8Fs=; b=fkCVkvlMqQLeq3JKZAR7+tTicsUjXDVkuNZ5JjmvidaxMQOZBJUHl6pZYNdBpf+EU1 8roS2U/3RHXD7BqIljTTlBoyh5hxYK1Lc/iUgqdFaAWx6VrWBPjcudWOOREs1o+BRsb3 04Ap5CElfdw21GQJw2fa0A4d3dGEGPZpz1JSGg1mc2OWnTxXIPZHafKiT35jOEX2rsx+ J+AswLu6uOzCJhQLAgR/v3T/6yIQ30CYuGhEWeG29Q3C8FVrb5YLbI9cBW+MKIWa3BOJ wLbNDkwfB7CdA2ylAZ/Hs2WF0CW8kpKYH9qXrL5ekIwgvhHdKZGmVhfircmCgQwGik6R QutA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698400095; x=1699004895; 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=30VwI2HQrqCL5YyhF8qmfbeeHlzGfWBEtfc4fCXo8Fs=; b=UUN5lmFnOQw6ywKsenA79PdfZUtmOASYmoHIaUsWglxru6aaeIQhlR2Vo7k4/+jvGK UwS2j/ZCgsCo8TjKBMi+5eDZEEUDVwgNrhy1phTpZn5aGjV3ORUKC7caT+L6ml4uG52J 2PCAjLIFoNMVcMdqb6Rv0YGfU/5NelIQT3m2jfkCH4OU3JDjhM9eKxSjdq7gjlgGZuie DDK9YnlwL59BH08FQEjoDAO0GkUt2+IYd37Ykmd5BXapePFPnX1823dQuusW+ZBTrZie 3qWNGf+3ZVre4d42lzWFSLhIlsxYFaxSt/oqBATAO7+04nDjTfSihPn7RdtJPtM4aTrM RN1A== X-Gm-Message-State: AOJu0Yz/S6z/dY5I4YAyYS3jAIYfuRqIYpTdLTk7QqLAzJGpNyjR5fe0 EfRdZ/l9QprQM0fgjUUpAA8= X-Google-Smtp-Source: AGHT+IE4PpSyRDRjuLCwnnRqMs4Ez7+O/3yvQMMGSADruwPllbL3a4A8idM4xcMnD9poi1dGJZ1Jjg== X-Received: by 2002:a05:6000:1361:b0:32d:9b80:e2c6 with SMTP id q1-20020a056000136100b0032d9b80e2c6mr1636403wrz.26.1698400094647; Fri, 27 Oct 2023 02:48:14 -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.48.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Oct 2023 02:48:14 -0700 (PDT) Message-ID: <322697f1-c4fe-40ab-88ce-f99f9d1fe4d6@gmail.com> Date: Fri, 27 Oct 2023 10:48:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 26/28] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices() 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-27-dwmw2@infradead.org> From: "Durrant, Paul" In-Reply-To: <20231025145042.627381-27-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 > > Eliminate direct access to nd_table[] and nb_nics by processing the the > ISA NICs first and then calling pci_init_nic_devices() for the test. > > It's important to do this *before* the subsequent patch which registers > the Xen PV network devices, because the code being remove here didn't > check whether nd->instantiated was already set before using each entry. > > Signed-off-by: David Woodhouse > --- > hw/i386/pc.c | 21 +++++++++++---------- > include/hw/net/ne2000-isa.h | 2 -- > 2 files changed, 11 insertions(+), 12 deletions(-) > Reviewed-by: Paul Durrant