mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-10 04:58:12 -05:00
conf: refactor checking for unsupported memory devices
Introduce a helper to check supported device and domain config and move the memory hotplug checks to it. The advantage of this approach is that by default all new features are considered unsupported by all hypervisors unless specifically changed rather than the previous approach where every hypervisor would need to declare that a given feature is unsupported.
This commit is contained in:
@@ -251,15 +251,11 @@ static char *vboxGenerateMediumName(PRUint32 storageBus,
|
||||
}
|
||||
|
||||
static int
|
||||
vboxDomainDefPostParse(virDomainDefPtr def,
|
||||
vboxDomainDefPostParse(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
virCapsPtr caps ATTRIBUTE_UNUSED,
|
||||
unsigned int parseFlags ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* memory hotplug tunables are not supported by this driver */
|
||||
if (virDomainDefCheckUnsupportedMemoryHotplug(def) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user