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

Re: [PATCH v3 3/3] x86/PVH: Support relocatable dom0 kernels


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Fri, 22 Mar 2024 10:24:51 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=7+zLBygDoQy5LOS5f84CNPD8kLqL2PQj/RNpkH+1M30=; b=QcdzmkQqhuzgMv50eicPMLSZy4xTFAUWklYJgYbvN1I2Cj9y88ijxkPb1eDuN9I9mzRUkcqPEHzfZPH6iqXstKr67EZlO1KiCYgdqL4Epgvcg1TPK+t6n99Tfdbapvg9S+kVzGnU7LhFDzypqPEJVyHsn7o9m+XuuK/lOrAlU1dQq3Y5gmZzje62FJHfEpoTirB3t9PD2GduFC2ZYYBbvUu/Wqw2RkCjrH+9lG1YqlSpu21ozwu6V+o8nFjv5ppmNt9QbKKjMff6LD9fTT0+zUKCD+HK3e0On2D3ZW4BCqJ5hBFjqCKNjukJEzaJOxYdVwdSe74j9Y0kfXNOhEsTnA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QyakiNmcPFK+z/ATpBs7Kk9urmGMkHAFpdATjN38VECKYoilJHLOJ1KTffxlqVl53VMcHEfiYJPCt4VNg5m93hZaKKSkEEWYiIeMV4dKugQRg/a4eIjjWSh/ZEn/27XRu9ad4qMY6bXX9D3m8C0c4CdIAd7evm2Q43+zn/OZ0cQ0Qa7WT0H9crj5Fhk5OxhrqL25TNwDR80aFfLHipL7BliE1f6GpOUZTqXKapLzFMpYb/Oxe1GBu5acZg8evKLstMI53TJglanLXQvTPTiZ6vTXJGvWwyheSOIacf3spCL21gkY9pVFEV59fcQBrxDC4XTmTxAF1Vc6VqI9X0MkSg==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 22 Mar 2024 14:25:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2024-03-21 09:45, Jason Andryuk wrote:
On 2024-03-20 10:39, Jan Beulich wrote:
On 19.03.2024 21:58, Jason Andryuk wrote:

@@ -536,6 +565,10 @@ elf_errorstatus elf_xen_parse(struct elf_binary *elf,
      parms->p2m_base = UNSET_ADDR;
      parms->elf_paddr_offset = UNSET_ADDR;
      parms->phys_entry = UNSET_ADDR32;
+    parms->phys_min = 0;
+    parms->phys_max = 0xffffffff;
+    parms->phys_align = 0x200000;

I think this wants to be MB(2) (requiring a pre-patch to centralize MB()
in the tool stack to tools/include/xen-tools/common-macros.h). And I
further think this needs to be an arch-specific constant, even if right
now the note is expected to be present only for x86. Which then also
needs saying ...

Are you thinking something like the following in libelf-dominfo.c:

#define X86_PHYS_ALIGN_DEFAULT MB(2)
#define X86_PHYS_MAX_DEFAULT (GB(4) - 1)

and setting as:
parms->phys_max = X86_PHYS_MAX_DEFAULT;
parms->phys_align = X86_PHYS_ALIGN_DEFAULT;

libelf is arch neutral, so there isn't a natural place to introduce arch-specific defines. Or were you looking for each arch to set it? We only care about x86 right now, so we can do something like:

#if x86
#define ARCH_PHYS_MAX_DEFAULT   (GB(4) - 1)
#define ARCH_PHYS_ALIGN_DEFAULT MB(2)
#else
#define ARCH_PHYS_MAX_DEFAULT   0
#define ARCH_PHYS_ALIGN_DEFAULT 0
#endif

Thanks,
Jason



 


Rackspace

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