xen/memory: Introduce CONFIG_ARCH_ACQUIRE_RESOURCE

New architectures shouldn't be forced to implement no-op stubs for unused
functionality.

Introduce CONFIG_ARCH_ACQUIRE_RESOURCE which can be opted in to, and provide
compatibility logic in xen/mm.h

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
Andrew Cooper committed 2021-01-12 18:17:02 +00:00
1 parent edad4c760a
commit 0db1ded6b5
4 files changed
+13 -8

No files matched your search

+1
View File
@@ -6,6 +6,7 @@ config X86
select ACPI
select ACPI_LEGACY_TABLES_LOOKUP
select ARCH_SUPPORTS_INT128
select ARCH_ACQUIRE_RESOURCE
select COMPAT
select CORE_PARKING
select HAS_ALTERNATIVE
+3
View File
@@ -22,6 +22,9 @@ config GRANT_TABLE
If unsure, say Y.
config ARCH_ACQUIRE_RESOURCE
bool
config HAS_ALTERNATIVE
bool
-8
View File
@@ -358,14 +358,6 @@ static inline void put_page_and_type(struct page_info *page)
void clear_and_clean_page(struct page_info *page);
static inline
int arch_acquire_resource(struct domain *d, unsigned int type, unsigned int id,
unsigned long frame, unsigned int nr_frames,
xen_pfn_t mfn_list[])
{
return -EOPNOTSUPP;
}
unsigned int arch_get_dma_bitsize(void);
#endif /* __ARCH_ARM_MM__ */
+9
View File
@@ -702,4 +702,13 @@ static inline void put_page_alloc_ref(struct page_info *page)
}
}
#ifndef CONFIG_ARCH_ACQUIRE_RESOURCE
static inline int arch_acquire_resource(
struct domain *d, unsigned int type, unsigned int id, unsigned long frame,
unsigned int nr_frames, xen_pfn_t mfn_list[])
{
return -EOPNOTSUPP;
}
#endif /* !CONFIG_ARCH_ACQUIRE_RESOURCE */
#endif /* __XEN_MM_H__ */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.