public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "DERUMIER, Alexandre" <Alexandre.DERUMIER@groupe-cyllene.com>
To: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server v2 12/13] fix #3574: enable multi pci device mapping from config
Date: Thu, 25 Aug 2022 14:21:29 +0000	[thread overview]
Message-ID: <40540b19-6675-8ec9-5ac0-0163814bfe92@groupe-cyllene.com> (raw)
In-Reply-To: <20220825092440.1810328-18-d.csapak@proxmox.com>

I can't get mdev device working, it don't create the mdev device

> +    # ignore mdev for multiple devices, except when from mapping
> +    if ($res->{mdev} && $ignore_mdev) {
> +	warn "ignoring mediated device with multifunction device\n";
> +	delete $res->{mdev};
>       }
>       return $res;
>   }
> @@ -433,11 +446,13 @@ my $print_pci_device = sub {
>   };
>   


root@pve2:~# qm start 101
ignoring mediated device with multifunction device


with
vmconfig
---------

agent: 1
boot: order=scsi0;ide2;net0
cores: 2
cpu: host
hostpci0: sharednvidia,mdev=nvidia-54
ide2: cephfs-1:iso/jammy-live-server-amd64.iso,media=cdrom,size=1439536K
machine: q35
memory: 8195
meta: creation-qemu=6.2.0,ctime=1659689043
name: ubuntu-server-gpu
net0: virtio=6E:67:68:AA:68:7F,bridge=vmbr0,firewall=1
numa: 1
ostype: l26
parent: toto
scsi0: ceph-vm-ct-1:vm-101-disk-0,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=3580645c-dd29-4ac9-8276-5a67474ce67a
sockets: 2
vga: virtio
vmgenid: 1c2eb299-a6f9-4d2d-ab33-9b43ffed8c6d


mapping
-------

  cat nodes/hardware-map.conf|jq
{
   "digest": "4a760264e56a84da88d4362d414684db860c3406",
   "pci": {
     "sharednvidia": {
       "pve1": {
         "mdev": "1",
         "device": "0x1c31",
         "iommugroup": "75",
         "subsystem-device": "0x131b",
         "path": "0000:02:00",
         "subsystem-vendor": "0x10de",
         "vendor": "0x10de"
       },
       "pve2": {
         "mdev": "1",
         "iommugroup": "47",
         "device": "0x1c31",
         "subsystem-device": "0x131b",
         "subsystem-vendor": "0x10de",
         "vendor": "0x10de",
         "path": "0000:02:00"
       }
     }
   }
}



generated kvm command line: (without mdev)

/usr/bin/kvm -id 101 -name ubuntu-server-gpu,debug-threads=on 
-no-shutdown -chardev 
socket,id=qmp,path=/var/run/qemu-server/101.qmp,server=on,wait=off -mon 
chardev=qmp,mode=control -chardev 
socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5 -mon 
chardev=qmp-event,mode=control -pidfile /var/run/qemu-server/101.pid 
-daemonize -smbios type=1,uuid=3580645c-dd29-4ac9-8276-5a67474ce67a -smp 
4,sockets=2,cores=2,maxcpus=4 -nodefaults -boot 
menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg 
-vnc unix:/var/run/qemu-server/101.vnc,password=on -cpu 
host,+kvm_pv_eoi,+kvm_pv_unhalt -m 8195 -object 
memory-backend-ram,id=ram-node0,size=4097.5M -numa 
node,nodeid=0,cpus=0-1,memdev=ram-node0 -object 
memory-backend-ram,id=ram-node1,size=4097.5M -numa 
node,nodeid=1,cpus=2-3,memdev=ram-node1 -readconfig 
/usr/share/qemu-server/pve-q35-4.0.cfg -device 
vmgenid,guid=1c2eb299-a6f9-4d2d-ab33-9b43ffed8c6d -device 
usb-tablet,id=tablet,bus=ehci.0,port=1 -device 
vfio-pci,host=0000:02:00.0,id=hostpci0.0,bus=pci.0,addr=0x10.0,multifunction=on 
-device vfio-pci,host=0000:02:00.1,id=hostpci0.1,bus=pci.0,addr=0x10.1 
-device virtio-vga,id=vga,bus=pcie.0,addr=0x1 -chardev 
socket,path=/var/run/qemu-server/101.qga,server=on,wait=off,id=qga0 
-device virtio-serial,id=qga0,bus=pci.0,addr=0x8 -device 
virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -device 
virtio-serial,id=spice,bus=pci.0,addr=0x9 -chardev 
spicevmc,id=vdagent,name=vdagent -device 
virtserialport,chardev=vdagent,name=com.redhat.spice.0 -spice 
tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on 
-device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on 
-iscsi initiator-name=iqn.1993-08.org.debian:01:fbdf9d609751 -drive 
file=/mnt/pve/cephfs-1/template/iso/jammy-live-server-amd64.iso,if=none,id=drive-ide2,media=cdrom,aio=io_uring 
-device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=101 
-device virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5 -drive 
file=rbd:ceph-vm-ct-1/vm-101-disk-0:conf=/etc/pve/ceph.conf:id=admin:keyring=/etc/pve/priv/ceph/ceph-vm-ct-1.keyring,if=none,id=drive-scsi0,format=raw,cache=none,aio=io_uring,detect-zeroes=on 
-device 
scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100 
-netdev 
type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on 
-device 
virtio-net-pci,mac=6E:67:68:AA:68:7F,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=102 
-machine type=q35+pve0






maybe not related, but after that, stop/start are not working anymore

root@pve2:~# qm stop 101
PCI device mapping invalid (hardware probably changed): 'mdev' 
configured but should not be

root@pve2:~# qm start 101
PCI device mapping invalid (hardware probably changed): 'mdev' 
configured but should not be




  reply	other threads:[~2022-08-25 14:21 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25  9:24 [pve-devel] [PATCH many v2] add cluster-wide hardware device mapping Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH cluster v2 1/1] add nodes/hardware-map.conf Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH access-control v2 1/1] PVE/AccessControl: add Hardware.* privileges and /hardware/ paths Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH common v2 1/3] SysFSTools: make mdev cleanup independent of pciid Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH common v2 2/3] add PVE/HardwareMap Dominik Csapak
2022-08-25 13:37   ` DERUMIER, Alexandre
2022-08-25  9:24 ` [pve-devel] [PATCH common v2 3/3] HardwareMap: add support for multiple pci device paths per mapping Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 01/13] cleanup pci devices in more situations Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 02/13] PCI: make mediated device path independent of pci id Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 03/13] PCI: refactor print_pci_device Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 04/13] PCI: reuse parsed info from print_hostpci_devices Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 05/13] PVE/QemuServer: allow mapped usb devices in config Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 06/13] PVE/QemuServer: allow mapped pci deviced " Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 07/13] PVE/API2/Qemu: add permission checks for mapped usb devices Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 08/13] PVE/API2/Qemu: add permission checks for mapped pci devices Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 09/13] PVE/QemuServer: extend 'check_local_resources' for mapped resources Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 10/13] PVE/API2/Qemu: migrate preconditions: use new check_local_resources info Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 11/13] PVE/QemuMigrate: check for mapped resources on migration Dominik Csapak
2022-08-25 18:00   ` DERUMIER, Alexandre
2022-08-26  6:33     ` Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 12/13] fix #3574: enable multi pci device mapping from config Dominik Csapak
2022-08-25 14:21   ` DERUMIER, Alexandre [this message]
2022-08-25 14:53     ` DERUMIER, Alexandre
2022-08-26  6:39       ` Dominik Csapak
2022-08-27 16:09         ` DERUMIER, Alexandre
2022-09-02  9:02           ` Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH qemu-server v2 13/13] add tests for mapped pci devices Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 01/13] PVE/API2/Hardware: add Mapping.pm Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 02/13] PVE/API2/Cluster: add Hardware mapping list api call Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 03/13] ui: form/USBSelector: make it more flexible with nodename Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 04/13] ui: form: add PCIMapSelector Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 05/13] ui: form: add USBMapSelector Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 06/13] ui: qemu/PCIEdit: rework panel to add a mapped configuration Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 07/13] ui: qemu/USBEdit: add 'mapped' device case Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 08/13] ui: form: add MultiPCISelector Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 09/13] ui: add window/PCIEdit: edit window for pci mappings Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 10/13] ui: add window/USBEdit: edit window for usb mappings Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 11/13] ui: add dc/HardwareView: a CRUD interface for hardware mapping Dominik Csapak
2022-08-25 15:37   ` DERUMIER, Alexandre
2022-08-26  6:48     ` Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 12/13] ui: window/Migrate: allow mapped devices Dominik Csapak
2022-08-25  9:24 ` [pve-devel] [PATCH manager v2 13/13] ui: improve permission handling for hardware Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40540b19-6675-8ec9-5ac0-0163814bfe92@groupe-cyllene.com \
    --to=alexandre.derumier@groupe-cyllene.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal