From patchwork Wed Sep 16 09:25:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 47879 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 n8G9QbnP009638 for ; Wed, 16 Sep 2009 09:26:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932072AbZIPJ0b (ORCPT ); Wed, 16 Sep 2009 05:26:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758264AbZIPJ0a (ORCPT ); Wed, 16 Sep 2009 05:26:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42200 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758316AbZIPJ0L (ORCPT ); Wed, 16 Sep 2009 05:26:11 -0400 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 n8G9QF6X017504 for ; Wed, 16 Sep 2009 05:26:15 -0400 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 n8G9QCfD022861; Wed, 16 Sep 2009 05:26:14 -0400 Received: from localhost.localdomain (cleopatra.tlv.redhat.com [10.35.255.11]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id A86F3250AD9; Wed, 16 Sep 2009 12:26:11 +0300 (IDT) From: Avi Kivity To: Marcelo Tosatti Cc: kvm@vger.kernel.org Subject: [PATCH QEMU-KVM 21/34] test: vm: map mmio 1:1 Date: Wed, 16 Sep 2009 12:25:56 +0300 Message-Id: <1253093169-1423-22-git-send-email-avi@redhat.com> In-Reply-To: <1253093169-1423-1-git-send-email-avi@redhat.com> References: <1253093169-1423-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 With this assumption, the apic code will be able to run either before or after the vm is set up. Signed-off-by: Avi Kivity --- kvm/user/test/x86/vm.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kvm/user/test/x86/vm.c b/kvm/user/test/x86/vm.c index 03c7354..ec9c145 100644 --- a/kvm/user/test/x86/vm.c +++ b/kvm/user/test/x86/vm.c @@ -189,6 +189,9 @@ static void setup_mmu(unsigned long len) unsigned long *cr3 = alloc_page(); unsigned long phys = 0; + if (len < (1ul << 32)) + len = 1ul << 32; /* map mmio 1:1 */ + memset(cr3, 0, PAGE_SIZE); while (phys + LARGE_PAGE_SIZE <= len) { install_large_page(cr3, phys, (void *)phys);