Skip to contentSkip to conversation

vmx-io.patch

PATCH New Arun Sharma 1 participant 1 message May 27, 2005 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vmx-io.patch

Fix some of the race conditions that show up when the device models are running on one CPU and the VMX domain is running on another on a SMP system.

arch/x86/vmx.c renamed from xen/arch/x86/vmx.c +1 -2
@@ -465,7 +465,7 @@
     set_bit(ARCH_VMX_IO_WAIT, &d->arch.arch_vmx.flags);
     p->state = STATE_IOREQ_READY;
     evtchn_send(IOPACKET_PORT);
-    do_block();
+    vmx_wait_io();
 }
 
 enum { COPY_IN = 0, COPY_OUT };
@@ -1266,7 +1266,6 @@
     case EXIT_REASON_PENDING_INTERRUPT:
         __vmwrite(CPU_BASED_VM_EXEC_CONTROL, 
               MONITOR_CPU_BASED_EXEC_CONTROLS);
-        vmx_intr_assist(ed);
         break;
     case EXIT_REASON_TASK_SWITCH:
         __vmx_bug(&regs);

===== arch/x86/vmx_io.c 1.24 vs edited =====

arch/x86/vmx_io.c renamed from xen/arch/x86/vmx_io.c +56 -26

120 lines not on this page · raw message

===== arch/x86/vmx_platform.c 1.19 vs edited =====

arch/x86/vmx_platform.c renamed from xen/arch/x86/vmx_platform.c +1 -2
@@ -470,7 +470,6 @@
     struct mi_per_cpu_info *mpci_p;
     struct cpu_user_regs *inst_decoder_regs;
     extern long evtchn_send(int lport);
-    extern long do_block(void);
 
     mpci_p = &current->arch.arch_vmx.vmx_platform.mpci;
     inst_decoder_regs = mpci_p->inst_decoder_regs;
@@ -520,7 +519,7 @@
 #endif
 
     evtchn_send(IOPACKET_PORT);
-    do_block(); 
+    vmx_wait_io();
 }
 
 void handle_mmio(unsigned long va, unsigned long gpa)

===== include/asm-x86/vmx_platform.h 1.9 vs edited =====

include/asm-x86/vmx_platform.h renamed from xen/include/asm-x86/vmx_platform.h +1 -0
@@ -85,6 +85,7 @@
 };
 
 extern void handle_mmio(unsigned long, unsigned long);
+extern void vmx_wait_io(void);
 extern int vmx_setup_platform(struct exec_domain *, struct cpu_user_regs *);
 
 // XXX - think about this -- maybe use bit 30 of the mfn to signify an MMIO frame.