aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Denemark <jdenemar@redhat.com>2012-08-17 14:06:13 +0200
committerJiri Denemark <jdenemar@redhat.com>2012-08-17 21:26:53 +0200
commitd4134642295210b00fe79adacbe10e86961e88a7 (patch)
tree88ed8cc47f3768238f9cc3217e78e83432f0df24 /src/conf/domain_conf.c
parentnetwork: add support for setting VLANs on Open vSwitch ports (diff)
downloadlibvirt-d4134642295210b00fe79adacbe10e86961e88a7.tar.gz
libvirt-d4134642295210b00fe79adacbe10e86961e88a7.tar.bz2
libvirt-d4134642295210b00fe79adacbe10e86961e88a7.zip
conf: Fix ABI stability check for spicevmc channel
Change device type of a virtio channel from/to spicevmc is not a user visible change. However, spicevmc channels use different default target name than other virtio channels. To maintain ABI stability during this change target name must be explicitly specified (and equal) in both configurations.
Diffstat (limited to 'src/conf/domain_conf.c')
-rw-r--r--src/conf/domain_conf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a2e73c69a..a330b0e3a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10075,6 +10075,15 @@ static bool virDomainChannelDefCheckABIStability(virDomainChrDefPtr src,
NULLSTR(dst->target.name), NULLSTR(src->target.name));
goto cleanup;
}
+ if (src->source.type != dst->source.type &&
+ (src->source.type == VIR_DOMAIN_CHR_TYPE_SPICEVMC ||
+ dst->source.type == VIR_DOMAIN_CHR_TYPE_SPICEVMC) &&
+ !src->target.name) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Changing device type to/from spicevmc would"
+ " change default target channel name"));
+ goto cleanup;
+ }
break;
case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD:
if (memcmp(src->target.addr, dst->target.addr,