[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] include: make domain_page.h's stubs properly use type-unsafe MFN <-> virt helpers
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 11 Sep 2023 08:38:30 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DFADsLsb1kDVyT8qTXZJEa8z+dCBZPheDsPwAKar0tI=; b=ZcBMW1LtTfdCK8YGwonELF/53/QJzmd2vrk/pGQ3KXvyrYIU/hXqVELeFD6Ojr1ZPaN5EkJouhOPxzGB6jO+OuomNz9MmVAyDsjWH0Lspbm13Gt90j8Y9+9rQblIxnxdbqeOg6MaSp/wgceqRdgho+EuktUqPNtTtXA9QOzAiaKcHmiTIpWF1GwJ4yCuUh7WZGAUIXMSRCiuMljLolwWyseGKvnaljgxO4EI10O+84kRCFXcwrp+EIHQ7w3ypeBXIY2F7U/ywIOZSsJWmrJ55Wwn87v8u5zDHnLkmE1682H2HHUtiPdfZidBAlBBf4tZkBpDJZCc4Kpy6yC5RxOUbg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rej/j+ttGNxbennkffBqXtGngTHoKx8d7v01k0FNUlmM8AkP6UxbzRROVkOXiA37X2FHK/quVONilcz4TYIx1vwmnpO8Swv3PNHAcrXXycE+qESvxJd/FnjrwFVT7PUTkU7L0yrI99uPthqg3uali5noG0708qBcq9SoUhbX/B1I+CYhJFjLiFPxfAYxc9Tp3tmBc6AhNvZoFAKaiYe0xzAS1oXht54bvZh4iiZAkPDaomw5V8hCvUBE4LlkPOLVs+o2xGuLcvePibpNHum34wKtNO1q2KwSWB9pDn8Eyu5fUUP6QJdfaetpDoLc44CjCMKZIp5hlyoZeIJA3kQWWA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 11 Sep 2023 06:38:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
The first of the commits referenced below didn't go far enough, and the
2nd of them, while trying to close (some of) the gap, wrongly kept using
the potentially type-safe variant. This is getting in the way of new
ports preferably not having any type-unsafe private code (and in
particular not having a need for any overrides in newly introduced
files).
Fixes: 41c48004d1d8 ("xen/mm: Use __virt_to_mfn in map_domain_page instead of
virt_to_mfn")
Fixes: f46b6197344f ("xen: Convert page_to_mfn and mfn_to_page to use typesafe
MFN")
Reported-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/include/xen/domain_page.h
+++ b/xen/include/xen/domain_page.h
@@ -56,11 +56,11 @@ static inline void *__map_domain_page_gl
#define map_domain_page(mfn) __mfn_to_virt(mfn_x(mfn))
#define __map_domain_page(pg) page_to_virt(pg)
#define unmap_domain_page(va) ((void)(va))
-#define domain_page_map_to_mfn(va) _mfn(virt_to_mfn((unsigned
long)(va)))
+#define domain_page_map_to_mfn(va) _mfn(__virt_to_mfn((unsigned
long)(va)))
static inline void *map_domain_page_global(mfn_t mfn)
{
- return mfn_to_virt(mfn_x(mfn));
+ return __mfn_to_virt(mfn_x(mfn));
}
static inline void *__map_domain_page_global(const struct page_info *pg)
|