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

Re: [PATCH v2 2/5] xen/domain.h: Centrialize is_domain_direct_mapped()


  • To: Henry Wang <xin.wang2@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 8 Mar 2024 09:59:07 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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=K9sNdPLlbtFRpgOPK0KF+208UXe6iwnzIMtL9DNuzFw=; b=DKj+9N+sNc/Z7e6RRXWuOd6ys8Xl0Cf3osPQJQBFgvsU+VYmKUJPmKh2+2kUPsa2EiOSzn3qpqqQvqh3xJEkdc4KtMc2LHeMw7x6Oaw1rDUqNPJEiaNy1tLgvDdOEf5LH4zcXbJUwB93K96/o5sxqr3qfdytY5yKL6m+gLh8YKl/e5J7AxUt73DlngSjdGzqFozIx+3GZ7JGMPwD+64P2AGD+NGAf/w1Mu3XfKZqfdIBJpmhyab4ulmmdDfTY+1tnVnZo8KsfRuq53r53igIBE96yH8LQ7Llmv+ncgVgpBEv44p5Btzr8cqbdqj2wxsD7Gc2AnsQFV+gG+Usf8GpmQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G0swNRpX5GHKcgROXa2VVmIEwWWtiHi2oQ6Z8HSbusrqFXhLwV9BjPwJKE0NyetyOsvGDLz01Li7OA5pqScpQOq4wdYG5W7vvfUN81rxku77uqLQhdWe8udkP/tgGZHQfra+XCuLutp6DOKaZPrlWmmmiXch68b+BANiZSIUeetNi86L0NDrMaQ1IIeRwHArw5QHK66uOvxZnJjNtTgDXg7HacW0A4NsrCSbcKhFPgsSGkOx2T2669+mXiMqq08IW4vNZx8PkRsjnMl0rofHMmcEixPyB+UalWYumcvUeFtiZrSzI0e3JITio0PA6yWjv01XaPd5fXaroM1ab0pbMQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, "Connor Davis" <connojdavis@xxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 08 Mar 2024 08:59:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Henry,

On 08/03/2024 02:54, Henry Wang wrote:
> Currently direct mapped domain is only supported by the Arm
> architecture at the domain creation time by setting the CDF_directmap
> flag. There is not a need for every non-Arm architecture, i.e. x86,
> RISC-V and PPC, to define a stub is_domain_direct_mapped() in arch
> header.
> 
> Move is_domain_direct_mapped() to a centralized place at xen/domain.h
> and evaluate CDF_directmap for non-Arm architecture to 0.
> 
> Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
Shouldn't you add Suggested-by: Jan?

Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

Another alternative would be to let the arch header define it if needed and use 
a centralized stub in xen/domain.h:

#ifndef is_domain_direct_mapped
#define is_domain_direct_mapped(d) ((void)(d), 0)
#endif

I'm not sure which solution is better.

~Michal



 


Rackspace

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