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

Re: [PATCH v2 for-4.15] x86/msr: introduce an option for HVM relaxed rdmsr behavior


  • To: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 4 Mar 2021 23:28:16 +0000
  • 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=zht4K8WtOcQDjXZ6cTEgTKJfAZyNi8lX3hG6b5f56Wk=; b=Cdoi9rCJiuIHw88ElKrF0PgUZX63P9ALXGWRYnXPbjPq4zZdMAFqogwg5duVTrQfR1iLLqNM9T8HbiuCDQGh405XRMuHrKVkyfAc6h5zMaLpczmoXNIBLFppsoJKtNqImQCkT3C/esIjK+V5bHSy1sDkLEmIMgg72VvlKRhDRmIO/LV7Ppj50Kds6fvn0vEaRpvKA3JqllKIFlbEexZKfY7HNbPtDveV5Bp7P05TVB5xMlsBE1ki9OkWWJ/BYX2EXd0DtE5UHg2+mkGCl/jzXz7Et7K47XkT14sw8FU2eipGDeopM3HmVeT38j0vqy5DZJAh8yYnOK1rI/trbu+4Ow==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g558SdPuxR4hjtvjqQweCKRHsl4hedoTXinq9DztVY3XNsivkSHUlr42sX6XjCzyX9kt+Y4qO3ABURI2wA+yFpgs5Z+UGcUS40zNOoCe7WhRdsSoBvI2skTYOcQga1d3lXBwCudFRs2asuh/NN29OkSsHY1Ob59ULpb8ci79Xo4xDlAgPfKoEfQTUyrwn6cUSmY/qp/23jlRidkC5+jzAYAlhOPbk5ZKubhzNYDcWMfZur23mBbBhvDEfjb22EEXgDE1VyacXyhWgpOKo/qJIwintvipyXQxPb8A2KQeHjJ9mEiMVQtYikNQEF4UvAvT0IISrgnXusgIc/0aqh5zFQ==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Thu, 04 Mar 2021 23:29:09 +0000
  • Ironport-sdr: CF2w7RCLiGsHjt+NW/ENbAPKXuGXI7fcthHfZKH2VyhpQ22itbEtFygW37PRUWFFGYuNC1xUAF uprcyaRTP0y+FKTfOSNeghbgRQjeIpYCzYa/Js1aA+ONQbdu48/g6FjzK8aLov3vw51ycMub7p BvWwBm0+SAsMUxUJWqn7ViXUbhm99qhjE9oLIaHdZPcO3rlK2u5E83G4HKf1lKmKsEb82ex1YS O98PnQg9MzPSpxmWFQBog8GNQMGBSu14r4uY31Nuj4fDzN0KuCBv+dYLOzBFYAaGHzIidKA2l8 B84=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04/03/2021 23:09, Boris Ostrovsky wrote:
> On 3/4/21 9:47 AM, Roger Pau Monne wrote:
>> Introduce an option to allow selecting a less strict behaviour for
>> rdmsr accesses targeting a MSR not explicitly handled by Xen. Since
>> commit 84e848fd7a162f669 accesses to MSRs not explicitly handled by
>> Xen result in the injection of a #GP to the guest. This is a behavior
>> change since previously a #GP was only injected if accessing the MSR
>> on the real hardware will also trigger a #GP.
>>
>> This commit attempts to offer a fallback option similar to the
>> previous behavior. Note however that the value of the underlying MSR
>> is never leaked to the guest, as the newly introduced option only
>> changes whether a #GP is injected or not.
>>
>> Long term the plan is to properly handle all the MSRs, so the option
>> introduced here should be considered a temporary resort for OSes that
>> don't work properly with the new MSR policy. Any OS that requires this
>> option to be enabled should be reported to
>> xen-devel@xxxxxxxxxxxxxxxxxxxx.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> ---
>> Changes since v1:
>>  - Only apply the option to HVM guests.
>>  - Only apply the special handling to MSR reads.
>>  - Sanitize the newly introduced flags field.
>>  - Print a warning message when the option is used.
>> ---
>> Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
>> ---
>> Boris, could you please test with Solaris to see if this fixes the
>> issue?
>
> Yes, still works. (It worked especially well after I noticed new option name 
> ;-))

I'm afraid I want to break and rework how this bugfix happens.  Solaris
is still broken on all older branches and this isn't a suitable fix to
backport.

~Andrew



 


Rackspace

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