xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Sergey Dyasli <sergey.dyasli@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 1/2] xen: Introduce an xmemdup() helper
Date: Mon, 9 Jul 2018 13:08:31 +0100	[thread overview]
Message-ID: <3f0b227e-94f3-6502-74a9-b8b3e8ecd093@citrix.com> (raw)
In-Reply-To: <5B434ECC02000078001D24BF@prv1-mh.provo.novell.com>

On 09/07/18 13:02, Jan Beulich wrote:
>>>> On 09.07.18 at 12:29, <andrew.cooper3@citrix.com> wrote:
>> ... and use it in place of the opencoded instances.
>>
>> For consistency, restructure init_domain_cpuid_policy() to be like
>> init_{domain,vcpu}_msr_policy() by operating on the local pointer where
>> possible.
>>
>> No change in behaviour.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> I think it would be nice to mention the const related restriction, to
> make clear we would want that to be working, but we can't find a
> solution at the moment.
>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>
> with a cosmetic issue taken care of:
>
>> --- a/xen/arch/x86/cpuid.c
>> +++ b/xen/arch/x86/cpuid.c
>> @@ -703,16 +703,17 @@ void recalculate_cpuid_policy(struct domain *d)
>>  
>>  int init_domain_cpuid_policy(struct domain *d)
>>  {
>> -    d->arch.cpuid = xmalloc(struct cpuid_policy);
>> +    struct cpuid_policy *p =
>> +        xmemdup(is_pv_domain(d) ? & pv_max_cpuid_policy
> Stray blank (same below in the MSR equivalent).

That was the visually line up the _max_cpuid_policy with hvm below.

Another option would be "?  &pv_" with a double space before the &.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-07-09 12:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 10:29 [PATCH 0/2] x86/msr: Code cleanup and improvements Andrew Cooper
2018-07-09 10:29 ` [PATCH 1/2] xen: Introduce an xmemdup() helper Andrew Cooper
2018-07-09 12:02   ` Jan Beulich
2018-07-09 12:08     ` Andrew Cooper [this message]
2018-07-09 12:40       ` Jan Beulich
2018-07-10  8:32   ` Roger Pau Monné
2018-07-10  8:38     ` Jan Beulich
2018-07-10  8:44       ` Andrew Cooper
2018-07-10  8:53         ` Jan Beulich
2018-07-09 10:29 ` [PATCH 2/2] x86/msr: Rename the msr policy objects Andrew Cooper
2018-07-09 12:04   ` Jan Beulich
2018-07-10  8:33   ` Roger Pau Monné

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=3f0b227e-94f3-6502-74a9-b8b3e8ecd093@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=sergey.dyasli@citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).