All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Tamas K Lengyel <tamas.lengyel@intel.com>
Cc: "Tamas K Lengyel" <tamas@tklengyel.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 1/2] x86/mem_sharing: copy cpuid during vm forking
Date: Tue, 5 Jan 2021 09:40:26 +0100	[thread overview]
Message-ID: <7106d2d6-507e-b94a-fb60-0d80e991b8af@suse.com> (raw)
In-Reply-To: <6d5ca8a57a2745e933f00706bff306844611f64d.1609781242.git.tamas.lengyel@intel.com>

On 04.01.2021 18:41, Tamas K Lengyel wrote:
> --- a/xen/arch/x86/mm/mem_sharing.c
> +++ b/xen/arch/x86/mm/mem_sharing.c
> @@ -1764,6 +1764,7 @@ static int fork(struct domain *cd, struct domain *d)
>  
>          domain_pause(d);
>          cd->max_pages = d->max_pages;
> +        memcpy(cd->arch.cpuid, d->arch.cpuid, sizeof(*d->arch.cpuid));

Can such copying please be done using assignment rather than
memcpy(), for the added type safety? (I wouldn't mind doing
this while committing, so long as you don't mind.)

Jan


  parent reply	other threads:[~2021-01-05  8:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 17:41 [PATCH 1/2] x86/mem_sharing: copy cpuid during vm forking Tamas K Lengyel
2021-01-04 17:41 ` [PATCH 2/2] x86/hap: Resolve mm-lock order violations when forking VMs with nested p2m Tamas K Lengyel
2021-01-06 12:03   ` Jan Beulich
2021-01-06 15:29     ` Tamas K Lengyel
2021-01-06 16:11       ` Jan Beulich
2021-01-06 16:26         ` Tamas K Lengyel
2021-01-07 12:25           ` Jan Beulich
2021-01-07 12:43             ` Tamas K Lengyel
2021-01-07 12:56               ` Jan Beulich
2021-01-07 13:27                 ` Tamas K Lengyel
2021-01-05  8:40 ` Jan Beulich [this message]
2021-01-05 11:04 ` [PATCH 1/2] x86/mem_sharing: copy cpuid during vm forking Andrew Cooper
2021-01-05 15:50   ` Lengyel, Tamas

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=7106d2d6-507e-b94a-fb60-0d80e991b8af@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=tamas.lengyel@intel.com \
    --cc=tamas@tklengyel.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.