WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2/2] x86/vmi: fix interrupt enable/disable/save/resto

To: "H. Peter Anvin" <hpa@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2/2] x86/vmi: fix interrupt enable/disable/save/restore calling convention.
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Fri, 30 Jan 2009 23:18:41 -0800
Cc: Zachary Amsden <zach@xxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Ravikiran Thirumalai <kiran@xxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>
Delivery-date: Fri, 30 Jan 2009 23:19:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4983DBC9.5080701@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1233182100@xxxxxxxxxxxxxxxxx> <49815764.6040809@xxxxxxxxxx> <49817C26.2020503@xxxxxxxx> <4983DBC9.5080701@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20090105)
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@xxxxxxxxxx>
---
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);



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>