Am 30.04.2014 10:37, schrieb Paolo Bonzini: > 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 <pbonz...@redhat.com> > > Richard, Andreas, who is going to take this?
Not my comfort zone. > I can do it too since I > plan to put my soft-reset target-i386/ patches in uq/master after they > are reviewed. > >> 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. Please update the subjects to have "target-i386: " and drop the trailing dot when either of you queues them. Thanks, Andreas >> >> 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(-) -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg