From patchwork Wed Oct 31 12:21:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 991381 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="L6pZo355"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42lSK91lKJz9s0n for ; Wed, 31 Oct 2018 23:27:41 +1100 (AEDT) Received: from localhost ([::1]:59163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHpb0-0005xI-Oz for incoming@patchwork.ozlabs.org; Wed, 31 Oct 2018 08:27:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHpVk-0000sa-Uz for qemu-devel@nongnu.org; Wed, 31 Oct 2018 08:22:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHpVe-0001tC-C8 for qemu-devel@nongnu.org; Wed, 31 Oct 2018 08:22:12 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:39827) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHpVa-0001Fw-Es for qemu-devel@nongnu.org; Wed, 31 Oct 2018 08:22:04 -0400 Received: by mail-wr1-x42a.google.com with SMTP id r10-v6so16263122wrv.6 for ; Wed, 31 Oct 2018 05:21:30 -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=H6sT80oSETHSMbDT5Vnt8FGyyw3j6FjOjATOS8VN5ZI=; b=L6pZo355YfoeOQJvrW1nq3ESPLS+JthsSkwpMEhdQIhccY8EIHOxZyMW+dwWtbYdlK FAGVs9VfPOXfX5gQnt4z7pukKWCuQ9fNcqbL8MGRspGrk5Fl8Nk+4P6RJD7zoWAC+8As 08YV8xL3R3fQlxm7Foe02DUYjPUvnWMBHkKcI= 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=H6sT80oSETHSMbDT5Vnt8FGyyw3j6FjOjATOS8VN5ZI=; b=EEvm1LC4g7hTwKBVa5IYKAp/eGKvSxmTeoBM8iW3tHl175iVmeTfBU0LpGaMrCO0X8 q10Nq7023NuOG7uONEC4q/mu/FzC8sPUquKwjz/zjoDzvnJCfDXH1LZla0vEtz6HSP17 mHFdkn56i0vyAWL0uCKj/9U/TnsWHQd6JEW3Pv6icgQGPIHmPQYqr8D1RXdfLpk3rCOm 7cKKqwCgFtvr3KUgH2131b5nK7XfIuenHYd0flJiM0ikn6MrKmFG0qvapfZRfXjzlG+F wTkjZLe8+YNxbTVtIQe8Voghn2gvRIAKNDxe66wuRZKbvlBTrD/OFMET5kCUJ7zMKXL/ ogpw== X-Gm-Message-State: AGRZ1gLhKuqfc9jj+1iWFLFy590wUA9KqpUi8kHZbCGyOSs7iUKy3CMc Hich7iJNKAqHuKJXbk9fpEDqGt5twbc= X-Google-Smtp-Source: AJdET5dZYgrzXjly6iaOAnzPsI32z434/rvi9+/xh9eTHzgwJQfh9dsPdIwBMTLH3iQsZmq3oGcJCw== X-Received: by 2002:a5d:628c:: with SMTP id k12-v6mr2481247wru.83.1540988489431; Wed, 31 Oct 2018 05:21:29 -0700 (PDT) Received: from cloudburst.twiddle.net.lan (79-69-241-110.dynamic.dsl.as9105.com. [79.69.241.110]) by smtp.gmail.com with ESMTPSA id v2-v6sm13450362wru.17.2018.10.31.05.21.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 05:21:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 31 Oct 2018 12:21:19 +0000 Message-Id: <20181031122119.1669-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181031122119.1669-1-richard.henderson@linaro.org> References: <20181031122119.1669-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a Subject: [Qemu-devel] [PULL 10/10] cputlb: Remove tlb_c.pending_flushes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is essentially redundant with tlb_c.dirty. Tested-by: Emilio G. Cota Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 6 ------ accel/tcg/cputlb.c | 16 ++-------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index ca0fea8b27..6a60f94a41 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -160,12 +160,6 @@ typedef struct CPUTLBDesc { typedef struct CPUTLBCommon { /* Serialize updates to tlb_table and tlb_v_table, and others as noted. */ QemuSpin lock; - /* - * Within pending_flush, for each bit N, there exists an outstanding - * cross-cpu flush for mmu_idx N. Further cross-cpu flushes to that - * mmu_idx may be discarded. Protected by tlb_c.lock. - */ - uint16_t pending_flush; /* * Within dirty, for each bit N, modifications have been made to * mmu_idx N since the last time that mmu_idx was flushed. diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index f6c37bc4db..af6bd8ccf9 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -174,20 +174,8 @@ void tlb_flush_by_mmuidx(CPUState *cpu, uint16_t idxmap) tlb_debug("mmu_idx: 0x%" PRIx16 "\n", idxmap); if (cpu->created && !qemu_cpu_is_self(cpu)) { - CPUArchState *env = cpu->env_ptr; - uint16_t pending, to_clean; - - qemu_spin_lock(&env->tlb_c.lock); - pending = env->tlb_c.pending_flush; - to_clean = idxmap & ~pending; - env->tlb_c.pending_flush = pending | idxmap; - qemu_spin_unlock(&env->tlb_c.lock); - - if (to_clean) { - tlb_debug("reduced mmu_idx: 0x%" PRIx16 "\n", to_clean); - async_run_on_cpu(cpu, tlb_flush_by_mmuidx_async_work, - RUN_ON_CPU_HOST_INT(to_clean)); - } + async_run_on_cpu(cpu, tlb_flush_by_mmuidx_async_work, + RUN_ON_CPU_HOST_INT(idxmap)); } else { tlb_flush_by_mmuidx_async_work(cpu, RUN_ON_CPU_HOST_INT(idxmap)); }