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

Re: UEFI support in ARM DomUs


  • To: Julien Grall <julien@xxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>, Julien Grall <julien.grall.oss@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Mon, 22 Jun 2020 13:56:44 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jVOvB/yzooCwwq6oZQ6CQdZJZH/l+WZowYVZ+GbFVzw=; b=fo5FhVZbBz2hXogf1hqb7bwmTjRsaGjjwjcGNLLVZTf7uQRPR94PriN3la89c/K8ApUnRqHH7PrebhN3nk7txaf/1U9Ujxynnl69JTPGIiRy/QyWaJyGuSwk5G4fpnazAYkrtAfTSjejnWXSrNu0Ngxvn1FJzx89MG4kAdE/h6MlAwkzqU683sT016OFJxwxsExMWafbXpZVQVwg8JjF+JSDeWpph1HXiPWMzykC+/i+boC6IrFheCMErtm1cGlSYFLQJY62osgnZR87BAV9HO4O6SZynqfNGA4vMxTmvYlpLO6aS3D6fAYgv2QSOZZPc3DiC0RvyA2tMvrQh5fPiw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RjnlQGT/4MyDDRhMG7nIDtyNWZUrrTTJxm2pSio3Zp2MA5J685t3VgoSE4cX6u8Jc7Go0lmunweqAkSF9SIq8digfnVnmqD4On/2uiIEsATKuneEhUcmQbRmzvsnAqK9FqBUIIQzQH96yqu5Qxsas72COZ4hCPFqoak0h1683U4OchzNVIL06H9cYbeD7tdLBtxrFrrGCX6V45Wt0x5SADkv0f1pCVeXTNR/HDvP3/CYfSpjdBmbgVAqfxkkSKDcB3ecNR9U36qrOsElZAQr8JbDT4k1oyCt9Pm+POs/8hTkO4ZI9z0jWMUWewk24uIHKgWfgLWdCqQYYRvPqGVv+g==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=epam.com;
  • Cc: Anastasiia Lukianenko <Anastasiia_Lukianenko@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Peng Fan <peng.fan@xxxxxxx>, Roman Shaposhnik <roman@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Nataliya Korovkina <malus.brandywine@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 22 Jun 2020 13:56:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWOoSI1wnhumD+IkWBnAQX9mudyajIlWsAgBVWbwCAAJ62gIAAeBOAgAANxQCAAOXggIAABCWAgAABUwCAAAIogIAAAeMAgAACtYCAAAPKgIAEvpiA
  • Thread-topic: UEFI support in ARM DomUs

On 6/19/20 4:29 PM, Oleksandr Andrushchenko wrote:
> On 6/19/20 4:15 PM, Julien Grall wrote:
>>
>>
>> On 19/06/2020 14:06, Oleksandr Andrushchenko wrote:
>>>
>>> On 6/19/20 3:59 PM, Julien Grall wrote:
>>>> Hi,
>>>>
>>>> On 19/06/2020 13:51, Oleksandr Andrushchenko wrote:
>>>>> On 6/19/20 3:47 PM, Julien Grall wrote:
>>>>>> They will not be available from the fdt, but you can retrieve them with 
>>>>>> an hypervisor call (see HVM_PARAM_STORE_PFN, HVM_PARAM_CONSOLE_PFN).
>>>>> Yes, and it used in the relevant pieces of code (hyp calls)
>>>>>> One question though, why do you need to map them in advance? Couldn't 
>>>>>> you map them on demand?
>>>>>
>>>>> Well, we need to at least estimate the pg_table size so we can reserve 
>>>>> and allocate memory later,
>>>>
>>>> Oh, so U-boot doesn't support runtime page-table table allocation. Is that 
>>>> right?
>>> As per my understanding no, we provide a memory map and the tables are 
>>> allocated beforehand
>>
>> Ok :(.
>>
>>>>
>>>>>
>>>>> so I have to provide memory range from either by coding a constant or 
>>>>> looking into the devtree at
>>>>>
>>>>> hypervisor { reg = <>; }. It is a bit tricky though
>>>>
>>>> Looking for a node in the device-tree shouldn't be too difficult given 
>>>> that you have fdt_* available.
>>>>
>>>> However, please not that <reg> doesn't refer to the guest magic pages. 
>>>> Instead, it provides a region you can use for mapping the grant-table 
>>>> frames
>>>
>>> Indeed, this is in my case 0x38000000, but the magic is at 0x39000000
>>>
>>> So, I need the memory range set up beforehand, but I can't as there is no 
>>> cute way to get that.
>>>
>>> Of course, I can issue a hyp call to get HVM_PARAM_CONSOLE_PFN and use it 
>>> as the base address,
>>>
>>> but this smells like a hack. I can call other HVM_PARAM_ to get their pfns 
>>> and set up the memory regions,
>>>
>>> but this looks a bit weird.
>>
>> Why is it weird? In general, you only want to map exactly what you need. Not 
>> less, not more.
>>
>> In your situation, you only care about two pages, the console page and the 
>> xenstore page. The rest shouldn't be mapped.
> Ok, so I'll try get pfns for HVM_PARAM_CONSOLE_PFN + XENSTORE_PFN_OFFSET via 
> hyp call and map those
>>
>>> I need that constant badly ;)
>>
>> No you don't ;).

We have managed to make use of the relevant hypercalls to get the PFNs, but for 
that

we need to maintain the caches as this happens (the calls) when MMU is not yet

setup and is in the process of.

>>
>> Cheers,
>>
> Thanks for helping with this

 


Rackspace

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