From patchwork Sun Jan 10 10:31:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 71991 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0AAViCA001516 for ; Sun, 10 Jan 2010 10:31:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753310Ab0AJKbh (ORCPT ); Sun, 10 Jan 2010 05:31:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753285Ab0AJKbe (ORCPT ); Sun, 10 Jan 2010 05:31:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15349 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753192Ab0AJKbd (ORCPT ); Sun, 10 Jan 2010 05:31:33 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0AAVVr3002062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 10 Jan 2010 05:31:31 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0AAVU2W005655; Sun, 10 Jan 2010 05:31:31 -0500 Received: from localhost.localdomain (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 4FA01250050; Sun, 10 Jan 2010 12:31:30 +0200 (IST) From: Avi Kivity To: Marcelo Tosatti , Joerg Roedel Cc: kvm@vger.kernel.org Subject: [PATCH 1/6] KVM: Set cr0.et when the guest writes cr0 Date: Sun, 10 Jan 2010 12:31:24 +0200 Message-Id: <1263119489-29150-2-git-send-email-avi@redhat.com> In-Reply-To: <1263119489-29150-1-git-send-email-avi@redhat.com> References: <1263119489-29150-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6e6f188..ca42ae3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -428,6 +428,8 @@ out: void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) { + cr0 |= X86_CR0_ET; + if (cr0 & CR0_RESERVED_BITS) { printk(KERN_DEBUG "set_cr0: 0x%lx #GP, reserved bits 0x%lx\n", cr0, kvm_read_cr0(vcpu));