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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3D39D767D8 for ; Thu, 31 Oct 2024 16:27:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 574386B008C; Thu, 31 Oct 2024 12:27:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 524456B0092; Thu, 31 Oct 2024 12:27:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C3CB6B0093; Thu, 31 Oct 2024 12:27:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1FC2E6B008C for ; Thu, 31 Oct 2024 12:27:15 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id BABA681752 for ; Thu, 31 Oct 2024 16:27:14 +0000 (UTC) X-FDA: 82734426390.23.EBE31DC Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf07.hostedemail.com (Postfix) with ESMTP id 7DC1940012 for ; Thu, 31 Oct 2024 16:26:34 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=gcEJKgEM; spf=pass (imf07.hostedemail.com: domain of sumanthk@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=sumanthk@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730391872; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zjAryEKOETloLGYkEAicJv4Ye9LzgIY+dPDahJh00aE=; b=qtrRqMJm3CiM95lqQFZBXLijmB2eRLnPu/DeEs/HL0tNA/9oHZ6wQrVD2NUKmfyr3AD3tU P66XOJ+UjSIT6BTHsD1nYeeNzaWLgUrcpZjptB8xv7pPlmFz05NDP0vjAHBcbxDtWiyboL CmdIGGCfbll4E5YLtizi5Rt2fTNhts0= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=gcEJKgEM; spf=pass (imf07.hostedemail.com: domain of sumanthk@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=sumanthk@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730391872; a=rsa-sha256; cv=none; b=ASkmwjEhwPPcZC9A2jHjxl6GX/73bNO2tMpKYyKuDvc08zOajAdYDz4O3X7kKv6h6FcGb6 sYBNzevoZSEsre+stuBYOJd/uMY9kbCBnLmAPNR4+nKY1OjMtgGQ+vpYBxwglhFJEVcLrv DsYwO4kblkf3figQfLqYCnAwBq6GRZg= Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49VFvV8u013288; Thu, 31 Oct 2024 16:27:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=zjAryE KOETloLGYkEAicJv4Ye9LzgIY+dPDahJh00aE=; b=gcEJKgEMejrm5iqP0v7tYM BWMvCeiJg5ESHTTh2J2QG7m9dmvuUyn4rtC5N0pXMc8B0ARkcqjECWrRxRkuVT/H qJKKaYspyo0hpdOBhygBs8F98X1nXJ4bvEEk/qK1I5mQx9XwCj8jzr94eIaeoZEl db7dilRan6XoCnh1GKH5HjcndQAeDMcOutFK6gyDhb137IMwJEcDavqhKZrwxiNM IOjZ0RVLEGwzF2RwK5i2Ye6eAmV08a7y14fr5g4J3XHCkXf+LDgsjKk+USXEP+Ib oVHWQIpybx4dwom7lkX00oRgiqMXuEC57UoxFbv3c5FAz3+nBGZhTtC3dD8PPoqg == Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 42kkbn6vt0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2024 16:27:11 +0000 (GMT) Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 49VGRAee010519; Thu, 31 Oct 2024 16:27:10 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 42kkbn6vst-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2024 16:27:10 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 49VFYgsw015899; Thu, 31 Oct 2024 16:27:09 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 42hdf1n9xu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2024 16:27:09 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 49VGR66Q33948176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Oct 2024 16:27:06 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1F93C2004B; Thu, 31 Oct 2024 16:27:06 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BD43120040; Thu, 31 Oct 2024 16:27:05 +0000 (GMT) Received: from li-2b55cdcc-350b-11b2-a85c-a78bff51fc11.ibm.com (unknown [9.155.203.167]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTPS; Thu, 31 Oct 2024 16:27:05 +0000 (GMT) Date: Thu, 31 Oct 2024 17:27:04 +0100 From: Sumanth Korikkar To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, virtualization@lists.linux.dev, linux-doc@vger.kernel.org, kvm@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Huth , Cornelia Huck , Janosch Frank , Claudio Imbrenda , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , Eric Farman , Andrew Morton , Jonathan Corbet Subject: Re: [PATCH v3 0/7] virtio-mem: s390 support Message-ID: References: <20241025141453.1210600-1-david@redhat.com> Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20241025141453.1210600-1-david@redhat.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: KkOr9GvzLSxQCyUeFHljQwa7fRHX3lDZ X-Proofpoint-GUID: YSSxnDKxiBsunEDZsaYs1a7k8GlH0CKE Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-15_01,2024-10-11_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 malwarescore=0 priorityscore=1501 adultscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1011 spamscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410310121 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 7DC1940012 X-Stat-Signature: tp3woyfbtcpd3fpw6kjjx5jiq1zbqya1 X-Rspam-User: X-HE-Tag: 1730391994-646899 X-HE-Meta: U2FsdGVkX18IlSLBCiVwAaybVUzJKXFTsMxiKZZ0O6e26yFl1A6R5P8/8IvY8kpGeoJNXvtg7PjsMxdQGx4o2vA9FSHL0XTlQJXn5ZsLo12fJYKXk+5IXZWa7n/lDs0P1B/rV+UMMC53gqxUz4pWs+SJUrxi1NuUGF7+wITbOLcSXLx3h9b8IUbwtfsuoqcpvTeQ/CPATwiMbOVsDeEIzLnVWZWgOxzzrNvzBZIh8Ak4ZunGzMYGj3iJQVKzE/xK3AupySF+7wu6fxFkhJuXpBkto9D6JFw7uPwPV+6bg9FtkY+fFjkPbSB44SRpR0jEIy5BmIkDpKRdBGIjnv09CuvVajFJfB16I7pwEo/ahaFRO+1GUlNVlOySqxz/n1kS0zya7+nEdmaB/KjN/70jNcZv6lLoe7uWDyshcja6nNPU+bMxe/L/XDWLJRoXLIJpkP9lB/aKqAd9PztyLdX9cvnjdljVH27BqOb53LTgVuzyUxAYcWZ1PIDmrsQ6vBKt4JmKUm58NxMyKziAu0HUtOi6P0p5+buj1xfKjGvi0VbnEDakzbw5CeteUjQPnVhpU4d5juBDYBpfqqjZJyPj6iLmXYihQjBb5gJqBDXdjDUCssaq+pcMvNNBbNqPqIq3IYWJuUUqbM/nJM7zEUKvScIPJa13e97+7+WYCSLelnFQ698ZaNHzZ/FXsC/5yH4nmc0FJoL+gnzL3cGK9NwKPtJC+NyOmxryh/VcnRwQJl2D8oJMMN7gktxFNNA1AVSLH7V3K2AfiIopBGleKhuYk75EO0HmQazkB7X+YhPyDL9tqJgV9J8lTOGoOuuGdx1iifKQ0CyECHsJVHdqnINz7giopNWuKJuLKyddze1S0Oz4NaRDsann/a5uDAW4XvTuwK2Huib1aYbAtpnvDEBgFH6Dx1ZlxVN11JAjLiTUfLDftvBcntu6zpFy4bejUKrQfShfHogubu2jm84A1mw iQAxsa0c MOB5N4+PLV8K9JCR2KolbuyIOjf0qpi4RP6BnUNIWpBbRNQ+CcpaZ374Dt3ZxkX+rWfw+PF+B6wGhTCyFWftrTNsHDs4C3xKvhri2Pd6U5AZ9DS1yXg6y9M6y4rctiK/o4x2D4eVUznd1uZlH0Qsh+9PKlKFl3bVUBHCqAgh3xKEAZVHlCmay6+N73qb7O6vIjNVs9dOKJVZeJkt3Iqf1jCOqMn3ReI0Z4tCWDJGuo9MkRA/x/IE9FuKBAGQIUzf4kxVaThqxZG+sJbCJUME6Zon7S6C+cAl6Lvu35kFs5w5KxPA5Q0sS/sI6F1LA7inWVsrZZMY7GXzx9fx014wdCP7kcmfCHJ8/pfWZVFZoIyHJgdb6c1BpodRElcDFheMO25iScRhXXRar4G9MjESpsUf1naLwg/JHGQvvyyFzyutwAFh58uV3ypKeXG8SddVxFQ0ZLB/Drxb0nXyjSuv7xLg3YBm4+ehz8JSlcpVvFSGvEPpChMFwoCgHYiF6O+ZWz5vYw73gC3BbIQReBHUA41SJa0fmewVB8gltdtLbkW1DVarRLsyl6NnR2BenUk8otiJoeDyK97iYjD7+k6ITcnO3p/qJgRXBFTJKFMuFSUHRLLaeGRQquN9FDw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Oct 25, 2024 at 04:14:45PM +0200, David Hildenbrand wrote: > Let's finally add s390 support for virtio-mem; my last RFC was sent > 4 years ago, and a lot changed in the meantime. > > The latest QEMU series is available at [1], which contains some more > details and a usage example on s390 (last patch). > > There is not too much in here: The biggest part is querying a new diag(500) > STORAGE_LIMIT hypercall to obtain the proper "max_physmem_end". > > The last three patches are not strictly required but certainly nice-to-have. > > Note that -- in contrast to standby memory -- virtio-mem memory must be > configured to be automatically onlined as soon as hotplugged. The easiest > approach is using the "memhp_default_state=" kernel parameter or by using > proper udev rules. More details can be found at [2]. > > I have reviving+upstreaming a systemd service to handle configuring > that on my todo list, but for some reason I keep getting distracted ... > > I tested various things, including: > * Various memory hotplug/hotunplug combinations > * Device hotplug/hotunplug > * /proc/iomem output > * reboot > * kexec > * kdump: make sure we properly enter the "kdump mode" in the virtio-mem > driver > > kdump support for virtio-mem memory on s390 will be sent out separately. > > v2 -> v3 > * "s390/kdump: make is_kdump_kernel() consistently return "true" in kdump > environments only" > -> Sent out separately [3] > * "s390/physmem_info: query diag500(STORAGE LIMIT) to support QEMU/KVM memory > devices" > -> No query function for diag500 for now. > -> Update comment above setup_ident_map_size(). > -> Optimize/rewrite diag500_storage_limit() [Heiko] > -> Change handling in detect_physmem_online_ranges [Alexander] > -> Improve documentation. > * "s390/sparsemem: provide memory_add_physaddr_to_nid() with CONFIG_NUMA" > -> Added after testing on systems with CONFIG_NUMA=y > > v1 -> v2: > * Document the new diag500 subfunction > * Use "s390" instead of "s390x" consistently > > [1] https://lkml.kernel.org/r/20241008105455.2302628-1-david@redhat.com > [2] https://virtio-mem.gitlab.io/user-guide/user-guide-linux.html > [3] https://lkml.kernel.org/r/20241023090651.1115507-1-david@redhat.com > > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Alexander Gordeev > Cc: Christian Borntraeger > Cc: Sven Schnelle > Cc: Thomas Huth > Cc: Cornelia Huck > Cc: Janosch Frank > Cc: Claudio Imbrenda > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Xuan Zhuo > Cc: "Eugenio P?rez" > Cc: Eric Farman > Cc: Andrew Morton > Cc: Jonathan Corbet > > David Hildenbrand (7): > Documentation: s390-diag.rst: make diag500 a generic KVM hypercall > Documentation: s390-diag.rst: document diag500(STORAGE LIMIT) > subfunction > s390/physmem_info: query diag500(STORAGE LIMIT) to support QEMU/KVM > memory devices > virtio-mem: s390 support > lib/Kconfig.debug: default STRICT_DEVMEM to "y" on s390 > s390/sparsemem: reduce section size to 128 MiB > s390/sparsemem: provide memory_add_physaddr_to_nid() with CONFIG_NUMA > > Documentation/virt/kvm/s390/s390-diag.rst | 35 +++++++++++++---- > arch/s390/boot/physmem_info.c | 47 ++++++++++++++++++++++- > arch/s390/boot/startup.c | 7 +++- > arch/s390/include/asm/physmem_info.h | 3 ++ > arch/s390/include/asm/sparsemem.h | 10 ++++- > drivers/virtio/Kconfig | 12 +++--- > lib/Kconfig.debug | 2 +- > 7 files changed, 98 insertions(+), 18 deletions(-) > > > base-commit: ae90f6a6170d7a7a1aa4fddf664fbd093e3023bc > -- > 2.46.1 > Tested successfully various memory hotplug operations on lpar. Tested-by: Sumanth Korikkar