mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu_command: Generate mem-reserve for controllers
Pretty straightforward. Just put mem-reserve attribute whenever it's set. Previous commit ensures it's set only for valid controller models. Resolves: https://issues.redhat.com/browse/RHEL-7461 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
772e33487a
commit
c38720b337
@ -2776,6 +2776,7 @@ qemuBuildControllerPCIDevProps(virDomainControllerDef *def,
|
||||
if (virJSONValueObjectAdd(&props,
|
||||
"s:driver", modelName,
|
||||
"i:chassis_nr", pciopts->chassisNr,
|
||||
"P:mem-reserve", pciopts->memReserve * 1024,
|
||||
"s:id", def->info.alias,
|
||||
NULL) < 0)
|
||||
return -1;
|
||||
@ -2816,6 +2817,7 @@ qemuBuildControllerPCIDevProps(virDomainControllerDef *def,
|
||||
"i:chassis", pciopts->chassis,
|
||||
"s:id", def->info.alias,
|
||||
"T:hotplug", pciopts->hotplug,
|
||||
"P:mem-reserve", pciopts->memReserve * 1024,
|
||||
NULL) < 0)
|
||||
return -1;
|
||||
|
||||
@ -2824,6 +2826,7 @@ qemuBuildControllerPCIDevProps(virDomainControllerDef *def,
|
||||
if (virJSONValueObjectAdd(&props,
|
||||
"s:driver", modelName,
|
||||
"i:index", pciopts->targetIndex,
|
||||
"P:mem-reserve", pciopts->memReserve * 1024,
|
||||
"s:id", def->info.alias,
|
||||
NULL) < 0)
|
||||
return -1;
|
||||
|
@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-q35-test/.config \
|
||||
-no-shutdown \
|
||||
-boot strict=on \
|
||||
-device '{"driver":"i82801b11-bridge","id":"pci.1","bus":"pcie.0","addr":"0x1e"}' \
|
||||
-device '{"driver":"pci-bridge","chassis_nr":56,"id":"pci.2","bus":"pci.1","addr":"0x0"}' \
|
||||
-device '{"driver":"pci-bridge","chassis_nr":56,"mem-reserve":8392704,"id":"pci.2","bus":"pci.1","addr":"0x0"}' \
|
||||
-device '{"driver":"ich9-usb-ehci1","id":"usb","bus":"pcie.0","addr":"0x1d.0x7"}' \
|
||||
-device '{"driver":"ich9-usb-uhci1","masterbus":"usb.0","firstport":0,"bus":"pcie.0","multifunction":true,"addr":"0x1d"}' \
|
||||
-device '{"driver":"ich9-usb-uhci2","masterbus":"usb.0","firstport":2,"bus":"pcie.0","addr":"0x1d.0x1"}' \
|
||||
|
Loading…
Reference in New Issue
Block a user