diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6dba478900724d2f5e9de4ab3a69c0b155213446..9f34b7008b86316fbcfc59c1fa9d5c297c306be1 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8858,7 +8858,7 @@ virDomainControllerDefParseXML(virDomainXMLOption *xmlopt, unsigned long long bytes; if ((rc = virParseScaledValue("./pcihole64", NULL, ctxt, &bytes, 1024, - 1024ULL * ULONG_MAX, false)) < 0) + ULLONG_MAX, false)) < 0) return NULL; if (rc == 1) @@ -23589,8 +23589,8 @@ virDomainControllerDefFormat(virBuffer *buf, if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI && def->opts.pciopts.pcihole64) { - virBufferAsprintf(&childBuf, "%lu\n", def->opts.pciopts.pcihole64size); + virBufferAsprintf(&childBuf, "%llu\n", + def->opts.pciopts.pcihole64size); } virXMLFormatElement(buf, "controller", &attrBuf, &childBuf); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2b40515e772a3910cd71e6b04b9127a1e75d2394..d46d35ba7dfca8ca0a94a617ec4f24e328594f05 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -747,7 +747,7 @@ struct _virDomainVirtioSerialOpts { struct _virDomainPCIControllerOpts { bool pcihole64; - unsigned long pcihole64size; + unsigned long long pcihole64size; /* the exact controller name is in the "model" subelement, e.g.: * diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index bda7de7f64c6b76ca8f4e7528160969a4ebc25b2..8c68acb533bf1117e490c9d60dbf33dd4a79d3b9 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6431,7 +6431,7 @@ qemuBuildGlobalControllerCommandLine(virCommand *cmd, } virCommandAddArg(cmd, "-global"); - virCommandAddArgFormat(cmd, "%s.pci-hole64-size=%luK", hoststr, + virCommandAddArgFormat(cmd, "%s.pci-hole64-size=%lluK", hoststr, cont->opts.pciopts.pcihole64size); } }