On Apr 1, 2019 11:39 AM, "Peter Maydell" <peter.mayd...@linaro.org> wrote: > > On Mon, 1 Apr 2019 at 16:23, Tommy Jin <t...@wavecomp.com> wrote: > > > > Boston didn't bring up any netcard by default, this is not so convenient for users who are verifying network related functionalities on this board. > > As the linux kernel has already supported virtio_net, now add a virtio netcard for boston, to make virtio work properly, please: > > 1. set virtio net options in linux kernel, saying CONFIG_VIRTIO && CONFIG_VIRTIO_PCI && CONFIG_VIRTIO_NET > > 2. specify model=virtio when you start boston in qemu. > > > > Signed-off-by: tjin <t...@wavecomp.com> > > --- > > hw/mips/boston.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/hw/mips/boston.c b/hw/mips/boston.c > > index cac0e22..5d3239e 100644 > > --- a/hw/mips/boston.c > > +++ b/hw/mips/boston.c > > @@ -428,10 +428,10 @@ static void network_init(PCIBus *bus) > > { > > PCIDevice *eth; > > > > - /*Please set CONFIG_VIRTIO && CONFIG_VIRTIO_PCI && CONFIG_VIRTIO_NET > > - of Linux kernel.*/ > > + /* Please set CONFIG_VIRTIO && CONFIG_VIRTIO_PCI && CONFIG_VIRTIO_NET */ > > + /* of Linux kernel. */ > > This sort of thing should go in documentation, not as a comment > in the code. > > > eth = pci_create(bus, > > - PCI_DEVFN(0, 1), "virtio-net-pci"); > > + PCI_DEVFN(0, 1), "virtio-net-pci"); > > > Am I missing something, or is this patch not actually changing > any code? Maybe you made a mistake somehow when creating it? > > I'm not sure if we want to create a default network card > for this board -- the user (or more usually the management > layer like libvirt) can create it on the command line, and > if we always create a virtio-net-pci device in the code then > the user has no way to say they *don't* want the device. > > Also, this board is a model of a real piece of hardware, and > the real hardware doesn't have a virtio-net device in it. > > > > > qdev_set_nic_properties(ð->qdev, &nd_table[0]); > > qdev_init_nofail(ð->qdev); > > -- > > thanks > -- PMM >
Just adding Paul Burton, the Boston card emulation maintainer. Aleksandar