[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1.1 5/5] tests: Introduce a TSX test


  • To: Edwin Torok <edvin.torok@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 14 Jun 2021 17:32:44 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hJFBPrmc5Rl4w3EL0oHertCC54rQcxAQVNjvK5mj840=; b=VdkQznLpiol3vBfDFsdVswatgxbeLWEAtN4MnZ8trBvOE3gAtwc/HYCaez0vG58DVbBnS2kqGXr9n0HrFRURtqE1A+7DrF0ZgzqCRsfe7D2JhxHX0E1PnjBzALhKTIvAm5EDRbsS6DuHpNtnY8FFbV3Z13+5zqy5hRUXpYwQUTmqlEdBI4MlHEnU4FUre+Guo/ZhtOvX3DLyOwunVZLrYzR41HrLXQ0/UDtKAHuLB02NJqPZAHp8kZk4aJ1ah8DKzBaDMdPh4EFWuTiA3pg1nbqPGW3YE9pLc8idv2CEuobA2riIiz7ESpaZuYR7J5EKqgxQ9urQshcFlGJXuy4B6A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jtBEKvz5QVWEifbMg2dpdDrOL+ImH/pJ+Lg4LssJ6maiULKA9q8xSZvmz+c3EXzXuKkyfgD76aqIXPdbkdoLoo6zOeXsrEtz5YoEK9uJLCfko/0b78XYbTvEFmqcQIN2fY7QKKr1eJ48wQbNYzn2UbY1Cbydd5UJ3QF401zK+Giw6ukwT2Q1VyXJHCzHqP04EcbPigyIRJv5iDz5ydg8zrM+qE2cENfQ69VTckTvcdQUjbiMnIL/+WT/1yt4Radhi0GQ4BJS8/qpb1ywmC7i8E/nXZxeHNAgS6M3IcYCptNn4JB5ouw5nPxtQnWFMexSyaOfAfMY4dG6Yjl19i+sDA==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "JBeulich@xxxxxxxx" <JBeulich@xxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>
  • Delivery-date: Mon, 14 Jun 2021 16:42:19 +0000
  • Ironport-hdrordr: A9a23:/C0ed6NuUkKdJcBcTgWjsMiBIKoaSvp037BK7S1MoH1uA6mlfq WV9sjzuiWatN98Yh8dcLO7Scu9qBHnlaKdiLN5VduftWHd01dAR7sSjrcKrQeAJ8X/nNQtr5 uJccJFeaDN5Y4Rt7eH3OG6eexQv+Vu6MqT9IPjJ+8Gd3ATV0lnhT0JbTqzIwlNayRtI4E2L5 aY7tovnUvaRZxGBv7LYEXsRoL41qT2qK4=
  • Ironport-sdr: pwAFhFVnoDb8Qn65g2gJMq8zaGKxeq4VPJUT73pPaYkn9+mr58kuoogA60XHQrMCVzszeC4rMK qiQF5tYXp+Q966tggI+6x9BV4wNyf1DHK9ZiZZO/6Hb/2ZHtY4VT1Qpd9wJcbWNvvCclXPExpp 8L9gIEVjRBO75/in3bVNuaEaYxg+NK7U3GACzSC91UknPywRGcUn3T5tZiPphCkz24oXlSzExS cISzkyftuTmJSiUUus6FYD66tcNi3t+Yc/Gi4xfgnopAOtlGIbHh0o5Anzr6KD+dFtn6zPJ9Kg fz4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14/06/2021 16:55, Edwin Torok wrote:
> On Mon, 2021-06-14 at 11:47 +0100, Andrew Cooper wrote:
>> +/*
>> + * Check all TSX MSRs, and in particular that their accessibility
>> matches what
>> + * is expressed in the host CPU policy.
>> + */
>> +static void test_tsx_msrs(void)
>> +{
>> +    printf("Testing MSR_TSX_FORCE_ABORT consistency\n");
>> +    test_tsx_msr_consistency(
>> +        MSR_TSX_FORCE_ABORT, host.cpuid.feat.tsx_force_abort);
>> +
>> +    printf("Testing MSR_TSX_CTRL consistency\n");
>> +    test_tsx_msr_consistency(
>> +        MSR_TSX_CTRL, host.msr.arch_caps.tsx_ctrl);
>> +}
>
> This is great, could we extend the test to all MSRs that Xen knows
> about and are expected to be identical? Particularly
> MSR_SPEC_CTRL, MSR_MCU_OPT_CTRL, and I see some MSRs used for errata
> workarounds like MSR_MCU_OPT_CTRL, possiblye more.

MSR_SPEC_CTRL, no.  It's value is influenced by the guest kernel in
context, and we would not expect it to be consistent across the system
at an arbitrary point in time.

MSR_MCU_OPT_CTRL might be a good candidate for a future change, but it's
not related to TSX.  (That said, it is actually how I spotted XSA-377).

~Andrew




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.