mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-03 15:45:49 +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}) {
|
||||
my $ivshmem = PVE::JSONSchema::parse_property_string($ivshmem_fmt, $conf->{ivshmem});
|
||||
|
||||
my $bus;
|
||||
if ($q35) {
|
||||
$bus = print_pcie_addr("ivshmem");
|
||||
} else {
|
||||
$bus = print_pci_addr("ivshmem", $bridges, $arch, $machine_type);
|
||||
}
|
||||
my $path = '/dev/shm/pve-shm-';
|
||||
if ($ivshmem->{name}) {
|
||||
$path .= $ivshmem->{name};
|
||||
} else {
|
||||
$path .= $vmid;
|
||||
}
|
||||
|
||||
my $ivshmem_name = $ivshmem->{name} // $vmid;
|
||||
my $path = '/dev/shm/pve-shm-' . $ivshmem_name;
|
||||
|
||||
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";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user