[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxc/restore: Don't duplicate state in process_vcpu_basic()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Fri, 20 Dec 2019 18:22:39 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@xxxxxxxxxx; spf=Pass smtp.mailfrom=Ian.Jackson@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 20 Dec 2019 18:22:58 +0000
  • Ironport-sdr: 22HAJRIXyooKbtIh9b8ofNPlHPZtGz/rnRh7o6g7dAfX3RbUn5doDLDl3QO+FSoM/ZXxFfxqEh xiUByfKUSdDmBV7lH325m2zXrY8wNuvnud55Au0ozgVvIZuecc/2X4zs1uN+7pb3k9ipuO3Yb/ xNcWCmmAbhkFNYnCMBmYJ9MWODpRi29yKwsBKeqmAPyx+W/PUq5G+F5zTH22pd+MCuVGoEoeCH m9EFn2E+4QmUNu1u967H4e+0+o3h8qltXtrE6sRpxsKIAwMNjjA1F45PZ0Q/gk2HnUw5x6kS7A xd8=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.