Il 28/07/2013 16:00, Arthur Chunqi Li ha scritto: > + > + while (1) { > + asm volatile ( > + "mov %%rsp, %%rsi\n\t" > + "mov %2, %%rdi\n\t" > + "vmwrite %%rsi, %%rdi\n\t" > + > + LOAD_GPR_C > + "cmpl $0, %1\n\t" > + "jne 1f\n\t" > + LOAD_RFLAGS > + "vmlaunch\n\t" > + "jmp 2f\n\t" > + "1: " > + "vmresume\n\t" > + "2: " > + "setbe %0\n\t" Perhaps here add jbe vmx_return ud2 but it can be added in a follow-up. > + "vmx_return:\n\t" > + SAVE_GPR_C > + SAVE_RFLAGS > + : "=m"(fail) > + : "m"(launched), "i"(HOST_RSP) > + : "rdi", "rsi", "memory", "cc" > + > + ); Nice! :) I pushed the patch. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html