
On 11/09/2012 08:00 AM, Viktor Mihajlovski wrote:
For S390, the default console target type cannot be of type 'serial'. It is necessary to at least interpret the 'arch' attribute value of the os/type element to produce the correct default type.
Therefore we need to extend the signature of defaultConsoleTargetType to account for architecture. As a consequence all the drivers supporting this capability function must be updated.
Despite the amount of changed files, the only change in behavior is that for S390 the default console target type will be 'virtio'.
Makes sense.
N.B.: A more future-proof approach could be to to use hypervisor specific capabilities to determine the best possible console type. For instance one could add an opaque private data pointer to the virCaps structure (in case of QEMU to hold capsCache) which could then be passed to the defaultConsoleTargetType callback to determine the console target type. Seems to be however a bit overengineered for the use case...
And we can always make that change in the future if it proves necessary, so I agree with your approach of the simpler change for now.
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com> --- src/conf/capabilities.h | 2 +- src/conf/domain_conf.c | 2 +- src/esx/esx_driver.c | 3 ++- src/libxl/libxl_conf.c | 3 ++- src/lxc/lxc_conf.c | 3 ++- src/openvz/openvz_conf.c | 3 ++- src/parallels/parallels_driver.c | 3 ++- src/phyp/phyp_driver.c | 3 ++- src/qemu/qemu_capabilities.c | 8 ++++++-- src/security/virt-aa-helper.c | 3 ++- src/test/test_driver.c | 3 ++- src/uml/uml_conf.c | 3 ++- src/vbox/vbox_tmpl.c | 3 ++- src/vmware/vmware_conf.c | 3 ++- src/xen/xen_hypervisor.c | 3 ++- src/xenapi/xenapi_driver.c | 3 ++- tests/testutilslxc.c | 3 ++- tests/testutilsqemu.c | 8 ++++++-- tests/testutilsxen.c | 3 ++- tests/vmx2xmltest.c | 3 ++- tests/xml2vmxtest.c | 3 ++- 21 files changed, 48 insertions(+), 23 deletions(-)
ACK and pushed. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org