We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d14a7db commit e91b6aaCopy full SHA for e91b6aa
hypervisor/common/schedule.c
@@ -199,14 +199,26 @@ static void switch_to(struct vcpu *curr)
199
if (curr == NULL) {
200
asm volatile ("movq %1, %%rsp\n"
201
"movq $0, %%rdi\n"
202
- "jmp *%0\n"
+ "call 22f\n"
203
+ "11: \n"
204
+ "pause\n"
205
+ "jmp 11b\n"
206
+ "22:\n"
207
+ "mov %0, (%%rsp)\n"
208
+ "ret\n"
209
:
210
: "a"(default_idle), "r"(cur_sp)
211
: "memory");
212
} else {
213
asm volatile ("movq %2, %%rsp\n"
214
"movq %0, %%rdi\n"
- "jmp *%1\n"
215
+ "call 44f\n"
216
+ "33: \n"
217
218
+ "jmp 33b\n"
219
+ "44:\n"
220
+ "mov %1, (%%rsp)\n"
221
222
223
: "c"(curr), "a"(vcpu_thread), "r"(cur_sp)
224
0 commit comments