Skip to contentSkip to conversation

kvm: add kvm version to the "info kvm" monitor command

PATCH In review Bjørn Mork 4 participants 6 messages Jul 29, 2009 – Jul 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: add kvm version to the "info kvm" monitor command

There isn't a one-to-one mapping between the KVM version and the QEMU version output from "info version". Complete the picture by adding the KVM version to the existing "info kvm" monitor command.

(qemu) info kvm
kvm support: enabled
kvm version: kvm-85

---
 monitor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
monitor.c +1 -0
index 99c174c..53463e9 100644
@@ -1428,6 +1428,7 @@ static void do_info_kvm(Monitor *mon)
         monitor_printf(mon, "enabled\n");
     else
         monitor_printf(mon, "disabled\n");
+    monitor_printf(mon, "kvm version: "  KVM_VERSION "\n");
 #else
     monitor_printf(mon, "kvm support: not compiled\n");
 #endif
Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 8 lines · On Wed, 29 Jul 2009 13:03:38 +0200 Bjørn Mork <[email protected]> wrote:

There isn't a one-to-one mapping between the KVM version and the QEMU version output from "info version". Complete the picture by adding the KVM version to the existing "info kvm" monitor command.

(qemu) info kvm
kvm support: enabled
kvm version: kvm-85

Doesn't seem a good idea, as this is considered a stable protocol.

Either, we should check current users or add 'info kvm-version'.

#2 lore raw
Quoted 8 lines · Luiz Capitulino
Quoted 5 lines · On Wed, 29 Jul 2009 13:03:38 +0200 Bjørn Mork <[email protected]> wrote:

There isn't a one-to-one mapping between the KVM version and the QEMU version output from "info version".  Complete the picture by adding the KVM version to the existing "info kvm" monitor command.

Quoted 7 lines
Quoted 3 lines

 (qemu) info kvm
 kvm support: enabled
 kvm version: kvm-85

 Doesn't seem a good idea, as this is considered a stable protocol.

 Either, we should check current users or add 'info kvm-version'.

can't see why. We recently added information to info migrate, and many others. If we are using a new line, shouldn't matter, since it is expected that parsers for those things would be line based.

Not only I'd like to see this, I would also like to see information of kvm itself being
more verbose, like whether or not we have in kernel irqchip/pit

Signature · 5 lines
Glauber  Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."
#3 lore raw
Quoted 13 lines · On Wed, 29 Jul 2009 17:48:13 -0300 Glauber Costa <[email protected]> wrote:
Quoted 12 lines · Luiz Capitulino
Quoted 8 lines · On Wed, 29 Jul 2009 13:03:38 +0200 Bjørn Mork <[email protected]> wrote:

There isn't a one-to-one mapping between the KVM version and the QEMU version output from "info version".  Complete the picture by adding the KVM version to the existing "info kvm" monitor command.

 (qemu) info kvm
 kvm support: enabled
 kvm version: kvm-85

Quoted 7 lines
Quoted 3 lines

 Doesn't seem a good idea, as this is considered a stable protocol.

 Either, we should check current users or add 'info kvm-version'.

can't see why. We recently added information to info migrate, and many others. If we are using a new line, shouldn't matter, since it is expected that parsers for those things would be line based.

I don't think this is a safe assumption if you take it literally
for all the commands. If I remember correctly, libvirt for example, expects the string '(qemu)' as a meaning of 'command executed', in this case anything different could cause problems.

I would have to check the code to be certain, though. But will
not matter anyway, if 'info kvm' has no users.

Quoted 3 lines

Not only I'd like to see this, I would also like to see information of kvm itself being
more verbose, like whether or not we have in kernel irqchip/pit

Yes, this is really useful. I'm just concerned with current
users and when I started working on the monitor protocol people have clearly expressed their concern on not changing commands output.

I also should add that I would be extremely happy to find out
that monitor's output could be changed. :)

#4 lore raw
In reply to Bjørn Mork
Quoted 9 lines · Bjørn Mork

There isn't a one-to-one mapping between the KVM version and the QEMU version output from "info version". Complete the picture by adding the KVM version to the existing "info kvm" monitor command.

(qemu) info kvm
kvm support: enabled
kvm version: kvm-85

info version will tell you the kvm version.

Regards,

Anthony Liguori

#5 lore raw
Quoted 6 lines · Anthony Liguori
Quoted 5 lines · Bjørn Mork

There isn't a one-to-one mapping between the KVM version and the QEMU version output from "info version". Complete the picture by adding the KVM version to the existing "info kvm" monitor command.

Quoted 6 lines
Quoted 4 lines

(qemu) info kvm
kvm support: enabled
kvm version: kvm-85

info version will tell you the kvm version.

It will? Ah, right. I see that QEMU_PKGVERSION has been added to it.

Weird. I did attempt to add the KVM version to "info version" a while ago, but this was (rightfully) rejected due to the monitor command stability requirements and the fact that it would affect non-KVM usage too.

Well, I guess my extended usage of "info kvm" isn't necessary anymore. But it would IMHO still be useful to define the ouput as a variable number of lines of 'name: value' sets. I realise that we can't know for sure that this won't break any parser anywhere, but such bugs should be fairly easy to fix for those affected, if anyone.

Bjørn