[libvirt] [PATCH 4/6] Support all backend serial devices for pSeries guest

Daniel P. Berrange berrange at redhat.com
Thu Dec 20 10:29:53 UTC 2012


On Thu, Dec 20, 2012 at 02:02:25PM +0800, Li Zhang wrote:
> From: Li Zhang <zhlcindy at linux.vnet.ibm.com>
> 
> Currently, it only considers PTY backend serial devices for pseries.
> It need to support all kinds of serial devices.
> 
> This patch is to fix the problem which is that it doesn't work
> when specifying source type as file.
> 
> Signed-off-by: Li Zhang <zhlcindy at linux.vnet.ibm.com>
> ---
>  src/qemu/qemu_command.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 6a90ed5..f769dc6 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -923,7 +923,6 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
>  
>      for (i = 0 ; i < def->nserials; i++) {
>          if (def->serials[i]->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
> -            def->serials[i]->source.type == VIR_DOMAIN_CHR_TYPE_PTY &&
>              (def->os.arch == VIR_ARCH_PPC64) &&
>              STREQ(def->os.machine, "pseries"))
>              def->serials[i]->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
> @@ -6975,7 +6974,6 @@ qemuBuildChrDeviceStr(virDomainChrDefPtr serial,
>  
>      if ((arch == VIR_ARCH_PPC64) && STREQ(machine, "pseries")) {
>          if (serial->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
> -            serial->source.type == VIR_DOMAIN_CHR_TYPE_PTY &&
>              serial->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO) {
>              virBufferAsprintf(&cmd, "spapr-vty,chardev=char%s",
>                                serial->info.alias);

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list