Re: [PATCH v3 1/2] KVM: VMX: enable acknowledge interupt on vmexit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 21, 2013 at 10:58 AM, Zhang, Yang Z <yang.z.zhang@xxxxxxxxx> wrote:
> Thanks. Here is code after changing, please review it:
>
>                 asm(
>                         "mov %0, %%" _ASM_DX " \n\t"
> #ifdef CONFIG_X86_64
>                         "mov %%" _ASM_SP ", %%" _ASM_BX " \n\t"
>                         "and $0xfffffffffffffff0, %%" _ASM_SP " \n\t"
>                         "mov %%ss, %%" _ASM_AX " \n\t"
>                         "push %%" _ASM_AX " \n\t"
>                         "push %%" _ASM_BX " \n\t"
> #endif
>                         "pushf \n\t"
>                         "orl $0x200, (%%" _ASM_SP ") \n\t"
>                         __ASM_SIZE(push) " %c[cs] \n\t"
>                         "call *%% " _ASM_DX " \n\t"
>                         : : "m"(entry), [cs]"i"(__KERNEL_CS) :
> #ifdef CONFIG_X86_64
>                         "rax", "rbx", "rdx"
> #else
>                         "edx"
> #endif
>                         );

For cleanliness, you can provide more parameters via the constraints:

  "m"(entry) -> [entry]"r"(entry) (and then use "call *[entry]")
  use "push %c[ss]" for ss
  and [sp]"=&r"(tmp) instead of rdx/edx as the temporary for rsp
--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux