mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-07 16:54:19 +00:00
Fix #1384: add missing decrement to calculation of socket-id
For calculation of "current_core" the input variable id is decremented.
For calculation of "current_socket" this decrement was missing resulting
in a wrong value when "cores" is set to 1.
Signed-off-by: Tobias Böhm <tb@robhost.de>
(cherry picked from commit 7032e08c85
)
This commit is contained in:
parent
5b794c373a
commit
5c5581d772
@ -1718,7 +1718,7 @@ sub print_cpu_device {
|
||||
my $cores = $conf->{cores} || 1;
|
||||
|
||||
my $current_core = ($id - 1) % $cores;
|
||||
my $current_socket = int(($id - $current_core)/$cores);
|
||||
my $current_socket = int(($id - 1 - $current_core)/$cores);
|
||||
|
||||
return "$cpu-x86_64-cpu,id=cpu$id,socket-id=$current_socket,core-id=$current_core,thread-id=0";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user