From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:60734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBDxF-0007qA-DV for qemu-devel@nongnu.org; Tue, 02 Apr 2019 03:35:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBDxE-0004E0-Dl for qemu-devel@nongnu.org; Tue, 02 Apr 2019 03:35:33 -0400 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:40175) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hBDxD-0004DD-TU for qemu-devel@nongnu.org; Tue, 02 Apr 2019 03:35:32 -0400 Received: by mail-ot1-x344.google.com with SMTP id t8so11109859otp.7 for ; Tue, 02 Apr 2019 00:35:31 -0700 (PDT) MIME-Version: 1.0 References: <1554099897-28606-1-git-send-email-tjin@wavecomp.com> <1554099897-28606-2-git-send-email-tjin@wavecomp.com> In-Reply-To: From: Peter Maydell Date: Tue, 2 Apr 2019 07:35:19 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH] Adds virtio_net as the default netcard for mips boston board. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tommy Jin Cc: Aleksandar Markovic , "qemu-devel@nongnu.org" , "pburton.wavecomp.com@gmail.com" On Tue, 2 Apr 2019 at 14:24, Tommy Jin wrote: > For the option2, I think specify the network model in command line is > not enough, per my understanding, we still need to create the device > using API like pci_create && qdev_set_nic_properties && qdev_init_nofail, > otherwise we'll get error prompts like "requested NIC (anonymous, model > virtio) was not created (not supported by this machine?)", currently I > just add these pieces of code in /hw/mips/boston.c, Do you call these > pieces of code board code and what's your suggestion? If the boston board has PCI support and it is implemented correctly then you should be able to create a virtio network setup with command line options like -netdev user,id=mynet -device virtio-net-pci,netdev=mynet (or any other netdev backend, eg tun/tap). I don't have a boston image/command line to test that with, but it works for arm boards and should be the same for any pci capable board model. thanks -- PMM