Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1665773 > unrolled thread
| Started by | Brian Gerst <brgerst@gmail.com> |
|---|---|
| First post | 2017-06-14 14:50 +0200 |
| Last post | 2017-06-14 14:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/3] x86-32: Simplify IOPL switch check Brian Gerst <brgerst@gmail.com> - 2017-06-14 14:50 +0200
| From | Brian Gerst <brgerst@gmail.com> |
|---|---|
| Date | 2017-06-14 14:50 +0200 |
| Subject | [PATCH 2/3] x86-32: Simplify IOPL switch check |
| Message-ID | <tSfUe-5dU-31@gated-at.bofh.it> |
Remove the get_kernel_rpl() call from the test for switching IOPL. Instead
make set_iopl_mask() a no-op when Xen is running in supervisor mode.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
arch/x86/kernel/process_32.c | 2 +-
arch/x86/xen/enlighten_pv.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index ffeae81..b2d1f7c 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -263,7 +263,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
* is running virtualized at a non-zero CPL, the popf will
* not restore flags, so it must be done in a separate step.
*/
- if (get_kernel_rpl() && unlikely(prev->iopl != next->iopl))
+ if (unlikely(prev->iopl != next->iopl))
set_iopl_mask(next->iopl);
/*
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index f33eef4..05257c0 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -1350,8 +1350,10 @@ asmlinkage __visible void __init xen_start_kernel(void)
#ifdef CONFIG_X86_32
pv_info.kernel_rpl = 1;
- if (xen_feature(XENFEAT_supervisor_mode_kernel))
+ if (xen_feature(XENFEAT_supervisor_mode_kernel)) {
pv_info.kernel_rpl = 0;
+ pv_cpu_ops.set_iopl_mask = paravirt_nop;
+ }
#else
pv_info.kernel_rpl = 0;
#endif
--
2.9.4
Back to top | Article view | linux.kernel
csiph-web