From patchwork Wed Oct 3 16:04:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 188856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 26AC12C00C6 for ; Thu, 4 Oct 2012 03:20:53 +1000 (EST) Received: from localhost ([::1]:37601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJSco-0002ap-S4 for incoming@patchwork.ozlabs.org; Wed, 03 Oct 2012 13:20:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJRRP-00076D-VE for qemu-devel@nongnu.org; Wed, 03 Oct 2012 12:05:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJRRL-0007up-Qp for qemu-devel@nongnu.org; Wed, 03 Oct 2012 12:04:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJRRL-0007ug-Hx for qemu-devel@nongnu.org; Wed, 03 Oct 2012 12:04:51 -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.14.4/8.14.4) with ESMTP id q93G4mQk008505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Oct 2012 12:04:48 -0400 Received: from s01.tlv.redhat.com (s01.tlv.redhat.com [10.35.255.8]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q93G47J2016728; Wed, 3 Oct 2012 12:04:46 -0400 From: Avi Kivity To: qemu-devel@nongnu.org, Anthony Liguori , liu ping fan , "Michael S. Tsirkin" , Paolo Bonzini , Blue Swirl Date: Wed, 3 Oct 2012 18:04:01 +0200 Message-Id: <1349280245-16341-19-git-send-email-avi@redhat.com> In-Reply-To: <1349280245-16341-1-git-send-email-avi@redhat.com> References: <1349280245-16341-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v1 18/22] s390: avoid reaching into memory core internals 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 use cpu_physical_memory_is_io() instead. Signed-off-by: Avi Kivity --- target-s390x/misc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index e9b3cae..2da4c90 100644 --- a/target-s390x/misc_helper.c +++ b/target-s390x/misc_helper.c @@ -81,7 +81,7 @@ int sclp_service_call(CPUS390XState *env, uint32_t sccb, uint64_t code) #endif /* basic checks */ - if (!memory_region_is_ram(phys_page_find(sccb >> TARGET_PAGE_BITS)->mr)) { + if (cpu_physical_memory_is_io(sccb)) { return -PGM_ADDRESSING; } if (sccb & ~0x7ffffff8ul) {