Re: Add iommu device when VM configured with > 255 vcpus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2024-05-31 at 11:16 +0100, Joao Martins wrote:
> On 30/05/2024 18:00, Dario Faggioli via Devel wrote:
> > 
> > IIUIC, it's a matter of number of bits available in the I/O APIC
> > IRQ
> > destination register. Like, with only that available, and it being
> > only
> > 8 bit wide, it's just not doable.
> > 
> 
> On VMs, there's alternatively a KVM PV op to bump the limit to 32k
> vCPUs i.e.
> 
> 	KVM_FEATURE_MSI_EXT_DEST_ID
> 	(on qemu it's cpu feature name +kvm-msi-ext-dest-id)
> 
> Which uses the other 24-bits for that destination register (which on
> hardware
> would cross a page boundary in IOAPIC entry IIUC) without needing
> IOMMU
> interrupt remapping. But you need the guest to understand that
> feature (which is
> there since Linux v5.15 or around that timeframe). I think this is
> what Igor is
> referring to.
> 
Ok, and thanks for the explanation. :-)

Now, it may very well be me, but this confuses me even more... :-O

So, right now, if you try to create a VM with more than 255 vCPUs and
do not explicitly and manually add a vIOMMU to it, Libvirt does not let
you do that. In fact, as show in earlier messages, both `virsh edit`
and `virsh define` blocks you until you either reduce the vCPUs number
or add the device.

In fact, if I want a VM with 256 vCPUs and no vIOMMU, I just can't have
it. And I don't think that check is guest-OS (or guest-OS-kernel-
version) dependent so, even if the guest is a Linux with a > 5.15
kernel that understands that feature, and hence things could actually
work there, we force users to defin a vIOMMU.

I guess that what I do not understand is the coexistence of those
checks and the decision of not adding the device automatically (and
even less now that you told me that it's not even always strictly
necessary).

Basically, we don't want to create a vIOMMU automatically, because it
might be that things work without a vIOMMU, and users may not want the
vIOMMU. But if there's no vIOMMU in the xml, we don't even define the
VM and ask the users to go and put there a vIOMMU themselves? What am I
missing?

Thanks and Regards,
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux