All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>, Wei Liu <wl@xen.org>
Subject: [Xen-devel] [PATCH] libxc/restore: Don't duplicate state in process_vcpu_basic()
Date: Fri, 20 Dec 2019 18:22:39 +0000	[thread overview]
Message-ID: <24061.4463.693713.311441@mariner.uk.xensource.com> (raw)
In-Reply-To: <20191220172310.27231-1-andrew.cooper3@citrix.com>

Andrew Cooper writes ("[PATCH] libxc/restore: Don't duplicate state in process_vcpu_basic()"):
> vcpu_guest_context_any_t is currently allocated on the stack, and copied from
> a mutable buffer which is freed immediately after its use here.
> 
> Mutate the buffer in place instead of duplicating it.

It is not obvious to me that nothing uses the modified fields after
process_vcpu_basic has edited things.  The ctx of which the vcpu is
part is passed to process_vcpu_<various> by update_vcpu_context.

Why do you think this copying (which is extra code) was introduced ?

Ian.

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

  reply	other threads:[~2019-12-20 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 17:23 [Xen-devel] [PATCH] libxc/restore: Don't duplicate state in process_vcpu_basic() Andrew Cooper
2019-12-20 18:22 ` Ian Jackson [this message]
2019-12-20 18:40   ` Andrew Cooper
2019-12-20 18:46     ` Ian Jackson

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=24061.4463.693713.311441@mariner.uk.xensource.com \
    --to=ian.jackson@citrix.com \
    --cc=andrew.cooper3@citrix.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.