Skip to content

Commit

Permalink
Add device address parameter for s390x
Browse files Browse the repository at this point in the history
Signed-off-by: Xujun Ma <xuma@redhat.com>
  • Loading branch information
maxujun committed Oct 8, 2024
1 parent e69c15e commit bfd86ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions virttest/qemu_devices/qcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2472,7 +2472,7 @@ def define_hbas(
if scsi_hba == "virtio-scsi-device":
pci_bus = {"type": "virtio-bus"}
elif scsi_hba == "virtio-scsi-ccw":
pci_bus = None
pci_bus = {'aobject': 'virtual-css'}
elif scsi_hba == "spapr-vscsi":
addr_spec = [64, 32]
pci_bus = None
Expand Down Expand Up @@ -3132,7 +3132,7 @@ def serials_define_by_variables(
if bus_type == "virtio-serial-device":
pci_bus = {"type": "virtio-bus"}
elif bus_type == "virtio-serial-ccw":
pci_bus = None
pci_bus = {'aobject': 'virtual-css'}
else:
pci_bus = {"aobject": "pci.0"}
if bus != "<new>":
Expand Down
7 changes: 5 additions & 2 deletions virttest/qemu_devices/qdevices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3080,10 +3080,13 @@ class QNoAddrCustomBus(QSparseBus):
"""

def _set_device_props(self, device, addr):
pass
if self.aobject == "virtual-css":
device.set_param("devno", "fe.0.%s" % f"{addr[0]:04x}")
else:
pass

def _update_device_props(self, device, addr):
pass
self._set_device_props(device, addr)


class QUSBBus(QSparseBus):
Expand Down

0 comments on commit bfd86ab

Please sign in to comment.