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

Re: [PATCH 6/7] xen/arm: Implement the logic for static shared memory from Xen heap


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Fri, 10 May 2024 09:25:35 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y/DxX1DNCNf2QgaMJTIwoc53PkU1J8qu6qS4WJS5Qoc=; b=KmcaGVym2dWaxKn6RvG7dJCfozNjFJ2mzhUGLAv+T4UglQsNHzG9Do6f9Cv0FUiXpcI0souZnYGNJrdJIZq+YceKRW3Ht2m7UO+/N+7DrljcDd+J8HW9q1PLtMw53YlbOavg87PVRONsRhk+2eyfK0epOthg2gJ4tQv5BAxyLSCf8cV7tGpoUOJvNXH+m0I9NlRpsNZ2sW7FiDQ01LotNRodzVgjJQ3MHmtDD6WGGGb8idhbT5ixRe51dt217DQnDPGIbPSzyEi3keHZLJOyKYxjrCxzB6EhtAwuEEIYdNipDYquMZtOW7y+96KtnQtTDTfHvLCl3K3n5d7LGloovA==
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y/DxX1DNCNf2QgaMJTIwoc53PkU1J8qu6qS4WJS5Qoc=; b=dtDRAHL+uEka9C91mG8YN7j4t7DOQWBZygfpVu20BduWmJXn52kiMPd4W1EWvAUf1sOth1KeURjhKjNtcvko89y4rpGixqPVh0OCG+7xtJPvKK0kbVqyM6k2koQ4A4fJJAyFs8mQk5cawU0QrvKc/gbjxTrJ2B2g0/vODeuKaIbnCPURBPkCplSSNcbdODsc7oUkTdEgnQYKyxSeGwgjg1vfKId2//fHarJJMAgrfsv4KYrtc0ZkgG5U+nQTIDx0VefqKEoxOM6uUA8k1NhkVgm7w+6C5XeN4aeLdQ4Af1za9UJYkQAM2nZtC2lqKUQipXDFnhmUQI/fPRtDRLXSVQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=WoMIFSpLToePcC2S1YLX7Y0jR9ZScLxKUeeb3pLRyb8EOCbdZpLGQZuyu+ZD9X/IeEuHKbCjUi3ZE9hIFAPYYaBLMH3ptQ+p9DPVhbNgNaKNlOdqoo2twd413SzPeUJHBfPit0pcSk+aG+q/jFqLUFBkHSjdv/vaSgSoOqhf/A99B5JRVCo73o67Z1OraUqRmevMJ/+jasl0/eTsGgohGnPi1S+R/iQDZp9vMqn6EOed3jHwUw7b7v/y6CQySn7zeL0adqe8Spjk4M6rJNBSJ+6gAyQBxCLIgDgyXd2ky3C7atoaBDCTooOXmh3F43fpCB+Z1O3rvHHeNpYWt08kmw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SYy5fgiSAn7b695MtJPysFdGHjeJoa3Pjj2sfNH6JJSj88d/0lEoHQmXW9FYBFvrx3VuGqJQ96WzVNe4JH3uTytrsJgbLyPzzTDlOpAMW6aqC0O+oI9X8wSuryTpt9a7rkCh4/U9NZixYE4EWuHkaMAY8qLpLfHryCKnd/F/6AObAjmCIMoF4NbAau9RyuO3Kkditgl9YaeDbrSSOeHuIH9vU7jAWrsZjOWqZ7f9736PFs0EBJbZoRVb/Le6H/PJCp8l6Hh52rjR5zPPfeN2i5Wnm+QW5Jd05O5nf8PpLVra/G+CppagaX569kkP5ocgt6TItjpcU6l0t3IjWirC9Q==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 10 May 2024 09:25:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHalVfty94kOt4AK0ecWyByn7T1+rGQSwuAgAACP4A=
  • Thread-topic: [PATCH 6/7] xen/arm: Implement the logic for static shared memory from Xen heap


> On 10 May 2024, at 10:17, Michal Orzel <michal.orzel@xxxxxxx> wrote:
> 
> Hi Luca,
> 
> On 23/04/2024 10:25, Luca Fancellu wrote:
>> 
>> 
>> This commit implements the logic to have the static shared memory banks
>> from the Xen heap instead of having the host physical address passed from
>> the user.
>> 
>> When the host physical address is not supplied, the physical memory is
>> taken from the Xen heap using allocate_domheap_memory, the allocation
>> needs to occur at the first handled DT node and the allocated banks
>> need to be saved somewhere, so introduce the 'shm_heap_banks' static
>> global variable of type 'struct meminfo' that will hold the banks
>> allocated from the heap, its field .shmem_extra will be used to point
>> to the bootinfo shared memory banks .shmem_extra space, so that there
>> is not further allocation of memory and every bank in shm_heap_banks
>> can be safely identified by the shm_id to reconstruct its traceability
>> and if it was allocated or not.
>> 
>> A search into 'shm_heap_banks' will reveal if the banks were allocated
>> or not, in case the host address is not passed, and the callback given
>> to allocate_domheap_memory will store the banks in the structure and
>> map them to the current domain, to do that, some changes to
>> acquire_shared_memory_bank are made to let it differentiate if the bank
>> is from the heap and if it is, then assign_pages is called for every
>> bank.
>> 
>> When the bank is already allocated, for every bank allocated with the
>> corresponding shm_id, handle_shared_mem_bank is called and the mapping
>> are done.
>> 
>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> 
> I tested this patch and it resulted in assertion:
> Assertion 's <= e' failed at common/rangeset.c:189
> 
> I checked and in find_unallocated_memory(), given that start is ~0UL (host 
> address not provided),
> start + size would overflow. Did you test this patch?

Hi Michal,

Mmm I’m testing with a dom0less setup, without dom0, I think I missed that part 
because my guests doesn’t have
the hypervisor node (enhanced), sorry about that, I’ll test using your setup, 
can you confirm what are you using?


> 
> ~Michal


 


Rackspace

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