From: Gleb Natapov Subject: [PATCH v2 0/8] Miscellaneous x86 emulator fixes Date: Wed, 10 Feb 2010 14:21:28 +0200 Message-ID: <1265804496-18102-1-git-send-email-gleb@redhat.com> Cc: kvm@vger.kernel.org To: avi@redhat.com, mtosatti@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49530 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754806Ab0BJMVi (ORCPT ); Wed, 10 Feb 2010 07:21:38 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1ACLcB0002611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Feb 2010 07:21:38 -0500 Sender: kvm-owner@vger.kernel.org List-ID: X86 emulator fails to do permission/correctness checking like real CPU does for some instruction. This patch series fixes some of those discrepancies. Changelog: v1->v2 - move IOPL permission checking functions into emulate.c - rename them to more intuitive names - fix tr segment limit checking Gleb Natapov (8): KVM: Add group8 instruction decoding. KVM: Add group9 instruction decoding. KVM: Add Virtual-8086 mode of emulation. KVM: fix memory access during x86 emulation. KVM: Check IOPL level during io instruction emulation. KVM: Fix popf emulation. KVM: Check CPL level during privilege instruction emulation. KVM: Add LOCK prefix validity checking. arch/x86/include/asm/kvm_emulate.h | 15 ++- arch/x86/include/asm/kvm_host.h | 8 +- arch/x86/kvm/emulate.c | 286 ++++++++++++++++++++++++++++-------- arch/x86/kvm/mmu.c | 17 +-- arch/x86/kvm/mmu.h | 6 + arch/x86/kvm/paging_tmpl.h | 11 +- arch/x86/kvm/x86.c | 144 +++++++++++++----- 7 files changed, 368 insertions(+), 119 deletions(-)