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 Wed, Feb 20, 2013 at 3:10 PM, Zhang, Yang Z <yang.z.zhang@xxxxxxxxx> wrote:
>>>>
>>>> push %%cs
>>> "push %%cs" is invalid in x86_64.
>>
>> Oops. 'push[lq] $__KERNEL_CS' then.
> Is this right? Just copy it from other file.
>
> #define __STR(X) #X
> #define STR(X) __STR(X)
>
> #ifdef CONFIG_X86_64
>                         "pushq $"STR(__KERNEL_CS)" \n\t"
> #else
>                         "pushl $"STR(__KERNEL_CS)" \n\t"
> #endif
>
> #undef STR
> #undef __STR
>

Use __ASM_SIZE and an immediate operand for __KERNEL_CS:

 asm ( ... : : [cs]"i"(__KERNEL_CS) );

and the code will be cleaner.
--
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