From patchwork Thu Oct 18 14:30:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 149150 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2078638lji; Thu, 18 Oct 2018 07:52:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV61vwmDHwAnnWtzQSQGRHiyoKARUkXuwtjhFwV3ONlP9Ki3EzfZ8qH53dzJee87lyADIrqbo X-Received: by 2002:ac8:f06:: with SMTP id e6-v6mr29879798qtk.262.1539874374472; Thu, 18 Oct 2018 07:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539874374; cv=none; d=google.com; s=arc-20160816; b=Ip4nvCujFwjSJRxSDH45E2pwKfldtFTRbxNiteMnaafSRfCHTT/mkZiI4tFqGZ6APL VtyDP501O0SeZ69TewEQOaNxL3iPLcdIIkDOR9b0aIc2EDKqiGSVUU7USJS0/X0G3nTe AffOoGRF1QCaMNAUqXd7HGdw5UzIIC1PnAuB0oPJ+KMZX4ITh6Pv1a6DMVHKq4VeLW0/ LntroOjrCOuiNuGeUizcqMDVGlJT+IR0A9i0sRPikAae+aKLw3uvjQDUFJHqtJw5fwrY cfM7tHviWVD6jTpEHlCVLdReHmf8ceBHeDBrHB6o1sTwivSypRHd/s4sruI4LvbvLDio iYmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=FGW4797BOW3bBWuqz44PqBzIhumtT03TrPnE7mZ2dKE=; b=av6/cgfGQsSdxEzWPETwYsoMOEkZF8c0XpcBXAsjD26eaYtFt6rAtWucczuLkVSFbL Bor/YaNOzBF1lnH4ig4SgKjBwVN8rVN4tyV+mw9DOqmVO09e6jr0D2hZB8VQdOLltD3b c2vC293oHD1Uh77cuTplYHl51RFYFui034aOx5/75NIFgZqTI1e5758Z1VV7wONme+1Q jlOHx4TlAIzaEnMZ+5Px4puMNFnU9mxrZyUFUaBi+VCU9VAatDFFNhdQfl52cnISoaqJ WF/bZ4XV1wEIJQS99l4rJ/q89/G374zcuK77SgxfcFP0FVpyGOV6iyGrpg88BXqOzILO sd7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id h1-v6si563691qkj.159.2018.10.18.07.52.54 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 18 Oct 2018 07:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:42813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gD9fR-0006WD-SM for patch@linaro.org; Thu, 18 Oct 2018 10:52:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gD9LK-0006Cu-3F for qemu-devel@nongnu.org; Thu, 18 Oct 2018 10:32:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gD9LJ-0007gY-FU for qemu-devel@nongnu.org; Thu, 18 Oct 2018 10:32:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56788) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gD9LH-0007aP-7c; Thu, 18 Oct 2018 10:32:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0E40830F8BF0; Thu, 18 Oct 2018 14:32:02 +0000 (UTC) Received: from laptop.redhat.com (ovpn-116-215.ams2.redhat.com [10.36.116.215]) by smtp.corp.redhat.com (Postfix) with ESMTP id A55FD7899E; Thu, 18 Oct 2018 14:31:59 +0000 (UTC) From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org, shameerali.kolothum.thodi@huawei.com, kwangwoo.lee@sk.com, imammedo@redhat.com, david@redhat.com Date: Thu, 18 Oct 2018 16:30:38 +0200 Message-Id: <20181018143042.29588-13-eric.auger@redhat.com> In-Reply-To: <20181018143042.29588-1-eric.auger@redhat.com> References: <20181018143042.29588-1-eric.auger@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 18 Oct 2018 14:32:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v4 12/16] hw/arm/virt-acpi-build: Add PC-DIMM in SRAT 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: drjones@redhat.com, dgilbert@redhat.com, Suzuki.Poulose@arm.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Shameer Kolothum Generate Memory Affinity Structures for PC-DIMM ranges. Signed-off-by: Shameer Kolothum Signed-off-by: Eric Auger --- v3 -> v4: - do not use vms->bootinfo.device_memory_start/device_memory_size anymore v1 -> v2: - build_srat_hotpluggable_memory movedc to aml-build --- hw/arm/virt-acpi-build.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 5785fb697c..8818bbf5ec 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -545,6 +545,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) int i, srat_start; uint64_t mem_base; MachineClass *mc = MACHINE_GET_CLASS(vms); + MachineState *ms = MACHINE(vms); const CPUArchIdList *cpu_list = mc->possible_cpu_arch_ids(MACHINE(vms)); srat_start = table_data->len; @@ -570,6 +571,9 @@ build_srat(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) } } + build_srat_hotpluggable_memory(table_data, ms->device_memory->base, + ms->device_memory->mr.size, 0); + build_header(linker, table_data, (void *)(table_data->data + srat_start), "SRAT", table_data->len - srat_start, 3, NULL, NULL); }