From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DBC5C433FE for ; Thu, 7 Oct 2021 20:57:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D500E6103C for ; Thu, 7 Oct 2021 20:57:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D500E6103C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:40580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYaS2-0007Bc-1X for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 16:57:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYaE5-0006HJ-AT for qemu-devel@nongnu.org; Thu, 07 Oct 2021 16:42:49 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:33665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYaE1-0006Xp-Ox for qemu-devel@nongnu.org; Thu, 07 Oct 2021 16:42:49 -0400 Received: by mail-lf1-x12d.google.com with SMTP id j21so12141245lfe.0 for ; Thu, 07 Oct 2021 13:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d00jZrTsVgfiEO8V5WNA/3B70+o4GfZVlLc+D3Tnb4s=; b=BMbQcaoczyIA/nDrbDOftChsiOw6HkmJdqfv8FiQaTlVldo7ve4/C7iTykP4BM0ABd eau+tFr+iIDc/5wsOPBn68RBu+didaFEpCftqWw7oGCzj2G8KKQgD9sQVq7OVT5tZkGI G3ugFZJuve7zSf81siu+2nrtLYJUHsd/dFxn1uLSGQMt4yKeS0nxrXOPqzB2JoiKBAOw DjnSYhmrYPMsfC2GBV5CLke66i5tzsZ83RRZFVTBI/+0bc4OA9Bg8mLO8NacjyscWCaZ Ew+KGCO5zmMYkMbVcQ27miR2o9V5kuqpd2zN1YsualFDw3LZ3YZjF8lwQBoduw5bnj6c +BLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d00jZrTsVgfiEO8V5WNA/3B70+o4GfZVlLc+D3Tnb4s=; b=Nhoo3io14/Ghja3frHFwayrqDf317zUlpEpXDbixX/wdbZMOZuN54z+xIxOVpNpE8y t84xTm3Z5DcizoqfxLwimFdrZ8+evkHdX2hmk67L2S+Xt2Kv6bVZIhkI2182R4XNbt8a /oMd1vcIdKgjQcZpB9cyE6Bjq24Uwa4qSOu1/CxZ9ZJnprBYTVICaOVQCDUVykotX/ww 660I6xGlFIhAUzpMzov5z4a7uA4gNkh2gze8QvACJEhUCK47tLKy6gM3ACleJQk+c+i5 mWcWZMk34pzGrfO3y67AGM7tvo5q7/bijUebTs03ckcO/Ss4d0ls+mpHZKalnG8Ppt04 FPIg== X-Gm-Message-State: AOAM532mXp9PQp/Pz2gwY4Gn4RtZFiec48SeA2MENCgq/M8i/JnTS9DA qMV7bgf12c45wIiC1bZC4hbdJiz62xDt5tSSHOI= X-Google-Smtp-Source: ABdhPJz1rk5LLvBcSIqBALyo2BGqC3Up+945SdijrFv7o8kCs68ouf0AMlanRMFE3Szab2ism810QHTCx/nvB+bJECo= X-Received: by 2002:a05:651c:a0f:: with SMTP id k15mr106734ljq.461.1633639363850; Thu, 07 Oct 2021 13:42:43 -0700 (PDT) MIME-Version: 1.0 References: <20211007130630.632028-1-pbonzini@redhat.com> <20211007130829.632254-1-pbonzini@redhat.com> In-Reply-To: <20211007130829.632254-1-pbonzini@redhat.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Fri, 8 Oct 2021 00:42:06 +0400 Message-ID: Subject: Re: [PATCH 06/24] kconfig: split CONFIG_SPARSE_MEM from fuzzing To: Paolo Bonzini Content-Type: multipart/alternative; boundary="000000000000f936cd05cdc94d06" Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=marcandre.lureau@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Oleinik , QEMU Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000f936cd05cdc94d06 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 7, 2021 at 5:20 PM Paolo Bonzini wrote: > Pass CONFIG_FUZZ via host_kconfig, and use it to select the > sparse-mem device. > > Cc: Alexander Oleinik > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-Andr=C3=A9 Lureau > --- > Kconfig.host | 4 ++++ > hw/mem/Kconfig | 3 +++ > hw/mem/meson.build | 2 +- > meson.build | 1 + > 4 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/Kconfig.host b/Kconfig.host > index 24255ef441..60b9c07b5e 100644 > --- a/Kconfig.host > +++ b/Kconfig.host > @@ -41,3 +41,7 @@ config PVRDMA > config MULTIPROCESS_ALLOWED > bool > imply MULTIPROCESS > + > +config FUZZ > + bool > + select SPARSE_MEM > diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig > index 8b19fdc49f..03dbb3c7df 100644 > --- a/hw/mem/Kconfig > +++ b/hw/mem/Kconfig > @@ -8,3 +8,6 @@ config MEM_DEVICE > config NVDIMM > bool > select MEM_DEVICE > + > +config SPARSE_MEM > + bool > diff --git a/hw/mem/meson.build b/hw/mem/meson.build > index 3c8fdef9f9..82f86d117e 100644 > --- a/hw/mem/meson.build > +++ b/hw/mem/meson.build > @@ -6,4 +6,4 @@ mem_ss.add(when: 'CONFIG_NVDIMM', if_true: > files('nvdimm.c')) > > softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss) > > -softmmu_ss.add(when: 'CONFIG_FUZZ', if_true: files('sparse-mem.c')) > +softmmu_ss.add(when: 'CONFIG_SPARSE_MEM', if_true: files('sparse-mem.c')= ) > diff --git a/meson.build b/meson.build > index 0e9733a833..f03bfff7a1 100644 > --- a/meson.build > +++ b/meson.build > @@ -1602,6 +1602,7 @@ endif > > have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD') > host_kconfig =3D \ > + ('CONFIG_FUZZ' in config_host ? ['CONFIG_FUZZ=3Dy'] : []) + \ > ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ > ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ > (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ > -- > 2.31.1 > > > > --=20 Marc-Andr=C3=A9 Lureau --000000000000f936cd05cdc94d06 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Oct 7, 2021 at 5:20 PM Paolo = Bonzini <pbonzi= ni@redhat.com> wrote:
Pass CONFIG_FUZZ via host_kconfig, and use it to select the sparse-mem device.

Cc: Alexander Oleinik <alxndr@bu.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

<= div>
Reviewed-by: Marc-Andr=C3=A9 Lureau <marcandre.lureau@redhat.com><= /div>

=C2=A0
---
=C2=A0Kconfig.host=C2=A0 =C2=A0 =C2=A0 =C2=A0| 4 ++++
=C2=A0hw/mem/Kconfig=C2=A0 =C2=A0 =C2=A0| 3 +++
=C2=A0hw/mem/meson.build | 2 +-
=C2=A0meson.build=C2=A0 =C2=A0 =C2=A0 =C2=A0 | 1 +
=C2=A04 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/Kconfig.host b/Kconfig.host
index 24255ef441..60b9c07b5e 100644
--- a/Kconfig.host
+++ b/Kconfig.host
@@ -41,3 +41,7 @@ config PVRDMA
=C2=A0config MULTIPROCESS_ALLOWED
=C2=A0 =C2=A0 =C2=A0bool
=C2=A0 =C2=A0 =C2=A0imply MULTIPROCESS
+
+config FUZZ
+=C2=A0 =C2=A0 bool
+=C2=A0 =C2=A0 select SPARSE_MEM
diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
index 8b19fdc49f..03dbb3c7df 100644
--- a/hw/mem/Kconfig
+++ b/hw/mem/Kconfig
@@ -8,3 +8,6 @@ config MEM_DEVICE
=C2=A0config NVDIMM
=C2=A0 =C2=A0 =C2=A0bool
=C2=A0 =C2=A0 =C2=A0select MEM_DEVICE
+
+config SPARSE_MEM
+=C2=A0 =C2=A0 bool
diff --git a/hw/mem/meson.build b/hw/mem/meson.build
index 3c8fdef9f9..82f86d117e 100644
--- a/hw/mem/meson.build
+++ b/hw/mem/meson.build
@@ -6,4 +6,4 @@ mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files(&#= 39;nvdimm.c'))

=C2=A0softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss= )

-softmmu_ss.add(when: 'CONFIG_FUZZ', if_true: files('sparse-mem= .c'))
+softmmu_ss.add(when: 'CONFIG_SPARSE_MEM', if_true: files('spar= se-mem.c'))
diff --git a/meson.build b/meson.build
index 0e9733a833..f03bfff7a1 100644
--- a/meson.build
+++ b/meson.build
@@ -1602,6 +1602,7 @@ endif

=C2=A0have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD')
=C2=A0host_kconfig =3D \
+=C2=A0 ('CONFIG_FUZZ' in config_host ? ['CONFIG_FUZZ=3Dy']= : []) + \
=C2=A0 =C2=A0('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy= 9;] : []) + \
=C2=A0 =C2=A0('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3D= y'] : []) + \
=C2=A0 =C2=A0(have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \
--
2.31.1





--
Marc-Andr= =C3=A9 Lureau
--000000000000f936cd05cdc94d06--