All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lengyel, Tamas" <tlengyel@novetta.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH V2 2/3] xen/vm_event: Support for guest-requested events
Date: Mon, 6 Jul 2015 09:46:44 -0400	[thread overview]
Message-ID: <CAD33N+6EX8ZbsQoTGXmsk0vGLDKzO6g=3ATnXE9OyBp+fUiDUQ@mail.gmail.com> (raw)
In-Reply-To: <559A73DB020000780008C9AA@mail.emea.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 2248 bytes --]

On Mon, Jul 6, 2015 at 6:26 AM, Jan Beulich <JBeulich@suse.com> wrote:

> >>> On 30.06.15 at 16:48, <tlengyel@novetta.com> 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 can't see what benefit using fixed widht types here is: Best
> demonstrated with uint64_t, gcc doesn't honor the type of the
> field anyway. And hence counting the number of left bits (with
> some unknown definition of "left") is quite pointless too - it's an
> internal structure, and when a new bit field needs to be added,
> it doesn't really matter whether it grows the structure (at least
> no more than any other field addition).
>
> Bottom line - no fixed width types when not really warranted,
> please.
>
> Jan
>

SGTM.

Thanks,
Tamas

[-- Attachment #1.2: Type: text/html, Size: 3264 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2015-07-06 13:46 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
2015-07-01  8:24         ` Razvan Cojocaru
2015-07-06 10:26         ` Jan Beulich
2015-07-06 13:46           ` Lengyel, Tamas [this message]
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='CAD33N+6EX8ZbsQoTGXmsk0vGLDKzO6g=3ATnXE9OyBp+fUiDUQ@mail.gmail.com' \
    --to=tlengyel@novetta.com \
    --cc=JBeulich@suse.com \
    --cc=rcojocaru@bitdefender.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.