Received: from eggs.gnu.org ([140.186.70.92]:57929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe8Tu-0001mB-M3 for qemu-devel@nongnu.org; Tue, 05 Jul 2011 12:28:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qe8Ts-0000v5-Pi for qemu-devel@nongnu.org; Tue, 05 Jul 2011 12:28:14 -0400 Received: from cantor2.suse.de ([195.135.220.15]:50140 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe8Tr-0000ue-Qn for qemu-devel@nongnu.org; Tue, 05 Jul 2011 12:28:11 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id B60F486A2E for ; Tue, 5 Jul 2011 18:28:10 +0200 (CEST) From: Alexander Graf Date: Tue, 5 Jul 2011 18:28:01 +0200 Message-Id: <1309883290-17595-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 0/9] Don't use ld./st._phys in hw/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org Developers" We have quite some code in hw/ that uses ld./st._phys functions in device emulation code. This is just pure wrong, as devices don't know about the CPU endianness (except for virtio), so they should instead use something endian specific. Unfortunately, there is no endian specific call to easily receive an integer from memory, so this patch set introduces some and then converts all the obvious users to them. I tested the targets I could, but please double-check if your architecture behaves differently or I accidently put in a _be instead of _le :) Alex Alexander Graf (9): exec: add endian specific phys ld/st functions hpet: use specific endian ld/st_phys intel-hda: use specific endian ld/st_phys msi: use specific endian ld/st_phys msix: use specific endian ld/st_phys pl080: use specific endian ld/st_phys ppc405_uc: use specific endian ld/st_phys s390-virtio: use specific endian ld/st_phys spapr: use specific endian ld/st_phys cpu-common.h | 12 ++++++ exec.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++ hw/hpet.c | 2 +- hw/intel-hda.c | 21 ++-------- hw/msi.c | 2 +- hw/msix.c | 2 +- hw/pl080.c | 8 ++-- hw/ppc405_uc.c | 43 +++++++++++---------- hw/s390-virtio-bus.c | 10 ++-- hw/s390-virtio.c | 6 +- hw/spapr.h | 4 +- hw/spapr_hcall.c | 12 +++--- 12 files changed, 164 insertions(+), 60 deletions(-) -- 1.7.3.4