Re: [kvm-unit-tests PATCH v2 2/5] x86: realmode: mark exec_in_big_real_mode as noinline

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

 



On Wed, Sep 8, 2021 at 2:49 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Wed, Sep 08, 2021, Bill Wendling wrote:
> > exec_in_big_real_mode() uses inline asm that has labels. Clang decides
>
> _global_ labels.  Inlining functions with local labels, including asm goto labels,
> is not problematic, the issue is specific to labels that must be unique for a
> given compilation unit.
>
> > that it can inline this function, which causes the assembler to complain
> > about duplicate symbols. Mark the function as "noinline" to prevent
> > this.
> >
> > Signed-off-by: Bill Wendling <morbo@xxxxxxxxxx>
> > ---
> >  x86/realmode.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/x86/realmode.c b/x86/realmode.c
> > index b4fa603..07a477f 100644
> > --- a/x86/realmode.c
> > +++ b/x86/realmode.c
> > @@ -178,7 +178,7 @@ static inline void init_inregs(struct regs *regs)
> >               inregs.esp = (unsigned long)&tmp_stack.top;
> >  }
> >
> > -static void exec_in_big_real_mode(struct insn_desc *insn)
> > +static __attribute__((noinline)) void exec_in_big_real_mode(struct insn_desc *insn)
>
> Forgot to use the new define in this patch :-)
>
This was intentional. realmode.c doesn't #include any header files,
and adding '#include "libflat.h" causes a lot of warnings and errors.
We could do that, but I feel it's beyond the scope of this series of
patches.

-bw



[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