From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Lengyel, Tamas" Subject: Re: [PATCH V2 2/3] xen/vm_event: Support for guest-requested events Date: Tue, 30 Jun 2015 10:48:32 -0400 Message-ID: References: <1434359007-9302-1-git-send-email-rcojocaru@bitdefender.com> <1434359007-9302-3-git-send-email-rcojocaru@bitdefender.com> <558D152B0200007800089FD4@mail.emea.novell.com> <558CFC75.9000905@bitdefender.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4036158987911353914==" Return-path: In-Reply-To: <558CFC75.9000905@bitdefender.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru Cc: kevin.tian@intel.com, Wei Liu , Ian Campbell , Stefano Stabellini , Jun Nakajima , Andrew Cooper , Tim Deegan , Daniel De Graaf , Xen-devel , eddie.dong@intel.com, Aravind.Gopalakrishnan@amd.com, Jan Beulich , suravee.suthikulpanit@amd.com, boris.ostrovsky@oracle.com, keir@xen.org, Ian Jackson List-Id: xen-devel@lists.xenproject.org --===============4036158987911353914== Content-Type: multipart/alternative; boundary=f46d044283a80817920519bd4ec3 --f46d044283a80817920519bd4ec3 Content-Type: text/plain; charset=ISO-8859-1 >> --- a/xen/include/asm-x86/domain.h > >> +++ b/xen/include/asm-x86/domain.h > >> @@ -342,13 +342,15 @@ struct arch_domain > >> > >> /* Monitor options */ > >> struct { > >> - uint16_t write_ctrlreg_enabled : 4; > >> - uint16_t write_ctrlreg_sync : 4; > >> - uint16_t write_ctrlreg_onchangeonly : 4; > >> - uint16_t mov_to_msr_enabled : 1; > >> - uint16_t mov_to_msr_extended : 1; > >> - uint16_t singlestep_enabled : 1; > >> - uint16_t software_breakpoint_enabled : 1; > >> + uint32_t write_ctrlreg_enabled : 4; > >> + uint32_t write_ctrlreg_sync : 4; > >> + uint32_t write_ctrlreg_onchangeonly : 4; > >> + uint32_t mov_to_msr_enabled : 1; > >> + uint32_t mov_to_msr_extended : 1; > >> + uint32_t singlestep_enabled : 1; > >> + uint32_t software_breakpoint_enabled : 1; > >> + uint32_t request_enabled : 1; > >> + uint32_t request_sync : 1; > > > > Can you please switch to plain unsigned int if you already have to > > touch this? There's no reason I can see to use a fixed width integer > > type here. > > Ack, will make it plain int. IMHO having it fix-width is easier to read when adding new elements to see how many bits we have left free. I would not want this changed unless there is a clear benefit to doing so. Tamas --f46d044283a80817920519bd4ec3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
>> --- a/xen/include/asm-x86/domain.h
= >> +++ b/xen/include/asm-x86/domain.h
>> @@ -342,13 +342,15 @@ struct arch_domain
>>
>>=A0 =A0 =A0 /* Monitor options */
>>=A0 =A0 =A0 struct {
>> -=A0 =A0 =A0 =A0 uint16_t write_ctrlreg_enabled=A0 =A0 =A0 =A0: 4;=
>> -=A0 =A0 =A0 =A0 uint16_t write_ctrlreg_sync=A0 =A0 =A0 =A0 =A0 : = 4;
>> -=A0 =A0 =A0 =A0 uint16_t write_ctrlreg_onchangeonly=A0 : 4;
>> -=A0 =A0 =A0 =A0 uint16_t mov_to_msr_enabled=A0 =A0 =A0 =A0 =A0 : = 1;
>> -=A0 =A0 =A0 =A0 uint16_t mov_to_msr_extended=A0 =A0 =A0 =A0 =A0: = 1;
>> -=A0 =A0 =A0 =A0 uint16_t singlestep_enabled=A0 =A0 =A0 =A0 =A0 : = 1;
>> -=A0 =A0 =A0 =A0 uint16_t software_breakpoint_enabled : 1;
>> +=A0 =A0 =A0 =A0 uint32_t write_ctrlreg_enabled=A0 =A0 =A0 =A0: 4;=
>> +=A0 =A0 =A0 =A0 uint32_t write_ctrlreg_sync=A0 =A0 =A0 =A0 =A0 : = 4;
>> +=A0 =A0 =A0 =A0 uint32_t write_ctrlreg_onchangeonly=A0 : 4;
>> +=A0 =A0 =A0 =A0 uint32_t mov_to_msr_enabled=A0 =A0 =A0 =A0 =A0 : = 1;
>> +=A0 =A0 =A0 =A0 uint32_t mov_to_msr_extended=A0 =A0 =A0 =A0 =A0: = 1;
>> +=A0 =A0 =A0 =A0 uint32_t singlestep_enabled=A0 =A0 =A0 =A0 =A0 : = 1;
>> +=A0 =A0 =A0 =A0 uint32_t software_breakpoint_enabled : 1;
>> +=A0 =A0 =A0 =A0 uint32_t request_enabled=A0 =A0 =A0 =A0 =A0 =A0 = =A0: 1;
>> +=A0 =A0 =A0 =A0 uint32_t request_sync=A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 : 1;
>
> Can you please switch to plain unsigned int if you already have to
> touch this? There's no reason I can see to use a fixed width integ= er
> type here.

Ack, will make it plain int.

IMHO ha= ving it fix-width is easier to read when adding new elements to see how man= y bits we have left free. I would not want this changed unless there is a c= lear benefit to doing so.

Tamas
--f46d044283a80817920519bd4ec3-- --===============4036158987911353914== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============4036158987911353914==--