Skip to contentSkip to conversation

Arch info lost in "info cpus"

DISCUSSION Sergio Lopez 5 participants 9 messages Sep 30, 2019 – Oct 2, 2019

lore
Share & tools
lore
#0 lore raw

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

Thanks,
Sergio.

#1 lore raw
Quoted 7 lines · * Sergio Lopez ([email protected]) wrote:

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

Quoted 6 lines

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

Even the qemp equivalent, query-cpus is deprecated. (Although we do call the underlying query-cpus in 'info numa' as well)

Dave

Quoted 2 lines

Thanks,
Sergio.

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#5 lore raw
In reply to Sergio Lopez
Quoted 10 lines · Sergio Lopez

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

You can always enable the gdbserver from the HMP when you need it.

Quoted 2 lines

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

info registers

should give you a full dump of the CPU state including the PC.

Quoted 3 lines

Thanks,
Sergio.

--
Alex Bennée

#6 lore raw
Quoted 13 lines · Alex Bennée
Quoted 10 lines · Sergio Lopez

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

Quoted 9 lines

You can always enable the gdbserver from the HMP when you need it.

Quoted 2 lines

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

info registers

should give you a full dump of the CPU state including the PC.

Both methods are less convenient that what we had before. Perhaps it'd be reasonable adding a flag to "info cpus" to give users the options of having the same behavior as before?

Thanks,
Sergio.

#2 lore raw
In reply to Dr. David Alan Gilbert
Quoted 8 lines · Dr. David Alan Gilbert
Quoted 7 lines · * Sergio Lopez ([email protected]) wrote:

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

Quoted 8 lines
Quoted 6 lines

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

Even the qemp equivalent, query-cpus is deprecated. (Although we do call the underlying query-cpus in 'info numa' as well)

This obviously went by unnoticed back then. Query-cpus-fast should serve the same purpose as query-cpus there, being less intrusive on the VM and allow to complete the deprecation process, if this is still wanted. If not, adding an option that lets hmp 'info cpus' call the old API doesn't seem unreasonable.

Quoted 9 lines

Dave

Quoted 2 lines

Thanks,
Sergio.

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

Signature · 2 lines
Kind Regards,
   Viktor
#7 lore raw
In reply to Sergio Lopez
Quoted 21 lines · Sergio Lopez
Quoted 18 lines · Alex Bennée
Quoted 10 lines · Sergio Lopez

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

You can always enable the gdbserver from the HMP when you need it.

Quoted 2 lines

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

Quoted 8 lines
Quoted 4 lines

info registers

should give you a full dump of the CPU state including the PC.

Both methods are less convenient that what we had before. Perhaps it'd be reasonable adding a flag to "info cpus" to give users the options of having the same behavior as before?

Is "info registers -a" less convenient because it prints too much information, or because it doesn't print the active CPU indicator and thread_id?

Signature · 1 line
Eduardo
#8 lore raw
Quoted 27 lines · Eduardo Habkost
Quoted 26 lines · Sergio Lopez
Quoted 22 lines · Alex Bennée
Quoted 10 lines · Sergio Lopez

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

You can always enable the gdbserver from the HMP when you need it.

Quoted 2 lines

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

info registers

should give you a full dump of the CPU state including the PC.

Quoted 7 lines
Quoted 3 lines

Both methods are less convenient that what we had before. Perhaps it'd be reasonable adding a flag to "info cpus" to give users the options of having the same behavior as before?

Is "info registers -a" less convenient because it prints too much information, or because it doesn't print the active CPU indicator and thread_id?

A bit of both. Previously, "info cpus" gave you the PC, thread_id, and whether the CPU is halted or not, which is just enough information to have an initial idea of the VM's and Guest's status at a quick glance. You can even call it multiple times to see how the CPUs were progressing. This came specially useful when debugging boot hangs.

I mean, as for myself, I can definitely work with "info registers -a". But I would find hard explaining users why the original functionality of "info cpus" was lost.

Cheers,
Sergio.

#3 lore raw
In reply to Dr. David Alan Gilbert
Quoted 12 lines · Dr. David Alan Gilbert
Quoted 11 lines · * Sergio Lopez ([email protected]) wrote:

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

Quoted 5 lines
Quoted 2 lines

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

Even the qemp equivalent, query-cpus is deprecated. (Although we do call the underlying query-cpus in 'info numa' as well)

Why exactly it has to be deprecated? We have use cases that require query-cpus-fast to exist, but I don't see why the existence of a command that returns extended information is a bad thing.

Having a command that synchronizes CPU state is even a requirement if we want to eventually implement "info registers" using QMP.

Signature · 1 line
Eduardo
#4 lore raw
Quoted 19 lines · * Eduardo Habkost ([email protected]) wrote:
Quoted 12 lines · Dr. David Alan Gilbert
Quoted 11 lines · * Sergio Lopez ([email protected]) wrote:

Hi,

Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to make it more lightweight, but also removed the ability to get the architecture specific status of each vCPU.

This information was really useful to diagnose certain Guest issues, without the need of using GDB, which is more intrusive and requires enabling it in advance.

Quoted 5 lines
Quoted 2 lines

Is there an alternative way of getting something equivalent to what "info cpus" provided previously (in 2.10)?

Even the qemp equivalent, query-cpus is deprecated. (Although we do call the underlying query-cpus in 'info numa' as well)

Quoted 8 lines

Why exactly it has to be deprecated? We have use cases that require query-cpus-fast to exist, but I don't see why the existence of a command that returns extended information is a bad thing.

Having a command that synchronizes CPU state is even a requirement if we want to eventually implement "info registers" using QMP.

Yes, agreed; it was useful to have the non-syncing version but I don't see a reason to remove the full-fat version.

Dave

Quoted 2 lines
Signature · 1 line
Eduardo

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK