From d7795d3cc52fa8c297908912a9541ecd4f810f03 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 24 Jun 2021 12:38:20 +0200 Subject: modules: check arch and block load on mismatch Add module_allow_arch() to set the target architecture. In case a module is limited to some arch verify arches match and ignore the module if not. Signed-off-by: Gerd Hoffmann Reviewed-by: Jose R. Ziviani Message-Id: <20210624103836.2382472-19-kraxel@redhat.com> Signed-off-by: Paolo Bonzini --- include/qemu/module.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/qemu/module.h b/include/qemu/module.h index 9cd305de59..3deac0078b 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -72,6 +72,7 @@ void module_call_init(module_init_type type); bool module_load_one(const char *prefix, const char *lib_name, bool mayfail); void module_load_qom_one(const char *type); void module_load_qom_all(void); +void module_allow_arch(const char *arch); /** * DOC: module info annotation macros -- cgit v1.2.3