From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: "Lengyel, Tamas" <tlengyel@novetta.com>
Cc: kevin.tian@intel.com, Wei Liu <wei.liu2@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, Daniel De Graaf <dgdegra@tycho.nsa.gov>,
Xen-devel <xen-devel@lists.xen.org>,
eddie.dong@intel.com, Aravind.Gopalakrishnan@amd.com,
Jan Beulich <JBeulich@suse.com>,
suravee.suthikulpanit@amd.com, boris.ostrovsky@oracle.com,
keir@xen.org, Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH V2 2/3] xen/vm_event: Support for guest-requested events
Date: Tue, 30 Jun 2015 18:22:29 +0300 [thread overview]
Message-ID: <5592B435.1040107@bitdefender.com> (raw)
In-Reply-To: <CAD33N+4-agvUhakTyoc=o_fRg2bZ_UpzJxoHU2CZg1jfVMPx2A@mail.gmail.com>
On 06/30/2015 05:48 PM, Lengyel, Tamas wrote:
>>> --- 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.
I don't really have a preference one way or the other about this based
on readability, so I'm fine with going either way.
However, while in practice this modification is safe, AFAIK the C
standard does not guarantee that an (unsigned) int is at least 32-bits
wide, so it might raise the question of what might happen if somebody
builds the hypervisor with a 16-bit int compiler (though I would imagine
there would be some compile-time warning / error in that case). Do we
care about that?
Thanks,
Razvan
next prev parent reply other threads:[~2015-06-30 15:22 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 9:03 Vm_event memory introspection helpers Razvan Cojocaru
2015-06-15 9:03 ` [PATCH V2 1/3] xen/vm_access: Support for memory-content hiding Razvan Cojocaru
2015-06-25 15:57 ` Jan Beulich
2015-06-26 8:22 ` Razvan Cojocaru
2015-06-26 8:44 ` Jan Beulich
2015-06-26 9:49 ` Razvan Cojocaru
2015-06-26 9:59 ` Jan Beulich
2015-06-15 9:03 ` [PATCH V2 2/3] xen/vm_event: Support for guest-requested events Razvan Cojocaru
2015-06-24 14:56 ` Razvan Cojocaru
2015-06-24 15:03 ` Jan Beulich
2015-06-25 7:55 ` Razvan Cojocaru
2015-06-25 8:37 ` Jan Beulich
2015-06-25 9:09 ` Razvan Cojocaru
2015-06-26 7:02 ` Jan Beulich
2015-06-26 7:17 ` Razvan Cojocaru
2015-06-26 8:45 ` Jan Beulich
2015-06-30 14:48 ` Lengyel, Tamas
2015-06-30 15:22 ` Razvan Cojocaru [this message]
2015-07-01 8:24 ` Razvan Cojocaru
2015-07-06 10:26 ` Jan Beulich
2015-07-06 13:46 ` Lengyel, Tamas
2015-06-30 14:23 ` Razvan Cojocaru
2015-07-06 10:27 ` Jan Beulich
2015-07-06 14:35 ` Razvan Cojocaru
2015-06-15 9:03 ` [PATCH V2 3/3] xen/vm_event: Deny register writes if refused by vm_event reply Razvan Cojocaru
2015-06-26 8:28 ` Jan Beulich
2015-06-26 9:17 ` Razvan Cojocaru
2015-06-26 9:39 ` Jan Beulich
2015-06-26 10:33 ` Razvan Cojocaru
2015-07-01 15:21 ` Razvan Cojocaru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5592B435.1040107@bitdefender.com \
--to=rcojocaru@bitdefender.com \
--cc=Aravind.Gopalakrishnan@amd.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=eddie.dong@intel.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tim@xen.org \
--cc=tlengyel@novetta.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.