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

Re: [PATCH for-4.17 v2 1/3] hvm/msr: load VIRT_SPEC_CTRL


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Wed, 2 Nov 2022 14:20:12 +0000
  • Accept-language: en-GB, en-US
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Gk+1qxE1/RsLDG9ozR69RKKHZaooRnR1lsHp0T+oddk=; b=HsqgJxa6sVq+3P0USnEfTss26aThSryuCJzkSPomla7oONsYB2GiDz5ipltLT78J8fM/X/RR+dBv+CZw/olCWED+PevzME1l6xpPeo9YEnbpavt57Skd7C0ucVnOVNLuGM8mQM9q/ceSk0UUP6j7rAja5TN7sSHWgWWdLfbv4qwze/RIflU0LFPpilx8F5GE3jrYjaS1UKsAmomqL+KAVaFY+dZ1nPf1wj3Lz7ZYfxR4q+5eugZyNLJ2hNir/BUriZsqJeFd29bXREPyDFRxrkm6wcLE4TotPcdXJK/FDk5bRLi/y9R6QuxyKZJv9TnZ4IiB31pkab47V/jotN0tLg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XQpHE628SrfpSiLfSy1QG2pE0KDV5JjTc/YfNvSFvdnQgQDbx+dfFiBs+KwZbj5hxU0Y5Lcizv32V97bK9jg+2qvTWaBLWKAWY2JixKuAarMg5HmhKVkfwQOOp39PXsdEovosRid5ThJAzxC0Fg9nbYU1J+dmtpv3+V/91LuCpG63sQ2Y4aRFoga1N+01vqaX5u49PWlBANxgnvCFyHY+HelExeyW/a0Ka6Wh+fTJCgb7OxR5Xc45wJ2iH3oo9f+1DyDg39tTE+mfPVtWy0YuqhESK6ud8RhX1e2a5YhwBzD7ukvPL7saLqai5gRVrfyFnSg1Mh8SFlucGsfyfVwlA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: "Henry.Wang@xxxxxxx" <Henry.Wang@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 02 Nov 2022 14:20:26 +0000
  • Ironport-data: A9a23:nqT0t6sgF5RVYKQdPxEH48qSAefnVGhfMUV32f8akzHdYApBsoF/q tZmKWnSPvbYYmT3fI9/OYW3900PsJKEzIVlQVZprC1nEn8W+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiffHg0HVU/IMsYoUoLs/YjhYJ1isSODQqIu Nfjy+XSI1bg0DNvWo4uw/vrRChH4bKj5Vv0gnRkPaoR5QaGzSFPZH4iDfrZw0XQE9E88tGSH 44v/JnhlkvF8hEkDM+Sk7qTWiXmlZaLYGBiIlIPM0STqkAqSh4ai87XB9JFAatjsB2bnsgZ9 Tl4ncfYpTHFnEH7sL91vxFwS0mSNEDdkVPNCSDXXce7lyUqf5ZwqhnH4Y5f0YAwo45K7W9yG fMwKh8/diCJm/yPmomDZsJSo88cJsrsBdZK0p1g5Wmx4fcOZ7nmGv+PyfoGmTA6i4ZJAOrUY NcfZXx3dhPcbhZTO1ARTpUjgOOvgXq5eDpdwL6XjfNvvy6Pk0osgf60b4C9lt+iHK25mm6xo G7c8nu/KRYdLNGFkhKO8262h/+JliT+MG4XPO3krqUz0AzKroAVIDIkeByQj+LisR+jC9ZiF X5X/DYwlZFnoSRHSfG4BXVUukWsrhMaHtZdDeA+wAWM0bbPpRaUAHAeSTxMY8Bgs9U5LRQK2 1mTjpXWDDpgmLSPTDSW8bL8hTG4NDURLGQCTTQZVgZD6N7myKksijrfQ9AlF7S65uAZAhn1y jGO6SQ72bMaiJdR073hpA+dxTWxupLOUwg5oB3NWX6o5R94Y4jjYJG07V/c7rBLK4PxokS9g UXoUvO2tIgmZaxhXgTUKAnRNNlFP8q4DQA=
  • Ironport-hdrordr: A9a23:oq5zKapF92uGbhjy58dggx4aV5uIL9V00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssSkb6Ku90KnpewK+yXbsibNhcItKLzOWwldAS7sSobcKogeQUREWk9Qw6U 4OSdkYNDSdNzlHZIPBkXGF+rUbsZa6GcKT9IHjJh5WJGkEBZ2IrT0JczpzeXcGJjWucKBJcK Z0kfA3wgZIF052Uu2LQl0+G8TTrdzCk5zrJTQcAQQ81QWIhTS0rJbnDhmxxH4lInJy6IZn1V KAvx3y562lvf3+4ATbzXXv45Nfn8ak4sdfBfaLltMeJlzX+0aVjcVaKv6/VQIO0aSSAWUR4Z 3xStAbToNOAkbqDyOISN3Wqk/dOXgVmibfIBSj8AbeSITCNU4H4ox69Mxkm1LimjQdVJsX6t M140uJ85VQFh/OhyL7+pzBUAxrjFO9pT44nfcUlGE3a/pWVFZ9l/1pwKpuKuZ3IAvqrIQ8VO V+BsDV4/hbNVuccnDCp2FqhNihRG46EBuKSlUL/pX96UkcoFlpi08DgMAPlHYJ85wwD5FC+u TfK6xt0LVDVNUfY65xDPoIBcG3FmvOSxTRN3/6GyWuKIgXf3bW75Ln6rQ84++nPJQO0ZspgZ zEFEhVsGYjEnieffFmHKc7hywlbF/NLggFkPsulqSRkoeMNIbDIGmEVE0kldemrrEWHtDbMs zDSq5rPw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHY6sNZyDs+pahU70+VbMHdR6akRa4rtukA
  • Thread-topic: [PATCH for-4.17 v2 1/3] hvm/msr: load VIRT_SPEC_CTRL

On 28/10/2022 12:49, Roger Pau Monne wrote:
> Add MSR_VIRT_SPEC_CTRL to the list of MSRs handled by
> hvm_load_cpu_msrs(), or else it would be lost.
>
> Fixes: 8ffd5496f4 ('amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top 
> of SPEC_CTRL')
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
> I'm confused as to why we have two different list of MSR to send and
> load, one in msrs_to_send[] and the other open-coded in
> hvm_load_cpu_msrs(), but given the release status it's no time to
> clean that up.

It's necessary (for now).

guest_wrmsr() started as only safe in current context.  The conversion
work (to make it safe in remote-but-paused context) is in progress.

e.g. guest_wrmsr()'s call into vmce_wrmsr() will malfunction in
non-current context.  There are probably others (although I think most
of problem went away when restructured the handlers.)

The list is the list of MSRs is the subset known safe for remote
writes.  It should be dropped when guest_wrmsr() is fully safe.

~Andrew

 


Rackspace

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