[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v11 07/13] x86: add multiboot2 protocol support for EFI platforms



On 1/12/17 6:04 PM, Daniel Kiper wrote:
> On Thu, Jan 12, 2017 at 04:23:59PM -0600, Doug Goldstein wrote:
>> On 1/12/17 2:28 PM, Daniel Kiper wrote:
>>> On Thu, Jan 12, 2017 at 09:52:15AM -0600, Doug Goldstein wrote:
>>>> On 1/12/17 6:50 AM, Daniel Kiper wrote:
>>>>> On Wed, Jan 11, 2017 at 02:20:15PM -0600, Doug Goldstein wrote:
>>>>>> On 1/11/17 1:47 PM, Daniel Kiper wrote:
>>>>>>> On Tue, Jan 10, 2017 at 02:51:27PM -0600, Doug Goldstein wrote:
>>>>>>>> On 1/9/17 7:37 PM, Doug Goldstein wrote:
> 
> [...]
> 
>>>>>>>> memory region). You need to use AllocatePages() otherwise you are
>>>>>>>> trampling memory that might have been allocated by the bootloader or 
>>>>>>>> any
>>>>>>>
>>>>>>> Bootloader code/data should be dead here.
>>>>>>
>>>>>> Correct. Unfortunately on my Lenovo laptop and my Intel NUCs I can't
>>>>>> currently call ExitBootServices and a timer that iPXE has wired up has
>>>>>
>>>>> If you disable an important wheel in a machine you should not expect
>>>>> that the machine will work. Sorry! No way!
>>>>
>>>> Speak to your co-workers Konrad and Boris. We've had long email threads
>>>> about how certain hardware does not work with the way Xen calls
>>>> ExitBootServices.
>>>
>>> Could you be more precise what is wrong? Or at least send links to
>>> relevant threads.
>>
>> There have been several on the ML over the past 2 years. A quick Google
>> search turns these up.
>>
>> http://xen.markmail.org/message/f6lx2ab4o2fch35r
>> https://lists.xenproject.org/archives/html/xen-devel/2015-01/msg03164.html
> 
> This is more or less what I expected. However, IIRC, it was not related
> to ExitBootServices() itself. The problem was that some runtime services
> code lived in boot services code and data regions. So, I suppose that if
> you map boot services code and data regions with runtime services code
> and data everything should work. However, I have just realized that we
> need an option to enable this functionality from GRUB2 command line.
> Though you can do a test by setting map_bs to 1 at the beginning of
> efi_multiboot2(). Do not forget to enable ExitBootServices() call in Xen.
> 
>>>>>> some memory reserved down there and it was getting trampled. The real
>>>>>
>>>>> I still do not know why remnants of iPXE should run at this Xen boot 
>>>>> stage.
>>>>> It looks like an iPXE bug and IMO it should be fixed first.
>>>>
>>>> Like I said above, its because on this machine I am unable to call Xen's
>>>> EBS.
>>>
>>> I do not understand how ExitBootServices() call is related to iPXE timer 
>>> remnants
>>> or so. Though if it is related somehow then I think that you should blame 
>>> machine
>>> and/or iPXE designer/developer not Xen developer.
>>
>> iPXE registers a callback for when EBS is called to clean up a timer.
> 
> Could not you unregister this callback just before jump to the Xen image?
> I do not think it is needed for Xen boot.

Yep. Already done and merged. But my point is we should prefer to use
AllocatePages() and only fall back to trampling any conventional memory
region if the call didn't work.

-- 
Doug Goldstein

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.