kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/1] qapi: introduce 'query-cpu-model-cpuid' action
@ 2021-05-04 12:26 Valeriy Vdovin
  2021-05-04 12:26 ` [PATCH v7 1/1] " Valeriy Vdovin
  0 siblings, 1 reply; 4+ messages in thread
From: Valeriy Vdovin @ 2021-05-04 12:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Marcel Apfelbaum, Eric Blake, Markus Armbruster,
	Paolo Bonzini, Marcelo Tosatti, Richard Henderson, Thomas Huth,
	Laurent Vivier, kvm, Denis Lunev, Vladimir Sementsov-Ogievskiy,
	Valeriy Vdovin

In version 7 of the subject patch, I wanted to try to implement this qmp
method with the help of existing kvm ioctl KVM_GET_CPUID2. The reasoning
behind my decision is the fact that QEMU uses KVM_SET_CPUID2 to set full
cpuid response table to the virtual cpu, and KVM_GET_CPUID2 is a convenient
and complementary method for extracting the same cpuid entry table back
from the kernel.

So I've pushed a patch into Linux KVM subtree to fine tune ioctl
KVM_GET_CPUID2 for this type of application. This has triggered a small
One of the responses here https://lkml.org/lkml/2021/5/4/109 is from
Paolo Bonzini. There he suggests to cache the the whole cpuid entries
table that we pass to the kernel via KVM_SET_CPUID2 and later just output
this cached data instead of calling the same table via KVM_GET_CPUID2.
Current patch is the reflection of that idea.

Valeriy Vdovin (1):
  qapi: introduce 'query-cpu-model-cpuid' action

 qapi/machine-target.json   | 51 ++++++++++++++++++++++++++++++++++++++
 target/i386/kvm/kvm.c      | 45 ++++++++++++++++++++++++++++++---
 tests/qtest/qmp-cmd-test.c |  1 +
 3 files changed, 93 insertions(+), 4 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-31 12:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 12:26 [PATCH v7 0/1] qapi: introduce 'query-cpu-model-cpuid' action Valeriy Vdovin
2021-05-04 12:26 ` [PATCH v7 1/1] " Valeriy Vdovin
2021-05-26 21:44   ` Eduardo Habkost
2021-05-31 12:16     ` Valeriy Vdovin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).