[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-devel
Subject:    Re: [PATCH 3/4] x86/vmx: replace enum vmx_msr_intercept_type with the msr access flags
From:       Xenia Ragiadakou <burzalodowa () gmail ! com>
Date:       2023-02-28 15:07:18
Message-ID: e91460f8-9872-9968-0aa1-268b3dc68d9c () gmail ! com
[Download RAW message or body]


On 2/28/23 16:34, Jan Beulich wrote:
> 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.

Thx. I will fix and keep it in mind.

> 
> Jan

-- 
Xenia

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic