[PATCH v1] docs: add slot when adding new PCIe root port

2021-06-14 Thread Vincent Bernat
stem-x86_64: -device pcie-root-port,bus=pcie.0,id=rp2: Can't add chassis slot, error -16 This is due to the fact they both try to use slot 0. Update the documentation to specify a slot for each new PCIe root port. Signed-off-by: Vincent Bernat --- docs/pcie_pci_bridge.txt | 6 +++--- 1

Re: [PATCH v4] hw/smbios: support for type 41 (onboard devices extended information)

2021-05-07 Thread Vincent Bernat
❦ 3 mai 2021 15:42 -04, Michael S. Tsirkin: >> >> +/* >> >> + * We only handle the case were the device is attached to >> >> + * the PCI root bus. The general case is more complex as >> >> + * bridges are enumerated later and the table would need >

Re: [PATCH v4] hw/smbios: support for type 41 (onboard devices extended information)

2021-05-03 Thread Vincent Bernat
❦ 3 mai 2021 17:05 +02, Igor Mammedov: >> +/* >> + * We only handle the case were the device is attached to >> + * the PCI root bus. The general case is more complex as >> + * bridges are enumerated later and the table would need >> + *

Re: [PATCH v4] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-30 Thread Vincent Bernat
❦ 1 avril 2021 19:11 +02, Vincent Bernat: > Type 41 defines the attributes of devices that are onboard. The > original intent was to imply the BIOS had some level of control over > the enablement of the associated devices. Now that QEMU 6 is released, I think this patch is ready

Re: [PATCH v3] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-06 Thread Vincent Bernat
❦ 6 avril 2021 21:05 +02, Igor Mammedov: >> >>> This can be invoked with: >> >>> >> >>> $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',i

Re: [PATCH v3] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-02 Thread Vincent Bernat
❦ 1 avril 2021 23:07 +02, Vincent Bernat: >>> This can be invoked with: >>> >>> $QEMU -netdev user,id=internet >>> -device >>> virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \ >>> -smbios

Re: [PATCH v3] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-01 Thread Vincent Bernat
❦ 1 avril 2021 22:58 +02, Igor Mammedov: >> This can be invoked with: >> >> $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,pcid

[PATCH v4] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-01 Thread Vincent Bernat
:1/128 eno1 UP 10.0.2.14/24 fec0::5254:ff:fe00:42/64 fe80::5254:ff:fe00:42/64 Signed-off-by: Vincent Bernat --- hw/arm/virt.c| 7 +- hw/i386/fw_cfg.c | 4 +- hw/smbios/smbios.c | 124 ++- include/hw/firmware

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

[PATCH v3] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-01 Thread Vincent Bernat
:1/128 eno1 UP 10.0.2.14/24 fec0::5254:ff:fe00:42/64 fe80::5254:ff:fe00:42/64 Signed-off-by: Vincent Bernat --- hw/arm/virt.c| 7 ++- hw/i386/fw_cfg.c | 4 +- hw/smbios/smbios.c | 112 ++- include/hw/firmware

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 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 1/2] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-01 Thread Vincent Bernat
❦ 1 avril 2021 09:41 +01, Daniel P. Berrangé: >> +t = calloc(1, sizeof(struct type41_instance)); >> +if (!t) { >> +error_setg(errp, >> + "Unable to allocate memory for a new type 41 >> instance"); >> +return; >> +

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

2021-04-01 Thread Vincent Bernat
64 Signed-off-by: Vincent Bernat --- hw/smbios/smbios.c | 47 +- qemu-options.hx| 2 +- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 46a08652dff4..0f390e03453c 100644 --- a/hw/smbio

[PATCH v2 1/2] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-01 Thread Vincent Bernat
T_NAME_ONBOARD=eno1 E: ID_NET_LABEL_ONBOARD=Onboard LAN Signed-off-by: Vincent Bernat --- hw/smbios/smbios.c | 119 +++ include/hw/firmware/smbios.h | 11 qemu-options.hx | 7 ++- 3 files changed, 136 insertions(+), 1 deletion(-) diff --git

Re: [RFC v1] hw/smbios: support for type 41 (onboard devices extended information)

2021-03-30 Thread Vincent Bernat
❦ 30 mars 2021 11:35 +01, Daniel P. Berrangé: >> If network devices are present in this table, by default, udev will >> name the corresponding interfaces enoX, X being the instance number. >> Without such information, udev will fallback to using the PCI ID and >> this usually gives ens3 or ens4.

[Bug 1090604] Re: RFE: Implement support for SMBIOS Type 41 structures

2021-03-29 Thread Vincent Bernat
I have sent a first patch around this: https://lists.nongnu.org/archive/html/qemu-devel/2021-03/msg09391.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1090604 Title: RFE: Implement support for

[RFC v1] hw/smbios: support for type 41 (onboard devices extended information)

2021-03-28 Thread Vincent Bernat
w to implement this. Signed-off-by: Vincent Bernat --- hw/smbios/smbios.c | 117 +++ include/hw/firmware/smbios.h | 11 qemu-options.hx | 7 ++- 3 files changed, 134 insertions(+), 1 deletion(-) diff --git a/hw/smbios/smbios.c b/hw

[Qemu-devel] [RFC, PATCH, v1] hw/audio/opl2lpt: add support for OPL2LPT

2018-02-18 Thread Vincent Bernat
ter() isn't always called on shutdown either). The user has to reset the VM, then stop it if they don't want to reset the OPL2LPT manually. Signed-off-by: Vincent Bernat --- default-configs/sound.mak | 1 + hw/audio/Makefile.objs| 1 + hw/

Re: [Qemu-devel] [PATCH x86-next v2] target-i386: add PCID flag to Westmere, Sandy Bridge and Ivy Bridge

2018-01-16 Thread Vincent Bernat
❦ 16 janvier 2018 10:41 -0200, Eduardo Habkost  : >> > Adding Westmere-PCID would require adding a Westmere-PCID-IBRS >> > CPU model too, so this is starting to look a bit ridiculous. >> > Sane VM management systems would know how to use >> > "-cpu Westmere,+pcid" without requiring new CPU model

Re: [Qemu-devel] [PATCH x86-next v2] target-i386: add PCID flag to Westmere, Sandy Bridge and Ivy Bridge

2018-01-12 Thread Vincent Bernat
❦ 12 janvier 2018 16:47 -0200, Eduardo Habkost  : > Adding Westmere-PCID would require adding a Westmere-PCID-IBRS > CPU model too, so this is starting to look a bit ridiculous. > Sane VM management systems would know how to use > "-cpu Westmere,+pcid" without requiring new CPU model entries in >

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 21:19 -0200, Eduardo Habkost  : >> > GET_SUPPORTED_CPUID seems to still return PCID as supported >> > without EPT, doesn't it? >> >> Indeed it is! It will also be useful for KPTI performance without >> INVPCID, but it won't be useful without EPT. > > Well, I can live with "not

[Qemu-devel] [PATCH x86-next v2] target-i386: add PCID flag to Westmere, Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
kernel. Signed-off-by: Vincent Bernat --- include/hw/i386/pc.h | 14 +- qemu-doc.texi| 11 +++ target/i386/cpu.c| 7 --- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index bb49165fe0a4..f4ccbfdc4ac2

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 20:56 -0200, Eduardo Habkost  : > (BTW, is PCID useful for KPTI performance without INVPCID?) It seems it is: https://mail-archive.com/linux-kernel@vger.kernel.org/msg1576774.html -- Don't use conditional branches as a substitute for a logical expression. - The E

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 17:37 -0500, Paolo Bonzini  : >> One possible way to work around this problem is to declare that >> QEMU 2.12 with KVM will require Linux v3.6 and newer (because we >> need Linux kernel commit ad756a1603c5 "KVM: VMX: Implement >> PCID/INVPCID for guests with EPT"). > > Note that

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 20:14 -0200, Eduardo Habkost  : >> What are the consequences of running a too old kernel? Would KVM just >> hide PCID flag? > > On an old kernel, the SandyBridge and IvyBridge CPU models will > be unexpectedly become not runnable. But, isn't it the same for more recent models t

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 19:16 -0200, Eduardo Habkost  : > One possible way to work around this problem is to declare that > QEMU 2.12 with KVM will require Linux v3.6 and newer (because we > need Linux kernel commit ad756a1603c5 "KVM: VMX: Implement > PCID/INVPCID for guests with EPT"). I have propose

[Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
PCID has been introduced in Sandy Bridge and, currently, KVM doesn't object exposing it to VM as long as it is present on the host. Update CPU model for both Sandy Bridge and Ivy Bridge accordingly. Signed-off-by: Vincent Bernat --- target/i386/cpu.c | 5 +++-- 1 file changed, 3 inser

[Qemu-devel] [PATCH] slirp: allow host port 0 for hostfwd

2017-02-25 Thread Vincent Bernat
-net user,hostfwd=127.0.0.1:0-:22 ... Then, get your port with: $ lsof -np 1474 | grep LISTEN qemu-syst 31777 bernat 12u IPv4 [...] TCP 127.0.0.1:35145 (LISTEN) Signed-off-by: Vincent Bernat --- net/slirp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/slirp.c b/n

Re: [Qemu-devel] [v2] tftp: fake support for netascii protocol

2016-11-22 Thread Vincent Bernat
❦ 22 novembre 2016 10:49 GMT, Stefan Hajnoczi  : >> I guess the question is that while the patch above could be accepted for >> the upcoming 2.8 (I don't see it breaking existing systems), a patch >> that would implement the transformation would be a lot more involved, >> and really not suitable

Re: [Qemu-devel] [v2] tftp: fake support for netascii protocol

2016-11-21 Thread Vincent Bernat
doing nr_block*512. If there is a transformation, this cannot work this way. But this can be done, we'll just have to maintain an offset. Not knowing the final size is not a problem, just send back 0 as the size. -- Vincent Bernat — vincent.ber...@exoscale.ch ❬❱ https://www.exoscale.ch

Re: [Qemu-devel] [PULL] tftp: fake support for netascii protocol

2016-11-20 Thread Vincent Bernat
❦ 19 novembre 2016 23:30 +0100, Samuel Thibault  : >> > I think you should at least issue a qemu_log_mask(LOG_UNIMP, "...") >> > call in that case. >> >> I can do that if needed. > > That'd be better indeed. Otherwise people might wonder why things are > not working. Warning that they have to do

[Qemu-devel] [v2] tftp: fake support for netascii protocol

2016-11-20 Thread Vincent Bernat
From: Vincent Bernat Some network equipments are requesting a file using the netascii protocol and this is not configurable. Currently, qemu's tftpd only supports the octet protocol. This commit makes it accept the netascii protocol as well but do not perform the requested transformatio

Re: [Qemu-devel] [PULL] tftp: fake support for netascii protocol

2016-11-19 Thread Vincent Bernat
❦ 19 novembre 2016 08:32 +0100, Thomas Huth  : >> Some network equipments are requesting a file using the netascii >> protocol and this is not configurable. Currently, qemu's tftpd only >> supports the octet protocol. This commit makes it accept the netascii >> protocol as well but do not perform

Re: [Qemu-devel] [PATCH] tftp: fake support for netascii protocol

2016-11-17 Thread Vincent Bernat
the remaining of the file. > ERROR: Missing Signed-off-by: line(s) Should I resend the patch for that or the amendment I sent in another mail is sufficient? -- Vincent Bernat — vincent.ber...@exoscale.ch ❬❱ https://www.exoscale.ch

[Qemu-devel] [PATCH] tftp: fake support for netascii protocol

2016-11-17 Thread Vincent Bernat
From: Vincent Bernat Some network equipments are requesting a file using the netascii protocol and this is not configurable. Currently, qemu's tftpd only supports the octet protocol. This commit makes it accept the netascii protocol as well but do not perform the requested transformatio

Re: [Qemu-devel] [PATCH] tftp: fake support for netascii protocol

2016-11-17 Thread Vincent Bernat
❦ 17 novembre 2016 13:20 +0100, Vincent Bernat  : > Some network equipments are requesting a file using the netascii > protocol and this is not configurable. Currently, qemu's tftpd only > supports the octet protocol. This commit makes it accept the netascii > protocol as well b