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

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

 



On Mon, May 4, 2020 at 12:23 AM Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
>
> On Tue, Apr 28, 2020 at 3:48 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> >
> > On 26/04/20 13:52, Uros Bizjak wrote:
> > > Improve handle_external_interrupt_irqoff inline assembly in several ways:
> > > - use "n" operand constraint instead of "i" and remove
> > >   unneeded %c operand modifiers and "$" prefixes
> > > - use %rsp instead of _ASM_SP, since we are in CONFIG_X86_64 part
> > > - use $-16 immediate to align %rsp
> > > - remove unneeded use of __ASM_SIZE macro
> > > - define "ss" named operand only for X86_64
> > >
> > > The patch introduces no functional changes.
> >
> > I think I agree with all of these, so the patch is okay!  Thanks,
>
> Actually, after some more thinking, neither "i", and neither "n" is
> correct for x86_64 as far as push is concerned. The correct constraint
> is "e", but in case the value doesn't fit this constraint, we have to
> allow "r" and eventually "m". Let's use "rme", which allows everything
> the insn is able to handle, and leave to the compiler to use the
> optimal one. GCC uses this constraint internally, and it also fits
> 32bit targets.

And yes... I forgot that "m" allows stack slots, which won't fly due
to clobbered stack pointer.

> V3 patch is in the works.

V4, actually. Sorry for the mess.

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