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

Re: [PATCH 3/4] x86/vmx: replace enum vmx_msr_intercept_type with the msr access flags


  • To: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 28 Feb 2023 15:34:37 +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=YfCRyZD09J7MF0fUTxIaYJx3kdGw88pi/ktRGnphkSo=; b=RU0riz5zH04PXWUZqgSRGPWcI0cxMA3CNFLNJdDbucjSGW8Q5+YowwGagJivD32SzP5KsNzMKyXVZrkZCvr3DdT7rKc3qpGKkqJ8HXIHBRyfnCQiMhV/4atLw2I5LcoB3I5c2a7ID6FG5D22+xbtRJCDYfuf3rJWWtf4YWqHvmmQhLEqT23SPWBHgZO9GW+/d47HObOxbcto7SgHrLwnrQw4b6ey/gN+cIrtVfRIsslBULDBRxF5cuLbbVa5fgVYfe36ZEc1DsOobaNVWi2wKZI5QHzMmMaTpNOT7yJTR6Wgo0Rn0VAWAkfVYzXkAQjwRzTxVgSh3UPAWNTNzLfHgA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eDyJ6CPbQS08bQEHNzBKn5mR/PvRp1pZ6rSLQorrGHZdi8B6Z7Qh3cK59T9LWC2ohd98a/jfQmlz2VPFN9gesCVJmD5oIj2lB9WixA/lcqJBpBtprhs1zl+mfV9NP615lCn+e0A6EZ286u10JTLh1cEJJ/WNzMfrW3phor2Zp+cCE9K6flO9tQyPwuD2ozJb1xF3WukLhpdojEsPYvh+35KknWoagUb0mqDgwJLpHHXwUo3oOa8O2oAp0ILCmVNH2LticQFYXZBaDcl03fonXS6/8ChZaOXld0UIwa8OfsL94SogDuFvb/oqY3jYe3VfK1YmJPgJHUKJj9PE9isvLQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 28 Feb 2023 14:34:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.02.2023 15:31, Jan Beulich wrote:
> On 27.02.2023 08:56, Xenia Ragiadakou wrote:
>> --- a/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
>> +++ b/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
>> @@ -644,18 +644,8 @@ static inline int vmx_write_guest_msr(struct vcpu *v, 
>> uint32_t msr,
>>      return 0;
>>  }
>>  
>> -
>> -/* MSR intercept bitmap infrastructure. */
>> -enum vmx_msr_intercept_type {
>> -    VMX_MSR_R  = 1,
>> -    VMX_MSR_W  = 2,
>> -    VMX_MSR_RW = VMX_MSR_R | VMX_MSR_W,
>> -};
>> -
>> -void vmx_clear_msr_intercept(struct vcpu *v, unsigned int msr,
>> -                             enum vmx_msr_intercept_type type);
>> -void vmx_set_msr_intercept(struct vcpu *v, unsigned int msr,
>> -                           enum vmx_msr_intercept_type type);
>> +void vmx_clear_msr_intercept(struct vcpu *v, unsigned int msr, int type);
>> +void vmx_set_msr_intercept(struct vcpu *v, unsigned int msr, int type);
> 
> unsigned int please again for the last parameter each.

Oh, also, another remark here towards patch 2: Note how the middle parameter
each is "unsigned int msr" here, when in SVM code you make it (kind of leave
it) uint32_t. As per ./CODING_STYLE unsigned int is to be preferred; in any
event both (and the eventual hook) want to agree.

Jan



 


Rackspace

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