mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
kvm: silence a warning on non-x86 builds
We don't use this particular constant on non-x86 builds, so let's leave it out if when it's not needed. BUG=chromium:797868 TEST=build_test passes TEST=crosvm runs on caroline Change-Id: Ic752f9ae33d577d78c7df282e9803936aa181504 Reviewed-on: https://chromium-review.googlesource.com/952166 Commit-Ready: Sonny Rao <sonnyrao@chromium.org> Tested-by: Sonny Rao <sonnyrao@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
parent
d604dbbab4
commit
657c1850ab
1 changed files with 1 additions and 2 deletions
|
@ -31,8 +31,6 @@ use sys_util::{ioctl, ioctl_with_val, ioctl_with_ref, ioctl_with_mut_ref, ioctl_
|
|||
|
||||
pub use cap::*;
|
||||
|
||||
const MAX_KVM_CPUID_ENTRIES: usize = 256;
|
||||
|
||||
fn errno_result<T>() -> Result<T> {
|
||||
Err(Error::last())
|
||||
}
|
||||
|
@ -135,6 +133,7 @@ impl Kvm {
|
|||
|
||||
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||
fn get_cpuid(&self, kind: u64) -> Result<CpuId> {
|
||||
const MAX_KVM_CPUID_ENTRIES: usize = 256;
|
||||
let mut cpuid = CpuId::new(MAX_KVM_CPUID_ENTRIES);
|
||||
|
||||
let ret = unsafe {
|
||||
|
|
Loading…
Reference in a new issue