On 14/12/11 09:06, Kevin O'Connor wrote:
On Tue, Dec 06, 2011 at 07:32:55PM -0500, Amos Kong wrote:
----- Original Message -----
On Tue, Dec 06, 2011 at 01:39:35PM +0800, Amos Kong wrote:
Only func 0 is registered to guest driver (we can
only found func 0 in slot->funcs list of driver),
the other functions could not be cleaned when
hot-removing the whole slot. This patch adds
device per function in ACPI DSDT tables.
Notify only when func0 is added and removed.
Have tested with linux/winxp/win7, hot-adding/hot-remving,
single/multiple function device, they are all fine(all
added devices can be removed).
This includes some bits I wrote but this is not an ack
of the patch yet :)
I find it surprising that this works: a function
has _EJ0 so would not guest expect that ejecting
a single one will only remove it, and not all functions?
Removing single func is not supported by specific, and current code
(qemu/kernel pci driver) process hot-remove with the whole slot.
We could not hot-remove single func with/without this patch.
Register _EJ0() for each func, then all the funcs will be record
into the function list of the slot.
Just as an update - it's not clear to me what this patch does, and it
seems like Michael had some concerns.
Also, it doesn't seem right to hardcode the generation of that many
devices (248) in the AML code.
Hi Kevin,
When we hot-unplug a pci device, all functions in same slot should be
unpluged
in one time. Hot-plug/unpluging nics for winXp VM is fine(all funcs can
be removed).
But hot-unpluging nics of linux VM exists problem(only function 0 is
removed),
Because not all the functions are registered in slot->funcs list in
guest kernel.
What we can do to resolve this problem:
1. remove all the functions when hot-unplug one function in the slot
http://marc.info/?l=kvm&m=131597620101566&w=2
[PATCH] pci: clean all funcs when hot-removing multifunc device
2. register all the functions to slot->funcs list, then we don't need to
change guest pci driver.
http://marc.info/?l=kvm&m=132314964618843&w=2
[SeaBIOS PATCH v3] hotplug: Add device per func in ACPI DSDT tables
mst, any more comment?
Thanks,
Amos
So, unless there are further comments I'm going to hold off on this
patch.
-Kevin
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html