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

Re: [PATCH] x86/HVM: drop stale check from hvm_load_cpu_msrs()


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Tue, 29 Nov 2022 20:36:50 +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=vfFTvcCL7i8yJifALi+r/OXeZZHyFf98VXEdnY/QKU8=; b=kFbgxOW+j3VvOpBWSjLfK0sOpyEGgqwXTKpUEh7A1V8aC1Q8EsiVkL2niuOkb9voWV5PK/ZZg+LCkh1jv30K5nwX9BQikH8627UG8RftEVOfSm5Y+y2nGFIFzVLjaQ649Q8kQo4H4sWvo2PO9h+HdlPLqmgQXllPU7xTVz+JPLN0mhNzPpfy9kqn+nGacC+f3DAtFnnBBHLKlSzU6LI0ewXhu2tjivB4L6erMFRfZChiwwyfxloXDvIRT5lVkQP+e8rJFHkWI1NjJ8HHuIyIxwhZIVIZ3pDlDzh2pbuPcihzA8WYU7g2sfz2GoN9RmFVKmZIRk8LH4FXDqarOMKjZQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S4JTvS5QD5p3TQ6O6tfwKteyWIYOTd8fv2bO1ytMiyih+C6xeY3Y1xcUGpBe0Uthe+9WoVuBeCyO9kA3KR+kfUnsJ8tSQoKgE/Un11HwqOMAj5EFdz23eJqAgf6wczxNNYOR0U0+OSyDjvh1Fdwc57OhO06GUbmGbwEU3uArJ7H1EfsOee0NBDLuJq51kOqW7Bf0zjXEEOB+H1olXurY2ropxh5NeUI0/AN+DG22ew6EFN3JXvYsSIoEGu8EI1sUJ2gqzLVE3V1ESa3rwgfWAMaUhQR76yxAMiB3s7mYQmqMwbWttiWYFUnCv/fOupPcjK2oTBSljqQFx9A6rY0A4w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 29 Nov 2022 20:37:10 +0000
  • Ironport-data: A9a23:1cQeNq74gQLq2vM9NtVwAQxRtBrGchMFZxGqfqrLsTDasY5as4F+v mFMXDqHP/uPMGX1ct8gYN6/90wBuZeHy9ZnTws4qS1jHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraBYnoqLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4pwehBtC5gZkPKkR7QeA/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5my O4fKxMJNy2/i92zmYOnFtNvnc8MI5y+VG8fkikIITDxK98DGMqGb4CUoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6OnUooj+SF3Nn9I7RmQe18mEqCq 32A1GP+GhwAb/SUyCaf82LqjejK9c/+cNJPROXjqaUy6LGV7msXFxETbAOSndmC1VKaVeIOA XYy9SV7+MDe82TuFLERRSaQonSJoxodUNp4CPAh5UeGza+8y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.xenproject.org>
  • Thread-index: AQHZBAII9yW//UkOVUmtKXeE7HsILK5WXJkA
  • Thread-topic: [PATCH] x86/HVM: drop stale check from hvm_load_cpu_msrs()

On 29/11/2022 14:51, Jan Beulich wrote:
> Up until f61685a66903 ("x86: remove defunct init/load/save_msr()
> hvm_funcs") the check of the _rsvd field served as an error check for
> the earlier hvm_funcs.save_msr() invocation. With that invocation gone
> the check makes no sense anymore. While dropping it also merge the two
> paths setting "err" to -ENXIO.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> We could go further here, removing the local "err" variable altogether,
> by using "return -ENXIO". Thoughts.

'err' is a non-standard variable name, so yeah, why not.

That said, the current code has a split loop checking the incoming _rsvd
fields in a first pass, and then calling guest_wrmsr() on the second
pass.  This was also made pointless by the identified changeset, so the
two loops ought to be merged.

~Andrew

 


Rackspace

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