All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "H. Peter Anvin" <hpa@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Xen-devel <xen-devel@lists.xensource.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Zachary Amsden <zach@vmware.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Ravikiran Thirumalai <kiran@scalemp.com>
Subject: [PATCH 2/2] x86/vmi: fix interrupt enable/disable/save/restore calling convention.
Date: Fri, 30 Jan 2009 23:18:41 -0800	[thread overview]
Message-ID: <4983FB51.8080008@goop.org> (raw)
In-Reply-To: <4983DBC9.5080701@kernel.org>

Zach says:
> Enable/Disable have no clobbers at all.
> Save clobbers only return value, %eax
> Restore also clobbers nothing.

This is precisely compatible with the calling convention, so we can
just call them directly without wrapping.

(Compile tested only.)

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
 arch/x86/kernel/vmi_32.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

===================================================================
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -670,10 +670,11 @@
 	para_fill(pv_mmu_ops.write_cr2, SetCR2);
 	para_fill(pv_mmu_ops.write_cr3, SetCR3);
 	para_fill(pv_cpu_ops.write_cr4, SetCR4);
-	para_fill(pv_irq_ops.save_fl, GetInterruptMask);
-	para_fill(pv_irq_ops.restore_fl, SetInterruptMask);
-	para_fill(pv_irq_ops.irq_disable, DisableInterrupts);
-	para_fill(pv_irq_ops.irq_enable, EnableInterrupts);
+
+	para_fill(pv_irq_ops.save_fl.func, GetInterruptMask);
+	para_fill(pv_irq_ops.restore_fl.func, SetInterruptMask);
+	para_fill(pv_irq_ops.irq_disable.func, DisableInterrupts);
+	para_fill(pv_irq_ops.irq_enable.func, EnableInterrupts);
 
 	para_fill(pv_cpu_ops.wbinvd, WBINVD);
 	para_fill(pv_cpu_ops.read_tsc, RDTSC);



WARNING: multiple messages have this Message-ID (diff)
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "H. Peter Anvin" <hpa@kernel.org>
Cc: Zachary Amsden <zach@vmware.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	linux-kernel@vger.kernel.org,
	Ravikiran Thirumalai <kiran@scalemp.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: [PATCH 2/2] x86/vmi: fix interrupt enable/disable/save/restore calling convention.
Date: Fri, 30 Jan 2009 23:18:41 -0800	[thread overview]
Message-ID: <4983FB51.8080008@goop.org> (raw)
In-Reply-To: <4983DBC9.5080701@kernel.org>

Zach says:
> Enable/Disable have no clobbers at all.
> Save clobbers only return value, %eax
> Restore also clobbers nothing.

This is precisely compatible with the calling convention, so we can
just call them directly without wrapping.

(Compile tested only.)

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
 arch/x86/kernel/vmi_32.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

===================================================================
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -670,10 +670,11 @@
 	para_fill(pv_mmu_ops.write_cr2, SetCR2);
 	para_fill(pv_mmu_ops.write_cr3, SetCR3);
 	para_fill(pv_cpu_ops.write_cr4, SetCR4);
-	para_fill(pv_irq_ops.save_fl, GetInterruptMask);
-	para_fill(pv_irq_ops.restore_fl, SetInterruptMask);
-	para_fill(pv_irq_ops.irq_disable, DisableInterrupts);
-	para_fill(pv_irq_ops.irq_enable, EnableInterrupts);
+
+	para_fill(pv_irq_ops.save_fl.func, GetInterruptMask);
+	para_fill(pv_irq_ops.restore_fl.func, SetInterruptMask);
+	para_fill(pv_irq_ops.irq_disable.func, DisableInterrupts);
+	para_fill(pv_irq_ops.irq_enable.func, EnableInterrupts);
 
 	para_fill(pv_cpu_ops.wbinvd, WBINVD);
 	para_fill(pv_cpu_ops.read_tsc, RDTSC);

  parent reply	other threads:[~2009-01-31  7:18 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 22:35 [PATCH 0 of 7] x86/paravirt: optimise pvop calls and register use Jeremy Fitzhardinge
2009-01-28 22:35 ` Jeremy Fitzhardinge
2009-01-28 22:35 ` [PATCH 1 of 7] xen: move remaining mmu-related stuff into mmu.c Jeremy Fitzhardinge
2009-01-28 22:35 ` [PATCH 2 of 7] x86/pvops: add a paravirt_ident functions to allow special patching Jeremy Fitzhardinge
2009-01-29  8:05   ` Rusty Russell
2009-01-29  9:26     ` Jeremy Fitzhardinge
2009-01-29  9:26       ` Jeremy Fitzhardinge
2009-01-29 10:46     ` Jeremy Fitzhardinge
2009-01-29 10:46       ` Jeremy Fitzhardinge
2009-01-28 22:35 ` [PATCH 3 of 7] x86: fix paravirt clobber in entry_64.S Jeremy Fitzhardinge
2009-01-29  8:39   ` Rusty Russell
2009-01-29  9:28     ` Jeremy Fitzhardinge
2009-01-29  9:28       ` Jeremy Fitzhardinge
2009-01-28 22:35 ` [PATCH 4 of 7] x86/paravirt: selectively save/restore regs around pvops calls Jeremy Fitzhardinge
2009-01-29  8:47   ` Rusty Russell
2009-01-29  9:30     ` Jeremy Fitzhardinge
2009-01-29  9:30       ` Jeremy Fitzhardinge
2009-01-30  0:27       ` Rusty Russell
2009-01-28 22:35 ` [PATCH 5 of 7] x86/paravirt: add register-saving thunks to reduce caller register pressure Jeremy Fitzhardinge
2009-01-28 22:35   ` Jeremy Fitzhardinge
2009-02-06  7:28   ` Andi Kleen
2009-02-06 16:37     ` Jeremy Fitzhardinge
2009-02-06 16:37       ` Jeremy Fitzhardinge
2009-01-28 22:35 ` [PATCH 6 of 7] x86/paravirt: implement PVOP_CALL macros for callee-save functions Jeremy Fitzhardinge
2009-01-28 22:35 ` [PATCH 7 of 7] x86/paravirt: use callee-saved convention for pte_val/make_pte/etc Jeremy Fitzhardinge
2009-01-29  7:14 ` [PATCH 0 of 7] x86/paravirt: optimise pvop calls and register use H. Peter Anvin
2009-01-29  9:51   ` Jeremy Fitzhardinge
2009-01-29  9:51     ` Jeremy Fitzhardinge
2009-01-31  5:04     ` H. Peter Anvin
2009-01-31  7:16       ` Jeremy Fitzhardinge
2009-01-31 22:43         ` H. Peter Anvin
2009-01-31  7:17       ` [PATCH 1/2] x86/paravirt: don't restore second return reg Jeremy Fitzhardinge
2009-01-31  7:17         ` Jeremy Fitzhardinge
2009-01-31  7:18       ` Jeremy Fitzhardinge [this message]
2009-01-31  7:18         ` [PATCH 2/2] x86/vmi: fix interrupt enable/disable/save/restore calling convention Jeremy Fitzhardinge
2009-01-31 16:12       ` [PATCH 0 of 7] x86/paravirt: optimise pvop calls and register use Ingo Molnar
2009-01-31 16:12         ` Ingo Molnar
2009-01-31 17:00         ` Jeremy Fitzhardinge
2009-01-31 17:00           ` Jeremy Fitzhardinge
2009-02-04  2:10         ` Ingo Molnar
2009-02-04  2:10           ` Ingo Molnar
2009-02-04  2:16           ` Jeremy Fitzhardinge
2009-02-04  2:16             ` Jeremy Fitzhardinge
2009-02-04 14:26             ` Ingo Molnar
2009-02-04 14:26               ` Ingo Molnar
2009-02-04 17:06               ` Ingo Molnar

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=4983FB51.8080008@goop.org \
    --to=jeremy@goop.org \
    --cc=hpa@kernel.org \
    --cc=ian.campbell@citrix.com \
    --cc=kiran@scalemp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=zach@vmware.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.