Tue Jun 7 14:53:03 2011 UTC ()
Don't call psignal() without holding proc_lock. This is the cause of
the reboot of PR port-xen/45028
Now that Xen2 is gone, handle FPU context switches the same way as
amd64. This makes all tests in /usr/tests/lib/libc/ieeefp pass.


(bouyer)
diff -r1.702 -r1.703 src/sys/arch/i386/i386/machdep.c
diff -r1.139 -r1.140 src/sys/arch/i386/isa/npx.c
diff -r1.11 -r1.12 src/sys/arch/xen/include/i386/hypercalls.h

cvs diff -r1.702 -r1.703 src/sys/arch/i386/i386/machdep.c (expand / switch to unified diff)

--- src/sys/arch/i386/i386/machdep.c 2011/04/26 15:51:23 1.702
+++ src/sys/arch/i386/i386/machdep.c 2011/06/07 14:53:03 1.703
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machdep.c,v 1.702 2011/04/26 15:51:23 joerg Exp $ */ 1/* $NetBSD: machdep.c,v 1.703 2011/06/07 14:53:03 bouyer Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 4 * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
5 * The NetBSD Foundation, Inc. 5 * The NetBSD Foundation, Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to The NetBSD Foundation 8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Charles M. Hannum, by Jason R. Thorpe of the Numerical Aerospace 9 * by Charles M. Hannum, by Jason R. Thorpe of the Numerical Aerospace
10 * Simulation Facility NASA Ames Research Center, by Julio M. Merino Vidal, 10 * Simulation Facility NASA Ames Research Center, by Julio M. Merino Vidal,
11 * and by Andrew Doran. 11 * and by Andrew Doran.
12 * 12 *
13 * Redistribution and use in source and binary forms, with or without 13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions 14 * modification, are permitted provided that the following conditions
@@ -57,27 +57,27 @@ @@ -57,27 +57,27 @@
57 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 57 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
58 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 58 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
59 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 59 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
60 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 60 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
61 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 61 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
62 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 62 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
63 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 63 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64 * SUCH DAMAGE. 64 * SUCH DAMAGE.
65 * 65 *
66 * @(#)machdep.c 7.4 (Berkeley) 6/3/91 66 * @(#)machdep.c 7.4 (Berkeley) 6/3/91
67 */ 67 */
68 68
69#include <sys/cdefs.h> 69#include <sys/cdefs.h>
70__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.702 2011/04/26 15:51:23 joerg Exp $"); 70__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.703 2011/06/07 14:53:03 bouyer Exp $");
71 71
72#include "opt_beep.h" 72#include "opt_beep.h"
73#include "opt_compat_ibcs2.h" 73#include "opt_compat_ibcs2.h"
74#include "opt_compat_netbsd.h" 74#include "opt_compat_netbsd.h"
75#include "opt_compat_svr4.h" 75#include "opt_compat_svr4.h"
76#include "opt_cpureset_delay.h" 76#include "opt_cpureset_delay.h"
77#include "opt_ddb.h" 77#include "opt_ddb.h"
78#include "opt_ipkdb.h" 78#include "opt_ipkdb.h"
79#include "opt_kgdb.h" 79#include "opt_kgdb.h"
80#include "opt_mtrr.h" 80#include "opt_mtrr.h"
81#include "opt_modular.h" 81#include "opt_modular.h"
82#include "opt_multiboot.h" 82#include "opt_multiboot.h"
83#include "opt_multiprocessor.h" 83#include "opt_multiprocessor.h"
@@ -517,52 +517,52 @@ i386_proc0_tss_ldt_init(void) @@ -517,52 +517,52 @@ i386_proc0_tss_ldt_init(void)
517 struct pcb *pcb = lwp_getpcb(l); 517 struct pcb *pcb = lwp_getpcb(l);
518 518
519 pmap_kernel()->pm_ldt_sel = GSEL(GLDT_SEL, SEL_KPL); 519 pmap_kernel()->pm_ldt_sel = GSEL(GLDT_SEL, SEL_KPL);
520 pcb->pcb_cr0 = rcr0() & ~CR0_TS; 520 pcb->pcb_cr0 = rcr0() & ~CR0_TS;
521 pcb->pcb_esp0 = uvm_lwp_getuarea(l) + KSTACK_SIZE - 16; 521 pcb->pcb_esp0 = uvm_lwp_getuarea(l) + KSTACK_SIZE - 16;
522 pcb->pcb_iopl = SEL_KPL; 522 pcb->pcb_iopl = SEL_KPL;
523 l->l_md.md_regs = (struct trapframe *)pcb->pcb_esp0 - 1; 523 l->l_md.md_regs = (struct trapframe *)pcb->pcb_esp0 - 1;
524 memcpy(&pcb->pcb_fsd, &gdt[GUDATA_SEL], sizeof(pcb->pcb_fsd)); 524 memcpy(&pcb->pcb_fsd, &gdt[GUDATA_SEL], sizeof(pcb->pcb_fsd));
525 memcpy(&pcb->pcb_gsd, &gdt[GUDATA_SEL], sizeof(pcb->pcb_gsd)); 525 memcpy(&pcb->pcb_gsd, &gdt[GUDATA_SEL], sizeof(pcb->pcb_gsd));
526 526
527#ifndef XEN 527#ifndef XEN
528 lldt(pmap_kernel()->pm_ldt_sel); 528 lldt(pmap_kernel()->pm_ldt_sel);
529#else 529#else
530 HYPERVISOR_fpu_taskswitch(); 530 HYPERVISOR_fpu_taskswitch(1);
531 XENPRINTF(("lwp tss sp %p ss %04x/%04x\n", 531 XENPRINTF(("lwp tss sp %p ss %04x/%04x\n",
532 (void *)pcb->pcb_esp0, 532 (void *)pcb->pcb_esp0,
533 GSEL(GDATA_SEL, SEL_KPL), 533 GSEL(GDATA_SEL, SEL_KPL),
534 IDXSEL(GSEL(GDATA_SEL, SEL_KPL)))); 534 IDXSEL(GSEL(GDATA_SEL, SEL_KPL))));
535 HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb->pcb_esp0); 535 HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb->pcb_esp0);
536#endif 536#endif
537} 537}
538 538
539#ifdef XEN 539#ifdef XEN
540/* 540/*
541 * Switch context: 541 * Switch context:
542 * - honor CR0_TS in saved CR0 and request DNA exception on FPU use 542 * - honor CR0_TS in saved CR0 and request DNA exception on FPU use
543 * - switch stack pointer for user->kernel transition 543 * - switch stack pointer for user->kernel transition
544 */ 544 */
545void 545void
546i386_switch_context(lwp_t *l) 546i386_switch_context(lwp_t *l)
547{ 547{
548 struct cpu_info *ci; 548 struct cpu_info *ci;
549 struct pcb *pcb; 549 struct pcb *pcb;
550 struct physdev_op physop; 550 struct physdev_op physop;
551 551
552 pcb = lwp_getpcb(l); 552 pcb = lwp_getpcb(l);
553 ci = curcpu(); 553 ci = curcpu();
554 if (ci->ci_fpused) { 554 if (ci->ci_fpused) {
555 HYPERVISOR_fpu_taskswitch(); 555 HYPERVISOR_fpu_taskswitch(1);
556 ci->ci_fpused = 0; 556 ci->ci_fpused = 0;
557 } 557 }
558 558
559 HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb->pcb_esp0); 559 HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb->pcb_esp0);
560 560
561 physop.cmd = PHYSDEVOP_SET_IOPL; 561 physop.cmd = PHYSDEVOP_SET_IOPL;
562 physop.u.set_iopl.iopl = pcb->pcb_iopl; 562 physop.u.set_iopl.iopl = pcb->pcb_iopl;
563 HYPERVISOR_physdev_op(&physop); 563 HYPERVISOR_physdev_op(&physop);
564} 564}
565#endif /* XEN */ 565#endif /* XEN */
566 566
567#ifndef XEN 567#ifndef XEN
568/* 568/*

cvs diff -r1.139 -r1.140 src/sys/arch/i386/isa/Attic/npx.c (expand / switch to unified diff)

--- src/sys/arch/i386/isa/Attic/npx.c 2010/12/20 00:25:35 1.139
+++ src/sys/arch/i386/isa/Attic/npx.c 2011/06/07 14:53:03 1.140
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: npx.c,v 1.139 2010/12/20 00:25:35 matt Exp $ */ 1/* $NetBSD: npx.c,v 1.140 2011/06/07 14:53:03 bouyer Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software developed for The NetBSD Foundation 7 * This code is derived from software developed for The NetBSD Foundation
8 * by Andrew Doran. 8 * by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -86,27 +86,27 @@ @@ -86,27 +86,27 @@
86 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 86 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
87 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 87 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
88 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 88 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
89 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 89 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
90 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 90 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
91 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 91 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
92 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 92 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
93 * SUCH DAMAGE. 93 * SUCH DAMAGE.
94 * 94 *
95 * @(#)npx.c 7.2 (Berkeley) 5/12/91 95 * @(#)npx.c 7.2 (Berkeley) 5/12/91
96 */ 96 */
97 97
98#include <sys/cdefs.h> 98#include <sys/cdefs.h>
99__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.139 2010/12/20 00:25:35 matt Exp $"); 99__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.140 2011/06/07 14:53:03 bouyer Exp $");
100 100
101#if 0 101#if 0
102#define IPRINTF(x) printf x 102#define IPRINTF(x) printf x
103#else 103#else
104#define IPRINTF(x) 104#define IPRINTF(x)
105#endif 105#endif
106 106
107#include "opt_multiprocessor.h" 107#include "opt_multiprocessor.h"
108#include "opt_xen.h" 108#include "opt_xen.h"
109 109
110#include <sys/param.h> 110#include <sys/param.h>
111#include <sys/systm.h> 111#include <sys/systm.h>
112#include <sys/conf.h> 112#include <sys/conf.h>
@@ -149,28 +149,28 @@ __KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.13 @@ -149,28 +149,28 @@ __KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.13
149 * 3b) Otherwise, reload the process's previous NPX state. 149 * 3b) Otherwise, reload the process's previous NPX state.
150 * 150 *
151 * When a process is created or exec()s, its saved cr0 image has the TS bit 151 * When a process is created or exec()s, its saved cr0 image has the TS bit
152 * set and the MDL_USEDFPU bit clear. The MDL_USEDFPU bit is set when the 152 * set and the MDL_USEDFPU bit clear. The MDL_USEDFPU bit is set when the
153 * process first gets a DNA and the NPX is initialized. The TS bit is turned 153 * process first gets a DNA and the NPX is initialized. The TS bit is turned
154 * off when the NPX is used, and turned on again later when the process's NPX 154 * off when the NPX is used, and turned on again later when the process's NPX
155 * state is saved. 155 * state is saved.
156 */ 156 */
157 157
158static int x86fpflags_to_ksiginfo(uint32_t flags); 158static int x86fpflags_to_ksiginfo(uint32_t flags);
159static int npxdna(struct cpu_info *); 159static int npxdna(struct cpu_info *);
160 160
161#ifdef XEN 161#ifdef XEN
162#define clts() 162#define clts() HYPERVISOR_fpu_taskswitch(0)
163#define stts() 163#define stts() HYPERVISOR_fpu_taskswitch(1)
164#endif 164#endif
165 165
166static enum npx_type npx_type; 166static enum npx_type npx_type;
167volatile u_int npx_intrs_while_probing; 167volatile u_int npx_intrs_while_probing;
168volatile u_int npx_traps_while_probing; 168volatile u_int npx_traps_while_probing;
169 169
170extern int i386_fpu_present; 170extern int i386_fpu_present;
171extern int i386_fpu_exception; 171extern int i386_fpu_exception;
172extern int i386_fpu_fdivbug; 172extern int i386_fpu_fdivbug;
173 173
174struct npx_softc *npx_softc; 174struct npx_softc *npx_softc;
175 175
176static inline void 176static inline void
@@ -180,29 +180,27 @@ fpu_save(union savefpu *addr) @@ -180,29 +180,27 @@ fpu_save(union savefpu *addr)
180 { 180 {
181 fxsave(&addr->sv_xmm); 181 fxsave(&addr->sv_xmm);
182 182
183 /* FXSAVE doesn't FNINIT like FNSAVE does -- so do it here. */ 183 /* FXSAVE doesn't FNINIT like FNSAVE does -- so do it here. */
184 fninit(); 184 fninit();
185 } else 185 } else
186 fnsave(&addr->sv_87); 186 fnsave(&addr->sv_87);
187} 187}
188 188
189static int 189static int
190npxdna_empty(struct cpu_info *ci) 190npxdna_empty(struct cpu_info *ci)
191{ 191{
192 192
193#ifndef XEN 
194 panic("npxdna vector not initialized"); 193 panic("npxdna vector not initialized");
195#endif 
196 return 0; 194 return 0;
197} 195}
198 196
199 197
200int (*npxdna_func)(struct cpu_info *) = npxdna_empty; 198int (*npxdna_func)(struct cpu_info *) = npxdna_empty;
201 199
202#ifndef XEN 200#ifndef XEN
203/* 201/*
204 * This calls i8259_* directly, but currently we can count on systems 202 * This calls i8259_* directly, but currently we can count on systems
205 * having a i8259 compatible setup all the time. Maybe have to change 203 * having a i8259 compatible setup all the time. Maybe have to change
206 * that in the future. 204 * that in the future.
207 */ 205 */
208enum npx_type 206enum npx_type
@@ -497,27 +495,29 @@ npxintr(void *arg, struct intrframe *fra @@ -497,27 +495,29 @@ npxintr(void *arg, struct intrframe *fra
497 } 495 }
498 496
499 trapsignal(l, &ksi); 497 trapsignal(l, &ksi);
500 } else { 498 } else {
501 /* 499 /*
502 * This is a nested interrupt. This should only happen when 500 * This is a nested interrupt. This should only happen when
503 * an IRQ13 occurs at the same time as a higher-priority 501 * an IRQ13 occurs at the same time as a higher-priority
504 * interrupt. 502 * interrupt.
505 * 503 *
506 * XXX 504 * XXX
507 * Currently, we treat this like an asynchronous interrupt, but 505 * Currently, we treat this like an asynchronous interrupt, but
508 * this has disadvantages. 506 * this has disadvantages.
509 */ 507 */
 508 mutex_enter(proc_lock);
510 psignal(l->l_proc, SIGFPE); 509 psignal(l->l_proc, SIGFPE);
 510 mutex_exit(proc_lock);
511 } 511 }
512 512
513 kpreempt_enable(); 513 kpreempt_enable();
514 return (1); 514 return (1);
515} 515}
516 516
517/* map x86 fp flags to ksiginfo fp codes */ 517/* map x86 fp flags to ksiginfo fp codes */
518/* see table 8-4 of the IA-32 Intel Architecture */ 518/* see table 8-4 of the IA-32 Intel Architecture */
519/* Software Developer's Manual, Volume 1 */ 519/* Software Developer's Manual, Volume 1 */
520/* XXX punting on the stack fault with FLTINV */ 520/* XXX punting on the stack fault with FLTINV */
521static int 521static int
522x86fpflags_to_ksiginfo(uint32_t flags) 522x86fpflags_to_ksiginfo(uint32_t flags)
523{ 523{

cvs diff -r1.11 -r1.12 src/sys/arch/xen/include/i386/Attic/hypercalls.h (expand / switch to unified diff)

--- src/sys/arch/xen/include/i386/Attic/hypercalls.h 2011/03/30 22:57:24 1.11
+++ src/sys/arch/xen/include/i386/Attic/hypercalls.h 2011/06/07 14:53:03 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: hypercalls.h,v 1.11 2011/03/30 22:57:24 jym Exp $ */ 1/* $NetBSD: hypercalls.h,v 1.12 2011/06/07 14:53:03 bouyer Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Manuel Bouyer. 4 * Copyright (c) 2006 Manuel Bouyer.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 14 *
@@ -216,51 +216,37 @@ static __inline int @@ -216,51 +216,37 @@ static __inline int
216HYPERVISOR_mmuext_op(struct mmuext_op *op, int count, int *success_count, 216HYPERVISOR_mmuext_op(struct mmuext_op *op, int count, int *success_count,
217 domid_t domid) 217 domid_t domid)
218{ 218{
219 int ret; 219 int ret;
220 unsigned long ign1, ign2, ign3, ign4; 220 unsigned long ign1, ign2, ign3, ign4;
221 221
222 _hypercall(__HYPERVISOR_mmuext_op, 222 _hypercall(__HYPERVISOR_mmuext_op,
223 _harg("1" (op), "2" (count), "3" (success_count), "4" (domid)), 223 _harg("1" (op), "2" (count), "3" (success_count), "4" (domid)),
224 _harg("=a" (ret), "=b" (ign1), "=c" (ign2), "=d" (ign3), "=S" (ign4))); 224 _harg("=a" (ret), "=b" (ign1), "=c" (ign2), "=d" (ign3), "=S" (ign4)));
225 225
226 return ret; 226 return ret;
227} 227}
228 228
229#if 0 
230static __inline int 229static __inline int
231HYPERVISOR_fpu_taskswitch(int set) 230HYPERVISOR_fpu_taskswitch(int set)
232{ 231{
233 long ret; 232 long ret;
234 long ign1; 233 long ign1;
235 234
236 _hypercall(__HYPERVISOR_fpu_taskswitch, _harg("1" (set)), 235 _hypercall(__HYPERVISOR_fpu_taskswitch, _harg("1" (set)),
237 _harg("=a" (ret), "=b" (ign1))); 236 _harg("=a" (ret), "=b" (ign1)));
238 237
239 return ret; 238 return ret;
240} 239}
241#else /* 0 */ 
242/* Xen2 compat: always i38HYPERVISOR_fpu_taskswitch(1) */ 
243static __inline int 
244HYPERVISOR_fpu_taskswitch(void) 
245{ 
246 long ret; 
247 long ign1; 
248 _hypercall(__HYPERVISOR_fpu_taskswitch, _harg("1" (1)), 
249 _harg("=a" (ret), "=b" (ign1))); 
250 
251 return ret; 
252} 
253#endif /* 0 */ 
254 240
255static __inline int 241static __inline int
256HYPERVISOR_update_descriptor(uint64_t ma, uint32_t word1, uint32_t word2) 242HYPERVISOR_update_descriptor(uint64_t ma, uint32_t word1, uint32_t word2)
257{ 243{
258 int ret; 244 int ret;
259 unsigned long ign1, ign2, ign3, ign4; 245 unsigned long ign1, ign2, ign3, ign4;
260 int ma1 = ma & 0xffffffff; 246 int ma1 = ma & 0xffffffff;
261 int ma2 = (ma >> 32) & 0xffffffff; 247 int ma2 = (ma >> 32) & 0xffffffff;
262 248
263 _hypercall(__HYPERVISOR_update_descriptor, 249 _hypercall(__HYPERVISOR_update_descriptor,
264 _harg("1" (ma1), "2" (ma2), "3" (word1), "4" (word2)), 250 _harg("1" (ma1), "2" (ma2), "3" (word1), "4" (word2)),
265 _harg("=a" (ret), "=b" (ign1), "=c" (ign2), "=d" (ign3), "=S" (ign4))); 251 _harg("=a" (ret), "=b" (ign1), "=c" (ign2), "=d" (ign3), "=S" (ign4)));
266 252