[virt-tools-list] [PATCH] virt-manager : add support for architecture type "s390x"
Pavel Hrdina
phrdina at redhat.com
Fri Jul 10 12:53:46 UTC 2015
On Wed, Jul 08, 2015 at 09:48:42PM -0400, Kevin Zhao wrote:
> For architecture "s390x",the disk and the network device are based
> on "virtio" bus.The cdrom is based on "scsi".So set the default
> cdrom bus as "scsi",the default bus as "virtio".Also the default
> machine type is set to "s390-ccw-virtio" as it is the only supported
> in "s390x".
>
This is the same patch as the first one. Please fix the issues pointed out and
send the new patch as v2. To properly format the patch prefix, you can use:
git format-patch --subject-prefix "virt-manager PATCH v2" origin/master
In general, we put a space after dot, comma, semicolon, etc. This applies to
the whole patch including commit message. Please fix those in the v2. Before
you post the v2, try to run "python setup.py test" and "python setup.py pylint"
to not brake anything. The output has to be the same as running those commands
without your changes.
> Signed-off-by: Kevin Zhao <kevinzs at linux.vnet.ibm.com>
> ---
> virtManager/create.py | 4 ++--
> virtinst/capabilities.py | 4 ++++
> virtinst/devicedisk.py | 3 +++
> virtinst/guest.py | 2 ++
> virtinst/osxml.py | 3 +++
> 5 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/virtManager/create.py b/virtManager/create.py
> index 8401a7a..013a089 100644
> --- a/virtManager/create.py
> +++ b/virtManager/create.py
> @@ -409,7 +409,7 @@ class vmmCreate(vmmGObjectUI):
> can_remote_url = self.conn.get_backend().support_remote_url_install()
>
> installable_arch = (self.capsinfo.arch in
> - ["i686", "x86_64", "ppc64", "ppc64le", "ia64"])
> + ["i686", "x86_64", "ppc64", "ppc64le", "ia64","s390x"])
There should be a space after comma.
>
> if self.capsinfo.arch == "aarch64":
> try:
> @@ -676,7 +676,7 @@ class vmmCreate(vmmGObjectUI):
> archs.remove("i686")
> archs.sort()
>
> - prios = ["x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le"]
> + prios = ["x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le","s390x"]
Same here.
> if self.conn.caps.host.cpu.arch not in prios:
> prios = []
> else:
> diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py
> index bed8596..5823da2 100644
> --- a/virtinst/capabilities.py
> +++ b/virtinst/capabilities.py
> @@ -323,6 +323,10 @@ class _CapsInfo(object):
> if "vexpress-a15" in self.machines:
> return "vexpress-a15"
>
> + if self.arch in ["s390x"]:
> + if "s390-ccw-virtio" in self.machines:
> + return "s390-ccw-virtio"
> +
> return None
>
>
> diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py
> index 6ca76e5..d2b3443 100644
> --- a/virtinst/devicedisk.py
> +++ b/virtinst/devicedisk.py
> @@ -896,6 +896,9 @@ class VirtualDisk(VirtualDevice):
> def set_defaults(self, guest):
> if self.is_cdrom():
> self.read_only = True
> +
Extra spaces, please remove them, only new line should be there.
> + if self.is_cdrom() and guest.os.is_s390x():
> + self.bus = "scsi"
>
> if (guest.os.is_xenpv() and
> self.type == VirtualDisk.TYPE_FILE and
> diff --git a/virtinst/guest.py b/virtinst/guest.py
> index bf4b70b..c958068 100644
> --- a/virtinst/guest.py
> +++ b/virtinst/guest.py
> @@ -987,6 +987,8 @@ class Guest(XMLBuilder):
> d.bus = "sd"
> elif self.os.is_q35():
> d.bus = "sata"
> + elif self.os.is_s390x():
> + d.bus = "virtio"
> else:
> d.bus = "ide"
>
> diff --git a/virtinst/osxml.py b/virtinst/osxml.py
> index 77771bd..7ba20e4 100644
> --- a/virtinst/osxml.py
> +++ b/virtinst/osxml.py
> @@ -70,6 +70,9 @@ class OSXML(XMLBuilder):
> return self.arch == "ppc64" or self.arch == "ppc64le"
> def is_pseries(self):
> return self.is_ppc64() and self.machine == "pseries"
> +
Another extra spaces, please also remove them.
> + def is_s390x(self):
> + return self.arch == "s390x"
>
> _XML_ROOT_NAME = "os"
> _XML_PROP_ORDER = ["arch", "os_type", "loader", "loader_ro", "loader_type",
> --
> 1.8.3.1
Pavel
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
More information about the virt-tools-list
mailing list