lkml.org 
[lkml]   [2017]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/3] KVM: x86: generalize guest_cpuid_has_ helpers
From
Date
On 05.08.2017 00:12, Radim Krčmář wrote:
> This patch turns guest_cpuid_has_XYZ(cpuid) into guest_cpuid_has(cpuid,
> X86_FEATURE_XYZ), which gets rid of many very similar helpers.
>
> When seeing a X86_FEATURE_*, we can know which cpuid it belongs to, but
> this information isn't in common code, so we recreate it for KVM.
>
> Add some BUILD_BUG_ONs to make sure that it runs nicely.
>
> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
> ---
> v2:
> - fixed X86_FEATURE_RDTSCP (David)
> - renamed best to entry (David)
> - added const (David)
> - added __always_inline (Paolo)
> ---
> arch/x86/kvm/cpuid.h | 170 +++++++++++++++++----------------------------------
> arch/x86/kvm/mmu.c | 7 ++-
> arch/x86/kvm/mtrr.c | 2 +-
> arch/x86/kvm/svm.c | 2 +-
> arch/x86/kvm/vmx.c | 26 ++++----
> arch/x86/kvm/x86.c | 38 ++++++------
> 6 files changed, 95 insertions(+), 150 deletions(-)
>

Reviewed-by: David Hildenbrand <david@redhat.com>


--

Thanks,

David

\
 
 \ /
  Last update: 2017-08-07 10:35    [W:0.072 / U:1.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site