On 6/18/26 16:53, Martin Kletzander via Devel wrote:
From: Martin Kletzander <mkletzan@redhat.com>
The constants for maximum units on a bus are slightly tricky because for the narrow bus it does not need to account for the extra unit used by the controller, but the wide and super-wide ones need to.
With this patch a VMX with 64 disks on a pvscsi controller can be properly parsed.
To properly handle the maximum numbers one of the conditions also needs to be changed to not allow for units 16 and 65. This does not change various conditionals in XML parsing and VMX formatting as they need a significant rewrite. And since that is already working only with the wide scsi controller (and not the super-wide one) we leave that refactor for another day as it was done previously.
Tests show this is now possible and they fail before this change.
Resolves: https://redhat.atlassian.net/browse/RHEL-181350 Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/conf/domain_conf.h | 16 +- src/vmx/vmx.c | 2 +- tests/vmx2xmldata/esx-in-the-wild-11.xml | 2 +- tests/vmx2xmldata/scsi-driver-max.vmx | 50 +++ tests/vmx2xmldata/scsi-driver-max.xml | 95 +++++ .../vmx2xmldata/scsi-driver-superwide-max.vmx | 197 ++++++++++ .../vmx2xmldata/scsi-driver-superwide-max.xml | 340 ++++++++++++++++++ tests/vmx2xmltest.c | 2 + 8 files changed, 701 insertions(+), 3 deletions(-) create mode 100644 tests/vmx2xmldata/scsi-driver-max.vmx create mode 100644 tests/vmx2xmldata/scsi-driver-max.xml create mode 100644 tests/vmx2xmldata/scsi-driver-superwide-max.vmx create mode 100644 tests/vmx2xmldata/scsi-driver-superwide-max.xml
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal