From a7fca49f7acf01434b1892ccc289dc568a0f4ba6 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 20 Jan 2017 14:47:41 +0800 Subject: [PATCH 1/7] delete qemu/include/qemu/notify.h --- qemu/aarch64.h | 3 -- qemu/arm.h | 3 -- qemu/header_gen.py | 3 -- qemu/include/exec/memory.h | 21 ----------- qemu/include/qemu/notify.h | 72 -------------------------------------- qemu/include/qemu/timer.h | 1 - qemu/m68k.h | 3 -- qemu/memory.c | 17 --------- qemu/mips.h | 3 -- qemu/mips64.h | 3 -- qemu/mips64el.h | 3 -- qemu/mipsel.h | 3 -- qemu/powerpc.h | 3 -- qemu/qemu-timer.c | 1 - qemu/sparc.h | 3 -- qemu/sparc64.h | 3 -- qemu/x86_64.h | 3 -- 17 files changed, 148 deletions(-) delete mode 100644 qemu/include/qemu/notify.h diff --git a/qemu/aarch64.h b/qemu/aarch64.h index cc0930ea..b641ed02 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_aarch64 #define memory_region_name memory_region_name_aarch64 #define memory_region_need_escape memory_region_need_escape_aarch64 -#define memory_region_notify_iommu memory_region_notify_iommu_aarch64 #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_aarch64 #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_aarch64 #define memory_region_present memory_region_present_aarch64 #define memory_region_read_accessor memory_region_read_accessor_aarch64 #define memory_region_readd_subregion memory_region_readd_subregion_aarch64 #define memory_region_ref memory_region_ref_aarch64 -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_aarch64 #define memory_region_resolve_container memory_region_resolve_container_aarch64 #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_aarch64 #define memory_region_section_get_iotlb memory_region_section_get_iotlb_aarch64 @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_aarch64 #define memory_region_transaction_commit memory_region_transaction_commit_aarch64 #define memory_region_unref memory_region_unref_aarch64 -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_aarch64 #define memory_region_update_coalesced_range memory_region_update_coalesced_range_aarch64 #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_aarch64 #define memory_region_update_container_subregions memory_region_update_container_subregions_aarch64 diff --git a/qemu/arm.h b/qemu/arm.h index 32a30644..090ec4de 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_arm #define memory_region_name memory_region_name_arm #define memory_region_need_escape memory_region_need_escape_arm -#define memory_region_notify_iommu memory_region_notify_iommu_arm #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_arm #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_arm #define memory_region_present memory_region_present_arm #define memory_region_read_accessor memory_region_read_accessor_arm #define memory_region_readd_subregion memory_region_readd_subregion_arm #define memory_region_ref memory_region_ref_arm -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_arm #define memory_region_resolve_container memory_region_resolve_container_arm #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_arm #define memory_region_section_get_iotlb memory_region_section_get_iotlb_arm @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_arm #define memory_region_transaction_commit memory_region_transaction_commit_arm #define memory_region_unref memory_region_unref_arm -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_arm #define memory_region_update_coalesced_range memory_region_update_coalesced_range_arm #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_arm #define memory_region_update_container_subregions memory_region_update_container_subregions_arm diff --git a/qemu/header_gen.py b/qemu/header_gen.py index 7d59f495..35b84d4d 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -2067,14 +2067,12 @@ symbols = ( 'memory_region_is_unassigned', 'memory_region_name', 'memory_region_need_escape', - 'memory_region_notify_iommu', 'memory_region_oldmmio_read_accessor', 'memory_region_oldmmio_write_accessor', 'memory_region_present', 'memory_region_read_accessor', 'memory_region_readd_subregion', 'memory_region_ref', - 'memory_region_register_iommu_notifier', 'memory_region_resolve_container', 'memory_region_rom_device_set_romd', 'memory_region_section_get_iotlb', @@ -2088,7 +2086,6 @@ symbols = ( 'memory_region_transaction_begin', 'memory_region_transaction_commit', 'memory_region_unref', - 'memory_region_unregister_iommu_notifier', 'memory_region_update_coalesced_range', 'memory_region_update_coalesced_range_as', 'memory_region_update_container_subregions', diff --git a/qemu/include/exec/memory.h b/qemu/include/exec/memory.h index 9dc25cf1..cc542d7b 100644 --- a/qemu/include/exec/memory.h +++ b/qemu/include/exec/memory.h @@ -30,7 +30,6 @@ #endif #include "qemu/queue.h" #include "qemu/int128.h" -#include "qemu/notify.h" #include "qapi/error.h" #include "qom/object.h" @@ -168,7 +167,6 @@ struct MemoryRegion { uint8_t dirty_log_mask; unsigned ioeventfd_nb; MemoryRegionIoeventfd *ioeventfds; - NotifierList iommu_notify; struct uc_struct *uc; uint32_t perms; //all perms, partially redundant with readonly uint64_t end; @@ -486,25 +484,6 @@ bool memory_region_is_iommu(MemoryRegion *mr); void memory_region_notify_iommu(MemoryRegion *mr, IOMMUTLBEntry entry); -/** - * memory_region_register_iommu_notifier: register a notifier for changes to - * IOMMU translation entries. - * - * @mr: the memory region to observe - * @n: the notifier to be added; the notifier receives a pointer to an - * #IOMMUTLBEntry as the opaque value; the pointer ceases to be - * valid on exit from the notifier. - */ -void memory_region_register_iommu_notifier(MemoryRegion *mr, Notifier *n); - -/** - * memory_region_unregister_iommu_notifier: unregister a notifier for - * changes to IOMMU translation entries. - * - * @n: the notifier to be removed. - */ -void memory_region_unregister_iommu_notifier(Notifier *n); - /** * memory_region_name: get a memory region's name * diff --git a/qemu/include/qemu/notify.h b/qemu/include/qemu/notify.h deleted file mode 100644 index a3d73e4b..00000000 --- a/qemu/include/qemu/notify.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Notifier lists - * - * Copyright IBM, Corp. 2010 - * - * Authors: - * Anthony Liguori - * - * This work is licensed under the terms of the GNU GPL, version 2. See - * the COPYING file in the top-level directory. - * - */ - -#ifndef QEMU_NOTIFY_H -#define QEMU_NOTIFY_H - -#include "qemu/queue.h" - -typedef struct Notifier Notifier; - -struct Notifier -{ - void (*notify)(Notifier *notifier, void *data); - QLIST_ENTRY(Notifier) node; -}; - -typedef struct NotifierList -{ - QLIST_HEAD(, Notifier) notifiers; -} NotifierList; - -#define NOTIFIER_LIST_INITIALIZER(head) \ - { QLIST_HEAD_INITIALIZER((head).notifiers) } - -void notifier_list_init(NotifierList *list); - -void notifier_list_add(NotifierList *list, Notifier *notifier); - -void notifier_remove(Notifier *notifier); - -void notifier_list_notify(NotifierList *list, void *data); - -/* Same as Notifier but allows .notify() to return errors */ -typedef struct NotifierWithReturn NotifierWithReturn; - -struct NotifierWithReturn { - /** - * Return 0 on success (next notifier will be invoked), otherwise - * notifier_with_return_list_notify() will stop and return the value. - */ - int (*notify)(NotifierWithReturn *notifier, void *data); - QLIST_ENTRY(NotifierWithReturn) node; -}; - -typedef struct NotifierWithReturnList { - QLIST_HEAD(, NotifierWithReturn) notifiers; -} NotifierWithReturnList; - -#define NOTIFIER_WITH_RETURN_LIST_INITIALIZER(head) \ - { QLIST_HEAD_INITIALIZER((head).notifiers) } - -void notifier_with_return_list_init(NotifierWithReturnList *list); - -void notifier_with_return_list_add(NotifierWithReturnList *list, - NotifierWithReturn *notifier); - -void notifier_with_return_remove(NotifierWithReturn *notifier); - -int notifier_with_return_list_notify(NotifierWithReturnList *list, - void *data); - -#endif diff --git a/qemu/include/qemu/timer.h b/qemu/include/qemu/timer.h index f3612863..f0e4de6f 100644 --- a/qemu/include/qemu/timer.h +++ b/qemu/include/qemu/timer.h @@ -3,7 +3,6 @@ #include "qemu/typedefs.h" #include "qemu-common.h" -#include "qemu/notify.h" /* timers */ diff --git a/qemu/m68k.h b/qemu/m68k.h index 9e44287c..b6c94a0d 100644 --- a/qemu/m68k.h +++ b/qemu/m68k.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_m68k #define memory_region_name memory_region_name_m68k #define memory_region_need_escape memory_region_need_escape_m68k -#define memory_region_notify_iommu memory_region_notify_iommu_m68k #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_m68k #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_m68k #define memory_region_present memory_region_present_m68k #define memory_region_read_accessor memory_region_read_accessor_m68k #define memory_region_readd_subregion memory_region_readd_subregion_m68k #define memory_region_ref memory_region_ref_m68k -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_m68k #define memory_region_resolve_container memory_region_resolve_container_m68k #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_m68k #define memory_region_section_get_iotlb memory_region_section_get_iotlb_m68k @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_m68k #define memory_region_transaction_commit memory_region_transaction_commit_m68k #define memory_region_unref memory_region_unref_m68k -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_m68k #define memory_region_update_coalesced_range memory_region_update_coalesced_range_m68k #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_m68k #define memory_region_update_container_subregions memory_region_update_container_subregions_m68k diff --git a/qemu/memory.c b/qemu/memory.c index 453ddce1..70b13310 100644 --- a/qemu/memory.c +++ b/qemu/memory.c @@ -1359,23 +1359,6 @@ bool memory_region_is_iommu(MemoryRegion *mr) return mr->iommu_ops; } -void memory_region_register_iommu_notifier(MemoryRegion *mr, Notifier *n) -{ - //notifier_list_add(&mr->iommu_notify, n); -} - -void memory_region_unregister_iommu_notifier(Notifier *n) -{ - //notifier_remove(n); -} - -void memory_region_notify_iommu(MemoryRegion *mr, - IOMMUTLBEntry entry) -{ - assert(memory_region_is_iommu(mr)); - //notifier_list_notify(&mr->iommu_notify, &entry); -} - void memory_region_set_readonly(MemoryRegion *mr, bool readonly) { if (mr->readonly != readonly) { diff --git a/qemu/mips.h b/qemu/mips.h index abc40b8a..18e73078 100644 --- a/qemu/mips.h +++ b/qemu/mips.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_mips #define memory_region_name memory_region_name_mips #define memory_region_need_escape memory_region_need_escape_mips -#define memory_region_notify_iommu memory_region_notify_iommu_mips #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_mips #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_mips #define memory_region_present memory_region_present_mips #define memory_region_read_accessor memory_region_read_accessor_mips #define memory_region_readd_subregion memory_region_readd_subregion_mips #define memory_region_ref memory_region_ref_mips -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_mips #define memory_region_resolve_container memory_region_resolve_container_mips #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_mips #define memory_region_section_get_iotlb memory_region_section_get_iotlb_mips @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_mips #define memory_region_transaction_commit memory_region_transaction_commit_mips #define memory_region_unref memory_region_unref_mips -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_mips #define memory_region_update_coalesced_range memory_region_update_coalesced_range_mips #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_mips #define memory_region_update_container_subregions memory_region_update_container_subregions_mips diff --git a/qemu/mips64.h b/qemu/mips64.h index 4baf241b..155494bd 100644 --- a/qemu/mips64.h +++ b/qemu/mips64.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_mips64 #define memory_region_name memory_region_name_mips64 #define memory_region_need_escape memory_region_need_escape_mips64 -#define memory_region_notify_iommu memory_region_notify_iommu_mips64 #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_mips64 #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_mips64 #define memory_region_present memory_region_present_mips64 #define memory_region_read_accessor memory_region_read_accessor_mips64 #define memory_region_readd_subregion memory_region_readd_subregion_mips64 #define memory_region_ref memory_region_ref_mips64 -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_mips64 #define memory_region_resolve_container memory_region_resolve_container_mips64 #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_mips64 #define memory_region_section_get_iotlb memory_region_section_get_iotlb_mips64 @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_mips64 #define memory_region_transaction_commit memory_region_transaction_commit_mips64 #define memory_region_unref memory_region_unref_mips64 -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_mips64 #define memory_region_update_coalesced_range memory_region_update_coalesced_range_mips64 #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_mips64 #define memory_region_update_container_subregions memory_region_update_container_subregions_mips64 diff --git a/qemu/mips64el.h b/qemu/mips64el.h index 2a17b295..004a8f47 100644 --- a/qemu/mips64el.h +++ b/qemu/mips64el.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_mips64el #define memory_region_name memory_region_name_mips64el #define memory_region_need_escape memory_region_need_escape_mips64el -#define memory_region_notify_iommu memory_region_notify_iommu_mips64el #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_mips64el #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_mips64el #define memory_region_present memory_region_present_mips64el #define memory_region_read_accessor memory_region_read_accessor_mips64el #define memory_region_readd_subregion memory_region_readd_subregion_mips64el #define memory_region_ref memory_region_ref_mips64el -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_mips64el #define memory_region_resolve_container memory_region_resolve_container_mips64el #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_mips64el #define memory_region_section_get_iotlb memory_region_section_get_iotlb_mips64el @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_mips64el #define memory_region_transaction_commit memory_region_transaction_commit_mips64el #define memory_region_unref memory_region_unref_mips64el -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_mips64el #define memory_region_update_coalesced_range memory_region_update_coalesced_range_mips64el #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_mips64el #define memory_region_update_container_subregions memory_region_update_container_subregions_mips64el diff --git a/qemu/mipsel.h b/qemu/mipsel.h index cacecdaa..cb76e4ce 100644 --- a/qemu/mipsel.h +++ b/qemu/mipsel.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_mipsel #define memory_region_name memory_region_name_mipsel #define memory_region_need_escape memory_region_need_escape_mipsel -#define memory_region_notify_iommu memory_region_notify_iommu_mipsel #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_mipsel #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_mipsel #define memory_region_present memory_region_present_mipsel #define memory_region_read_accessor memory_region_read_accessor_mipsel #define memory_region_readd_subregion memory_region_readd_subregion_mipsel #define memory_region_ref memory_region_ref_mipsel -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_mipsel #define memory_region_resolve_container memory_region_resolve_container_mipsel #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_mipsel #define memory_region_section_get_iotlb memory_region_section_get_iotlb_mipsel @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_mipsel #define memory_region_transaction_commit memory_region_transaction_commit_mipsel #define memory_region_unref memory_region_unref_mipsel -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_mipsel #define memory_region_update_coalesced_range memory_region_update_coalesced_range_mipsel #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_mipsel #define memory_region_update_container_subregions memory_region_update_container_subregions_mipsel diff --git a/qemu/powerpc.h b/qemu/powerpc.h index 7ccd86d5..62a8c366 100644 --- a/qemu/powerpc.h +++ b/qemu/powerpc.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_powerpc #define memory_region_name memory_region_name_powerpc #define memory_region_need_escape memory_region_need_escape_powerpc -#define memory_region_notify_iommu memory_region_notify_iommu_powerpc #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_powerpc #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_powerpc #define memory_region_present memory_region_present_powerpc #define memory_region_read_accessor memory_region_read_accessor_powerpc #define memory_region_readd_subregion memory_region_readd_subregion_powerpc #define memory_region_ref memory_region_ref_powerpc -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_powerpc #define memory_region_resolve_container memory_region_resolve_container_powerpc #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_powerpc #define memory_region_section_get_iotlb memory_region_section_get_iotlb_powerpc @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_powerpc #define memory_region_transaction_commit memory_region_transaction_commit_powerpc #define memory_region_unref memory_region_unref_powerpc -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_powerpc #define memory_region_update_coalesced_range memory_region_update_coalesced_range_powerpc #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_powerpc #define memory_region_update_container_subregions memory_region_update_container_subregions_powerpc diff --git a/qemu/qemu-timer.c b/qemu/qemu-timer.c index 2ea304b5..01e17537 100644 --- a/qemu/qemu-timer.c +++ b/qemu/qemu-timer.c @@ -47,7 +47,6 @@ typedef struct QEMUClock { /* We rely on BQL to protect the timerlists */ QLIST_HEAD(, QEMUTimerList) timerlists; - NotifierList reset_notifiers; int64_t last; QEMUClockType type; diff --git a/qemu/sparc.h b/qemu/sparc.h index a4fc87af..7259b6ba 100644 --- a/qemu/sparc.h +++ b/qemu/sparc.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_sparc #define memory_region_name memory_region_name_sparc #define memory_region_need_escape memory_region_need_escape_sparc -#define memory_region_notify_iommu memory_region_notify_iommu_sparc #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_sparc #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_sparc #define memory_region_present memory_region_present_sparc #define memory_region_read_accessor memory_region_read_accessor_sparc #define memory_region_readd_subregion memory_region_readd_subregion_sparc #define memory_region_ref memory_region_ref_sparc -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_sparc #define memory_region_resolve_container memory_region_resolve_container_sparc #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_sparc #define memory_region_section_get_iotlb memory_region_section_get_iotlb_sparc @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_sparc #define memory_region_transaction_commit memory_region_transaction_commit_sparc #define memory_region_unref memory_region_unref_sparc -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_sparc #define memory_region_update_coalesced_range memory_region_update_coalesced_range_sparc #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_sparc #define memory_region_update_container_subregions memory_region_update_container_subregions_sparc diff --git a/qemu/sparc64.h b/qemu/sparc64.h index b0e5384c..664d308a 100644 --- a/qemu/sparc64.h +++ b/qemu/sparc64.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_sparc64 #define memory_region_name memory_region_name_sparc64 #define memory_region_need_escape memory_region_need_escape_sparc64 -#define memory_region_notify_iommu memory_region_notify_iommu_sparc64 #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_sparc64 #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_sparc64 #define memory_region_present memory_region_present_sparc64 #define memory_region_read_accessor memory_region_read_accessor_sparc64 #define memory_region_readd_subregion memory_region_readd_subregion_sparc64 #define memory_region_ref memory_region_ref_sparc64 -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_sparc64 #define memory_region_resolve_container memory_region_resolve_container_sparc64 #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_sparc64 #define memory_region_section_get_iotlb memory_region_section_get_iotlb_sparc64 @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_sparc64 #define memory_region_transaction_commit memory_region_transaction_commit_sparc64 #define memory_region_unref memory_region_unref_sparc64 -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_sparc64 #define memory_region_update_coalesced_range memory_region_update_coalesced_range_sparc64 #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_sparc64 #define memory_region_update_container_subregions memory_region_update_container_subregions_sparc64 diff --git a/qemu/x86_64.h b/qemu/x86_64.h index 5df15284..a9efa494 100644 --- a/qemu/x86_64.h +++ b/qemu/x86_64.h @@ -2061,14 +2061,12 @@ #define memory_region_is_unassigned memory_region_is_unassigned_x86_64 #define memory_region_name memory_region_name_x86_64 #define memory_region_need_escape memory_region_need_escape_x86_64 -#define memory_region_notify_iommu memory_region_notify_iommu_x86_64 #define memory_region_oldmmio_read_accessor memory_region_oldmmio_read_accessor_x86_64 #define memory_region_oldmmio_write_accessor memory_region_oldmmio_write_accessor_x86_64 #define memory_region_present memory_region_present_x86_64 #define memory_region_read_accessor memory_region_read_accessor_x86_64 #define memory_region_readd_subregion memory_region_readd_subregion_x86_64 #define memory_region_ref memory_region_ref_x86_64 -#define memory_region_register_iommu_notifier memory_region_register_iommu_notifier_x86_64 #define memory_region_resolve_container memory_region_resolve_container_x86_64 #define memory_region_rom_device_set_romd memory_region_rom_device_set_romd_x86_64 #define memory_region_section_get_iotlb memory_region_section_get_iotlb_x86_64 @@ -2082,7 +2080,6 @@ #define memory_region_transaction_begin memory_region_transaction_begin_x86_64 #define memory_region_transaction_commit memory_region_transaction_commit_x86_64 #define memory_region_unref memory_region_unref_x86_64 -#define memory_region_unregister_iommu_notifier memory_region_unregister_iommu_notifier_x86_64 #define memory_region_update_coalesced_range memory_region_update_coalesced_range_x86_64 #define memory_region_update_coalesced_range_as memory_region_update_coalesced_range_as_x86_64 #define memory_region_update_container_subregions memory_region_update_container_subregions_x86_64 From 42771848d6e05e49e0c05c1d4c24ec927708e0d7 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 20 Jan 2017 14:57:33 +0800 Subject: [PATCH 2/7] no more spinlock --- include/qemu.h | 1 - include/uc_priv.h | 1 - qemu/aarch64.h | 2 -- qemu/arm.h | 2 -- qemu/cpu-exec.c | 11 -------- qemu/header_gen.py | 2 -- qemu/include/exec/exec-all.h | 4 --- qemu/include/exec/spinlock.h | 53 ----------------------------------- qemu/m68k.h | 2 -- qemu/mips.h | 2 -- qemu/mips64.h | 2 -- qemu/mips64el.h | 2 -- qemu/mipsel.h | 2 -- qemu/powerpc.h | 2 -- qemu/sparc.h | 2 -- qemu/sparc64.h | 2 -- qemu/target-i386/mem_helper.c | 2 -- qemu/x86_64.h | 2 -- uc.c | 2 -- 19 files changed, 98 deletions(-) delete mode 100644 qemu/include/exec/spinlock.h diff --git a/include/qemu.h b/include/qemu.h index f0a727e3..26cbd141 100644 --- a/include/qemu.h +++ b/include/qemu.h @@ -14,7 +14,6 @@ struct uc_struct; #include "qemu/thread.h" #include "include/qom/cpu.h" -#include "exec/spinlock.h" #include "vl.h" diff --git a/include/uc_priv.h b/include/uc_priv.h index dd4a211b..23889332 100644 --- a/include/uc_priv.h +++ b/include/uc_priv.h @@ -177,7 +177,6 @@ struct uc_struct { RAMList ram_list; // qemu/exec.c BounceBuffer bounce; // qemu/cpu-exec.c volatile sig_atomic_t exit_request; // qemu/cpu-exec.c - spinlock_t x86_global_cpu_lock; // for X86 arch only bool global_dirty_log; // qemu/memory.c /* This is a multi-level map on the virtual address space. The bottom level has pointers to PageDesc. */ diff --git a/qemu/aarch64.h b/qemu/aarch64.h index b641ed02..1e89318e 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_aarch64 #define sort_constraints sort_constraints_aarch64 #define sp_el0_access sp_el0_access_aarch64 -#define spin_lock spin_lock_aarch64 -#define spin_unlock spin_unlock_aarch64 #define spsel_read spsel_read_aarch64 #define spsel_write spsel_write_aarch64 #define start_list start_list_aarch64 diff --git a/qemu/arm.h b/qemu/arm.h index 090ec4de..d92233aa 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_arm #define sort_constraints sort_constraints_arm #define sp_el0_access sp_el0_access_arm -#define spin_lock spin_lock_arm -#define spin_unlock spin_unlock_arm #define spsel_read spsel_read_arm #define spsel_write spsel_write_arm #define start_list start_list_arm diff --git a/qemu/cpu-exec.c b/qemu/cpu-exec.c index 61b11f30..8a44dfe0 100644 --- a/qemu/cpu-exec.c +++ b/qemu/cpu-exec.c @@ -67,9 +67,6 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq struct hook *hook; - /* This must be volatile so it is not trashed by longjmp() */ - volatile bool have_tb_lock = false; - if (cpu->halted) { if (!cpu_has_work(cpu)) { return EXCP_HALTED; @@ -208,8 +205,6 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq cpu->exception_index = EXCP_INTERRUPT; cpu_loop_exit(cpu); } - spin_lock(&tcg_ctx->tb_ctx.tb_lock); - have_tb_lock = true; tb = tb_find_fast(env); // qq if (!tb) { // invalid TB due to invalid code? uc->invalid_error = UC_ERR_FETCH_UNMAPPED; @@ -232,8 +227,6 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq tb_add_jump((TranslationBlock *)(next_tb & ~TB_EXIT_MASK), next_tb & TB_EXIT_MASK, tb); } - have_tb_lock = false; - spin_unlock(&tcg_ctx->tb_ctx.tb_lock); /* cpu_interrupt might be called while translating the TB, but before it is linked into a potentially @@ -275,10 +268,6 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq #ifdef TARGET_I386 x86_cpu = X86_CPU(uc, cpu); #endif - if (have_tb_lock) { - spin_unlock(&tcg_ctx->tb_ctx.tb_lock); - have_tb_lock = false; - } } } /* for(;;) */ diff --git a/qemu/header_gen.py b/qemu/header_gen.py index 35b84d4d..0e527241 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -2603,8 +2603,6 @@ symbols = ( 'softmmu_unlock_user', 'sort_constraints', 'sp_el0_access', - 'spin_lock', - 'spin_unlock', 'spsel_read', 'spsel_write', 'start_list', diff --git a/qemu/include/exec/exec-all.h b/qemu/include/exec/exec-all.h index cdf888f4..ea04678d 100644 --- a/qemu/include/exec/exec-all.h +++ b/qemu/include/exec/exec-all.h @@ -169,8 +169,6 @@ struct TranslationBlock { uint32_t icount; }; -#include "exec/spinlock.h" - typedef struct TBContext TBContext; struct TBContext { @@ -178,8 +176,6 @@ struct TBContext { TranslationBlock *tbs; TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE]; int nb_tbs; - /* any access to the tbs or the page table must use this lock */ - spinlock_t tb_lock; /* statistics */ int tb_flush_count; diff --git a/qemu/include/exec/spinlock.h b/qemu/include/exec/spinlock.h deleted file mode 100644 index 215b27b4..00000000 --- a/qemu/include/exec/spinlock.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2003 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see - */ - -/* configure guarantees us that we have pthreads on any host except - * mingw32, which doesn't support any of the user-only targets. - * So we can simply assume we have pthread mutexes here. - */ -#ifndef QEMU_EXEC_SPINLOCK_H -#define QEMU_EXEC_SPINLOCK_H - -#if defined(CONFIG_USER_ONLY) - -#include -#define spin_lock pthread_mutex_lock -#define spin_unlock pthread_mutex_unlock -#define spinlock_t pthread_mutex_t -#define SPIN_LOCK_UNLOCKED PTHREAD_MUTEX_INITIALIZER - -#else - -/* Empty implementations, on the theory that system mode emulation - * is single-threaded. This means that these functions should only - * be used from code run in the TCG cpu thread, and cannot protect - * data structures which might also be accessed from the IO thread - * or from signal handlers. - */ -typedef int spinlock_t; -#define SPIN_LOCK_UNLOCKED 0 - -static inline void spin_lock(spinlock_t *lock) -{ -} - -static inline void spin_unlock(spinlock_t *lock) -{ -} - -#endif -#endif diff --git a/qemu/m68k.h b/qemu/m68k.h index b6c94a0d..850d8fad 100644 --- a/qemu/m68k.h +++ b/qemu/m68k.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_m68k #define sort_constraints sort_constraints_m68k #define sp_el0_access sp_el0_access_m68k -#define spin_lock spin_lock_m68k -#define spin_unlock spin_unlock_m68k #define spsel_read spsel_read_m68k #define spsel_write spsel_write_m68k #define start_list start_list_m68k diff --git a/qemu/mips.h b/qemu/mips.h index 18e73078..c151426c 100644 --- a/qemu/mips.h +++ b/qemu/mips.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_mips #define sort_constraints sort_constraints_mips #define sp_el0_access sp_el0_access_mips -#define spin_lock spin_lock_mips -#define spin_unlock spin_unlock_mips #define spsel_read spsel_read_mips #define spsel_write spsel_write_mips #define start_list start_list_mips diff --git a/qemu/mips64.h b/qemu/mips64.h index 155494bd..ff74feb8 100644 --- a/qemu/mips64.h +++ b/qemu/mips64.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_mips64 #define sort_constraints sort_constraints_mips64 #define sp_el0_access sp_el0_access_mips64 -#define spin_lock spin_lock_mips64 -#define spin_unlock spin_unlock_mips64 #define spsel_read spsel_read_mips64 #define spsel_write spsel_write_mips64 #define start_list start_list_mips64 diff --git a/qemu/mips64el.h b/qemu/mips64el.h index 004a8f47..cbebb6a1 100644 --- a/qemu/mips64el.h +++ b/qemu/mips64el.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_mips64el #define sort_constraints sort_constraints_mips64el #define sp_el0_access sp_el0_access_mips64el -#define spin_lock spin_lock_mips64el -#define spin_unlock spin_unlock_mips64el #define spsel_read spsel_read_mips64el #define spsel_write spsel_write_mips64el #define start_list start_list_mips64el diff --git a/qemu/mipsel.h b/qemu/mipsel.h index cb76e4ce..d6fe1ea3 100644 --- a/qemu/mipsel.h +++ b/qemu/mipsel.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_mipsel #define sort_constraints sort_constraints_mipsel #define sp_el0_access sp_el0_access_mipsel -#define spin_lock spin_lock_mipsel -#define spin_unlock spin_unlock_mipsel #define spsel_read spsel_read_mipsel #define spsel_write spsel_write_mipsel #define start_list start_list_mipsel diff --git a/qemu/powerpc.h b/qemu/powerpc.h index 62a8c366..b973ed72 100644 --- a/qemu/powerpc.h +++ b/qemu/powerpc.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_powerpc #define sort_constraints sort_constraints_powerpc #define sp_el0_access sp_el0_access_powerpc -#define spin_lock spin_lock_powerpc -#define spin_unlock spin_unlock_powerpc #define spsel_read spsel_read_powerpc #define spsel_write spsel_write_powerpc #define start_list start_list_powerpc diff --git a/qemu/sparc.h b/qemu/sparc.h index 7259b6ba..af888648 100644 --- a/qemu/sparc.h +++ b/qemu/sparc.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_sparc #define sort_constraints sort_constraints_sparc #define sp_el0_access sp_el0_access_sparc -#define spin_lock spin_lock_sparc -#define spin_unlock spin_unlock_sparc #define spsel_read spsel_read_sparc #define spsel_write spsel_write_sparc #define start_list start_list_sparc diff --git a/qemu/sparc64.h b/qemu/sparc64.h index 664d308a..09759477 100644 --- a/qemu/sparc64.h +++ b/qemu/sparc64.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_sparc64 #define sort_constraints sort_constraints_sparc64 #define sp_el0_access sp_el0_access_sparc64 -#define spin_lock spin_lock_sparc64 -#define spin_unlock spin_unlock_sparc64 #define spsel_read spsel_read_sparc64 #define spsel_write spsel_write_sparc64 #define start_list start_list_sparc64 diff --git a/qemu/target-i386/mem_helper.c b/qemu/target-i386/mem_helper.c index f3ca92ef..f92c736c 100644 --- a/qemu/target-i386/mem_helper.c +++ b/qemu/target-i386/mem_helper.c @@ -27,12 +27,10 @@ void helper_lock(CPUX86State *env) { - spin_lock(&x86_env_get_cpu(env)->parent_obj.uc->x86_global_cpu_lock); } void helper_unlock(CPUX86State *env) { - spin_unlock(&x86_env_get_cpu(env)->parent_obj.uc->x86_global_cpu_lock); } void helper_cmpxchg8b(CPUX86State *env, target_ulong a0) diff --git a/qemu/x86_64.h b/qemu/x86_64.h index a9efa494..865c6ef8 100644 --- a/qemu/x86_64.h +++ b/qemu/x86_64.h @@ -2597,8 +2597,6 @@ #define softmmu_unlock_user softmmu_unlock_user_x86_64 #define sort_constraints sort_constraints_x86_64 #define sp_el0_access sp_el0_access_x86_64 -#define spin_lock spin_lock_x86_64 -#define spin_unlock spin_unlock_x86_64 #define spsel_read spsel_read_x86_64 #define spsel_write spsel_write_x86_64 #define start_list start_list_x86_64 diff --git a/uc.c b/uc.c index 46b019cc..19aedaee 100644 --- a/uc.c +++ b/uc.c @@ -157,8 +157,6 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result) uc->ram_list.blocks.tqh_first = NULL; uc->ram_list.blocks.tqh_last = &(uc->ram_list.blocks.tqh_first); - uc->x86_global_cpu_lock = SPIN_LOCK_UNLOCKED; - uc->memory_listeners.tqh_first = NULL; uc->memory_listeners.tqh_last = &uc->memory_listeners.tqh_first; From c6de7930c99eab41a590aeca7d879aa63a8ea093 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 20 Jan 2017 15:44:03 +0800 Subject: [PATCH 3/7] remove mutex code --- include/qemu.h | 2 -- include/uc_priv.h | 1 - qemu/aarch64.h | 1 - qemu/arm.h | 1 - qemu/exec.c | 26 -------------------- qemu/header_gen.py | 1 - qemu/include/qemu/thread-posix.h | 4 ---- qemu/include/qemu/thread-win32.h | 5 ---- qemu/include/qemu/thread.h | 6 ----- qemu/include/qemu/timer.h | 8 ------- qemu/m68k.h | 1 - qemu/memory.c | 20 ---------------- qemu/mips.h | 1 - qemu/mips64.h | 1 - qemu/mips64el.h | 1 - qemu/mipsel.h | 1 - qemu/powerpc.h | 1 - qemu/qemu-timer.c | 15 ------------ qemu/sparc.h | 1 - qemu/sparc64.h | 1 - qemu/util/qemu-thread-posix.c | 41 -------------------------------- qemu/util/qemu-thread-win32.c | 30 ----------------------- qemu/x86_64.h | 1 - 23 files changed, 170 deletions(-) diff --git a/include/qemu.h b/include/qemu.h index 26cbd141..0d7b5dd2 100644 --- a/include/qemu.h +++ b/include/qemu.h @@ -41,11 +41,9 @@ typedef struct { } BounceBuffer; typedef struct RAMList { - QemuMutex mutex; /* Protected by the iothread lock. */ unsigned long *dirty_memory[DIRTY_MEMORY_NUM]; RAMBlock *mru_block; - /* Protected by the ramlist lock. */ QTAILQ_HEAD(, RAMBlock) blocks; uint32_t version; } RAMList; diff --git a/include/uc_priv.h b/include/uc_priv.h index 23889332..4fcb7531 100644 --- a/include/uc_priv.h +++ b/include/uc_priv.h @@ -188,7 +188,6 @@ struct uc_struct { unsigned memory_region_transaction_depth; bool memory_region_update_pending; bool ioeventfd_update_pending; - QemuMutex flat_view_mutex; QTAILQ_HEAD(memory_listeners, MemoryListener) memory_listeners; QTAILQ_HEAD(, AddressSpace) address_spaces; MachineState *machine_state; diff --git a/qemu/aarch64.h b/qemu/aarch64.h index 1e89318e..abbddfbd 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_aarch64 #define qemu_clock_ptr qemu_clock_ptr_aarch64 #define qemu_clocks qemu_clocks_aarch64 -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_aarch64 #define qemu_get_cpu qemu_get_cpu_aarch64 #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_aarch64 #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_aarch64 diff --git a/qemu/arm.h b/qemu/arm.h index d92233aa..e90b2cd5 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_arm #define qemu_clock_ptr qemu_clock_ptr_arm #define qemu_clocks qemu_clocks_arm -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_arm #define qemu_get_cpu qemu_get_cpu_arm #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_arm #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_arm diff --git a/qemu/exec.c b/qemu/exec.c index 92f26641..bffed758 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -906,20 +906,6 @@ static void mem_add(MemoryListener *listener, MemoryRegionSection *section) } } -void qemu_flush_coalesced_mmio_buffer(void) -{ -} - -void qemu_mutex_lock_ramlist(struct uc_struct *uc) -{ - qemu_mutex_lock(&uc->ram_list.mutex); -} - -void qemu_mutex_unlock_ramlist(struct uc_struct *uc) -{ - qemu_mutex_unlock(&uc->ram_list.mutex); -} - #ifdef __linux__ #include @@ -1012,8 +998,6 @@ static ram_addr_t ram_block_add(struct uc_struct *uc, RAMBlock *new_block, Error old_ram_size = last_ram_offset(uc) >> TARGET_PAGE_BITS; - /* This assumes the iothread lock is taken here too. */ - qemu_mutex_lock_ramlist(uc); new_block->offset = find_ram_offset(uc, new_block->length); if (!new_block->host) { @@ -1023,7 +1007,6 @@ static ram_addr_t ram_block_add(struct uc_struct *uc, RAMBlock *new_block, Error error_setg_errno(errp, errno, "cannot set up guest memory '%s'", memory_region_name(new_block->mr)); - qemu_mutex_unlock_ramlist(uc); return -1; } memory_try_enable_merging(new_block->host, new_block->length); @@ -1043,7 +1026,6 @@ static ram_addr_t ram_block_add(struct uc_struct *uc, RAMBlock *new_block, Error uc->ram_list.mru_block = NULL; uc->ram_list.version++; - qemu_mutex_unlock_ramlist(uc); new_ram_size = last_ram_offset(uc) >> TARGET_PAGE_BITS; @@ -1102,8 +1084,6 @@ void qemu_ram_free_from_ptr(struct uc_struct *uc, ram_addr_t addr) { RAMBlock *block; - /* This assumes the iothread lock is taken here too. */ - qemu_mutex_lock_ramlist(uc); QTAILQ_FOREACH(block, &uc->ram_list.blocks, next) { if (addr == block->offset) { QTAILQ_REMOVE(&uc->ram_list.blocks, block, next); @@ -1113,15 +1093,12 @@ void qemu_ram_free_from_ptr(struct uc_struct *uc, ram_addr_t addr) break; } } - qemu_mutex_unlock_ramlist(uc); } void qemu_ram_free(struct uc_struct *uc, ram_addr_t addr) { RAMBlock *block; - /* This assumes the iothread lock is taken here too. */ - qemu_mutex_lock_ramlist(uc); QTAILQ_FOREACH(block, &uc->ram_list.blocks, next) { if (addr == block->offset) { QTAILQ_REMOVE(&uc->ram_list.blocks, block, next); @@ -1141,8 +1118,6 @@ void qemu_ram_free(struct uc_struct *uc, ram_addr_t addr) break; } } - qemu_mutex_unlock_ramlist(uc); - } #ifndef _WIN32 @@ -1555,7 +1530,6 @@ static void memory_map_init(struct uc_struct *uc) void cpu_exec_init_all(struct uc_struct *uc) { #if !defined(CONFIG_USER_ONLY) - qemu_mutex_init(&uc->ram_list.mutex); memory_map_init(uc); #endif io_mem_init(uc); diff --git a/qemu/header_gen.py b/qemu/header_gen.py index 0e527241..0311f271 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -2387,7 +2387,6 @@ symbols = ( 'qemu_clock_get_us', 'qemu_clock_ptr', 'qemu_clocks', - 'qemu_flush_coalesced_mmio_buffer', 'qemu_get_cpu', 'qemu_get_guest_memory_mapping', 'qemu_get_guest_simple_memory_mapping', diff --git a/qemu/include/qemu/thread-posix.h b/qemu/include/qemu/thread-posix.h index 69b15847..36f22721 100644 --- a/qemu/include/qemu/thread-posix.h +++ b/qemu/include/qemu/thread-posix.h @@ -3,10 +3,6 @@ #include "pthread.h" #include -struct QemuMutex { - pthread_mutex_t lock; -}; - struct QemuThread { pthread_t thread; }; diff --git a/qemu/include/qemu/thread-win32.h b/qemu/include/qemu/thread-win32.h index cae78aa7..9f82ea23 100644 --- a/qemu/include/qemu/thread-win32.h +++ b/qemu/include/qemu/thread-win32.h @@ -2,11 +2,6 @@ #define __QEMU_THREAD_WIN32_H 1 #include "windows.h" -struct QemuMutex { - CRITICAL_SECTION lock; - LONG owner; -}; - typedef struct QemuThreadData QemuThreadData; struct QemuThread { QemuThreadData *data; diff --git a/qemu/include/qemu/thread.h b/qemu/include/qemu/thread.h index 39336f79..96f70ff8 100644 --- a/qemu/include/qemu/thread.h +++ b/qemu/include/qemu/thread.h @@ -4,7 +4,6 @@ #include #include -typedef struct QemuMutex QemuMutex; typedef struct QemuThread QemuThread; #ifdef _WIN32 @@ -16,11 +15,6 @@ typedef struct QemuThread QemuThread; #define QEMU_THREAD_JOINABLE 0 #define QEMU_THREAD_DETACHED 1 -void qemu_mutex_init(QemuMutex *mutex); -void qemu_mutex_destroy(QemuMutex *mutex); -void qemu_mutex_lock(QemuMutex *mutex); -void qemu_mutex_unlock(QemuMutex *mutex); - struct uc_struct; // return -1 on error, 0 on success int qemu_thread_create(struct uc_struct *uc, QemuThread *thread, const char *name, diff --git a/qemu/include/qemu/timer.h b/qemu/include/qemu/timer.h index f0e4de6f..bac87f7f 100644 --- a/qemu/include/qemu/timer.h +++ b/qemu/include/qemu/timer.h @@ -123,14 +123,6 @@ static inline int64_t qemu_clock_get_us(QEMUClockType type) QEMUTimerList *timerlist_new(QEMUClockType type, QEMUTimerListNotifyCB *cb, void *opaque); -/** - * timerlist_free: - * @timer_list: the timer list to free - * - * Frees a timer_list. It must have no active timers. - */ -void timerlist_free(QEMUTimerList *timer_list); - /** * timerlist_has_timers: * @timer_list: the timer list to operate on diff --git a/qemu/m68k.h b/qemu/m68k.h index 850d8fad..0e695582 100644 --- a/qemu/m68k.h +++ b/qemu/m68k.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_m68k #define qemu_clock_ptr qemu_clock_ptr_m68k #define qemu_clocks qemu_clocks_m68k -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_m68k #define qemu_get_cpu qemu_get_cpu_m68k #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_m68k #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_m68k diff --git a/qemu/memory.c b/qemu/memory.c index 70b13310..97c95583 100644 --- a/qemu/memory.c +++ b/qemu/memory.c @@ -122,16 +122,8 @@ int memory_free(struct uc_struct *uc) return 0; } -/* flat_view_mutex is taken around reading as->current_map; the critical - * section is extremely short, so I'm using a single mutex for every AS. - * We could also RCU for the read-side. - * - * The BQL is taken around transaction commits, hence both locks are taken - * while writing to as->current_map (with the BQL taken outside). - */ static void memory_init(struct uc_struct *uc) { - qemu_mutex_init(&uc->flat_view_mutex); } typedef struct AddrRange AddrRange; @@ -484,9 +476,6 @@ static void memory_region_read_accessor(MemoryRegion *mr, { uint64_t tmp; - if (mr->flush_coalesced_mmio) { - qemu_flush_coalesced_mmio_buffer(); - } tmp = mr->ops->read(mr->uc, mr->opaque, addr, size); *value |= (tmp & mask) << shift; } @@ -513,9 +502,6 @@ static void memory_region_write_accessor(MemoryRegion *mr, { uint64_t tmp; - if (mr->flush_coalesced_mmio) { - qemu_flush_coalesced_mmio_buffer(); - } tmp = (*value >> shift) & mask; mr->ops->write(mr->uc, mr->opaque, addr, tmp, size); } @@ -732,10 +718,8 @@ static FlatView *address_space_get_flatview(AddressSpace *as) { FlatView *view; - qemu_mutex_lock(&as->uc->flat_view_mutex); view = as->current_map; flatview_ref(view); - qemu_mutex_unlock(&as->uc->flat_view_mutex); return view; } @@ -845,10 +829,8 @@ static void address_space_update_topology(AddressSpace *as) address_space_update_topology_pass(as, old_view, new_view, false); address_space_update_topology_pass(as, old_view, new_view, true); - qemu_mutex_lock(&as->uc->flat_view_mutex); flatview_unref(as->current_map); as->current_map = new_view; - qemu_mutex_unlock(&as->uc->flat_view_mutex); /* Note that all the old MemoryRegions are still alive up to this * point. This relieves most MemoryListeners from the need to @@ -863,7 +845,6 @@ static void address_space_update_topology(AddressSpace *as) void memory_region_transaction_begin(struct uc_struct *uc) { - qemu_flush_coalesced_mmio_buffer(); ++uc->memory_region_transaction_depth; } @@ -1459,7 +1440,6 @@ void memory_region_clear_coalescing(MemoryRegion *mr) CoalescedMemoryRange *cmr; bool updated = false; - qemu_flush_coalesced_mmio_buffer(); mr->flush_coalesced_mmio = false; while (!QTAILQ_EMPTY(&mr->coalesced)) { diff --git a/qemu/mips.h b/qemu/mips.h index c151426c..3b136883 100644 --- a/qemu/mips.h +++ b/qemu/mips.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_mips #define qemu_clock_ptr qemu_clock_ptr_mips #define qemu_clocks qemu_clocks_mips -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_mips #define qemu_get_cpu qemu_get_cpu_mips #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_mips #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_mips diff --git a/qemu/mips64.h b/qemu/mips64.h index ff74feb8..5f4465bb 100644 --- a/qemu/mips64.h +++ b/qemu/mips64.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_mips64 #define qemu_clock_ptr qemu_clock_ptr_mips64 #define qemu_clocks qemu_clocks_mips64 -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_mips64 #define qemu_get_cpu qemu_get_cpu_mips64 #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_mips64 #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_mips64 diff --git a/qemu/mips64el.h b/qemu/mips64el.h index cbebb6a1..416c9ea5 100644 --- a/qemu/mips64el.h +++ b/qemu/mips64el.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_mips64el #define qemu_clock_ptr qemu_clock_ptr_mips64el #define qemu_clocks qemu_clocks_mips64el -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_mips64el #define qemu_get_cpu qemu_get_cpu_mips64el #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_mips64el #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_mips64el diff --git a/qemu/mipsel.h b/qemu/mipsel.h index d6fe1ea3..d6cc23d5 100644 --- a/qemu/mipsel.h +++ b/qemu/mipsel.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_mipsel #define qemu_clock_ptr qemu_clock_ptr_mipsel #define qemu_clocks qemu_clocks_mipsel -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_mipsel #define qemu_get_cpu qemu_get_cpu_mipsel #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_mipsel #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_mipsel diff --git a/qemu/powerpc.h b/qemu/powerpc.h index b973ed72..506339dc 100644 --- a/qemu/powerpc.h +++ b/qemu/powerpc.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_powerpc #define qemu_clock_ptr qemu_clock_ptr_powerpc #define qemu_clocks qemu_clocks_powerpc -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_powerpc #define qemu_get_cpu qemu_get_cpu_powerpc #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_powerpc #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_powerpc diff --git a/qemu/qemu-timer.c b/qemu/qemu-timer.c index 01e17537..7520c250 100644 --- a/qemu/qemu-timer.c +++ b/qemu/qemu-timer.c @@ -64,7 +64,6 @@ static QEMUClock qemu_clocks[QEMU_CLOCK_MAX]; struct QEMUTimerList { QEMUClock *clock; - QemuMutex active_timers_lock; QEMUTimer *active_timers; QLIST_ENTRY(QEMUTimerList) list; QEMUTimerListNotifyCB *notify_cb; @@ -89,16 +88,6 @@ static bool timer_expired_ns(QEMUTimer *timer_head, int64_t current_time) return timer_head && (timer_head->expire_time <= current_time); } -void timerlist_free(QEMUTimerList *timer_list) -{ - assert(!timerlist_has_timers(timer_list)); - if (timer_list->clock) { - QLIST_REMOVE(timer_list, list); - } - qemu_mutex_destroy(&timer_list->active_timers_lock); - g_free(timer_list); -} - bool timerlist_has_timers(QEMUTimerList *timer_list) { return !!timer_list->active_timers; @@ -172,9 +161,7 @@ void timer_del(QEMUTimer *ts) { QEMUTimerList *timer_list = ts->timer_list; - qemu_mutex_lock(&timer_list->active_timers_lock); timer_del_locked(timer_list, ts); - qemu_mutex_unlock(&timer_list->active_timers_lock); } /* modify the current timer so that it will be fired when current_time @@ -184,10 +171,8 @@ void timer_mod_ns(QEMUTimer *ts, int64_t expire_time) QEMUTimerList *timer_list = ts->timer_list; bool rearm; - qemu_mutex_lock(&timer_list->active_timers_lock); timer_del_locked(timer_list, ts); rearm = timer_mod_ns_locked(timer_list, ts, expire_time); - qemu_mutex_unlock(&timer_list->active_timers_lock); if (rearm) { timerlist_rearm(timer_list); diff --git a/qemu/sparc.h b/qemu/sparc.h index af888648..dc40b36e 100644 --- a/qemu/sparc.h +++ b/qemu/sparc.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_sparc #define qemu_clock_ptr qemu_clock_ptr_sparc #define qemu_clocks qemu_clocks_sparc -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_sparc #define qemu_get_cpu qemu_get_cpu_sparc #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_sparc #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_sparc diff --git a/qemu/sparc64.h b/qemu/sparc64.h index 09759477..b9d70ea4 100644 --- a/qemu/sparc64.h +++ b/qemu/sparc64.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_sparc64 #define qemu_clock_ptr qemu_clock_ptr_sparc64 #define qemu_clocks qemu_clocks_sparc64 -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_sparc64 #define qemu_get_cpu qemu_get_cpu_sparc64 #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_sparc64 #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_sparc64 diff --git a/qemu/util/qemu-thread-posix.c b/qemu/util/qemu-thread-posix.c index cc6cf46e..eb06e934 100644 --- a/qemu/util/qemu-thread-posix.c +++ b/qemu/util/qemu-thread-posix.c @@ -33,47 +33,6 @@ static void error_exit(int err, const char *msg) abort(); } -void qemu_mutex_init(QemuMutex *mutex) -{ - int err; - pthread_mutexattr_t mutexattr; - - pthread_mutexattr_init(&mutexattr); - pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_ERRORCHECK); - err = pthread_mutex_init(&mutex->lock, &mutexattr); - pthread_mutexattr_destroy(&mutexattr); - if (err) - error_exit(err, __func__); -} - -void qemu_mutex_destroy(QemuMutex *mutex) -{ - int err; - - err = pthread_mutex_destroy(&mutex->lock); - if (err) - error_exit(err, __func__); -} - - -void qemu_mutex_lock(QemuMutex *mutex) -{ - int err; - - err = pthread_mutex_lock(&mutex->lock); - if (err) - error_exit(err, __func__); -} - -void qemu_mutex_unlock(QemuMutex *mutex) -{ - int err; - - err = pthread_mutex_unlock(&mutex->lock); - if (err) - error_exit(err, __func__); -} - int qemu_thread_create(struct uc_struct *uc, QemuThread *thread, const char *name, void *(*start_routine)(void*), void *arg, int mode) diff --git a/qemu/util/qemu-thread-win32.c b/qemu/util/qemu-thread-win32.c index f587953f..2035ddac 100644 --- a/qemu/util/qemu-thread-win32.c +++ b/qemu/util/qemu-thread-win32.c @@ -30,36 +30,6 @@ static void error_exit(int err, const char *msg) //abort(); } -void qemu_mutex_init(QemuMutex *mutex) -{ - mutex->owner = 0; - InitializeCriticalSection(&mutex->lock); -} - -void qemu_mutex_destroy(QemuMutex *mutex) -{ - assert(mutex->owner == 0); - DeleteCriticalSection(&mutex->lock); -} - -void qemu_mutex_lock(QemuMutex *mutex) -{ - EnterCriticalSection(&mutex->lock); - - /* Win32 CRITICAL_SECTIONs are recursive. Assert that we're not - * using them as such. - */ - assert(mutex->owner == 0); - mutex->owner = GetCurrentThreadId(); -} - -void qemu_mutex_unlock(QemuMutex *mutex) -{ - assert(mutex->owner == GetCurrentThreadId()); - mutex->owner = 0; - LeaveCriticalSection(&mutex->lock); -} - struct QemuThreadData { /* Passed to win32_start_routine. */ void *(*start_routine)(void *); diff --git a/qemu/x86_64.h b/qemu/x86_64.h index 865c6ef8..cc9bb869 100644 --- a/qemu/x86_64.h +++ b/qemu/x86_64.h @@ -2381,7 +2381,6 @@ #define qemu_clock_get_us qemu_clock_get_us_x86_64 #define qemu_clock_ptr qemu_clock_ptr_x86_64 #define qemu_clocks qemu_clocks_x86_64 -#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_x86_64 #define qemu_get_cpu qemu_get_cpu_x86_64 #define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_x86_64 #define qemu_get_guest_simple_memory_mapping qemu_get_guest_simple_memory_mapping_x86_64 From ee294eebb0d35d9583098947180db838c4c55334 Mon Sep 17 00:00:00 2001 From: xorstream Date: Fri, 20 Jan 2017 19:03:35 +1100 Subject: [PATCH 4/7] Fixed double free in win32 threads and changed free() to g_free(). (#722) --- qemu/util/qemu-thread-win32.c | 2 ++ uc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu/util/qemu-thread-win32.c b/qemu/util/qemu-thread-win32.c index 2035ddac..3a85e6a4 100644 --- a/qemu/util/qemu-thread-win32.c +++ b/qemu/util/qemu-thread-win32.c @@ -97,7 +97,9 @@ void *qemu_thread_join(QemuThread *thread) ret = data->ret; assert(data->mode != QEMU_THREAD_DETACHED); DeleteCriticalSection(&data->cs); + data->uc->qemu_thread_data = NULL; g_free(data); + data = NULL; return ret; } diff --git a/uc.c b/uc.c index 19aedaee..348e47c1 100644 --- a/uc.c +++ b/uc.c @@ -310,7 +310,7 @@ uc_err uc_close(uc_engine *uc) // Thread relateds. if (uc->qemu_thread_data) - free(uc->qemu_thread_data); + g_free(uc->qemu_thread_data); // Other auxilaries. free(uc->l1_map); From 6daa8581cd0d825f850fb9ad19a83dc464318a58 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 20 Jan 2017 16:12:49 +0800 Subject: [PATCH 5/7] win32_start_routine() looks broken. TODO --- qemu/util/qemu-thread-win32.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu/util/qemu-thread-win32.c b/qemu/util/qemu-thread-win32.c index 3a85e6a4..26fe5cd8 100644 --- a/qemu/util/qemu-thread-win32.c +++ b/qemu/util/qemu-thread-win32.c @@ -49,11 +49,13 @@ static unsigned __stdcall win32_start_routine(void *arg) void *(*start_routine)(void *) = data->start_routine; void *thread_arg = data->arg; +#if 0 if (data->mode == QEMU_THREAD_DETACHED) { data->uc->qemu_thread_data = NULL; g_free(data); - data = NULL; } +#endif + qemu_thread_exit(data->uc, start_routine(thread_arg)); abort(); } @@ -99,7 +101,7 @@ void *qemu_thread_join(QemuThread *thread) DeleteCriticalSection(&data->cs); data->uc->qemu_thread_data = NULL; g_free(data); - data = NULL; + return ret; } From fff532fc20929d10cebac6ebc59664de525f02c1 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 20 Jan 2017 16:46:58 +0800 Subject: [PATCH 6/7] timer is redundant --- qemu/hw/intc/apic.c | 2 + qemu/hw/intc/apic_common.c | 2 +- qemu/include/qemu/timer.h | 308 ------------------------------------- qemu/qemu-timer.c | 126 --------------- 4 files changed, 3 insertions(+), 435 deletions(-) diff --git a/qemu/hw/intc/apic.c b/qemu/hw/intc/apic.c index 1f89770e..c5c1f60d 100644 --- a/qemu/hw/intc/apic.c +++ b/qemu/hw/intc/apic.c @@ -178,11 +178,13 @@ static void apic_pre_save(APICCommonState *s) static void apic_post_load(APICCommonState *s) { +#if 0 if (s->timer_expiry != -1) { timer_mod(s->timer, s->timer_expiry); } else { timer_del(s->timer); } +#endif } static int apic_realize(struct uc_struct *uc, DeviceState *dev, Error **errp) diff --git a/qemu/hw/intc/apic_common.c b/qemu/hw/intc/apic_common.c index c5d32e39..9733afe4 100644 --- a/qemu/hw/intc/apic_common.c +++ b/qemu/hw/intc/apic_common.c @@ -152,7 +152,7 @@ void apic_init_reset(struct uc_struct *uc, DeviceState *dev) s->wait_for_sipi = !cpu_is_bsp(s->cpu); if (s->timer) { - timer_del(s->timer); + // timer_del(s->timer); } s->timer_expiry = -1; diff --git a/qemu/include/qemu/timer.h b/qemu/include/qemu/timer.h index bac87f7f..6772165b 100644 --- a/qemu/include/qemu/timer.h +++ b/qemu/include/qemu/timer.h @@ -105,314 +105,6 @@ static inline int64_t qemu_clock_get_us(QEMUClockType type) return qemu_clock_get_ns(type) / SCALE_US; } -/* - * QEMUTimerList - */ - -/** - * timerlist_new: - * @type: the clock type to associate with the timerlist - * @cb: the callback to call on notification - * @opaque: the opaque pointer to pass to the callback - * - * Create a new timerlist associated with the clock of - * type @type. - * - * Returns: a pointer to the QEMUTimerList created - */ -QEMUTimerList *timerlist_new(QEMUClockType type, - QEMUTimerListNotifyCB *cb, void *opaque); - -/** - * timerlist_has_timers: - * @timer_list: the timer list to operate on - * - * Determine whether a timer list has active timers - * - * Note that this function should not be used when other threads also access - * the timer list. The return value may be outdated by the time it is acted - * upon. - * - * Returns: true if the timer list has timers. - */ -bool timerlist_has_timers(QEMUTimerList *timer_list); - -/** - * timerlist_expired: - * @timer_list: the timer list to operate on - * - * Determine whether a timer list has any timers which - * are expired. - * - * Returns: true if the timer list has timers which - * have expired. - */ -bool timerlist_expired(QEMUTimerList *timer_list); - -/** - * timerlist_deadline_ns: - * @timer_list: the timer list to operate on - * - * Determine the deadline for a timer_list, i.e. - * the number of nanoseconds until the first timer - * expires. Return -1 if there are no timers. - * - * Returns: the number of nanoseconds until the earliest - * timer expires -1 if none - */ -int64_t timerlist_deadline_ns(QEMUTimerList *timer_list); - -/** - * timerlist_get_clock: - * @timer_list: the timer list to operate on - * - * Determine the clock type associated with a timer list. - * - * Returns: the clock type associated with the - * timer list. - */ -QEMUClockType timerlist_get_clock(QEMUTimerList *timer_list); - -/** - * timerlist_run_timers: - * @timer_list: the timer list to use - * - * Call all expired timers associated with the timer list. - * - * Returns: true if any timer expired - */ -bool timerlist_run_timers(QEMUTimerList *timer_list); - -/** - * timerlist_notify: - * @timer_list: the timer list to use - * - * call the notifier callback associated with the timer list. - */ -void timerlist_notify(QEMUTimerList *timer_list); - -/* - * QEMUTimerListGroup - */ - -/** - * timerlistgroup_init: - * @tlg: the timer list group - * @cb: the callback to call when a notify is required - * @opaque: the opaque pointer to be passed to the callback. - * - * Initialise a timer list group. This must already be - * allocated in memory and zeroed. The notifier callback is - * called whenever a clock in the timer list group is - * reenabled or whenever a timer associated with any timer - * list is modified. If @cb is specified as null, qemu_notify() - * is used instead. - */ -void timerlistgroup_init(QEMUTimerListGroup *tlg, - QEMUTimerListNotifyCB *cb, void *opaque); - -/** - * timerlistgroup_deinit: - * @tlg: the timer list group - * - * Deinitialise a timer list group. This must already be - * initialised. Note the memory is not freed. - */ -void timerlistgroup_deinit(QEMUTimerListGroup *tlg); - -/** - * timerlistgroup_run_timers: - * @tlg: the timer list group - * - * Run the timers associated with a timer list group. - * This will run timers on multiple clocks. - * - * Returns: true if any timer callback ran - */ -bool timerlistgroup_run_timers(QEMUTimerListGroup *tlg); - -/** - * timerlistgroup_deadline_ns: - * @tlg: the timer list group - * - * Determine the deadline of the soonest timer to - * expire associated with any timer list linked to - * the timer list group. Only clocks suitable for - * deadline calculation are included. - * - * Returns: the deadline in nanoseconds or -1 if no - * timers are to expire. - */ -int64_t timerlistgroup_deadline_ns(QEMUTimerListGroup *tlg); - -/* - * QEMUTimer - */ - -/** - * timer_init: - * @ts: the timer to be initialised - * @timer_list: the timer list to attach the timer to - * @scale: the scale value for the timer - * @cb: the callback to be called when the timer expires - * @opaque: the opaque pointer to be passed to the callback - * - * Initialise a new timer and associate it with @timer_list. - * The caller is responsible for allocating the memory. - * - * You need not call an explicit deinit call. Simply make - * sure it is not on a list with timer_del. - */ -void timer_init(QEMUTimer *ts, - QEMUTimerList *timer_list, int scale, - QEMUTimerCB *cb, void *opaque); - -/** - * timer_new_tl: - * @timer_list: the timer list to attach the timer to - * @scale: the scale value for the timer - * @cb: the callback to be called when the timer expires - * @opaque: the opaque pointer to be passed to the callback - * - * Creeate a new timer and associate it with @timer_list. - * The memory is allocated by the function. - * - * This is not the preferred interface unless you know you - * are going to call timer_free. Use timer_init instead. - * - * Returns: a pointer to the timer - */ -static inline QEMUTimer *timer_new_tl(QEMUTimerList *timer_list, - int scale, - QEMUTimerCB *cb, - void *opaque) -{ - QEMUTimer *ts = g_malloc0(sizeof(QEMUTimer)); - timer_init(ts, timer_list, scale, cb, opaque); - return ts; -} - -/** - * timer_free: - * @ts: the timer - * - * Free a timer (it must not be on the active list) - */ -void timer_free(QEMUTimer *ts); - -/** - * timer_del: - * @ts: the timer - * - * Delete a timer from the active list. - * - * This function is thread-safe but the timer and its timer list must not be - * freed while this function is running. - */ -void timer_del(QEMUTimer *ts); - -/** - * timer_mod_ns: - * @ts: the timer - * @expire_time: the expiry time in nanoseconds - * - * Modify a timer to expire at @expire_time - * - * This function is thread-safe but the timer and its timer list must not be - * freed while this function is running. - */ -void timer_mod_ns(QEMUTimer *ts, int64_t expire_time); - -/** - * timer_mod_anticipate_ns: - * @ts: the timer - * @expire_time: the expiry time in nanoseconds - * - * Modify a timer to expire at @expire_time or the current time, - * whichever comes earlier. - * - * This function is thread-safe but the timer and its timer list must not be - * freed while this function is running. - */ -void timer_mod_anticipate_ns(QEMUTimer *ts, int64_t expire_time); - -/** - * timer_mod: - * @ts: the timer - * @expire_time: the expire time in the units associated with the timer - * - * Modify a timer to expiry at @expire_time, taking into - * account the scale associated with the timer. - * - * This function is thread-safe but the timer and its timer list must not be - * freed while this function is running. - */ -void timer_mod(QEMUTimer *ts, int64_t expire_timer); - -/** - * timer_mod_anticipate: - * @ts: the timer - * @expire_time: the expiry time in nanoseconds - * - * Modify a timer to expire at @expire_time or the current time, whichever - * comes earlier, taking into account the scale associated with the timer. - * - * This function is thread-safe but the timer and its timer list must not be - * freed while this function is running. - */ -void timer_mod_anticipate(QEMUTimer *ts, int64_t expire_time); - -/** - * timer_pending: - * @ts: the timer - * - * Determines whether a timer is pending (i.e. is on the - * active list of timers, whether or not it has not yet expired). - * - * Returns: true if the timer is pending - */ -bool timer_pending(QEMUTimer *ts); - -/** - * timer_expired: - * @ts: the timer - * - * Determines whether a timer has expired. - * - * Returns: true if the timer has expired - */ -bool timer_expired(QEMUTimer *timer_head, int64_t current_time); - -/** - * timer_expire_time_ns: - * @ts: the timer - * - * Determine the expiry time of a timer - * - * Returns: the expiry time in nanoseconds - */ -uint64_t timer_expire_time_ns(QEMUTimer *ts); - -/** - * timer_get: - * @f: the file - * @ts: the timer - * - * Read a timer @ts from a file @f - */ -void timer_get(QEMUFile *f, QEMUTimer *ts); - -/** - * timer_put: - * @f: the file - * @ts: the timer - */ -void timer_put(QEMUFile *f, QEMUTimer *ts); - -/* - * General utility functions - */ - /** * qemu_timeout_ns_to_ms: * @ns: nanosecond timeout value diff --git a/qemu/qemu-timer.c b/qemu/qemu-timer.c index 7520c250..28e5121c 100644 --- a/qemu/qemu-timer.c +++ b/qemu/qemu-timer.c @@ -55,21 +55,6 @@ typedef struct QEMUClock { static QEMUClock qemu_clocks[QEMU_CLOCK_MAX]; -/* A QEMUTimerList is a list of timers attached to a clock. More - * than one QEMUTimerList can be attached to each clock, for instance - * used by different AioContexts / threads. Each clock also has - * a list of the QEMUTimerLists associated with it, in order that - * reenabling the clock can call all the notifiers. - */ - -struct QEMUTimerList { - QEMUClock *clock; - QEMUTimer *active_timers; - QLIST_ENTRY(QEMUTimerList) list; - QEMUTimerListNotifyCB *notify_cb; - void *notify_opaque; -}; - /** * qemu_clock_ptr: * @type: type of clock @@ -83,117 +68,6 @@ static inline QEMUClock *qemu_clock_ptr(QEMUClockType type) return &qemu_clocks[type]; } -static bool timer_expired_ns(QEMUTimer *timer_head, int64_t current_time) -{ - return timer_head && (timer_head->expire_time <= current_time); -} - -bool timerlist_has_timers(QEMUTimerList *timer_list) -{ - return !!timer_list->active_timers; -} - -void timerlist_notify(QEMUTimerList *timer_list) -{ - if (timer_list->notify_cb) { - timer_list->notify_cb(timer_list->notify_opaque); - } -} - -void timer_init(QEMUTimer *ts, - QEMUTimerList *timer_list, int scale, - QEMUTimerCB *cb, void *opaque) -{ - ts->timer_list = timer_list; - ts->cb = cb; - ts->opaque = opaque; - ts->scale = scale; - ts->expire_time = -1; -} - -static void timer_del_locked(QEMUTimerList *timer_list, QEMUTimer *ts) -{ - QEMUTimer **pt, *t; - - ts->expire_time = -1; - pt = &timer_list->active_timers; - for(;;) { - t = *pt; - if (!t) - break; - if (t == ts) { - *pt = t->next; - break; - } - pt = &t->next; - } -} - -static bool timer_mod_ns_locked(QEMUTimerList *timer_list, - QEMUTimer *ts, int64_t expire_time) -{ - QEMUTimer **pt, *t; - - /* add the timer in the sorted list */ - pt = &timer_list->active_timers; - for (;;) { - t = *pt; - if (!timer_expired_ns(t, expire_time)) { - break; - } - pt = &t->next; - } - ts->expire_time = MAX(expire_time, 0); - ts->next = *pt; - *pt = ts; - - return pt == &timer_list->active_timers; -} - -static void timerlist_rearm(QEMUTimerList *timer_list) -{ - /* Interrupt execution to force deadline recalculation. */ - timerlist_notify(timer_list); -} - -/* stop a timer, but do not dealloc it */ -void timer_del(QEMUTimer *ts) -{ - QEMUTimerList *timer_list = ts->timer_list; - - timer_del_locked(timer_list, ts); -} - -/* modify the current timer so that it will be fired when current_time - >= expire_time. The corresponding callback will be called. */ -void timer_mod_ns(QEMUTimer *ts, int64_t expire_time) -{ - QEMUTimerList *timer_list = ts->timer_list; - bool rearm; - - timer_del_locked(timer_list, ts); - rearm = timer_mod_ns_locked(timer_list, ts, expire_time); - - if (rearm) { - timerlist_rearm(timer_list); - } -} - -void timer_mod(QEMUTimer *ts, int64_t expire_time) -{ - timer_mod_ns(ts, expire_time * ts->scale); -} - -bool timer_pending(QEMUTimer *ts) -{ - return ts->expire_time >= 0; -} - -uint64_t timer_expire_time_ns(QEMUTimer *ts) -{ - return timer_pending(ts) ? ts->expire_time : -1; -} - /* return the host CPU cycle counter and handle stop/restart */ int64_t cpu_get_ticks(void) { From ac68745a9ca560e5a49b9caeeb2fbb7a1225f702 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 20 Jan 2017 17:03:39 +0800 Subject: [PATCH 7/7] we dont need to handle VGA & Migration memories --- qemu/aarch64.h | 28 ---------------------------- qemu/arm.h | 28 ---------------------------- qemu/exec.c | 2 -- qemu/header_gen.py | 28 ---------------------------- qemu/include/exec/memory.h | 6 ++---- qemu/include/exec/ram_addr.h | 28 ++-------------------------- qemu/m68k.h | 28 ---------------------------- qemu/mips.h | 28 ---------------------------- qemu/mips64.h | 28 ---------------------------- qemu/mips64el.h | 28 ---------------------------- qemu/mipsel.h | 28 ---------------------------- qemu/powerpc.h | 28 ---------------------------- qemu/sparc.h | 28 ---------------------------- qemu/sparc64.h | 28 ---------------------------- qemu/x86_64.h | 28 ---------------------------- 15 files changed, 4 insertions(+), 368 deletions(-) diff --git a/qemu/aarch64.h b/qemu/aarch64.h index abbddfbd..0a6ec4fd 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_aarch64 #define countLeadingZeros32 countLeadingZeros32_aarch64 #define countLeadingZeros64 countLeadingZeros64_aarch64 -#define count_opts_list count_opts_list_aarch64 #define cp_access_ok cp_access_ok_aarch64 #define cpacr_write cpacr_write_aarch64 #define cpreg_field_is_64bit cpreg_field_is_64bit_aarch64 @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_aarch64 #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_aarch64 #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_aarch64 -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_aarch64 #define cpu_physical_memory_unmap cpu_physical_memory_unmap_aarch64 #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_aarch64 #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_aarch64 @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_aarch64 #define op_to_mov op_to_mov_aarch64 #define op_to_movi op_to_movi_aarch64 -#define opts_accepts_any opts_accepts_any_aarch64 -#define opts_do_parse opts_do_parse_aarch64 -#define opt_set opt_set_aarch64 -#define opts_parse opts_parse_aarch64 #define output_type_enum output_type_enum_aarch64 #define packFloat128 packFloat128_aarch64 #define packFloat16 packFloat16_aarch64 @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_aarch64 #define qemu_loglevel_mask qemu_loglevel_mask_aarch64 #define qemu_log_vprintf qemu_log_vprintf_aarch64 -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_aarch64 -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_aarch64 #define qemu_oom_check qemu_oom_check_aarch64 -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_aarch64 -#define qemu_opts_append qemu_opts_append_aarch64 -#define qemu_opts_create qemu_opts_create_aarch64 -#define qemu_opts_del qemu_opts_del_aarch64 -#define qemu_opts_do_parse qemu_opts_do_parse_aarch64 -#define qemu_opts_find qemu_opts_find_aarch64 -#define qemu_opts_foreach qemu_opts_foreach_aarch64 -#define qemu_opts_free qemu_opts_free_aarch64 -#define qemu_opts_from_qdict qemu_opts_from_qdict_aarch64 -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_aarch64 -#define qemu_opts_id qemu_opts_id_aarch64 -#define qemu_opts_parse qemu_opts_parse_aarch64 -#define qemu_opts_print qemu_opts_print_aarch64 -#define qemu_opts_print_help qemu_opts_print_help_aarch64 -#define qemu_opts_reset qemu_opts_reset_aarch64 -#define qemu_opts_set qemu_opts_set_aarch64 -#define qemu_opts_set_defaults qemu_opts_set_defaults_aarch64 -#define qemu_opts_set_id qemu_opts_set_id_aarch64 -#define qemu_opts_to_qdict qemu_opts_to_qdict_aarch64 -#define qemu_opts_validate qemu_opts_validate_aarch64 #define qemu_parse_fd qemu_parse_fd_aarch64 #define qemu_ram_addr_from_host qemu_ram_addr_from_host_aarch64 #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_aarch64 diff --git a/qemu/arm.h b/qemu/arm.h index e90b2cd5..bb29d7b2 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_arm #define countLeadingZeros32 countLeadingZeros32_arm #define countLeadingZeros64 countLeadingZeros64_arm -#define count_opts_list count_opts_list_arm #define cp_access_ok cp_access_ok_arm #define cpacr_write cpacr_write_arm #define cpreg_field_is_64bit cpreg_field_is_64bit_arm @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_arm #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_arm #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_arm -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_arm #define cpu_physical_memory_unmap cpu_physical_memory_unmap_arm #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_arm #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_arm @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_arm #define op_to_mov op_to_mov_arm #define op_to_movi op_to_movi_arm -#define opts_accepts_any opts_accepts_any_arm -#define opts_do_parse opts_do_parse_arm -#define opt_set opt_set_arm -#define opts_parse opts_parse_arm #define output_type_enum output_type_enum_arm #define packFloat128 packFloat128_arm #define packFloat16 packFloat16_arm @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_arm #define qemu_loglevel_mask qemu_loglevel_mask_arm #define qemu_log_vprintf qemu_log_vprintf_arm -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_arm -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_arm #define qemu_oom_check qemu_oom_check_arm -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_arm -#define qemu_opts_append qemu_opts_append_arm -#define qemu_opts_create qemu_opts_create_arm -#define qemu_opts_del qemu_opts_del_arm -#define qemu_opts_do_parse qemu_opts_do_parse_arm -#define qemu_opts_find qemu_opts_find_arm -#define qemu_opts_foreach qemu_opts_foreach_arm -#define qemu_opts_free qemu_opts_free_arm -#define qemu_opts_from_qdict qemu_opts_from_qdict_arm -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_arm -#define qemu_opts_id qemu_opts_id_arm -#define qemu_opts_parse qemu_opts_parse_arm -#define qemu_opts_print qemu_opts_print_arm -#define qemu_opts_print_help qemu_opts_print_help_arm -#define qemu_opts_reset qemu_opts_reset_arm -#define qemu_opts_set qemu_opts_set_arm -#define qemu_opts_set_defaults qemu_opts_set_defaults_arm -#define qemu_opts_set_id qemu_opts_set_id_arm -#define qemu_opts_to_qdict qemu_opts_to_qdict_arm -#define qemu_opts_validate qemu_opts_validate_arm #define qemu_parse_fd qemu_parse_fd_arm #define qemu_ram_addr_from_host qemu_ram_addr_from_host_arm #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_arm diff --git a/qemu/exec.c b/qemu/exec.c index bffed758..892ebeb2 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -1357,7 +1357,6 @@ static void notdirty_mem_write(struct uc_struct* uc, void *opaque, hwaddr ram_ad default: abort(); } - cpu_physical_memory_set_dirty_range_nocode(uc, ram_addr, size); /* we remove the notdirty callback only if the code has been flushed */ if (!cpu_physical_memory_is_clean(uc, ram_addr)) { @@ -1590,7 +1589,6 @@ static void invalidate_and_set_dirty(struct uc_struct *uc, hwaddr addr, { if (cpu_physical_memory_range_includes_clean(uc, addr, length)) { tb_invalidate_phys_range(uc, addr, addr + length, 0); - cpu_physical_memory_set_dirty_range_nocode(uc, addr, length); } } diff --git a/qemu/header_gen.py b/qemu/header_gen.py index 0311f271..37e20633 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -206,7 +206,6 @@ symbols = ( 'count_cpreg', 'countLeadingZeros32', 'countLeadingZeros64', - 'count_opts_list', 'cp_access_ok', 'cpacr_write', 'cpreg_field_is_64bit', @@ -276,7 +275,6 @@ symbols = ( 'cpu_physical_memory_rw', 'cpu_physical_memory_set_dirty_flag', 'cpu_physical_memory_set_dirty_range', - 'cpu_physical_memory_set_dirty_range_nocode', 'cpu_physical_memory_unmap', 'cpu_physical_memory_write_rom', 'cpu_physical_memory_write_rom_internal', @@ -2187,10 +2185,6 @@ symbols = ( 'open_modeflags', 'op_to_mov', 'op_to_movi', - 'opts_accepts_any', - 'opts_do_parse', - 'opt_set', - 'opts_parse', 'output_type_enum', 'packFloat128', 'packFloat16', @@ -2403,29 +2397,7 @@ symbols = ( 'qemu_log_flush', 'qemu_loglevel_mask', 'qemu_log_vprintf', - 'qemu_mutex_lock_ramlist', - 'qemu_mutex_unlock_ramlist', 'qemu_oom_check', - 'qemu_opts_absorb_qdict', - 'qemu_opts_append', - 'qemu_opts_create', - 'qemu_opts_del', - 'qemu_opts_do_parse', - 'qemu_opts_find', - 'qemu_opts_foreach', - 'qemu_opts_free', - 'qemu_opts_from_qdict', - 'qemu_opts_from_qdict_1', - 'qemu_opts_id', - 'qemu_opts_parse', - 'qemu_opts_print', - 'qemu_opts_print_help', - 'qemu_opts_reset', - 'qemu_opts_set', - 'qemu_opts_set_defaults', - 'qemu_opts_set_id', - 'qemu_opts_to_qdict', - 'qemu_opts_validate', 'qemu_parse_fd', 'qemu_ram_addr_from_host', 'qemu_ram_addr_from_host_nofail', diff --git a/qemu/include/exec/memory.h b/qemu/include/exec/memory.h index cc542d7b..2989edc0 100644 --- a/qemu/include/exec/memory.h +++ b/qemu/include/exec/memory.h @@ -16,10 +16,8 @@ #ifndef CONFIG_USER_ONLY -#define DIRTY_MEMORY_VGA 0 -#define DIRTY_MEMORY_CODE 1 -#define DIRTY_MEMORY_MIGRATION 2 -#define DIRTY_MEMORY_NUM 3 /* num of dirty bits */ +#define DIRTY_MEMORY_CODE 0 +#define DIRTY_MEMORY_NUM 1 /* num of dirty bits */ #include #include diff --git a/qemu/include/exec/ram_addr.h b/qemu/include/exec/ram_addr.h index 01a646b4..a4c9007c 100644 --- a/qemu/include/exec/ram_addr.h +++ b/qemu/include/exec/ram_addr.h @@ -70,21 +70,13 @@ static inline bool cpu_physical_memory_get_dirty_flag(struct uc_struct *uc, ram_ static inline bool cpu_physical_memory_is_clean(struct uc_struct *uc, ram_addr_t addr) { - bool vga = cpu_physical_memory_get_dirty_flag(uc, addr, DIRTY_MEMORY_VGA); - bool code = cpu_physical_memory_get_dirty_flag(uc, addr, DIRTY_MEMORY_CODE); - bool migration = - cpu_physical_memory_get_dirty_flag(uc, addr, DIRTY_MEMORY_MIGRATION); - return !(vga && code && migration); + return !cpu_physical_memory_get_dirty_flag(uc, addr, DIRTY_MEMORY_CODE); } static inline bool cpu_physical_memory_range_includes_clean(struct uc_struct *uc, ram_addr_t start, ram_addr_t length) { - bool vga = cpu_physical_memory_get_clean(uc, start, length, DIRTY_MEMORY_VGA); - bool code = cpu_physical_memory_get_clean(uc, start, length, DIRTY_MEMORY_CODE); - bool migration = - cpu_physical_memory_get_clean(uc, start, length, DIRTY_MEMORY_MIGRATION); - return vga || code || migration; + return cpu_physical_memory_get_clean(uc, start, length, DIRTY_MEMORY_CODE); } static inline void cpu_physical_memory_set_dirty_flag(struct uc_struct *uc, ram_addr_t addr, @@ -94,17 +86,6 @@ static inline void cpu_physical_memory_set_dirty_flag(struct uc_struct *uc, ram_ set_bit(addr >> TARGET_PAGE_BITS, uc->ram_list.dirty_memory[client]); } -static inline void cpu_physical_memory_set_dirty_range_nocode(struct uc_struct *uc, ram_addr_t start, - ram_addr_t length) -{ - unsigned long end, page; - - end = TARGET_PAGE_ALIGN(start + length) >> TARGET_PAGE_BITS; - page = start >> TARGET_PAGE_BITS; - bitmap_set(uc->ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION], page, end - page); - bitmap_set(uc->ram_list.dirty_memory[DIRTY_MEMORY_VGA], page, end - page); -} - static inline void cpu_physical_memory_set_dirty_range(struct uc_struct *uc, ram_addr_t start, ram_addr_t length) { @@ -112,8 +93,6 @@ static inline void cpu_physical_memory_set_dirty_range(struct uc_struct *uc, ram end = TARGET_PAGE_ALIGN(start + length) >> TARGET_PAGE_BITS; page = start >> TARGET_PAGE_BITS; - bitmap_set(uc->ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION], page, end - page); - bitmap_set(uc->ram_list.dirty_memory[DIRTY_MEMORY_VGA], page, end - page); bitmap_set(uc->ram_list.dirty_memory[DIRTY_MEMORY_CODE], page, end - page); } @@ -139,9 +118,6 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(struct uc_struct *uc, for (k = 0; k < nr; k++) { if (bitmap[k]) { unsigned long temp = leul_to_cpu(bitmap[k]); - - uc->ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION][page + k] |= temp; - uc->ram_list.dirty_memory[DIRTY_MEMORY_VGA][page + k] |= temp; uc->ram_list.dirty_memory[DIRTY_MEMORY_CODE][page + k] |= temp; } } diff --git a/qemu/m68k.h b/qemu/m68k.h index 0e695582..8297a9ec 100644 --- a/qemu/m68k.h +++ b/qemu/m68k.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_m68k #define countLeadingZeros32 countLeadingZeros32_m68k #define countLeadingZeros64 countLeadingZeros64_m68k -#define count_opts_list count_opts_list_m68k #define cp_access_ok cp_access_ok_m68k #define cpacr_write cpacr_write_m68k #define cpreg_field_is_64bit cpreg_field_is_64bit_m68k @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_m68k #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_m68k #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_m68k -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_m68k #define cpu_physical_memory_unmap cpu_physical_memory_unmap_m68k #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_m68k #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_m68k @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_m68k #define op_to_mov op_to_mov_m68k #define op_to_movi op_to_movi_m68k -#define opts_accepts_any opts_accepts_any_m68k -#define opts_do_parse opts_do_parse_m68k -#define opt_set opt_set_m68k -#define opts_parse opts_parse_m68k #define output_type_enum output_type_enum_m68k #define packFloat128 packFloat128_m68k #define packFloat16 packFloat16_m68k @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_m68k #define qemu_loglevel_mask qemu_loglevel_mask_m68k #define qemu_log_vprintf qemu_log_vprintf_m68k -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_m68k -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_m68k #define qemu_oom_check qemu_oom_check_m68k -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_m68k -#define qemu_opts_append qemu_opts_append_m68k -#define qemu_opts_create qemu_opts_create_m68k -#define qemu_opts_del qemu_opts_del_m68k -#define qemu_opts_do_parse qemu_opts_do_parse_m68k -#define qemu_opts_find qemu_opts_find_m68k -#define qemu_opts_foreach qemu_opts_foreach_m68k -#define qemu_opts_free qemu_opts_free_m68k -#define qemu_opts_from_qdict qemu_opts_from_qdict_m68k -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_m68k -#define qemu_opts_id qemu_opts_id_m68k -#define qemu_opts_parse qemu_opts_parse_m68k -#define qemu_opts_print qemu_opts_print_m68k -#define qemu_opts_print_help qemu_opts_print_help_m68k -#define qemu_opts_reset qemu_opts_reset_m68k -#define qemu_opts_set qemu_opts_set_m68k -#define qemu_opts_set_defaults qemu_opts_set_defaults_m68k -#define qemu_opts_set_id qemu_opts_set_id_m68k -#define qemu_opts_to_qdict qemu_opts_to_qdict_m68k -#define qemu_opts_validate qemu_opts_validate_m68k #define qemu_parse_fd qemu_parse_fd_m68k #define qemu_ram_addr_from_host qemu_ram_addr_from_host_m68k #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_m68k diff --git a/qemu/mips.h b/qemu/mips.h index 3b136883..a0c5727b 100644 --- a/qemu/mips.h +++ b/qemu/mips.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_mips #define countLeadingZeros32 countLeadingZeros32_mips #define countLeadingZeros64 countLeadingZeros64_mips -#define count_opts_list count_opts_list_mips #define cp_access_ok cp_access_ok_mips #define cpacr_write cpacr_write_mips #define cpreg_field_is_64bit cpreg_field_is_64bit_mips @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_mips #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_mips #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_mips -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_mips #define cpu_physical_memory_unmap cpu_physical_memory_unmap_mips #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_mips #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_mips @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_mips #define op_to_mov op_to_mov_mips #define op_to_movi op_to_movi_mips -#define opts_accepts_any opts_accepts_any_mips -#define opts_do_parse opts_do_parse_mips -#define opt_set opt_set_mips -#define opts_parse opts_parse_mips #define output_type_enum output_type_enum_mips #define packFloat128 packFloat128_mips #define packFloat16 packFloat16_mips @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_mips #define qemu_loglevel_mask qemu_loglevel_mask_mips #define qemu_log_vprintf qemu_log_vprintf_mips -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_mips -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_mips #define qemu_oom_check qemu_oom_check_mips -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_mips -#define qemu_opts_append qemu_opts_append_mips -#define qemu_opts_create qemu_opts_create_mips -#define qemu_opts_del qemu_opts_del_mips -#define qemu_opts_do_parse qemu_opts_do_parse_mips -#define qemu_opts_find qemu_opts_find_mips -#define qemu_opts_foreach qemu_opts_foreach_mips -#define qemu_opts_free qemu_opts_free_mips -#define qemu_opts_from_qdict qemu_opts_from_qdict_mips -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_mips -#define qemu_opts_id qemu_opts_id_mips -#define qemu_opts_parse qemu_opts_parse_mips -#define qemu_opts_print qemu_opts_print_mips -#define qemu_opts_print_help qemu_opts_print_help_mips -#define qemu_opts_reset qemu_opts_reset_mips -#define qemu_opts_set qemu_opts_set_mips -#define qemu_opts_set_defaults qemu_opts_set_defaults_mips -#define qemu_opts_set_id qemu_opts_set_id_mips -#define qemu_opts_to_qdict qemu_opts_to_qdict_mips -#define qemu_opts_validate qemu_opts_validate_mips #define qemu_parse_fd qemu_parse_fd_mips #define qemu_ram_addr_from_host qemu_ram_addr_from_host_mips #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_mips diff --git a/qemu/mips64.h b/qemu/mips64.h index 5f4465bb..b2c62cff 100644 --- a/qemu/mips64.h +++ b/qemu/mips64.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_mips64 #define countLeadingZeros32 countLeadingZeros32_mips64 #define countLeadingZeros64 countLeadingZeros64_mips64 -#define count_opts_list count_opts_list_mips64 #define cp_access_ok cp_access_ok_mips64 #define cpacr_write cpacr_write_mips64 #define cpreg_field_is_64bit cpreg_field_is_64bit_mips64 @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_mips64 #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_mips64 #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_mips64 -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_mips64 #define cpu_physical_memory_unmap cpu_physical_memory_unmap_mips64 #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_mips64 #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_mips64 @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_mips64 #define op_to_mov op_to_mov_mips64 #define op_to_movi op_to_movi_mips64 -#define opts_accepts_any opts_accepts_any_mips64 -#define opts_do_parse opts_do_parse_mips64 -#define opt_set opt_set_mips64 -#define opts_parse opts_parse_mips64 #define output_type_enum output_type_enum_mips64 #define packFloat128 packFloat128_mips64 #define packFloat16 packFloat16_mips64 @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_mips64 #define qemu_loglevel_mask qemu_loglevel_mask_mips64 #define qemu_log_vprintf qemu_log_vprintf_mips64 -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_mips64 -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_mips64 #define qemu_oom_check qemu_oom_check_mips64 -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_mips64 -#define qemu_opts_append qemu_opts_append_mips64 -#define qemu_opts_create qemu_opts_create_mips64 -#define qemu_opts_del qemu_opts_del_mips64 -#define qemu_opts_do_parse qemu_opts_do_parse_mips64 -#define qemu_opts_find qemu_opts_find_mips64 -#define qemu_opts_foreach qemu_opts_foreach_mips64 -#define qemu_opts_free qemu_opts_free_mips64 -#define qemu_opts_from_qdict qemu_opts_from_qdict_mips64 -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_mips64 -#define qemu_opts_id qemu_opts_id_mips64 -#define qemu_opts_parse qemu_opts_parse_mips64 -#define qemu_opts_print qemu_opts_print_mips64 -#define qemu_opts_print_help qemu_opts_print_help_mips64 -#define qemu_opts_reset qemu_opts_reset_mips64 -#define qemu_opts_set qemu_opts_set_mips64 -#define qemu_opts_set_defaults qemu_opts_set_defaults_mips64 -#define qemu_opts_set_id qemu_opts_set_id_mips64 -#define qemu_opts_to_qdict qemu_opts_to_qdict_mips64 -#define qemu_opts_validate qemu_opts_validate_mips64 #define qemu_parse_fd qemu_parse_fd_mips64 #define qemu_ram_addr_from_host qemu_ram_addr_from_host_mips64 #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_mips64 diff --git a/qemu/mips64el.h b/qemu/mips64el.h index 416c9ea5..617bc44d 100644 --- a/qemu/mips64el.h +++ b/qemu/mips64el.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_mips64el #define countLeadingZeros32 countLeadingZeros32_mips64el #define countLeadingZeros64 countLeadingZeros64_mips64el -#define count_opts_list count_opts_list_mips64el #define cp_access_ok cp_access_ok_mips64el #define cpacr_write cpacr_write_mips64el #define cpreg_field_is_64bit cpreg_field_is_64bit_mips64el @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_mips64el #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_mips64el #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_mips64el -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_mips64el #define cpu_physical_memory_unmap cpu_physical_memory_unmap_mips64el #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_mips64el #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_mips64el @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_mips64el #define op_to_mov op_to_mov_mips64el #define op_to_movi op_to_movi_mips64el -#define opts_accepts_any opts_accepts_any_mips64el -#define opts_do_parse opts_do_parse_mips64el -#define opt_set opt_set_mips64el -#define opts_parse opts_parse_mips64el #define output_type_enum output_type_enum_mips64el #define packFloat128 packFloat128_mips64el #define packFloat16 packFloat16_mips64el @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_mips64el #define qemu_loglevel_mask qemu_loglevel_mask_mips64el #define qemu_log_vprintf qemu_log_vprintf_mips64el -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_mips64el -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_mips64el #define qemu_oom_check qemu_oom_check_mips64el -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_mips64el -#define qemu_opts_append qemu_opts_append_mips64el -#define qemu_opts_create qemu_opts_create_mips64el -#define qemu_opts_del qemu_opts_del_mips64el -#define qemu_opts_do_parse qemu_opts_do_parse_mips64el -#define qemu_opts_find qemu_opts_find_mips64el -#define qemu_opts_foreach qemu_opts_foreach_mips64el -#define qemu_opts_free qemu_opts_free_mips64el -#define qemu_opts_from_qdict qemu_opts_from_qdict_mips64el -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_mips64el -#define qemu_opts_id qemu_opts_id_mips64el -#define qemu_opts_parse qemu_opts_parse_mips64el -#define qemu_opts_print qemu_opts_print_mips64el -#define qemu_opts_print_help qemu_opts_print_help_mips64el -#define qemu_opts_reset qemu_opts_reset_mips64el -#define qemu_opts_set qemu_opts_set_mips64el -#define qemu_opts_set_defaults qemu_opts_set_defaults_mips64el -#define qemu_opts_set_id qemu_opts_set_id_mips64el -#define qemu_opts_to_qdict qemu_opts_to_qdict_mips64el -#define qemu_opts_validate qemu_opts_validate_mips64el #define qemu_parse_fd qemu_parse_fd_mips64el #define qemu_ram_addr_from_host qemu_ram_addr_from_host_mips64el #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_mips64el diff --git a/qemu/mipsel.h b/qemu/mipsel.h index d6cc23d5..1dc1af12 100644 --- a/qemu/mipsel.h +++ b/qemu/mipsel.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_mipsel #define countLeadingZeros32 countLeadingZeros32_mipsel #define countLeadingZeros64 countLeadingZeros64_mipsel -#define count_opts_list count_opts_list_mipsel #define cp_access_ok cp_access_ok_mipsel #define cpacr_write cpacr_write_mipsel #define cpreg_field_is_64bit cpreg_field_is_64bit_mipsel @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_mipsel #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_mipsel #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_mipsel -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_mipsel #define cpu_physical_memory_unmap cpu_physical_memory_unmap_mipsel #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_mipsel #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_mipsel @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_mipsel #define op_to_mov op_to_mov_mipsel #define op_to_movi op_to_movi_mipsel -#define opts_accepts_any opts_accepts_any_mipsel -#define opts_do_parse opts_do_parse_mipsel -#define opt_set opt_set_mipsel -#define opts_parse opts_parse_mipsel #define output_type_enum output_type_enum_mipsel #define packFloat128 packFloat128_mipsel #define packFloat16 packFloat16_mipsel @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_mipsel #define qemu_loglevel_mask qemu_loglevel_mask_mipsel #define qemu_log_vprintf qemu_log_vprintf_mipsel -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_mipsel -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_mipsel #define qemu_oom_check qemu_oom_check_mipsel -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_mipsel -#define qemu_opts_append qemu_opts_append_mipsel -#define qemu_opts_create qemu_opts_create_mipsel -#define qemu_opts_del qemu_opts_del_mipsel -#define qemu_opts_do_parse qemu_opts_do_parse_mipsel -#define qemu_opts_find qemu_opts_find_mipsel -#define qemu_opts_foreach qemu_opts_foreach_mipsel -#define qemu_opts_free qemu_opts_free_mipsel -#define qemu_opts_from_qdict qemu_opts_from_qdict_mipsel -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_mipsel -#define qemu_opts_id qemu_opts_id_mipsel -#define qemu_opts_parse qemu_opts_parse_mipsel -#define qemu_opts_print qemu_opts_print_mipsel -#define qemu_opts_print_help qemu_opts_print_help_mipsel -#define qemu_opts_reset qemu_opts_reset_mipsel -#define qemu_opts_set qemu_opts_set_mipsel -#define qemu_opts_set_defaults qemu_opts_set_defaults_mipsel -#define qemu_opts_set_id qemu_opts_set_id_mipsel -#define qemu_opts_to_qdict qemu_opts_to_qdict_mipsel -#define qemu_opts_validate qemu_opts_validate_mipsel #define qemu_parse_fd qemu_parse_fd_mipsel #define qemu_ram_addr_from_host qemu_ram_addr_from_host_mipsel #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_mipsel diff --git a/qemu/powerpc.h b/qemu/powerpc.h index 506339dc..8ca1c9a7 100644 --- a/qemu/powerpc.h +++ b/qemu/powerpc.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_powerpc #define countLeadingZeros32 countLeadingZeros32_powerpc #define countLeadingZeros64 countLeadingZeros64_powerpc -#define count_opts_list count_opts_list_powerpc #define cp_access_ok cp_access_ok_powerpc #define cpacr_write cpacr_write_powerpc #define cpreg_field_is_64bit cpreg_field_is_64bit_powerpc @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_powerpc #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_powerpc #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_powerpc -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_powerpc #define cpu_physical_memory_unmap cpu_physical_memory_unmap_powerpc #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_powerpc #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_powerpc @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_powerpc #define op_to_mov op_to_mov_powerpc #define op_to_movi op_to_movi_powerpc -#define opts_accepts_any opts_accepts_any_powerpc -#define opts_do_parse opts_do_parse_powerpc -#define opt_set opt_set_powerpc -#define opts_parse opts_parse_powerpc #define output_type_enum output_type_enum_powerpc #define packFloat128 packFloat128_powerpc #define packFloat16 packFloat16_powerpc @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_powerpc #define qemu_loglevel_mask qemu_loglevel_mask_powerpc #define qemu_log_vprintf qemu_log_vprintf_powerpc -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_powerpc -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_powerpc #define qemu_oom_check qemu_oom_check_powerpc -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_powerpc -#define qemu_opts_append qemu_opts_append_powerpc -#define qemu_opts_create qemu_opts_create_powerpc -#define qemu_opts_del qemu_opts_del_powerpc -#define qemu_opts_do_parse qemu_opts_do_parse_powerpc -#define qemu_opts_find qemu_opts_find_powerpc -#define qemu_opts_foreach qemu_opts_foreach_powerpc -#define qemu_opts_free qemu_opts_free_powerpc -#define qemu_opts_from_qdict qemu_opts_from_qdict_powerpc -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_powerpc -#define qemu_opts_id qemu_opts_id_powerpc -#define qemu_opts_parse qemu_opts_parse_powerpc -#define qemu_opts_print qemu_opts_print_powerpc -#define qemu_opts_print_help qemu_opts_print_help_powerpc -#define qemu_opts_reset qemu_opts_reset_powerpc -#define qemu_opts_set qemu_opts_set_powerpc -#define qemu_opts_set_defaults qemu_opts_set_defaults_powerpc -#define qemu_opts_set_id qemu_opts_set_id_powerpc -#define qemu_opts_to_qdict qemu_opts_to_qdict_powerpc -#define qemu_opts_validate qemu_opts_validate_powerpc #define qemu_parse_fd qemu_parse_fd_powerpc #define qemu_ram_addr_from_host qemu_ram_addr_from_host_powerpc #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_powerpc diff --git a/qemu/sparc.h b/qemu/sparc.h index dc40b36e..2151cff7 100644 --- a/qemu/sparc.h +++ b/qemu/sparc.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_sparc #define countLeadingZeros32 countLeadingZeros32_sparc #define countLeadingZeros64 countLeadingZeros64_sparc -#define count_opts_list count_opts_list_sparc #define cp_access_ok cp_access_ok_sparc #define cpacr_write cpacr_write_sparc #define cpreg_field_is_64bit cpreg_field_is_64bit_sparc @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_sparc #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_sparc #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_sparc -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_sparc #define cpu_physical_memory_unmap cpu_physical_memory_unmap_sparc #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_sparc #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_sparc @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_sparc #define op_to_mov op_to_mov_sparc #define op_to_movi op_to_movi_sparc -#define opts_accepts_any opts_accepts_any_sparc -#define opts_do_parse opts_do_parse_sparc -#define opt_set opt_set_sparc -#define opts_parse opts_parse_sparc #define output_type_enum output_type_enum_sparc #define packFloat128 packFloat128_sparc #define packFloat16 packFloat16_sparc @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_sparc #define qemu_loglevel_mask qemu_loglevel_mask_sparc #define qemu_log_vprintf qemu_log_vprintf_sparc -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_sparc -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_sparc #define qemu_oom_check qemu_oom_check_sparc -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_sparc -#define qemu_opts_append qemu_opts_append_sparc -#define qemu_opts_create qemu_opts_create_sparc -#define qemu_opts_del qemu_opts_del_sparc -#define qemu_opts_do_parse qemu_opts_do_parse_sparc -#define qemu_opts_find qemu_opts_find_sparc -#define qemu_opts_foreach qemu_opts_foreach_sparc -#define qemu_opts_free qemu_opts_free_sparc -#define qemu_opts_from_qdict qemu_opts_from_qdict_sparc -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_sparc -#define qemu_opts_id qemu_opts_id_sparc -#define qemu_opts_parse qemu_opts_parse_sparc -#define qemu_opts_print qemu_opts_print_sparc -#define qemu_opts_print_help qemu_opts_print_help_sparc -#define qemu_opts_reset qemu_opts_reset_sparc -#define qemu_opts_set qemu_opts_set_sparc -#define qemu_opts_set_defaults qemu_opts_set_defaults_sparc -#define qemu_opts_set_id qemu_opts_set_id_sparc -#define qemu_opts_to_qdict qemu_opts_to_qdict_sparc -#define qemu_opts_validate qemu_opts_validate_sparc #define qemu_parse_fd qemu_parse_fd_sparc #define qemu_ram_addr_from_host qemu_ram_addr_from_host_sparc #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_sparc diff --git a/qemu/sparc64.h b/qemu/sparc64.h index b9d70ea4..b19b68ce 100644 --- a/qemu/sparc64.h +++ b/qemu/sparc64.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_sparc64 #define countLeadingZeros32 countLeadingZeros32_sparc64 #define countLeadingZeros64 countLeadingZeros64_sparc64 -#define count_opts_list count_opts_list_sparc64 #define cp_access_ok cp_access_ok_sparc64 #define cpacr_write cpacr_write_sparc64 #define cpreg_field_is_64bit cpreg_field_is_64bit_sparc64 @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_sparc64 #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_sparc64 #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_sparc64 -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_sparc64 #define cpu_physical_memory_unmap cpu_physical_memory_unmap_sparc64 #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_sparc64 #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_sparc64 @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_sparc64 #define op_to_mov op_to_mov_sparc64 #define op_to_movi op_to_movi_sparc64 -#define opts_accepts_any opts_accepts_any_sparc64 -#define opts_do_parse opts_do_parse_sparc64 -#define opt_set opt_set_sparc64 -#define opts_parse opts_parse_sparc64 #define output_type_enum output_type_enum_sparc64 #define packFloat128 packFloat128_sparc64 #define packFloat16 packFloat16_sparc64 @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_sparc64 #define qemu_loglevel_mask qemu_loglevel_mask_sparc64 #define qemu_log_vprintf qemu_log_vprintf_sparc64 -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_sparc64 -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_sparc64 #define qemu_oom_check qemu_oom_check_sparc64 -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_sparc64 -#define qemu_opts_append qemu_opts_append_sparc64 -#define qemu_opts_create qemu_opts_create_sparc64 -#define qemu_opts_del qemu_opts_del_sparc64 -#define qemu_opts_do_parse qemu_opts_do_parse_sparc64 -#define qemu_opts_find qemu_opts_find_sparc64 -#define qemu_opts_foreach qemu_opts_foreach_sparc64 -#define qemu_opts_free qemu_opts_free_sparc64 -#define qemu_opts_from_qdict qemu_opts_from_qdict_sparc64 -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_sparc64 -#define qemu_opts_id qemu_opts_id_sparc64 -#define qemu_opts_parse qemu_opts_parse_sparc64 -#define qemu_opts_print qemu_opts_print_sparc64 -#define qemu_opts_print_help qemu_opts_print_help_sparc64 -#define qemu_opts_reset qemu_opts_reset_sparc64 -#define qemu_opts_set qemu_opts_set_sparc64 -#define qemu_opts_set_defaults qemu_opts_set_defaults_sparc64 -#define qemu_opts_set_id qemu_opts_set_id_sparc64 -#define qemu_opts_to_qdict qemu_opts_to_qdict_sparc64 -#define qemu_opts_validate qemu_opts_validate_sparc64 #define qemu_parse_fd qemu_parse_fd_sparc64 #define qemu_ram_addr_from_host qemu_ram_addr_from_host_sparc64 #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_sparc64 diff --git a/qemu/x86_64.h b/qemu/x86_64.h index cc9bb869..3f23d57e 100644 --- a/qemu/x86_64.h +++ b/qemu/x86_64.h @@ -200,7 +200,6 @@ #define count_cpreg count_cpreg_x86_64 #define countLeadingZeros32 countLeadingZeros32_x86_64 #define countLeadingZeros64 countLeadingZeros64_x86_64 -#define count_opts_list count_opts_list_x86_64 #define cp_access_ok cp_access_ok_x86_64 #define cpacr_write cpacr_write_x86_64 #define cpreg_field_is_64bit cpreg_field_is_64bit_x86_64 @@ -270,7 +269,6 @@ #define cpu_physical_memory_rw cpu_physical_memory_rw_x86_64 #define cpu_physical_memory_set_dirty_flag cpu_physical_memory_set_dirty_flag_x86_64 #define cpu_physical_memory_set_dirty_range cpu_physical_memory_set_dirty_range_x86_64 -#define cpu_physical_memory_set_dirty_range_nocode cpu_physical_memory_set_dirty_range_nocode_x86_64 #define cpu_physical_memory_unmap cpu_physical_memory_unmap_x86_64 #define cpu_physical_memory_write_rom cpu_physical_memory_write_rom_x86_64 #define cpu_physical_memory_write_rom_internal cpu_physical_memory_write_rom_internal_x86_64 @@ -2181,10 +2179,6 @@ #define open_modeflags open_modeflags_x86_64 #define op_to_mov op_to_mov_x86_64 #define op_to_movi op_to_movi_x86_64 -#define opts_accepts_any opts_accepts_any_x86_64 -#define opts_do_parse opts_do_parse_x86_64 -#define opt_set opt_set_x86_64 -#define opts_parse opts_parse_x86_64 #define output_type_enum output_type_enum_x86_64 #define packFloat128 packFloat128_x86_64 #define packFloat16 packFloat16_x86_64 @@ -2397,29 +2391,7 @@ #define qemu_log_flush qemu_log_flush_x86_64 #define qemu_loglevel_mask qemu_loglevel_mask_x86_64 #define qemu_log_vprintf qemu_log_vprintf_x86_64 -#define qemu_mutex_lock_ramlist qemu_mutex_lock_ramlist_x86_64 -#define qemu_mutex_unlock_ramlist qemu_mutex_unlock_ramlist_x86_64 #define qemu_oom_check qemu_oom_check_x86_64 -#define qemu_opts_absorb_qdict qemu_opts_absorb_qdict_x86_64 -#define qemu_opts_append qemu_opts_append_x86_64 -#define qemu_opts_create qemu_opts_create_x86_64 -#define qemu_opts_del qemu_opts_del_x86_64 -#define qemu_opts_do_parse qemu_opts_do_parse_x86_64 -#define qemu_opts_find qemu_opts_find_x86_64 -#define qemu_opts_foreach qemu_opts_foreach_x86_64 -#define qemu_opts_free qemu_opts_free_x86_64 -#define qemu_opts_from_qdict qemu_opts_from_qdict_x86_64 -#define qemu_opts_from_qdict_1 qemu_opts_from_qdict_1_x86_64 -#define qemu_opts_id qemu_opts_id_x86_64 -#define qemu_opts_parse qemu_opts_parse_x86_64 -#define qemu_opts_print qemu_opts_print_x86_64 -#define qemu_opts_print_help qemu_opts_print_help_x86_64 -#define qemu_opts_reset qemu_opts_reset_x86_64 -#define qemu_opts_set qemu_opts_set_x86_64 -#define qemu_opts_set_defaults qemu_opts_set_defaults_x86_64 -#define qemu_opts_set_id qemu_opts_set_id_x86_64 -#define qemu_opts_to_qdict qemu_opts_to_qdict_x86_64 -#define qemu_opts_validate qemu_opts_validate_x86_64 #define qemu_parse_fd qemu_parse_fd_x86_64 #define qemu_ram_addr_from_host qemu_ram_addr_from_host_x86_64 #define qemu_ram_addr_from_host_nofail qemu_ram_addr_from_host_nofail_x86_64