acpi memory hotplug: PNP_DETECTED_FATAL_ERROR

Hi,

I am testing ACPI memory hotplug on various guest OSes with an experimental
seabios and qemu-kvm. I 've had problems on windows VM testing (2012 server RC and 2008 consumer prelease - see further below for test details). I am wondering if someone that has bios/acpi windows experience could suggest anything. My guess is the windows driver does not accept the seabios memory device implementation (or the implementation is not fully acpi-compliant).

Testing on win2012 server RC or windows2008 consumer prerelease.

When adding a DIMM, the device shows up in
DeviceManager but does not work. Relevant messages:

"
This device cannot start. (Code 10)

Device configured(memory.inf) (UserPnP eventID 400)

Device installed (memory.inf)
ACPI/PNP0C80\2&daba3ff&1 was configured

Device not started(PNPMEM) (Kernel-PnP eventID 411, kernelID)
Device ACPI\PNP0C80\2&daba3ff&1 had a problem starting
Driver Name: memory.inf (c:\Windows\system32\DRIVERS\pnpmem.sys 6.2.8400 winmain_win8rc))

Memory range:0x80000000 - 0x90000000 (Initial memory of VM is 2GB. The hotplugged DIMM was a 256GB with physical address range starting at 2GB )

Conflicting device list: No conflicts.
"

Adding a 2nd or more dimms causes a crash (PNP_DETECTED_FATAL_ERROR with blue screen of death) and makes windows reboot.
After this, the VM keeps rebooting with ACPI_BIOS_ERROR. The VM refuses to boot anymore once a 2nd (or more) extra dimm is plugged-in.

The memory resources are always defined with a _CRS section (and the device ID, memory ranges and size are all changed at emulation runtime to be unique for each dimm)

Device(MPAA) {
Name(ID, 0xAA)
Name(_HID, EISAID(“PNP0C80”))
Name(_PXM, 0xAA)

External(CMST, MethodObj)
External(MPEJ, MethodObj)
External(MOST, MethodObj)

Name(_CRS, ResourceTemplate() {
QwordMemory(
ResourceConsumer,
,
MinFixed,
MaxFixed,
Cacheable,
ReadWrite,
0x0,
0xDEADBEEF,
0xE6ADBEEE,
0x00000000,
0x08000000,
)
})
Method (_STA, 0) {
Return(CMST(ID))
}
Method (_EJ0, 1, NotSerialized) {
MPEJ(ID, Arg0)
}
Method (_OST, 3) {
MOST(Arg0, Arg1, ID)
}
}

Does windows assume that the PCI-window covers all physical address ranges from initial memory onwards? There doesn’t seem to be a resource conflict"
Does windows require a more-specifc syntax for memory-resources?

Acpi-hotplug tests have worked on non-windows OSes. Any suggestions to proceed or any tools to use to debug would be very helpful.

The emulator+seabios implementation is here:
http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01389.html

In case someone wants to only look at the relevant seabios patches that implement memory device, here they are:

http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01392.html
http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01402.html
http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01391.html

I am not a windows kernel/system programmer and I apologize if I am missing something very obvious.

thank you for your time