mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-07 13:20:08 +00:00
ivmshmem: follouwp code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6dbcb07367
commit
e3c27a6afe
@ -3933,18 +3933,17 @@ sub config_to_command {
|
|||||||
|
|
||||||
if ($conf->{ivshmem}) {
|
if ($conf->{ivshmem}) {
|
||||||
my $ivshmem = PVE::JSONSchema::parse_property_string($ivshmem_fmt, $conf->{ivshmem});
|
my $ivshmem = PVE::JSONSchema::parse_property_string($ivshmem_fmt, $conf->{ivshmem});
|
||||||
|
|
||||||
my $bus;
|
my $bus;
|
||||||
if ($q35) {
|
if ($q35) {
|
||||||
$bus = print_pcie_addr("ivshmem");
|
$bus = print_pcie_addr("ivshmem");
|
||||||
} else {
|
} else {
|
||||||
$bus = print_pci_addr("ivshmem", $bridges, $arch, $machine_type);
|
$bus = print_pci_addr("ivshmem", $bridges, $arch, $machine_type);
|
||||||
}
|
}
|
||||||
my $path = '/dev/shm/pve-shm-';
|
|
||||||
if ($ivshmem->{name}) {
|
my $ivshmem_name = $ivshmem->{name} // $vmid;
|
||||||
$path .= $ivshmem->{name};
|
my $path = '/dev/shm/pve-shm-' . $ivshmem_name;
|
||||||
} else {
|
|
||||||
$path .= $vmid;
|
|
||||||
}
|
|
||||||
push @$devices, '-device', "ivshmem-plain,memdev=ivshmem$bus,";
|
push @$devices, '-device', "ivshmem-plain,memdev=ivshmem$bus,";
|
||||||
push @$devices, '-object', "memory-backend-file,id=ivshmem,share=on,mem-path=$path,size=$ivshmem->{size}M";
|
push @$devices, '-object', "memory-backend-file,id=ivshmem,share=on,mem-path=$path,size=$ivshmem->{size}M";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user