Yang, Sheng wrote:
On Monday 18 August 2008 10:33:11 Anthony Liguori wrote:
Sebastian Herbszt wrote:
Jump to rombios before executing the halt loop.
Why?  More importantly, why is this specific to KVM?

The bios copy AP boot up code to 0x10000 now in KVM, so it can be overwrite by userspace program like grub. I found it caused stop/cont/info cpus in grub corrupt AP. Please refer to "
KVM: Fix exiting from HLT emulation with MP_STATE_HALTED"
(well, I found the patch duplicated with Marcelo's patch later, then drop it...)

Yeah, I am agree this should not be a specific issue to KVM.

It is actually kvm specific. The SIPI code runs with interrupts disabled, so the 'hlt' instruction cannot be resumed due to an interrupt (and as the apic hasn't been configured yet, no nmis either). But due to a bug in kvm, an exit to userspace (like the one caused by 'info cpus' or stop+cont) can cause kvm to resume executing after the hlt instruction, which is now arbitrary application code.

Marcelo has a patch that addresses this, unfortunately with a regression, so hopefully the kvm bug will be closed soon. That's not to say running out of ROM space is a bad idea, so I'll apply this.

(would be even better not to copy the code at all)

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to