Re: [PATCH] KVM: VMX: Improve handle_external_interrupt_irqoff inline assembly

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

 



On Fri, Apr 17, 2020 at 2:07 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> On 17/04/20 13:35, Uros Bizjak wrote:
> > Improve handle_external_interrupt_irqoff inline assembly in several ways:
> > - use __stringify to use __KERNEL_DS and __KERNEL_CS directly in assembler
>
> What's the advantage of this to pushing cs and ss?  We are faking an
> interrupt gate, and interrupts push cs and ss not __KERNEL_DS and
> __KERNEL_CS.

I see. If the current form is documenting the above, then there is
indeed no compelling reason for the change.
>
> > - use %rsp instead of _ASM_SP, since we are in CONFIG_X86_64 part
> > - use $-16 immediate to align %rsp
> > - avoid earlyclobber by using "l" GCC input operand constraint
>
> What is this and where is it documented?!? :)

I was going to say that it is documented in [1] under x86 family
section, but indeed, there is no description of "l" constraint. It is
internal to the compiler. :(

(define_register_constraint "l" "INDEX_REGS"
 "@internal Any register that can be used as the index in a base+index
  memory access: that is, any general register except the stack pointer.")

Other changes are minor and really not worth the maintainer's time to
handle the patch. Please consider the patch retracted.

[1] https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html

Uros.



[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