[libvirt] [PATCH 6/7] qemu: Format spapr-vio addresses as 32-bit

Andrea Bolognani abologna at redhat.com
Fri Jun 14 11:23:30 UTC 2019


No reason not to be consistent with the user-visible value.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 src/qemu/qemu_command.c                               | 2 +-
 tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args   | 2 +-
 tests/qemuxml2argvdata/pseries-vio-user-assigned.args | 2 +-
 tests/qemuxml2argvdata/pseries-vio.args               | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 59dc134785..9d4d0b8fc2 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -395,7 +395,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
         }
     } else if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO) {
         if (info->addr.spaprvio.has_reg)
-            virBufferAsprintf(buf, ",reg=0x%llx", info->addr.spaprvio.reg);
+            virBufferAsprintf(buf, ",reg=0x%08llx", info->addr.spaprvio.reg);
     } else if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
         if (info->addr.ccw.assigned)
             virBufferAsprintf(buf, ",devno=%x.%x.%04x",
diff --git a/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
index 6c2618ed61..7bf011fd5f 100644
--- a/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
@@ -30,7 +30,7 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -device lsi,id=scsi0,bus=pci.0,addr=0x2 \
 -device megasas,id=scsi1,bus=pci.0,addr=0x3 \
 -device mptsas1068,id=scsi2,bus=pci.0,addr=0x4 \
--device spapr-vscsi,id=scsi3,reg=0x2000 \
+-device spapr-vscsi,id=scsi3,reg=0x00002000 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
 -drive file=/tmp/scsidisk.img,format=raw,if=none,id=drive-scsi0-0-0 \
diff --git a/tests/qemuxml2argvdata/pseries-vio-user-assigned.args b/tests/qemuxml2argvdata/pseries-vio-user-assigned.args
index 534037607a..a412593c9a 100644
--- a/tests/qemuxml2argvdata/pseries-vio-user-assigned.args
+++ b/tests/qemuxml2argvdata/pseries-vio-user-assigned.args
@@ -23,7 +23,7 @@ server,nowait \
 -mon chardev=charmonitor,id=monitor,mode=control \
 -rtc base=utc \
 -no-shutdown \
--device spapr-vscsi,id=scsi0,reg=0x2000 \
+-device spapr-vscsi,id=scsi0,reg=0x00002000 \
 -device spapr-vscsi,id=scsi1,reg=0x30000000 \
 -usb \
 -drive file=/tmp/scsidisk.img,format=raw,if=none,id=drive-scsi1-0-0-0 \
diff --git a/tests/qemuxml2argvdata/pseries-vio.args b/tests/qemuxml2argvdata/pseries-vio.args
index 9d4f77b85e..a500e9b4b9 100644
--- a/tests/qemuxml2argvdata/pseries-vio.args
+++ b/tests/qemuxml2argvdata/pseries-vio.args
@@ -23,8 +23,8 @@ server,nowait \
 -mon chardev=charmonitor,id=monitor,mode=control \
 -rtc base=utc \
 -no-shutdown \
--device spapr-vscsi,id=scsi0,reg=0x2000 \
--device spapr-vscsi,id=scsi1,reg=0x3000 \
+-device spapr-vscsi,id=scsi0,reg=0x00002000 \
+-device spapr-vscsi,id=scsi1,reg=0x00003000 \
 -usb \
 -drive file=/tmp/scsidisk.img,format=raw,if=none,id=drive-scsi1-0-0-0 \
 -device scsi-hd,bus=scsi1.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi1-0-0-0,\
-- 
2.21.0




More information about the libvir-list mailing list