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

Re: [Xen-devel] [PATCH v2 07/17] libxc/restore: STATIC_DATA_END inference for v2 compatibility

  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Thu, 5 Mar 2020 16:24:12 +0000
  • Authentication-results: esa6.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: Thu, 05 Mar 2020 16:24:58 +0000
  • Ironport-sdr: T8GwQ1RULyNHYn5DQoay7qDH3nvA9VMfQkVxCaWlvJpjKaLhMq8lmkLLMJQfC5WPodDTmUmS1S aySlieDglYDx3Av+snLCHmlNn2fbhRSo4yF7oBVsSjYoJRDxIvj9ddiizzdZC2L4cOT3e5pbkb BZDpGztjcpW5uiw2Gd+w+jX97qy0jZNM6ich4dwIsEijaIRWAvyHm4e0n+3fUvMwE5TzKX302n FoyE3HnhmA7iVifUaPrJD0vbgvTsMKcYIUP/G1LSqFizOfxiqDZaiBpPvwSmLLkxIfYm7Q0rZB vAg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Andrew Cooper writes ("Re: [PATCH v2 07/17] libxc/restore: STATIC_DATA_END 
inference for v2 compatibility"):
> On 24/02/2020 17:32, Ian Jackson wrote:
> > These 17 lines appears twice, in basically identical form.  Could it
> > be refactored ?
> Not really, no.
> The error handling (i.e. half of those 17 lines) is different, making it
> somewhat awkward to fit into a static inline.

You could handle that with a small bit of code around one of the call
sites to adjust the error handling.  (Also, what a mess, but I guess
we're here now...)

> More importantly however, by design, common code can't call
> arch-specific code without a restore_ops hook.  Deduping these would
> require breaking the restriction which is currently doing a decent job
> of keeping x86-isms out of common code.

I'm afraid you're going to have to explain that to me at a bit greater
length.  The biggest thing that is confusing me about your statement
here is that your patch is indeed adding x86-specific code to a common
file.  But also I don't understand the comment about restore_ops
hooks - do you mean something in restore_callbacks ?


Xen-devel mailing list



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