diff options
author | Matt Delco <delco@chromium.org> | 2020-02-04 16:01:55 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-20 02:12:01 +0000 |
commit | c469580e6c9b83172ba58e8305c6e5c11acfe186 (patch) | |
tree | db725dfd751f0955b9d1788772f4e3bb208aa9af /protos | |
parent | ce03437d567717bcee61ff464bc45f0a98dd3eb9 (diff) | |
download | crosvm-c469580e6c9b83172ba58e8305c6e5c11acfe186.tar crosvm-c469580e6c9b83172ba58e8305c6e5c11acfe186.tar.gz crosvm-c469580e6c9b83172ba58e8305c6e5c11acfe186.tar.bz2 crosvm-c469580e6c9b83172ba58e8305c6e5c11acfe186.tar.lz crosvm-c469580e6c9b83172ba58e8305c6e5c11acfe186.tar.xz crosvm-c469580e6c9b83172ba58e8305c6e5c11acfe186.tar.zst crosvm-c469580e6c9b83172ba58e8305c6e5c11acfe186.zip |
crosvm: support kvm's hyper-v cpuid ioctl
Kvm can emulate the hyper-v paravirt interface. Newer versions of kvm can advertise the features they support via an ioctl() that reports the cpuid leafs for this interface. This change adds some support for the ioctl() and plumbs it through the plugin interface so that plugins can determine the level of support available in kvm. BUG=b:144746965 TEST=Ran build_test on kernel that supports the ioctl. Added temporary code to print the cpuid leafs and verified that the output is as expected. Instrumented failure as expected from older kernels and verified that results still passed. Change-Id: I6cd7dade1793e4edb52b331d5b960685541f7ba3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2037919 Tested-by: Matt Delco <delco@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Matt Delco <delco@chromium.org>
Diffstat (limited to 'protos')
-rw-r--r-- | protos/src/plugin.proto | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/protos/src/plugin.proto b/protos/src/plugin.proto index e2838b0..783d23b 100644 --- a/protos/src/plugin.proto +++ b/protos/src/plugin.proto @@ -334,6 +334,9 @@ message VcpuRequest { bytes state = 2; } + message CpuidRequest { + } + message GetMsrs { // The entry data will be returned in the same order as this in the // VcpuResponse::GetMsrs::entry_data array. @@ -367,6 +370,7 @@ message VcpuRequest { SetMsrs set_msrs = 6; SetCpuid set_cpuid = 7; Shutdown shutdown = 8; + CpuidRequest get_hyperv_cpuid = 9; } } @@ -417,6 +421,10 @@ message VcpuResponse { message SetState { } + message CpuidResponse { + repeated CpuidEntry entries = 1; + } + message GetMsrs { // The order of the entry_data values is the same order as the array of indices given in the // corresponding request. @@ -439,5 +447,6 @@ message VcpuResponse { GetMsrs get_msrs = 6; SetMsrs set_msrs = 7; SetCpuid set_cpuid = 8; + CpuidResponse get_hyperv_cpuid = 9; } } |