mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
system: Declare qemu_[min/max]rampagesize() in 'system/hostmem.h'
Both qemu_minrampagesize() and qemu_maxrampagesize() are related to host memory backends, having the following call stack: qemu_minrampagesize() -> find_min_backend_pagesize() -> object_dynamic_cast(obj, TYPE_MEMORY_BACKEND) qemu_maxrampagesize() -> find_max_backend_pagesize() -> object_dynamic_cast(obj, TYPE_MEMORY_BACKEND) Having TYPE_MEMORY_BACKEND defined in "system/hostmem.h": include/system/hostmem.h:23:#define TYPE_MEMORY_BACKEND "memory-backend" Move their prototype declaration to "system/hostmem.h". Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Eric Auger <eric.auger@redhat.com> Message-Id: <20250308230917.18907-7-philmd@linaro.org> Acked-by: David Hildenbrand <david@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250311085743.21724-2-philmd@linaro.org Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
cbb2e10526
commit
c6cd30fead
5 changed files with 6 additions and 3 deletions
|
@ -34,6 +34,7 @@
|
||||||
#include "kvm_ppc.h"
|
#include "kvm_ppc.h"
|
||||||
#include "migration/vmstate.h"
|
#include "migration/vmstate.h"
|
||||||
#include "system/tcg.h"
|
#include "system/tcg.h"
|
||||||
|
#include "system/hostmem.h"
|
||||||
|
|
||||||
#include "hw/ppc/spapr.h"
|
#include "hw/ppc/spapr.h"
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "hw/s390x/tod.h"
|
#include "hw/s390x/tod.h"
|
||||||
#include "system/system.h"
|
#include "system/system.h"
|
||||||
#include "system/cpus.h"
|
#include "system/cpus.h"
|
||||||
|
#include "system/hostmem.h"
|
||||||
#include "target/s390x/kvm/pv.h"
|
#include "target/s390x/kvm/pv.h"
|
||||||
#include "migration/blocker.h"
|
#include "migration/blocker.h"
|
||||||
#include "qapi/visitor.h"
|
#include "qapi/visitor.h"
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <linux/kvm.h>
|
#include <linux/kvm.h>
|
||||||
#endif
|
#endif
|
||||||
#include "system/kvm.h"
|
#include "system/kvm.h"
|
||||||
|
#include "system/hostmem.h"
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
|
|
||||||
#include "hw/vfio/vfio-common.h"
|
#include "hw/vfio/vfio-common.h"
|
||||||
|
|
|
@ -102,9 +102,6 @@ static inline unsigned long int ramblock_recv_bitmap_offset(void *host_addr,
|
||||||
|
|
||||||
bool ramblock_is_pmem(RAMBlock *rb);
|
bool ramblock_is_pmem(RAMBlock *rb);
|
||||||
|
|
||||||
long qemu_minrampagesize(void);
|
|
||||||
long qemu_maxrampagesize(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qemu_ram_alloc_from_file,
|
* qemu_ram_alloc_from_file,
|
||||||
* qemu_ram_alloc_from_fd: Allocate a ram block from the specified backing
|
* qemu_ram_alloc_from_fd: Allocate a ram block from the specified backing
|
||||||
|
|
|
@ -93,4 +93,7 @@ bool host_memory_backend_is_mapped(HostMemoryBackend *backend);
|
||||||
size_t host_memory_backend_pagesize(HostMemoryBackend *memdev);
|
size_t host_memory_backend_pagesize(HostMemoryBackend *memdev);
|
||||||
char *host_memory_backend_get_name(HostMemoryBackend *backend);
|
char *host_memory_backend_get_name(HostMemoryBackend *backend);
|
||||||
|
|
||||||
|
long qemu_minrampagesize(void);
|
||||||
|
long qemu_maxrampagesize(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue