From patchwork Tue Jun 14 17:44:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 100401 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9D90EB6FB8 for ; Wed, 15 Jun 2011 04:12:58 +1000 (EST) Received: from localhost ([::1]:50546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWY6g-0003kQ-M1 for incoming@patchwork.ozlabs.org; Tue, 14 Jun 2011 14:12:55 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWXhB-0006m1-5j for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:46:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWXhA-00083i-4K for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:46:32 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:37049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWXh9-00083N-Lq for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:46:31 -0400 Received: by yxs7 with SMTP id 7so1386383yxs.4 for ; Tue, 14 Jun 2011 10:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer; bh=PaZoLSFZWfpj6AsBKepHmwxlNFDBD0+0IxBLfwYSxOc=; b=hZN4rvjWIXRVCpCwlN/EBYHxbC3YaaZGGwLy7MSNVmf9vvx1NNY3d80CmTsymhfSoD z4Mk9Cs8evzmAtH019H585lmqIxMYDYqwqBfn/yU/nS54xUcvfILx5YNeW5oC6Pwyigz CDXxMLBaMFobyAzo3OecVqJCl5MQ2JdPi4AwQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=iAVH4P5GiHoSsErRjX8bGWJPYt4gDk20lFCdDGdMllAadoZQ49PDPlmfPrNNhhYJ1Q By/9DvGJhxFTIRGjIHfCtgb0T3HOIxegN/DZm/OSNag7vyBuqJfqscyMgHuRtNfziXLc kcTXy9crh42Shhf2a8322+XiSFTqnjIsxRjHs= Received: by 10.236.28.2 with SMTP id f2mr8653836yha.387.1308073590088; Tue, 14 Jun 2011 10:46:30 -0700 (PDT) Received: from localhost.localdomain (c-71-227-161-214.hsd1.wa.comcast.net [71.227.161.214]) by mx.google.com with ESMTPS id v22sm3530734yhm.20.2011.06.14.10.46.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2011 10:46:28 -0700 (PDT) From: Richard Henderson To: qemu-devel Date: Tue, 14 Jun 2011 10:44:52 -0700 Message-Id: <1308073492-24789-1-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.5.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.173 Cc: Jan Kiszka Subject: [Qemu-devel] [PATCH] vga: Fix type of map_addr/end. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org These addresses have been passed through pci_to_cpu_addr, and thus need to be full target_phys_addr_t. Signed-off-by: Richard Henderson Cc: Jan Kiszka --- hw/vga_int.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Jan's recent patch series reminded me that I found a related problem in my alpha-softmmu port this past weekend. Note that the slight re-ordering of the members avoids extra padding in the structure due to alignment. diff --git a/hw/vga_int.h b/hw/vga_int.h index d2811bd..b65775b 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -109,9 +109,9 @@ typedef struct VGACommonState { uint32_t vram_size; uint32_t lfb_addr; uint32_t lfb_end; - uint32_t map_addr; - uint32_t map_end; uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */ + target_phys_addr_t map_addr; + target_phys_addr_t map_end; uint32_t latch; uint8_t sr_index; uint8_t sr[256];