Message ID | 20180702160546.31969-7-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | 9c8c334b0637bf3c592d432b0c11f3b62dd5dba3 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp124546ljj; Mon, 2 Jul 2018 09:06:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf9nO/RhVAKeGZlBzII6QPw+Wt2R7079l08mscr7rKZd3REujAJO0zsqfgvGW5Qlv7XZTXf X-Received: by 2002:a37:82c7:: with SMTP id e190-v6mr21929458qkd.313.1530547594039; Mon, 02 Jul 2018 09:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530547594; cv=none; d=google.com; s=arc-20160816; b=dOooW1l/PQaWBW6uyiTDJimuHe4/1w2X5UnCPycLuLM+/qdm5Ld5dOTn5aPnQIRmJ1 GZpOe9WySGRTd3ztBihvUYIyWp2aSdPNrv9vWPpLQXOSZ3wIc0Vo3H0gTk/ZdxCQlIWE 9aezXx81dFK6Eq3G9NEiBDQImJ6Rf6MP4AHiIjW8rz+bc/r8gJdAIJ+QbKcrRGMqQJ60 j3EKD8ZfitaOXTCfgQLWv5/8ghqK1kKFT6MQ2G4FgssHkJilQX/5pbdAAjSVPhlfCuNz 2JoviHvQRVMY88CTqyf8OGeUWej1BwF3yrv8ocWzq9hht9IjbhWrYgUNsdO6rr80FA1c fLlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=EDg7+xQrWVFN2B7aGOJKgtLDfQ0mJ1smJERcqBGPq1Y=; b=jfwjhWDKsVUXCYZJXG1Cqh/JkS7eGXjxr6xbwVpY0UjxWiZdO1XV3rnzAe5D32Cn5X mV3E3Gz8ZgV+f0YPSzUPphQaSeZi7bqzoKgWOmddTyT8mtyrNZRmM6j1ae1BnP8ZoKGJ dJIFqzYJagkqiiSJljTPeBpKU9PrCWkbn2xiuag7ebM752QTaSL1jptz8CyaHkwjol2d 9T8KHII6n1Me3XgOmh/ce6AoMeOcCBMnV9xwgU10y4L8qd3RL8CYDxdJ335X3ru6sSFB NiL2AJju610YzYZ/2U6pNcjNkVlSL6PtooP9HFwbXq/aBiIizZFqO7BF+FO3+DuxvbDX yzjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bklPN9Mo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 75-v6si809635qkg.314.2018.07.02.09.06.33 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 02 Jul 2018 09:06:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bklPN9Mo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fa1LV-0004nh-FX for patch@linaro.org; Mon, 02 Jul 2018 12:06:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fa1L3-0004kc-Og for qemu-devel@nongnu.org; Mon, 02 Jul 2018 12:06:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fa1Ky-0005Tu-CG for qemu-devel@nongnu.org; Mon, 02 Jul 2018 12:06:05 -0400 Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]:37186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fa1Ky-0005TO-6J for qemu-devel@nongnu.org; Mon, 02 Jul 2018 12:06:00 -0400 Received: by mail-pg0-x230.google.com with SMTP id n15-v6so4107458pgv.4 for <qemu-devel@nongnu.org>; Mon, 02 Jul 2018 09:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EDg7+xQrWVFN2B7aGOJKgtLDfQ0mJ1smJERcqBGPq1Y=; b=bklPN9Mo1esbQfs5g1uySsYWn5iG7sSE/cyH6o3z1rQrTzIpqZMMMUq31BmrKYSFWH RjAyJpX5s0/t+UvELYAZEbwfkpMOyP/+gGqRLVbUi4HB+IzpJdG/fOrCmz6SOG+zhJSK T6U9i8AGBP8rKir9wl1PGdNfjC3PAkvsM0kd0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EDg7+xQrWVFN2B7aGOJKgtLDfQ0mJ1smJERcqBGPq1Y=; b=DIZlahop0yJTvUwdW3u4m8Npd8oJMGYWIwS+4YOvQpkqghPpfeSyYC4ZTHUVPvjw+u 3VnGqRAotuDLThSaHJJFV3GzBNTgYZSi9igjDxVTfOyxRpU8jQ3z7BFETcKGrUpcsbvR Ax+h8HtVG3uKVI3gR9aIuaYhfYvTrAA4PncqpdSAOhQRuGtr61E3ITSRWTWEBJRjgU8M hOWmq8oUeno/ztmVFcwHIuNkiAp7YWKdgk/zH+EFeN39gKx2x9pmMeQMGJ18iRGMY8or PwGo4lEId0GwZnZ9+IQyfNoXt9yS3QXWEDbDo2m+FkXNIF8mHD+K7RiuphyQxF4sgPeK fnSg== X-Gm-Message-State: APt69E3ebXTWikB8HBT7c4URruJRGNAoohNhRqlD6uqNVyDyTktXBeZR NwmVxAESGTO0vBwIBttO1edhR/qDkeE= X-Received: by 2002:a63:6004:: with SMTP id u4-v6mr22162315pgb.441.1530547559032; Mon, 02 Jul 2018 09:05:59 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id e17-v6sm38107002pfd.15.2018.07.02.09.05.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Jul 2018 09:05:57 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Mon, 2 Jul 2018 09:05:46 -0700 Message-Id: <20180702160546.31969-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180702160546.31969-1-richard.henderson@linaro.org> References: <20180702160546.31969-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::230 Subject: [Qemu-devel] [PULL 6/6] cpu: Assert asidx_from_attrs return value in range X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg queued patches
|
expand
|
diff --git a/include/qom/cpu.h b/include/qom/cpu.h index cce2fd6acc..bd796579ee 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -620,11 +620,13 @@ static inline hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr) static inline int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs) { CPUClass *cc = CPU_GET_CLASS(cpu); + int ret = 0; if (cc->asidx_from_attrs) { - return cc->asidx_from_attrs(cpu, attrs); + ret = cc->asidx_from_attrs(cpu, attrs); + assert(ret < cpu->num_ases && ret >= 0); } - return 0; + return ret; } #endif