lkml.org 
[lkml]   [2020]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v14 01/13] KVM: x86: Report XSS as an MSR to be saved if there are supported features
    Date
    From: Sean Christopherson <sean.j.christopherson@intel.com>

    Add MSR_IA32_XSS to the list of MSRs reported to userspace if
    supported_xss is non-zero, i.e. KVM supports at least one XSS based
    feature.

    Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
    ---
    arch/x86/kvm/x86.c | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
    index 397f599b20e5..fce18a2537ea 100644
    --- a/arch/x86/kvm/x86.c
    +++ b/arch/x86/kvm/x86.c
    @@ -1237,6 +1237,8 @@ static const u32 msrs_to_save_all[] = {
    MSR_ARCH_PERFMON_EVENTSEL0 + 12, MSR_ARCH_PERFMON_EVENTSEL0 + 13,
    MSR_ARCH_PERFMON_EVENTSEL0 + 14, MSR_ARCH_PERFMON_EVENTSEL0 + 15,
    MSR_ARCH_PERFMON_EVENTSEL0 + 16, MSR_ARCH_PERFMON_EVENTSEL0 + 17,
    +
    + MSR_IA32_XSS,
    };

    static u32 msrs_to_save[ARRAY_SIZE(msrs_to_save_all)];
    @@ -5728,6 +5730,10 @@ static void kvm_init_msr_list(void)
    min(INTEL_PMC_MAX_GENERIC, x86_pmu.num_counters_gp))
    continue;
    break;
    + case MSR_IA32_XSS:
    + if (!supported_xss)
    + continue;
    + break;
    default:
    break;
    }
    --
    2.17.2
    \
     
     \ /
      Last update: 2020-11-06 02:07    [W:4.212 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site