Message ID | 1538295197-23704-8-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KVMQt/h6"; 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 42NJDz0FWwz9s5c for <incoming@patchwork.ozlabs.org>; Sun, 30 Sep 2018 18:17:39 +1000 (AEST) Received: from localhost ([::1]:54226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1g6Wv2-0004ox-J8 for incoming@patchwork.ozlabs.org; Sun, 30 Sep 2018 04:17:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1g6Wr5-00024X-2y for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:13:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1g6Wr3-0008OR-2e for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:13:30 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:36646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1g6Wr2-0008Ju-By for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:13:28 -0400 Received: by mail-wr1-x432.google.com with SMTP id y16so2236034wrw.3 for <qemu-devel@nongnu.org>; Sun, 30 Sep 2018 01:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=7oPkOe1NBZcsT5l/ZfMa7quymJ4Ev7ythyogW25/sXg=; b=KVMQt/h6xGt5ALpUY3wvvRbVMKJVNYKxKoaNUwRhrnHCVXAkexfJlJTRXfaU+jc8Hv tkcDIjjdy7aG+dXWisUAxf9z8U2or1ppbg/4l0/F5xrbFd38lmhukKNYsl0fHAIEqx4O Z+NLud9qw2SJRTC4J4lO5XwvR7B8lnYueZJsbMF0DckFq0kVhoR30uzKFhurPMLDX1QF HvVm3jwFp1UtHt7aZyKKr/aCJ+qHvIsFbENQThPqa7UyB7cfpzK4f6HJP9hBwJpKXwQ+ y4DSVM69DvHHtVa/GaIZQTjnA3sufKENVNkFL1JnLuJ099nXb+82IARoLyFuV0VBrkcS whlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=7oPkOe1NBZcsT5l/ZfMa7quymJ4Ev7ythyogW25/sXg=; b=CRAwpA+TnhZn7n8HUXxdcHAm/rNdAOgnst8Sx1Aaw6wAhizP3D72M1hqA1PGHZ+lgM wmeP5MvGJ5bKZrWm1eRNq5tWWp445LNMbULA1Tk8YATKGy2qmZKAWZbzkjnaYdVHXFh3 /oCY3kygLRyKmtcWyLWY1pMKFNp3Vo5/6WbtiXSN5efjiaeAHNokt3/mE5TdkbZX+RGa GoZZKuXr+3hWBmNGrw9M5NwZ9AxasxWHG6Gs7KYuurPm8z5r173Jpy66R/CeohXqxhdy 8PIQ0rh9BqoK/PI4eZMIZhbANFfL+RRSh1S/McuFZ/Y5Ahj7/2vQL89OuuP2aF75xWVj Nxkg== X-Gm-Message-State: ABuFfoisLeIFVmFYGnBhHFgHC6gk4WF6RaEUpcXsUDxdusqCoHqW3t9Y pK0tHSZXX2mGmvRspC+YH70TPj8N X-Google-Smtp-Source: ACcGV60joTRNPsSNvXyTiLJMFVCVfDTV8ZR7yZdRoX2MM3XmSNrSqkM3vZHuRn4f7Y3ONcBGWPiVFw== X-Received: by 2002:adf:9f0f:: with SMTP id l15-v6mr3822124wrf.206.1538295205997; Sun, 30 Sep 2018 01:13:25 -0700 (PDT) Received: from 640k.lan (94-36-187-248.adsl-ull.clienti.tiscali.it. [94.36.187.248]) by smtp.gmail.com with ESMTPSA id u76-v6sm11369194wmd.10.2018.09.30.01.13.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Sep 2018 01:13:25 -0700 (PDT) From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Date: Sun, 30 Sep 2018 10:12:05 +0200 Message-Id: <1538295197-23704-8-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1538295197-23704-1-git-send-email-pbonzini@redhat.com> References: <1538295197-23704-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 Subject: [Qemu-devel] [PULL 07/79] cacheinfo: add i/d cache_linesize_log 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: "Emilio G. Cota" <cota@braap.org> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/79] virtio: Return true from virtio_queue_empty if broken
|
expand
|
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index a91068d..a746a5e 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -570,6 +570,8 @@ extern uintptr_t qemu_real_host_page_size; extern intptr_t qemu_real_host_page_mask; extern int qemu_icache_linesize; +extern int qemu_icache_linesize_log; extern int qemu_dcache_linesize; +extern int qemu_dcache_linesize_log; #endif diff --git a/util/cacheinfo.c b/util/cacheinfo.c index db5172d..6c8fe79 100644 --- a/util/cacheinfo.c +++ b/util/cacheinfo.c @@ -7,9 +7,12 @@ */ #include "qemu/osdep.h" +#include "qemu/host-utils.h" int qemu_icache_linesize = 0; +int qemu_icache_linesize_log; int qemu_dcache_linesize = 0; +int qemu_dcache_linesize_log; /* * Operating system specific detection mechanisms. @@ -172,6 +175,11 @@ static void __attribute__((constructor)) init_cache_info(void) arch_cache_info(&isize, &dsize); fallback_cache_info(&isize, &dsize); + assert((isize & (isize - 1)) == 0); + assert((dsize & (dsize - 1)) == 0); + qemu_icache_linesize = isize; + qemu_icache_linesize_log = ctz32(isize); qemu_dcache_linesize = dsize; + qemu_dcache_linesize_log = ctz32(dsize); }