Gleb Natapov wrote: > On Thu, Jan 21, 2010 at 07:48:23PM +0800, Liu, Jinsong wrote: >>> From cb997030cba02e7e74a29b3d942aeba9808ed293 Mon Sep 17 00:00:00 >>> 2001 >> From: Liu, Jinsong <jinsong.liu@xxxxxxxxx> >> Date: Fri, 22 Jan 2010 03:18:46 +0800 >> Subject: [PATCH] Setup vcpu add/remove infrastructure, >> including madt bios_info and dsdt. >> >> 1. setup madt bios_info structure, so that static dsdt get >> run-time madt info like checksum address, lapic address, >> max cpu numbers, with least hardcode magic number >> (realmode address of bios_info). >> 2. setup vcpu add/remove dsdt infrastructure, including >> processor related acpi objects and control methods. vcpu >> add/remove will trigger SCI and then control method _L02. >> By matching madt, vcpu number and add/remove action were >> found, then by notify control method, it will notify OS >> acpi driver. >> >> Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx> > It looks like AML code is a port of what we had in BOCHS bios with > minor changes. Can you detail what is changed and why for easy review > please? And this still doesn't work with Windows I assume. > Yes, my work is based on BOCHS infrastructure, thanks BOCHS :) I just change some minor points: 1. explicitly define returen value of '_MAT' as 'buffer', otherwise some linux acpi driver (i.e. linux 2.6.30) would parse error which will handle it as 'integer' not 'buffer'; 2. keep correct 'checksum' of madt when vcpu add/remove, otherwise it will report 'checksum error' when using acpi tools to get madt info if we add/remove vcpu; 3. add '_EJ0' so that linux has acpi obj under /sys/devices/LNXSYSTM:00, which is need for vcpu remove; 4. on Method(PRSC, 0), just scan 'xxx' vcpus that qemu get from cmdline para 'maxcpus=xxx', not all 256 vcpus, otherwise under some dsdt processor define, it will result error; 5. use 1 hardcode address bios_info structure to replace '0x514', so that it can transfer more madt info to dsdt; Thanks, Jinsong-- 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