Skip to contentSkip to conversation

problems starting kvm-qemu with 5+ virtual functions

DISCUSSION Chris Friesen 2 participants 5 messages Jul 11, 2012 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

We're running into a problem where we can't start up a single instance of kvm-qemu with 5 or more virtual functions (for the ethernet card) being passed to the guest. It's an Intel I350 NIC if it matters.

I noticed a discussion in a thread titled "[RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts" that seemed to point to the hardcoded definition of KVM_MEMORY_SLOTS as being a possible problem, and proposed some patches to allow dynamic sizing of the number of memory slots. It looks like that patch never went through to mainline though.

Is this likely the source of my problem? Why didn't it ever get submitted to mainline.

What's the proper method of supporting 8 VFs per VM, with possibly several VMs?

Thanks,
Chris

#1 lore raw
Quoted 6 lines · Chris Friesen

Hi,

We're running into a problem where we can't start up a single instance of kvm-qemu with 5 or more virtual functions (for the ethernet card) being passed to the guest. It's an Intel I350 NIC if it matters.

Quoted 8 lines

I noticed a discussion in a thread titled "[RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts" that seemed to point to the hardcoded definition of KVM_MEMORY_SLOTS as being a possible problem, and proposed some patches to allow dynamic sizing of the number of memory slots. It looks like that patch never went through to mainline though.

Is this likely the source of my problem?

Yes, that's the problem.

Quoted 1 line

Why didn't it ever get submitted to mainline.

There were issues with extending the number of available memory slots. By itself, those patches just prevent an abort, but don't really let you add more devices.

Quoted 2 lines

What's the proper method of supporting 8 VFs per VM, with possibly several VMs?

The limiting factor to increasing memory slots was searching the array. That's since been fixed by caching mmio page table entries. AIUI, Avi is now willing to accept a patch to bump memory slots to a much higher value. The number of available slots can be queried by qemu using KVM_CAP_NR_MEMSLOTS, then something like the RFC you point at could be used to allow device assignment to take advantage of that. Thanks,

Alex

#2 lore raw
Quoted 3 lines · Alex Williamson

The limiting factor to increasing memory slots was searching the array. That's since been fixed by caching mmio page table entries.

Thanks for the confirmation of my suspicions.

Do you know roughly when this went in? A commit ID would be great.

Chris

#3 lore raw
Quoted 8 lines · Chris Friesen
Quoted 3 lines · Alex Williamson

The limiting factor to increasing memory slots was searching the array. That's since been fixed by caching mmio page table entries.

Thanks for the confirmation of my suspicions.

Do you know roughly when this went in? A commit ID would be great.

Almost exactly a year ago:

ce88decffd17bf9f373cc233c961ad2054965667

#4 lore raw
Quoted 11 lines · Alex Williamson
Quoted 6 lines · Chris Friesen
Quoted 2 lines · Alex Williamson

The limiting factor to increasing memory slots was searching the array. That's since been fixed by caching mmio page table entries.

Thanks for the confirmation of my suspicions.

Do you know roughly when this went in? A commit ID would be great.

Almost exactly a year ago:

ce88decffd17bf9f373cc233c961ad2054965667

Thanks, that's useful.

Chris