[pve-devel] virtiodisk ordering bug in current implementation + proposal for new qemu device syntax

Dietmar Maurer dietmar at proxmox.com
Mon Aug 29 08:25:17 CEST 2011


> The question is, do you want to limit the virtio disk to X number, and nics to X
> number ?

No, I don't want to limit anything- I just do not guarantee a fixed pci address
for vitrioN and netN where N >= 10

So we simply assign fixed addr to virtio0-virtio9 and net0-net9. The rest of the devices
does not get fixed pci addr (for now)

> I don't if some proxmox users want 20 disk or 20 nics by example.
> Also maybe we need to keep 1 or 2 slots for pci devices passthrough

we can also limit fixed slot assignments to 6 or 8 devices, which is still
enough for most use cases?

> Personnaly, for my professional use, I never use more than 3 disk and 3 nics ;)

Yes, so maybe 6 device with fixed pci addr are enough for now?

> And yes, maybe is the future (6 months?) with pci bridge we can add more
> devices.

hopefully
 
> So maybe a config file for all devices slots mapping can be the solution, so we
> can extend it in the future.

I suggest to simply hardcode that for now. 

sub get_pci_addr() { ... }

We can make it configurable later.

> Currently, i'm using this model config: (just an example)
> 
> pci: device=video0,bus=0,addr=2
> pci: device=balloon,bus=0,addr=3
> pci: device=audio0,bus=0,addr=4
> pci: device=scsi0,bus=0,addr=5
> pci: device=scsi1,bus=0,addr=6

Those are the same mappings used by libvirt? I would like to have that compatible.

> pci: device=virtio0,bus=0,addr=10
> pci: device=virtio1,bus=0,addr=11
> pci: device=virtio2,bus=0,addr=12
> pci: device=virtio3,bus=0,addr=13
> pci: device=virtio4,bus=0,addr=14
> pci: device=virtio5,bus=0,addr=15

look ok for me.

> pci: device=virtio6,bus=0,addr=16
> pci: device=virtio7,bus=0,addr=17
> pci: device=virtio8,bus=0,addr=18
> pci: device=virtio9,bus=0,addr=19
> pci: device=virtio10,bus=0,addr=20
> pci: device=net0,bus=0,addr=21
> pci: device=net1,bus=0,addr=22
> pci: device=net2,bus=0,addr=23
> pci: device=net3,bus=0,addr=24
> pci: device=net4,bus=0,addr=25
> pci: device=net5,bus=0,addr=26
> pci: device=net6,bus=0,addr=27
> pci: device=net7,bus=0,addr=28
> pci: device=net8,bus=0,addr=29
> pci: device=net9,bus=0,addr=30

maybe we do not need to assign all free addresses for now:

pci: device=net0,bus=0,addr=20
pci: device=net1,bus=0,addr=21
pci: device=net2,bus=0,addr=22
pci: device=net3,bus=0,addr=23
pci: device=net4,bus=0,addr=24
pci: device=net5,bus=0,addr=25

I currently use 1d (29) for usb controllers (see pve-usb.cfg)

- Dietmar


More information about the pve-devel mailing list