qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: GipsyU <suyuheng@bytedance.com>
To: pbonzini@redhat.com, richard.henderson@linaro.org,
	ehabkost@redhat.com, mst@redhat.com, marcel.apfelbaum@gmail.com
Cc: Yuheng Su <suyuheng@bytedance.com>, qemu-devel@nongnu.org
Subject: [PATCH] microvm: Enable hotplug of pcie
Date: Tue, 27 Apr 2021 22:39:37 +0800	[thread overview]
Message-ID: <20210427143937.80604-1-su_yuheng@foxmail.com> (raw)

From: Yuheng Su <suyuheng@bytedance.com>

Signed-off-by: Yuheng Su <suyuheng@bytedance.com>
---
 hw/i386/acpi-microvm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c
index ccd3303aac..4f32bf512f 100644
--- a/hw/i386/acpi-microvm.c
+++ b/hw/i386/acpi-microvm.c
@@ -26,6 +26,7 @@
 
 #include "exec/memory.h"
 #include "hw/acpi/acpi.h"
+#include "hw/acpi/pci.h"
 #include "hw/acpi/aml-build.h"
 #include "hw/acpi/bios-linker-loader.h"
 #include "hw/acpi/generic_event_device.h"
@@ -209,6 +210,16 @@ static void acpi_build_microvm(AcpiBuildTables *tables,
                     ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id,
                     x86ms->oem_table_id);
 
+    acpi_add_table(table_offsets, tables_blob);
+    {
+        AcpiMcfgInfo mcfg = {
+           .base = mms->gpex.ecam.base,
+           .size = mms->gpex.ecam.size,
+        };
+        build_mcfg(tables_blob, tables->linker, &mcfg, x86ms->oem_id,
+                   x86ms->oem_table_id);
+    }
+
     xsdt = tables_blob->len;
     build_xsdt(tables_blob, tables->linker, table_offsets, x86ms->oem_id,
                x86ms->oem_table_id);
-- 
2.11.0



             reply	other threads:[~2021-04-27 15:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 14:39 GipsyU [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-27 13:04 [PATCH] microvm: Enable hotplug of pcie suyuheng
2021-04-27 22:36 ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210427143937.80604-1-su_yuheng@foxmail.com \
    --to=suyuheng@bytedance.com \
    --cc=ehabkost@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).