From patchwork Thu Nov 7 10:21:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?=E2=80=9CWilliam_Roche?= X-Patchwork-Id: 13866123 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 858041EBA12 for ; Thu, 7 Nov 2024 10:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730974920; cv=fail; b=dLfaCic5FC/on8IwNJOY1MWCsS979iRBJy4zOr1I4ZfHLOElCvzw9vqbjUo4KM729AzQ8gMOzTh1V8LbHhNAfpNuL8qgIS4dy631GcND4wbJAEJvw8pccCR0kLr6J76glC4hjLPRkEP3T5rCY+CjRxS9FKZIT/Pqur2K57C4Yik= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730974920; c=relaxed/simple; bh=WU2Mmca9iwsl+m5tT330Go1T/Z4RrFx0ehvQcEOayEw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Vf4uJ38uz6KaDqZCMDClzd2wtdH3WHeES3Mxwbm7LgW7Ppq1zRJcxZqG4hKhMZI5AG6o/aqAmddBzT4rVmJcIwSRKR9pwP/qtFdU2MIkBznM/E4B6AfgOlBK/3CoZSruv2flHsDsguekahd8JVqXv8mTsPWpD1F80jyyJ5d/6JI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=KzLVJLXM; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=oi5jDGHm; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="KzLVJLXM"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="oi5jDGHm" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A71fZFc021950; Thu, 7 Nov 2024 10:21:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=jeyke96+8XdUGC7dBmIOrQRrlN3Zn+u9Xf3j5gg4Ztc=; b= KzLVJLXMmxXl3y8so0ToHvWhzErh8G+Fy3AxchUrk6KbRUzddABDt6U6oLwewDsy K0GnMj0Krpmmv4PVecO0hxD0IihWp1RjW33N8YB7carR9Hs2H7b6s4vJ2gFaEul6 372lsYAmEI78+K/MjU6nQd/u0wFPBcuibwfrwqPnPVv/dkphowNbn+SagXMQHiD3 5XSyd52dz4/L7S2cRrKnuO6z5CuyORYB4u9uUwBm6sAFKUFv1YIeOccows1U8VG4 IrRhrvyhlI5kiBkNYqiYpPMQ8TxpME0OjYEzVdMHHDdPJaQHGoBKukChy28o4MrF NxHQdJsYh6iV7WT8JaSHiw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42nbpst3ym-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Nov 2024 10:21:48 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4A78plMD008558; Thu, 7 Nov 2024 10:21:47 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2040.outbound.protection.outlook.com [104.47.70.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 42nah9t0xa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Nov 2024 10:21:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ihj7eY5jHL9vt6kT9UP48YtRMSyyfnNXHc+xxp72bZ1wjgqm+ZPx5nr8HPzg0DjwqJKLVkhuzd6SS18PNJXXRxAjPBWriecHTtkORZjyXYExWGRbn8pqYz/+uDYoXVNTPjJWVG9i9CfwlD8/Uym1wRBuldhRTSPWJN43DPwYAAgvuBxsQ1l3QmtENaV5NPw3KnxoXXJbFqC6N7ABZwa0AIguEPvud6JiE9fpPhMaPq2c0yZRwO0gB57O84xjvkvFOQIMHZwc05iOoYMRzu45Ro1/4B9t6x24CHxp2DbvTOrWW3XrCE6+OCWRwjVhE72xnKdDFXmobbh3uni6fe7YJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jeyke96+8XdUGC7dBmIOrQRrlN3Zn+u9Xf3j5gg4Ztc=; b=gHpPnFwML1bgaNjvYEP2orLg4aZd2IqEMrSkB/SpzKGA3AFAWSIYs1mSA61rWFkVctBw1Rvhv/n8j+9lymolDlPUYEB0ixR17e6zXkjE7ZR8uRPQ3M6kFvigwr7MEVCISsdHbVBwFAkUMA7SGD+QDyXYQxdF1wk2+mMvqpGXO7hWLrznFdjBKDGjFn7PA2T1q5ZrKPGs5aAhTEuBdlXuSUzfhscEM2+sDrULWPyYaPBRtzCoF3X+ShjjYktV8unzwxT+vuFdqdopsTaNS8tbXy25uaYs8Arh8izumLFOxRBu2wkRekrgsEofBPVg7vA2x7DomIsp0dmqw9IUUyW9nA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jeyke96+8XdUGC7dBmIOrQRrlN3Zn+u9Xf3j5gg4Ztc=; b=oi5jDGHm6jVQHHEmL+xbbDEYCaqdy32ztVAQK8lC8btKskw+VHAYsq0YQ++ryT2wEf5NcLIpQfHTAAMhz2K/mbIasCQZKr+L8T16UlJzLXqywvRpQbr1mK5LJJShMZZHwk342wmNyvYGQqP8NRCdlIU4f5mmvTG/Vp6B9PTrOl0= Received: from CH3PR10MB7329.namprd10.prod.outlook.com (2603:10b6:610:12c::16) by DM6PR10MB4187.namprd10.prod.outlook.com (2603:10b6:5:210::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Thu, 7 Nov 2024 10:21:44 +0000 Received: from CH3PR10MB7329.namprd10.prod.outlook.com ([fe80::f238:6143:104c:da23]) by CH3PR10MB7329.namprd10.prod.outlook.com ([fe80::f238:6143:104c:da23%3]) with mapi id 15.20.8137.018; Thu, 7 Nov 2024 10:21:44 +0000 From: =?utf-8?q?=E2=80=9CWilliam_Roche?= To: david@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: william.roche@oracle.com, peterx@redhat.com, pbonzini@redhat.com, richard.henderson@linaro.org, philmd@linaro.org, peter.maydell@linaro.org, mtosatti@redhat.com, imammedo@redhat.com, eduardo@habkost.net, marcel.apfelbaum@gmail.com, wangyanan55@huawei.com, zhao1.liu@intel.com, joao.m.martins@oracle.com Subject: [PATCH v2 7/7] system/physmem: Memory settings applied on remap notification Date: Thu, 7 Nov 2024 10:21:26 +0000 Message-ID: <20241107102126.2183152-8-william.roche@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241107102126.2183152-1-william.roche@oracle.com> References: <20241107102126.2183152-1-william.roche@oracle.com> X-ClientProxiedBy: SJ0PR05CA0025.namprd05.prod.outlook.com (2603:10b6:a03:33b::30) To CH3PR10MB7329.namprd10.prod.outlook.com (2603:10b6:610:12c::16) Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR10MB7329:EE_|DM6PR10MB4187:EE_ X-MS-Office365-Filtering-Correlation-Id: 99a41aab-7639-4d0d-98fa-08dcff15fa7b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|366016|376014; X-Microsoft-Antispam-Message-Info: u/5baVu9V665QX3GQMl0x0dMvBJfOZLEm3DSj8RjYxzIrKqmTLyJyURCWp1l2yWOfm+9szODc8t389Tj7S/aLJ7+taxkl/5fB1DkvVuYpQoH5wUruz/HHhXp3NhllxRkw5/9p0Y+PWe3FIKsbnzOp4wSQ3Pvl4ZiZ9Gd+t/MyQ5M06ZeCJUN/kcyWOXsYS3bG7Czm0pg2NIKTaWoziY/Tm05Orgk6rqAfrRfG1zIPwvnxef2etL6LJZTwblTjqeSIM+QJ3FNTq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forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH3PR10MB7329.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HfIIG/OQHvqVbJd3HfGMgHlqYMbM04XRhjRI3j572YxmkmynLpUyLPmDiDR9iKrlCXKTaWnmKm68CxtGFoD/GX2OKljX434qZ98i9OkJjXuxF7P8OQoSUO++SlqRzgH3KQecU+e+cXph8uK2WkQmMAKbK18AwVKZ8L77WxIDC0u5FlkaEhzromLzb80qs03Y5/TrQCAaE/RzECeZl7AK8QZhohxkHnJCwAYuMsQ7pw7yy7fPgTBPhc71obU+qgIeHoOzEqJDkWr6I11w4cyKUzcVGEI7gYhEovFRVjl0wJU8PEy2+0nZ8MS3jtpMyBmA1ekRjOiGvbrbFK9Ro4mBgvAmya/nVzmYcHWKXekZ5xYtVclO/KCGOZuHfGpZ1w6k7vcyvOz5OyzkjHdK+fon1CZQc2ss20lSitEfzR7yvNnUGykTE7Imwxz3CLGcWOry0onSZqtEEBKZsJMmAov+WxAoJa30Glna7Zg4FAAYMHC0297226OvBG+AAHBYLui9/QKVwzZ7E+qYno0BG1dysvWpNPDc9b8jEzQKVeqQbFYRnk26zR0NEJgfbet8YgP5SMYWXyYtp+1EISbpRGb8RDy46DcwWOFycjIOOm+8XN7oh+zJwQ4G46gJ55xUwkAKWNoECZqtDU79odAYB2KWxCBdGtBwFgMm/tZjQs4EJTIEu5bV2GJ4wQ7Jgpv9rEeil/gKnXLzmgnWttbiif5UxzX2VK68QmARDvGKS//Z30FlikVXdv7rXePk9xB0zmVqELMb2MfxC0b2ietgN8G5eFg3hNXYlYJRcTiv1H6UYK6ts72VUzdRur+NrvQjpu5vrEdHvYHWKfIqU0bjgEiY5wVTOMoEUpwNfHn7TZH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xzvr1kSEuHWsiGwQdW6vUhbMzwow7dgIpx47uAAwCqO+kYNXki3YDxXH3XZ98yyxFgrQzj8R6iPnoSrj1KBAmGPgeMgZoqpPlPe/UM8lHfexqmBr57j3zZ/wDntHtrm129A+RFpc/4h0FSBCGKhlW4OpopZHUrLZhwr/ZzL9ZI3g5gos54skOgN7j/mCSp9uP2kZVbppcq94yi+P76ON43vd32JStGPljZxDAah6ij+SS/kMJ6j7W6llQ8+zzUDWi5Ifw5FFDh6bmQ0N3QGkLCLbCoZ08mjS/gPRhSbOqFJ3kW2mwXFem0oNhZQy3xcAZfJ88vPGE3p130Ut6N6Of17r/e1MB2q/8R95L2mCF60RLxVpFJfzwy2gCE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99a41aab-7639-4d0d-98fa-08dcff15fa7b X-MS-Exchange-CrossTenant-AuthSource: CH3PR10MB7329.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2024 10:21:44.3424 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Avj513UXtWEV2dEj564+tHwL0rgbo/FrDKT4gkYgWuP6keZrPQAZp7yNui/xb0iyQbGVwuE8J5+ZOOjSLo+/AvWLtwTgyDLC0xf7hefIbXM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4187 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-11-07_01,2024-11-06_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 spamscore=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2411070079 X-Proofpoint-ORIG-GUID: SDefPObSeaEcgdwoP9vvO5QWReDmC_4R X-Proofpoint-GUID: SDefPObSeaEcgdwoP9vvO5QWReDmC_4R From: William Roche Merging and dump settings are handled by the remap notification in addition to memory policy and preallocation. If preallocation is set on a memory block, qemu_prealloc_mem() call is needed also after a ram_block_discard_range() use for this block. Signed-off-by: William Roche --- system/physmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index e72ca31451..72129d5b1b 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2225,8 +2225,6 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length) length, addr); exit(1); } - memory_try_enable_merging(vaddr, length); - qemu_ram_setup_dump(vaddr, length); } ram_block_notify_remap(block->host, offset, length); }