mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: domain: Add vcpu private data structure
Members will be added in follow-up patches.
This commit is contained in:
parent
5fe0b6b0a7
commit
2540c93203
@ -812,6 +812,46 @@ qemuDomainHostdevPrivateDispose(void *obj)
|
||||
}
|
||||
|
||||
|
||||
static virClassPtr qemuDomainVcpuPrivateClass;
|
||||
static void qemuDomainVcpuPrivateDispose(void *obj);
|
||||
|
||||
static int
|
||||
qemuDomainVcpuPrivateOnceInit(void)
|
||||
{
|
||||
qemuDomainVcpuPrivateClass = virClassNew(virClassForObject(),
|
||||
"qemuDomainVcpuPrivate",
|
||||
sizeof(qemuDomainVcpuPrivate),
|
||||
qemuDomainVcpuPrivateDispose);
|
||||
if (!qemuDomainVcpuPrivateClass)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainVcpuPrivate)
|
||||
|
||||
static virObjectPtr
|
||||
qemuDomainVcpuPrivateNew(void)
|
||||
{
|
||||
qemuDomainVcpuPrivatePtr priv;
|
||||
|
||||
if (qemuDomainVcpuPrivateInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(priv = virObjectNew(qemuDomainVcpuPrivateClass)))
|
||||
return NULL;
|
||||
|
||||
return (virObjectPtr) priv;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuDomainVcpuPrivateDispose(void *obj ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* qemuDomainSecretPlainSetup:
|
||||
* @conn: Pointer to connection
|
||||
* @secinfo: Pointer to secret info
|
||||
@ -1637,6 +1677,7 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
|
||||
.alloc = qemuDomainObjPrivateAlloc,
|
||||
.free = qemuDomainObjPrivateFree,
|
||||
.diskNew = qemuDomainDiskPrivateNew,
|
||||
.vcpuNew = qemuDomainVcpuPrivateNew,
|
||||
.hostdevNew = qemuDomainHostdevPrivateNew,
|
||||
.parse = qemuDomainObjPrivateXMLParse,
|
||||
.format = qemuDomainObjPrivateXMLFormat,
|
||||
|
@ -312,6 +312,19 @@ struct _qemuDomainDiskPrivate {
|
||||
# define QEMU_DOMAIN_HOSTDEV_PRIVATE(hostdev) \
|
||||
((qemuDomainHostdevPrivatePtr) (hostdev)->privateData)
|
||||
|
||||
|
||||
typedef struct _qemuDomainVcpuPrivate qemuDomainVcpuPrivate;
|
||||
typedef qemuDomainVcpuPrivate *qemuDomainVcpuPrivatePtr;
|
||||
struct _qemuDomainVcpuPrivate {
|
||||
virObject parent;
|
||||
|
||||
int dummy;
|
||||
};
|
||||
|
||||
# define QEMU_DOMAIN_VCPU_PRIVATE(vcpu) \
|
||||
((qemuDomainVcpuPrivatePtr) (vcpu)->privateData)
|
||||
|
||||
|
||||
struct qemuDomainDiskInfo {
|
||||
bool removable;
|
||||
bool locked;
|
||||
|
Loading…
x
Reference in New Issue
Block a user