From: "Sebastian Herbszt" Subject: Re: [PATCH] kvm: bios: Put AP boot up code to 0x1000 Date: Sat, 2 Aug 2008 21:30:41 +0200 Message-ID: <033901c8f4d6$5b972570$0201a8c0@zeug> References: <200807311043.20880.sheng.yang@intel.com> <034601c8f352$b6e073d0$0201a8c0@zeug> <200808010919.00663.sheng.yang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit Cc: "Avi Kivity" , To: "Yang, Sheng" Return-path: Received: from mail.gmx.net ([213.165.64.20]:55128 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1760648AbYHBTbg (ORCPT ); Sat, 2 Aug 2008 15:31:36 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Yang, Sheng wrote: > Please refer to my another patch comment. Basicly, AP is running HLT > in 0x10038, but it can exit due to some reason, here QEmu want to > raise it up . But after AP exit from HLT, it can't return to it > because the code was overrided by grub and no HLT loop there. Then AP > had gone away... Thank you for pointing me to "[PATCH] KVM: Fix QEmu interrupted HLT emulation". You wrote there: "Though I also sent a patch for BIOS, it's necessary to get correct behavior here." Would i be correct saying the problem is kvm/qemu only and with that patch applied the bios fix is not needed? If you still want to change the bios code i would suggest jumping to the original smp_ap_boot_code location in rombios32.bin which should not get overwritten. The following patch is based on the bochs version. - Sebastian --- rombios32start.orig 2008-08-02 19:37:34.000000000 +0200 +++ rombios32start.S 2008-08-02 20:19:15.000000000 +0200 @@ -40,9 +40,11 @@ .code16 smp_ap_boot_code_start: + cli xor %ax, %ax mov %ax, %ds lock incw CPU_COUNT_ADDR + ljmp $0xe000, $(1f-_start) 1: hlt jmp 1b