|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCHv2 0/4] Set eflags prior to segments; fix cpl in SMM |
Date: | Wed, 30 Apr 2014 10:37:21 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
Il 29/04/2014 22:37, Kevin O'Connor ha scritto:
This patch series is an update to the patch I sent at: https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg04028.html The goal of the patch series is to fix the SMM handler so that it runs with the proper cpl. I've broken the series up based on the feedback from Paolo. As with the previous patch, this series moves cr0 and eflags changes above cpu_x86_load_seg_cache() calls as cpu_x86_load_seg_cache() inspects those flags. I didn't move the eflags setting in helper_ret_protected() because I don't think I can easily move the eflags logic (it's not clear to me that it is safe to change eflags prior to exception checks) and helper_ret_protected() doesn't change any eflags bits that cpu_x86_load_seg_cache() cares about. That said, continuing to have cpu_x86_load_seg_cache() depend on cr0 and eflags is painful. I do wonder if it would be better to calculate hflags lazily to eliminate these ordering issues.
Reviewed-by: Paolo Bonzini <address@hidden>Richard, Andreas, who is going to take this? I can do it too since I plan to put my soft-reset target-i386/ patches in uq/master after they are reviewed.
-Kevin Kevin O'Connor (4): Set eflags prior to calling svm_load_seg_cache() in svm_helper.c. Set eflags and cr0 prior to calling cpu_x86_load_seg_cache() in smm_helper.c. Set eflags prior to calling cpu_x86_load_seg_cache() in seg_helper.c. The x86 CPL is stored in CS.selector - auto update hflags accordingly. bsd-user/main.c | 2 -- linux-user/main.c | 2 -- target-i386/cpu.h | 25 +++++++++++------------ target-i386/seg_helper.c | 53 +++++++++++++++++------------------------------- target-i386/smm_helper.c | 34 +++++++++++++++---------------- target-i386/svm_helper.c | 11 ++-------- 6 files changed, 50 insertions(+), 77 deletions(-)
[Prev in Thread] | Current Thread | [Next in Thread] |