[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: Michal Orzel <michal.orzel@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Henry Wang <xin.wang2@xxxxxxx>
- Date: Fri, 8 Mar 2024 17:06:08 +0800
- 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=ZCIa36OT7Ie20s1OkNd4ALvetqu5pbW3dNmXe+yj5Jw=; b=BJWqSoqOMO3hOxB8BJDM+azkMKqa+XXmYKKTNmiegEtLKT4gZogbi6AFivRXTvr9cEbspnQ2C8lwj150w1NhL3TLZLPOSO4MvPOGWRLS525It5dSiiLReCjsp/dYVq6lfV4obfj0d9AF8e0ccdPqBFWNTyv9RDFsAK1Ta1y0DCy3hw4He8hU9XInHgpckRsLwWqbCkaCJnn+eVpez9Jkh5POaZtUIvzZNaU2D+DRccxe9RjdPIC742jY7Z8geQS6CuPIe5j4tlFSMAtf8Dp9QEwtmmhJpm15lCR4r+GQeixsPqVKFF4veBtPuASHlvS2O1MWW6p9+o0lJzve7fUI5g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QRbmHyY/UMvfD830aBYngbjFodrxaDZ0Fus5xrxE8lxW+/av+s4hk8VtPJx1fboywYMxqQZkYHA0Pp+TtheirSv/ZLJ/cIXhBY+sMaEZ16JZvk0ThxAtnEMCV6dWg7SiOCjKsVb9+igV2SAM3X8jMsjHAfsa9ocqC13e+G8IwjDirf8FtK9gItD+yj8yLSVp2Up8PMdbmswFZW7AkK//TSQcb7RUVjHa1qwacvEaaOsP4k4AKFXrDvxkA8uQBF9eu4obCu1gvl3/LpDT6n/5y/z5h0/vPU9ydWRIpCWdDd6GG7PfihRI9m6czkgHXxq/lMFrWqqxwEnAAvn+oUPmtA==
- 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 09:06:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Michal,
On 3/8/2024 4:59 PM, Michal Orzel wrote:
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?
Yeah indeed I should have added it. I always have a hard time to
determine if I should add "Suggested-by"/"Reported-by" tags, sorry for
missing it this time.
I will add it in the next version.
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
Thanks!
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.
Thanks for the suggestion. I am fine with either way, so let's see what
the others would say and I will do the update of this patch accordingly.
Kind regards,
Henry
~Michal
|