mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
hostmem: separate allocation from UserCreatable complete method
This allows the superclass to set various policies on the memory region that the subclass creates. Drops hostmem-ram's complete method accordingly. Signed-off-by: Paolo Bonzini <pbonzini@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
58f4662c6c
commit
bd9262d95f
3 changed files with 25 additions and 4 deletions
|
@ -34,6 +34,8 @@ typedef struct HostMemoryBackendClass HostMemoryBackendClass;
|
|||
*/
|
||||
struct HostMemoryBackendClass {
|
||||
ObjectClass parent_class;
|
||||
|
||||
void (*alloc)(HostMemoryBackend *backend, Error **errp);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue