From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm: cleanup CR8 handling Date: Mon, 13 Dec 2010 14:08:20 +0200 Message-ID: <4D060CB4.9000207@redhat.com> References: <1291807635-3583-1-git-send-email-andre.przywara@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mtosatti@redhat.com To: Andre Przywara Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38057 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751913Ab0LMMIY (ORCPT ); Mon, 13 Dec 2010 07:08:24 -0500 In-Reply-To: <1291807635-3583-1-git-send-email-andre.przywara@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/08/2010 01:27 PM, Andre Przywara wrote: > The handling of CR8 writes in KVM is currently somewhat cumbersome. > This patch makes it look like the other CR register handlers > and fixes a possible issue in VMX, where the RIP would be incremented > despite an injected #GP. > > unsigned long kvm_get_cr8(struct kvm_vcpu *vcpu) > @@ -4104,7 +4098,7 @@ static int emulator_set_cr(int cr, unsigned long val, struct kvm_vcpu *vcpu) > res = kvm_set_cr4(vcpu, mk_cr_64(kvm_read_cr4(vcpu), val)); > break; > case 8: > - res = __kvm_set_cr8(vcpu, val& 0xfUL); > + res = kvm_set_cr8(vcpu, val); > break; > default: > vcpu_printf(vcpu, "%s: unexpected cr %u\n", __func__, cr); Why drop the mask? -- error compiling committee.c: too many arguments to function