public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xin Li <xin3.li@intel.com>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
	luto@kernel.org, ravi.v.shankar@intel.com,
	andrew.cooper3@citrix.com
Subject: [PATCH 2/2] x86/fred: Fix build with CONFIG_IA32_EMULATION=n
Date: Sat, 27 Jan 2024 01:37:28 -0800	[thread overview]
Message-ID: <20240127093728.1323-3-xin3.li@intel.com> (raw)
In-Reply-To: <20240127093728.1323-1-xin3.li@intel.com>

When CONFIG_IA32_EMULATION=n, int80_emulation() is NOT defined, fix it.

Fixes: 5e0636a41485 ("x86/fred: FRED entry/exit and dispatch code")
Link: https://lore.kernel.org/lkml/20240126100519.GBZbOD3xFB0v3mp5B1@fat_crate.local/
Reported-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Xin Li <xin3.li@intel.com>
---
 arch/x86/entry/entry_fred.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c
index 06d00c60ea64..ac120cbdaaf2 100644
--- a/arch/x86/entry/entry_fred.c
+++ b/arch/x86/entry/entry_fred.c
@@ -62,11 +62,13 @@ static noinstr void fred_intx(struct pt_regs *regs)
 	case X86_TRAP_OF:
 		return exc_overflow(regs);
 
+#ifdef CONFIG_IA32_EMULATION
 	/* INT80 */
 	case IA32_SYSCALL_VECTOR:
 		if (ia32_enabled())
 			return int80_emulation(regs);
 		fallthrough;
+#endif
 
 	default:
 		return exc_general_protection(regs, 0);
-- 
2.43.0


  parent reply	other threads:[~2024-01-27 10:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-27  9:37 [PATCH 0/2] x86/fred: Fix two build issues Xin Li
2024-01-27  9:37 ` [PATCH 1/2] x86/fred: Fix build with clang Xin Li
2024-01-27 18:14   ` H. Peter Anvin
2024-01-27 19:46     ` Li, Xin3
2024-01-28 19:33       ` H. Peter Anvin
2024-01-28 20:27         ` Li, Xin3
2024-01-29  6:45         ` [PATCH v1A " Xin Li
2024-01-30 10:34           ` Borislav Petkov
2024-01-27  9:37 ` Xin Li [this message]
2024-01-30 12:48   ` [PATCH 2/2] x86/fred: Fix build with CONFIG_IA32_EMULATION=n Borislav Petkov
2024-01-30 15:22     ` Li, Xin3
2024-01-30 15:31       ` Borislav Petkov
2024-01-30 16:30         ` Li, Xin3
2024-01-30 16:34           ` Borislav Petkov
2024-01-30 17:17       ` Borislav Petkov

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=20240127093728.1323-3-xin3.li@intel.com \
    --to=xin3.li@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=ravi.v.shankar@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox