mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
hostmem: add properties for NUMA memory policy
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [Raise errors on setting properties if !CONFIG_NUMA. Add BUILD_BUG_ON checks. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
dbcb898118
commit
4cf1b76bf1
3 changed files with 159 additions and 1 deletions
|
@ -12,10 +12,12 @@
|
|||
#ifndef QEMU_RAM_H
|
||||
#define QEMU_RAM_H
|
||||
|
||||
#include "sysemu/sysemu.h" /* for MAX_NODES */
|
||||
#include "qom/object.h"
|
||||
#include "qapi/error.h"
|
||||
#include "exec/memory.h"
|
||||
#include "qemu/option.h"
|
||||
#include "qemu/bitmap.h"
|
||||
|
||||
#define TYPE_MEMORY_BACKEND "memory-backend"
|
||||
#define MEMORY_BACKEND(obj) \
|
||||
|
@ -54,6 +56,8 @@ struct HostMemoryBackend {
|
|||
uint64_t size;
|
||||
bool merge, dump;
|
||||
bool prealloc, force_prealloc;
|
||||
DECLARE_BITMAP(host_nodes, MAX_NODES + 1);
|
||||
HostMemPolicy policy;
|
||||
|
||||
MemoryRegion mr;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue