From patchwork Mon Feb 1 13:11:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuya Yoshikawa X-Patchwork-Id: 76066 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o11D8ZtE026376 for ; Mon, 1 Feb 2010 13:08:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753035Ab0BANIZ (ORCPT ); Mon, 1 Feb 2010 08:08:25 -0500 Received: from serv2.oss.ntt.co.jp ([222.151.198.100]:51642 "EHLO serv2.oss.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752755Ab0BANIY (ORCPT ); Mon, 1 Feb 2010 08:08:24 -0500 Received: from serv2.oss.ntt.co.jp (localhost [127.0.0.1]) by serv2.oss.ntt.co.jp (Postfix) with ESMTP id 635422482E1; Mon, 1 Feb 2010 22:08:23 +0900 (JST) Received: from serv1.oss.ntt.co.jp (serv1.oss.ntt.co.jp [172.19.0.2]) by serv2.oss.ntt.co.jp (Postfix) with ESMTP id 5341E2482D9; Mon, 1 Feb 2010 22:08:23 +0900 (JST) Received: from yshtky3.kern.oss.ntt.co.jp (unknown [172.17.1.124]) by serv1.oss.ntt.co.jp (Postfix) with SMTP id 366FF11C097; Mon, 1 Feb 2010 22:08:23 +0900 (JST) Date: Mon, 1 Feb 2010 22:11:04 +0900 From: Takuya Yoshikawa To: avi@redhat.com, mtosatti@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH v2] KVM: fix load_guest_segment_descriptor() to return X86EMUL_* Message-Id: <20100201221104.b3575ac7.yoshikawa.takuya@oss.ntt.co.jp> X-Mailer: Sylpheed 2.6.0 (GTK+ 2.16.1; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 01 Feb 2010 13:08:35 +0000 (UTC) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index d47ceda..e5335e5 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4662,7 +4662,7 @@ static int load_guest_segment_descriptor(struct kvm_vcpu *vcpu, u16 selector, if (dtable.limit < index * 8 + 7) { kvm_queue_exception_e(vcpu, GP_VECTOR, selector & 0xfffc); - return 1; + return X86EMUL_PROPAGATE_FAULT; } return kvm_read_guest_virt(dtable.base + index*8, seg_desc, sizeof(*seg_desc), vcpu); }