H. Peter Anvin wrote: > It's not *quite* that easy. The assembly code around this is pretty > extensive, because it has to stand on its head in order to present the > proper register image. > Having just stood on my head for 55 breaths, might I suggest we implement a binary equivalent CPUID paravirt-ops wrapper; then the assembly code can just call CPUID and we can redefine it to call to a stub, which makes the pv-ops CPUID call, the puts the outputs back in the proper registers. The VMI ROM CPUID is binary identical in register format with the native instruction, so it need not do a headstand. For the others, ENTRY(paravirt_raw_cpuid) pushl %edx pushl %ecx pushl %ebx pushl %eax mov %esp, %eax /* pointer for eax in/out */ leal 4(%esp), %edx /* pointer for ebx in/out */ leal 8(%esp), %ecx /* pointer for ecx in/out */ leal 12(%esp), %ebx /* pointer for edx in/out */ pushl %ebx /* arg 4 passed on stack */ call *(paravirt_ops+pv_offset_CPUID) addl $4, %esp popl %eax popl %ebx popl %ecx popl %edx ret Should do the right thing. In any case, thanks for the heads up. Zach _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization