From patchwork Thu Oct 15 20:26:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 54091 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9FKSWCM002060 for ; Thu, 15 Oct 2009 20:28:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935480AbZJOU1A (ORCPT ); Thu, 15 Oct 2009 16:27:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763012AbZJOU1A (ORCPT ); Thu, 15 Oct 2009 16:27:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20003 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763011AbZJOU07 (ORCPT ); Thu, 15 Oct 2009 16:26:59 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9FKQXn4008803 for ; Thu, 15 Oct 2009 16:26:34 -0400 Received: from localhost.localdomain (vpn-13-142.rdu.redhat.com [10.11.13.142]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9FKQVHU022327; Thu, 15 Oct 2009 16:26:32 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH] get rid of MSR_COUNT Date: Thu, 15 Oct 2009 17:26:31 -0300 Message-Id: <1255638391-610-1-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index c8e37ed..350e5fd 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -808,12 +808,6 @@ static int get_msr_entry(struct kvm_msr_entry *entry, CPUState *env) return 0; } -#ifdef TARGET_X86_64 -#define MSR_COUNT 9 -#else -#define MSR_COUNT 5 -#endif - static void set_v8086_seg(struct kvm_segment *lhs, const SegmentCache *rhs) { lhs->selector = rhs->selector; @@ -868,7 +862,7 @@ void kvm_arch_load_regs(CPUState *env) struct kvm_regs regs; struct kvm_fpu fpu; struct kvm_sregs sregs; - struct kvm_msr_entry msrs[MSR_COUNT]; + struct kvm_msr_entry msrs[100]; int rc, n, i; regs.rax = env->regs[R_EAX]; @@ -1021,7 +1015,7 @@ void kvm_arch_save_regs(CPUState *env) struct kvm_regs regs; struct kvm_fpu fpu; struct kvm_sregs sregs; - struct kvm_msr_entry msrs[MSR_COUNT]; + struct kvm_msr_entry msrs[100]; uint32_t hflags; uint32_t i, n, rc;