From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yang, Sheng" Subject: Re: [PATCH] kvm: bios: Put AP boot up code to 0x1000 Date: Tue, 5 Aug 2008 16:14:32 +0800 Message-ID: <200808051614.33138.sheng.yang@intel.com> References: <200807311043.20880.sheng.yang@intel.com> <200808010919.00663.sheng.yang@intel.com> <033901c8f4d6$5b972570$0201a8c0@zeug> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: "Avi Kivity" , kvm@vger.kernel.org To: "Sebastian Herbszt" Return-path: Received: from mga09.intel.com ([134.134.136.24]:17041 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821AbYHEIMI (ORCPT ); Tue, 5 Aug 2008 04:12:08 -0400 In-Reply-To: <033901c8f4d6$5b972570$0201a8c0@zeug> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Sunday 03 August 2008 03:30:41 Sebastian Herbszt wrote: > 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? No... I think more important is get bios fixed. Anyway, copy BIOS part of running code to a place that may overwritten by userspace program is wrong, if you expect AP still running when userspace program is running. In fact, if BIOS code in right place, we won't need fix HLT, for HLT have a assumption that it might be interrupt by some event, so usually it is wrapped by a loop, as current BIOS did. > > 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. > Yeah, I just curious why we need to copy BIOS here and there in the beginning... Thanks for your patch, but is it based on bochs upstream? I found the patch don't apply... I also want to know why we need copy AP boot code, if anyone know the detail... Thanks! -- regards Yang, Sheng