[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 6/8] x86/hvm: Enable guest access to MSR_PKRS
- To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 12 Jan 2023 16:16:58 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=SkSZomSlQTVH2dS4wNry2udyFyEzoc56R83Z8NYcgRc=; b=WCt3S0F2fXvcx27oQvVQeZ80iW2B770cxgy6eNplXeFDh6VRZdNo8UvkRk/RuVy96RhtU1ikmPcTal83lWxyslcPA2b/WPp5Tcuz5tvESQcofgsKBrkZhTcR15QU/IFhHrAfiaVVbLv8yx1mLCoeTHdKNR/g9qYdbh12ktDhK4g9gxRbtCRgQIEAdyJV2FwjGzQ+7Cs3YY3GQ7kV5MbZfpV2bhQBml7VfTuNbHAkhlDiE8gmAJzsrYONEiouQhQ7L7E3EJ7BFDthGnZyGSz8yhcFU3fWTevQi/XpHrd4ZY9FbKpP4xhpMA7N9I8ZbLiQSrS18E5ZUcvSdWhhwZQ/nw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K6GMulc/9imHLAvIEFRdJHiQqCGubAwSQuruJXVbrI4SnJ2kHRndP17nqIfJVIrpXwlouhhIwiRyBdWUVSlatL+shbcPbeCbNHzrHlwlOkmfPGZtg6va2GidE8G6y8/lXbMRZEZdLZ/FrUoDBIYgpbUwlq3LnLBsYFVCLOKPpp+PTKbhvbFuC5D28y2jTn404l1GR7VvxjGN/e2xX6Ztf+cVmoJfSOaU5nFxJgwQj3IElX9eRiYm2rgiLsbPBfSBqQH32atgfCMbAiA9/xvzigVlxeYtsuQviCShv7YC1xTtmn46UZ6l7PCbfTpgUBM2M655YtvV7yAWB/wC+yay7g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 12 Jan 2023 15:17:09 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 12.01.2023 15:16, Andrew Cooper wrote:
> On 12/01/2023 1:26 pm, Jan Beulich wrote:
>> The other thing I'd like to understand (and having an answer to this
>> would have been better before re-applying my R-b to this re-based
>> logic) is towards the lack of feature checks here. hvm_get_reg()
>> can be called from other than guest_rdmsr(), for an example see
>> arch_get_info_guest().
>
> The point is to separate auditing logic (wants to be implemented only
> once) from data shuffling logic (is the value in a register, or the MSR
> lists, or VMCB/VMCS or struct vcpu, etc). It is always the caller's
> responsibility to confirm that REG exists, and that VAL is suitable for REG.
>
> arch_get_info_guest() passes MSR_SHADOW_GS_BASE which exists
> unilaterally (because we don't technically do !LM correctly.)
>
>
> But this is all discussed in the comment by the function prototypes.
> I'm not sure how to make that any clearer than it already is.
Okay, and I'm sorry for having looked at the definitions without finding
any helpful comment, but not at the declarations. Certainly sufficient
to confirm that my R-b can remain as you already had it.
Jan
|