From: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
To: Keir Fraser <Keir.Fraser@eu.citrix.com>
Cc: Xen Devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 0/7][RFC] make xenguest save & restore functions reentrant
Date: Sun, 15 Nov 2009 10:08:36 +0000 [thread overview]
Message-ID: <4AFFD324.70302@eu.citrix.com> (raw)
In-Reply-To: <C72419E1.1A245%keir.fraser@eu.citrix.com>
Keir Fraser wrote:
> Rather than making the macros take extra arguments, can you make them refer
> to ctx->foo instead (i.e., make it implciit the structure containing these
> ex-globals is called ctx)? It avoids having to change every caller, and some
> callers already have macros nested three deep and adding guest_width/max_mfn
> all over the place does not help readability.
I agree this isn't pretty. unfortunately i tried the route of changing
the macro to get from ctx-> but the macro is used also on other files
xc_core_x86.c and xc_resume.c which use the macro with the guest_width
and/or p2m_size on the call stack.
The only other solution I though of, would be to duplicate the value of
the ex-globals on the stack like:
...
int guest_width = ctx->guest_width;
int p2m_size = ctx->p2m_size;
...
I decided against, because it might look odd since it doesn't appear
used and also means I need to track all assignment to this variable.
If you prefer, I can change this patchset to do that.
There's also the solution of carrying this patchset, and prettyfying
some of thoses macro calls as if there were "expensive calls" just like
my patch 5/7 does.
> Also send also as attachments next time. I have problems applying these
> patches from inline email for some reason; some chunks don't apply.
yep ok.
--
Vincent
next prev parent reply other threads:[~2009-11-15 10:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 23:43 [PATCH 0/7][RFC] make xenguest save & restore functions reentrant Vincent Hanquez
2009-11-13 23:43 ` [PATCH 1/7] add explicit parameter to macros instead of assuming symbol name available on the stack or as a global variable Vincent Hanquez
2009-11-13 23:43 ` [PATCH 2/7] p2m_size is unnecessarily passed as a parameter when it's available " Vincent Hanquez
2009-11-13 23:43 ` [PATCH 3/7] move global variables in suspend into a global context Vincent Hanquez
2009-11-13 23:43 ` [PATCH 4/7] move the suspend_ctx on the save stack instead of a global one Vincent Hanquez
2009-11-13 23:43 ` [PATCH 5/7] alias i/FPP(guest_width) as p2m_index and replace every usage Vincent Hanquez
2009-11-13 23:43 ` [PATCH 6/7] move restore global variables into a global context Vincent Hanquez
2009-11-13 23:43 ` [PATCH 7/7] pass restore context as an argument instead of " Vincent Hanquez
2009-11-14 8:25 ` [PATCH 0/7][RFC] make xenguest save & restore functions reentrant Keir Fraser
2009-11-15 10:08 ` Vincent Hanquez [this message]
2009-11-15 10:20 ` Keir Fraser
2009-11-16 11:39 ` Vincent Hanquez
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=4AFFD324.70302@eu.citrix.com \
--to=vincent.hanquez@eu.citrix.com \
--cc=Keir.Fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.