Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Michael S. Tsirkin
On Thu, Apr 01, 2021 at 04:26:50PM +0200, Vincent Bernat wrote: > ❦ 1 avril 2021 09:59 -04, Michael S. Tsirkin: > > >> +/* > >> + * TODO: Extract the appropriate value. Most of the > >> + * time, this will be 0. > >> + */ > >> +

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Vincent Bernat
❦ 1 avril 2021 09:59 -04, Michael S. Tsirkin: >> +/* >> + * TODO: Extract the appropriate value. Most of the >> + * time, this will be 0. >> + */ >> +t->segment_group_number = cpu_to_le16(0); >> +t->b

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Michael S. Tsirkin
On Thu, Apr 01, 2021 at 10:25:44AM +0200, Vincent Bernat wrote: > Instead of specifying the PCI address manually, the device can be > specified by ID: > > $QEMU -netdev user,id=internet > -device > virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \ > -s

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Vincent Bernat
❦ 1 avril 2021 10:38 +01, Daniel P. Berrangé: >> +t->bus_number = pci_dev_bus_num(pdev); >> +t->device_number = pdev->devfn; >> +} else { >> +fprintf(stderr, "%s: cannot find PCI device %s\n", >> +__func__, t41->

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Daniel P . Berrangé
On Thu, Apr 01, 2021 at 12:07:30PM +0200, Vincent Bernat wrote: > ❦ 1 avril 2021 10:38 +01, Daniel P. Berrangé: > > >> hw/smbios/smbios.c | 47 +- > >> qemu-options.hx| 2 +- > >> 2 files changed, 22 insertions(+), 27 deletions(-) > > > > It does

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Vincent Bernat
❦ 1 avril 2021 10:38 +01, Daniel P. Berrangé: >> hw/smbios/smbios.c | 47 +- >> qemu-options.hx| 2 +- >> 2 files changed, 22 insertions(+), 27 deletions(-) > > It doesn't really make sense to have this as a separate patch > when it is deleting h

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Daniel P . Berrangé
On Thu, Apr 01, 2021 at 10:25:44AM +0200, Vincent Bernat wrote: > Instead of specifying the PCI address manually, the device can be > specified by ID: > > $QEMU -netdev user,id=internet > -device > virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \ > -s

[PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Vincent Bernat
Instead of specifying the PCI address manually, the device can be specified by ID: $QEMU -netdev user,id=internet -device virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \ -smbios type=41,designation='Onboard LAN',instance=1,kind=ethernet,pcidev=inter