Skip to contentSkip to conversation

init-dom0less: Weird use of cpupool in xl dominfo

DISCUSSION Amneesh Singh 3 participants 3 messages Jul 31, 2024

lore
Share & tools
lore
#0 lore raw

Hello, I was going through the source code for init-dom0less as I was facing some issue after applying this patchset. Feel free to ignore it however, as it seems unrelated to the issue I am encountering.

https://lists.xenproject.org/archives/html/xen-devel/2024-05/msg01825.html

One peculiar thing I noticed was that the "cpupool" field is being used as a bitfield to check individual vCPUs. However afaik, "cpupool" is supposed to be the cpupool *ID*. That matches the fact that the cpupool value for all my VMs is 0, as I only have a single cpupool (id = 0). Am I overlooking something, or am I correct? Here is the relevant code:

https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/helpers/init-dom0less.c;h=fee93459c4b9da59446a2f8dfcf5cbfc4d95aeab;hb=HEAD#l176

Regards
Amneesh

#1 lore raw
Quoted 6 lines · Amneesh Singh

Hello, I was going through the source code for init-dom0less as I was facing some issue after applying this patchset. Feel free to ignore it however, as it seems unrelated to the issue I am encountering.

https://lists.xenproject.org/archives/html/xen-devel/2024-05/msg01825.html

Quoted 7 lines

One peculiar thing I noticed was that the "cpupool" field is being used as a bitfield to check individual vCPUs. However afaik, "cpupool" is supposed to be the cpupool *ID*. That matches the fact that the cpupool value for all my VMs is 0, as I only have a single cpupool (id = 0). Am I overlooking something, or am I correct? Here is the relevant code:

https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/helpers/init-dom0less.c;h=fee93459c4b9da59446a2f8dfcf5cbfc4d95aeab;hb=HEAD#l176

CC'ing relevant people.

But yes - that looks distinctly wrong.

~Andrew

#2 lore raw
Quoted 13 lines · Andrew Cooper
Quoted 12 lines · Amneesh Singh

Hello, I was going through the source code for init-dom0less as I was facing some issue after applying this patchset. Feel free to ignore it however, as it seems unrelated to the issue I am encountering.

https://lists.xenproject.org/archives/html/xen-devel/2024-05/msg01825.html

One peculiar thing I noticed was that the "cpupool" field is being used as a bitfield to check individual vCPUs. However afaik, "cpupool" is supposed to be the cpupool *ID*. That matches the fact that the cpupool value for all my VMs is 0, as I only have a single cpupool (id = 0). Am I overlooking something, or am I correct? Here is the relevant code:

Quoted 5 lines
Quoted 1 line

https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/helpers/init-dom0less.c;h=fee93459c4b9da59446a2f8dfcf5cbfc4d95aeab;hb=HEAD#l176

CC'ing relevant people.

But yes - that looks distinctly wrong.

It _is_ wrong.

Juergen