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.
So, unless there are further comments I'm going to hold off on this patch.
-Kevin