All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Wendling <morbo@google.com>
To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>,
	David Matlack <dmatlack@google.com>,
	Sean Christopherson <seanjc@google.com>,
	Jim Mattson <jmattson@google.com>
Cc: Bill Wendling <morbo@google.com>
Subject: [kvm-unit-tests PATCH v2 2/5] x86: realmode: mark exec_in_big_real_mode as noinline
Date: Wed,  8 Sep 2021 13:45:38 -0700	[thread overview]
Message-ID: <20210908204541.3632269-3-morbo@google.com> (raw)
In-Reply-To: <20210908204541.3632269-1-morbo@google.com>

exec_in_big_real_mode() uses inline asm that has labels. Clang decides
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@google.com>
---
 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)
 {
 	unsigned long tmp;
 	static struct regs save;
-- 
2.33.0.309.g3052b89438-goog


  parent reply	other threads:[~2021-09-08 20:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 22:26 [PATCH 0/4] Prevent inlining for asm blocks with labels Bill Wendling
2021-08-25 22:26 ` [PATCH 1/4] x86: realmode: mark exec_in_big_real_mode as noinline Bill Wendling
2021-08-25 22:26 ` [PATCH 2/4] x86: svm: mark test_run " Bill Wendling
2021-08-25 22:26 ` [PATCH 3/4] x86: umip: mark do_ring3 " Bill Wendling
2021-08-25 22:26 ` [PATCH 4/4] x86: vmx: mark some test_* functions " Bill Wendling
2021-08-26 18:21 ` [PATCH 0/4] Prevent inlining for asm blocks with labels Sean Christopherson
2021-08-26 21:05   ` Bill Wendling
2021-09-08 20:45 ` [kvm-unit-tests PATCH v2 0/5] " Bill Wendling
2021-09-08 20:45   ` [kvm-unit-tests PATCH v2 1/5] libcflag: define the "noinline" macro Bill Wendling
2021-09-08 21:44     ` Sean Christopherson
2021-09-08 20:45   ` Bill Wendling [this message]
2021-09-08 21:49     ` [kvm-unit-tests PATCH v2 2/5] x86: realmode: mark exec_in_big_real_mode as noinline Sean Christopherson
2021-09-08 22:07       ` Bill Wendling
2021-09-08 22:51         ` Sean Christopherson
2021-09-09 17:19           ` Bill Wendling
2021-09-08 20:45   ` [kvm-unit-tests PATCH v2 3/5] x86: svm: mark test_run " Bill Wendling
2021-09-08 20:45   ` [kvm-unit-tests PATCH v2 4/5] x86: umip: mark do_ring3 " Bill Wendling
2021-09-08 20:45   ` [kvm-unit-tests PATCH v2 5/5] x86: vmx: mark some test_* functions " Bill Wendling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210908204541.3632269-3-morbo@google.com \
    --to=morbo@google.com \
    --cc=dmatlack@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=r.bolshakov@yadro.com \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.