Bug 5403 - KVM - Add fast REP string features support
Summary: KVM - Add fast REP string features support
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-05 15:51 UTC by AubreyLi
Modified: 2023-06-05 16:28 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AubreyLi intel_group 2023-06-05 15:51:40 UTC
The following two commits need to be backported to support fast REP string
features support in KVM, they are available beginning with processors based
on Golden Cove microarchitecture.

===============================================================================
commit 2a4209d6a9cb51082813e3081e1172ae68d27935
Author: Jim Mattson <jmattson@google.com>
Date:   Thu Sep 1 14:18:07 2022 -0700

    KVM: x86: Advertise fast REP string features inherent to the CPU
    
    Fast zero-length REP MOVSB, fast short REP STOSB, and fast short REP
    {CMPSB,SCASB} are inherent features of the processor that cannot be
    hidden by the hypervisor. When these features are present on the host,
    enumerate them in KVM_GET_SUPPORTED_CPUID.
    
    Signed-off-by: Jim Mattson <jmattson@google.com>
    Reviewed-by: Sean Christopherson <seanjc@google.com>
    Link: https://lore.kernel.org/r/20220901211811.2883855-2-jmattson@google.com
    Signed-off-by: Sean Christopherson <seanjc@google.com>

commit f8df91e73a6827a4569bb56cd53e55b4ea2f5b1f
Author: Jim Mattson <jmattson@google.com>
Date:   Thu Sep 1 14:18:06 2022 -0700

    x86/cpufeatures: Add macros for Intel's new fast rep string features
    
    KVM_GET_SUPPORTED_CPUID should reflect these host CPUID bits. The bits
    are already cached in word 12. Give the bits X86_FEATURE names, so
    that they can be easily referenced. Hide these bits from
    /proc/cpuinfo, since the host kernel makes no use of them at present.
    
    Signed-off-by: Jim Mattson <jmattson@google.com>
    Reviewed-by: Sean Christopherson <seanjc@google.com>
    Link: https://lore.kernel.org/r/20220901211811.2883855-1-jmattson@google.com
    Signed-off-by: Sean Christopherson <seanjc@google.com>
Comment 1 小龙 admin 2023-06-05 16:28:45 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/1706