提交 c9ab24ce 编写于 作者: L Liran Alon 提交者: Paolo Bonzini

hw/i386/vmport: Add device properties

No functional change.

This is done as a preparation for the following patches that will
introduce several device properties.
Reviewed-by: NNikita Leshenko <nikita.leshchenko@oracle.com>
Signed-off-by: NLiran Alon <liran.alon@oracle.com>
Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200312165431.82118-3-liran.alon@oracle.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 29282253
......@@ -30,6 +30,7 @@
#include "qemu/osdep.h"
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "sysemu/hw_accel.h"
#include "qemu/log.h"
#include "vmport.h"
......@@ -140,6 +141,10 @@ static void vmport_realizefn(DeviceState *dev, Error **errp)
vmport_register(VMPORT_CMD_GETRAMSIZE, vmport_cmd_ram_size, NULL);
}
static Property vmport_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
static void vmport_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
......@@ -147,6 +152,7 @@ static void vmport_class_initfn(ObjectClass *klass, void *data)
dc->realize = vmport_realizefn;
/* Reason: realize sets global port_state */
dc->user_creatable = false;
device_class_set_props(dc, vmport_properties);
}
static const TypeInfo vmport_info = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册