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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF84AC4360C for ; Thu, 10 Oct 2019 14:01:54 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 83F5F21835 for ; Thu, 10 Oct 2019 14:01:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83F5F21835 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 05FF64A837; Thu, 10 Oct 2019 10:01:54 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nmOeK3qPWV0k; Thu, 10 Oct 2019 10:01:52 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D9F294A5FD; Thu, 10 Oct 2019 10:01:52 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id DCA3E4A5BF for ; Thu, 10 Oct 2019 10:01:51 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n2IV52QoRrmh for ; Thu, 10 Oct 2019 10:01:50 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 9FE4A4A5A3 for ; Thu, 10 Oct 2019 10:01:50 -0400 (EDT) Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA3EA368E2 for ; Thu, 10 Oct 2019 14:01:49 +0000 (UTC) Received: by mail-qk1-f200.google.com with SMTP id s28so5571115qkm.5 for ; Thu, 10 Oct 2019 07:01:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qVAAqrz8NImQua1Z+MPnnhld52fQmUNm5/UzIy85cAw=; b=TDkdpMtnVPM72C5DsF4TVJmt/35jTNcoipNyfnmDtiBVtrq+H9vf+uW/rjVojUindY nT/3RpYluWBOEia+asmVii1O3wLjsSPoOT1yg+B8TTeC1o68nyMWlGt750NhXzGUKfGc QTmVHpRT7B5ip1XTx/HsLUiDiiO4XzmtrEVH8AAySTGvV9VH9K+ARPKUzvp+lLBpE1v0 ymekmecBvt6VtFaL8QS04thLR8vzkr6WiLFxGcvY6/Cky8SvNZ1S4HbtogUdkApvkkzM NHCSBe6M/WPj1RB1yHmcU5bUvm+pX7w3XiZtMSpMkRSUB9z/9TQO0MxsYhSXPT7OCbE2 Dm7Q== X-Gm-Message-State: APjAAAW/1iU7PDxkDCN+MJPWGn+EZEtt+iDxOPnJ9HxQeDUssQh+duLg 9B6c0mpbUY0D+xr0MtgGDLc4Sys18ojY55YjnI2gRHZ11P04BSThw14ggNe4GZ2OlldF1i+sWJA dTlOSx34QZ91bYtNSuH9904N5 X-Received: by 2002:ad4:4cd2:: with SMTP id i18mr10049276qvz.179.1570716109102; Thu, 10 Oct 2019 07:01:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYqCELGRxeh3CQ+BFJgenfbvye6L7ylSnPky4UXagpA1ByKmXrLmgDow8lDw+zIeO6sIjvOA== X-Received: by 2002:ad4:4cd2:: with SMTP id i18mr10049239qvz.179.1570716108835; Thu, 10 Oct 2019 07:01:48 -0700 (PDT) Received: from redhat.com (bzq-79-176-10-77.red.bezeqint.net. [79.176.10.77]) by smtp.gmail.com with ESMTPSA id z6sm2312398qkf.125.2019.10.10.07.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 07:01:48 -0700 (PDT) Date: Thu, 10 Oct 2019 10:01:42 -0400 From: "Michael S. Tsirkin" To: Heyi Guo Subject: Re: [RFC PATCH 12/12] virt/acpi: add SDEI table if SDEI is enabled Message-ID: <20191010100107-mutt-send-email-mst@kernel.org> References: <1569338511-3572-1-git-send-email-guoheyi@huawei.com> <1569338511-3572-13-git-send-email-guoheyi@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1569338511-3572-13-git-send-email-guoheyi@huawei.com> Cc: Marc Zyngier , qemu-devel@nongnu.org, Dave Martin , qemu-arm@nongnu.org, Igor Mammedov , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Tue, Sep 24, 2019 at 11:21:51PM +0800, Heyi Guo wrote: > Add SDEI table if SDEI is enabled, so that guest OS can get aware and > utilize the interfaces. > > Signed-off-by: Heyi Guo > Cc: Peter Maydell > Cc: Dave Martin > Cc: Marc Zyngier > Cc: Mark Rutland > Cc: James Morse > Cc: Shannon Zhao > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > --- > hw/arm/virt-acpi-build.c | 16 ++++++++++++++++ > include/hw/acpi/acpi-defs.h | 5 +++++ > 2 files changed, 21 insertions(+) > > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c > index 6cdf156..1088214 100644 > --- a/hw/arm/virt-acpi-build.c > +++ b/hw/arm/virt-acpi-build.c > @@ -32,6 +32,7 @@ > #include "trace.h" > #include "hw/core/cpu.h" > #include "target/arm/cpu.h" > +#include "target/arm/sdei.h" > #include "hw/acpi/acpi-defs.h" > #include "hw/acpi/acpi.h" > #include "hw/nvram/fw_cfg.h" > @@ -475,6 +476,16 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) > } > > static void > +build_sdei(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) > +{ > + int sdei_start = table_data->len; > + > + (void)acpi_data_push(table_data, sizeof(AcpiSdei)); > + build_header(linker, table_data, (void *)(table_data->data + sdei_start), > + "SDEI", table_data->len - sdei_start, 1, NULL, NULL); > +} > + Please quote the relevant spec, earliest version that includes this table, and chapter in that spec. > +static void > build_spcr(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) > { > AcpiSerialPortConsoleRedirection *spcr; > @@ -796,6 +807,11 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) > acpi_add_table(table_offsets, tables_blob); > build_spcr(tables_blob, tables->linker, vms); > > + if (sdei_enabled) { > + acpi_add_table(table_offsets, tables_blob); > + build_sdei(tables_blob, tables->linker, vms); > + } > + > if (ms->numa_state->num_nodes > 0) { > acpi_add_table(table_offsets, tables_blob); > build_srat(tables_blob, tables->linker, vms); > diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h > index 57a3f58..0a2265d 100644 > --- a/include/hw/acpi/acpi-defs.h > +++ b/include/hw/acpi/acpi-defs.h > @@ -634,4 +634,9 @@ struct AcpiIortRC { > } QEMU_PACKED; > typedef struct AcpiIortRC AcpiIortRC; > > +struct AcpiSdei { > + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ > +} QEMU_PACKED; > +typedef struct AcpiSdei AcpiSdei; > + > #endif > -- > 1.8.3.1 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm