* [PATCH] powerpc/epapr: add "memory" as a clobber to all hypercalls
@ 2012-03-15 22:41 Timur Tabi
2012-03-21 17:21 ` Kumar Gala
0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2012-03-15 22:41 UTC (permalink / raw)
To: galak, linuxppc-dev
The "memory" clobber tells the compiler to ensure that all writes to memory
are committed before the hypercall is made.
"memory" is only necessary for hcalls where the Hypervisor will read or
write guest memory. However, we add it to all hcalls because the impact is
minimal, and we want to ensure that it's present for the hcalls that need it.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
arch/powerpc/include/asm/epapr_hcalls.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
index f3b0c2c..976835d 100644
--- a/arch/powerpc/include/asm/epapr_hcalls.h
+++ b/arch/powerpc/include/asm/epapr_hcalls.h
@@ -134,10 +134,15 @@
* whether they will be clobbered.
*
* Note that r11 can be used as an output parameter.
+ *
+ * The "memory" clobber is only necessary for hcalls where the Hypervisor
+ * will read or write guest memory. However, we add it to all hcalls because
+ * the impact is minimal, and we want to ensure that it's present for the
+ * hcalls that need it.
*/
/* List of common clobbered registers. Do not use this macro. */
-#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc"
+#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc", "memory"
#define EV_HCALL_CLOBBERS8 EV_HCALL_CLOBBERS
#define EV_HCALL_CLOBBERS7 EV_HCALL_CLOBBERS8, "r10"
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/epapr: add "memory" as a clobber to all hypercalls
2012-03-15 22:41 [PATCH] powerpc/epapr: add "memory" as a clobber to all hypercalls Timur Tabi
@ 2012-03-21 17:21 ` Kumar Gala
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2012-03-21 17:21 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
On Mar 15, 2012, at 5:41 PM, Timur Tabi wrote:
> The "memory" clobber tells the compiler to ensure that all writes to =
memory
> are committed before the hypercall is made.
>=20
> "memory" is only necessary for hcalls where the Hypervisor will read =
or
> write guest memory. However, we add it to all hcalls because the =
impact is
> minimal, and we want to ensure that it's present for the hcalls that =
need it.
>=20
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/include/asm/epapr_hcalls.h | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
applied
- k=
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-21 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 22:41 [PATCH] powerpc/epapr: add "memory" as a clobber to all hypercalls Timur Tabi
2012-03-21 17:21 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).