qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ani Sinha <ani@anisinha.ca>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
	jusual@redhat.com, qemu-devel@nongnu.org,
	"Aleksandar Markovic" <aleksandar.qemu.devel@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [PATCH] piix4: don't reserve hw resources when hotplug is off globally
Date: Tue, 8 Sep 2020 20:23:09 +0530	[thread overview]
Message-ID: <eca6c69e-3fc0-4876-8f28-995ce38271eb@Spark> (raw)
In-Reply-To: <20200908100429-mutt-send-email-mst@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3108 bytes --]

On Sep 8, 2020, 19:35 +0530, Michael S. Tsirkin <mst@redhat.com>, wrote:
> On Tue, Sep 01, 2020 at 03:19:22PM +0530, Ani Sinha wrote:
> > When acpi hotplug is turned off for both root pci bus as well as for pci
> > bridges, we should not generate the related amls for DSDT table or initialize
> > related hw ports or reserve hw resources. This change makes sure all those
> > operations are turned off in the case acpi pci hotplug is off globally.
> >
> > Signed-off-by: Ani Sinha <ani@anisinha.ca>
>
> Queued. in the future pls do not reply to patch with a new version.

What new version? This is the only version for this patch.

You must be getting confused with some other patch I sent. I sent quite a few.

>
> Thanks!
>
> > ---
> > hw/acpi/piix4.c | 6 ++++--
> > hw/i386/acpi-build.c | 10 ++++++++--
> > 2 files changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> > index e6163bb6ce..b70b1f98af 100644
> > --- a/hw/acpi/piix4.c
> > +++ b/hw/acpi/piix4.c
> > @@ -596,8 +596,10 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
> > "acpi-gpe0", GPE_LEN);
> > memory_region_add_subregion(parent, GPE_BASE, &s->io_gpe);
> >
> > - acpi_pcihp_init(OBJECT(s), &s->acpi_pci_hotplug, bus, parent,
> > - s->use_acpi_hotplug_bridge);
> > + if (s->use_acpi_hotplug_bridge || s->use_acpi_root_pci_hotplug) {
> > + acpi_pcihp_init(OBJECT(s), &s->acpi_pci_hotplug, bus, parent,
> > + s->use_acpi_hotplug_bridge);
> > + }
> >
> > s->cpu_hotplug_legacy = true;
> > object_property_add_bool(OBJECT(s), "cpu-hotplug-legacy",
> > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> > index b7bcbbbb2a..5365b3d290 100644
> > --- a/hw/i386/acpi-build.c
> > +++ b/hw/i386/acpi-build.c
> > @@ -95,6 +95,7 @@ typedef struct AcpiPmInfo {
> > bool s3_disabled;
> > bool s4_disabled;
> > bool pcihp_bridge_en;
> > + bool pcihp_root_en;
> > uint8_t s4_val;
> > AcpiFadtData fadt;
> > uint16_t cpu_hp_io_base;
> > @@ -245,6 +246,9 @@ static void acpi_get_pm_info(MachineState *machine, AcpiPmInfo *pm)
> > pm->pcihp_bridge_en =
> > object_property_get_bool(obj, "acpi-pci-hotplug-with-bridge-support",
> > NULL);
> > + pm->pcihp_root_en =
> > + object_property_get_bool(obj, "acpi-root-pci-hotplug",
> > + NULL);
> > }
> >
> > static void acpi_get_misc_info(AcpiMiscInfo *info)
> > @@ -1504,7 +1508,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
> > build_hpet_aml(dsdt);
> > build_piix4_isa_bridge(dsdt);
> > build_isa_devices_aml(dsdt);
> > - build_piix4_pci_hotplug(dsdt);
> > + if (pm->pcihp_bridge_en || pm->pcihp_root_en) {
> > + build_piix4_pci_hotplug(dsdt);
> > + }
> > build_piix4_pci0_int(dsdt);
> > } else {
> > sb_scope = aml_scope("_SB");
> > @@ -1698,7 +1704,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
> > crs_range_set_free(&crs_range_set);
> >
> > /* reserve PCIHP resources */
> > - if (pm->pcihp_io_len) {
> > + if (pm->pcihp_io_len && (pm->pcihp_bridge_en || pm->pcihp_root_en)) {
> > dev = aml_device("PHPR");
> > aml_append(dev, aml_name_decl("_HID", aml_string("PNP0A06")));
> > aml_append(dev,
> > --
> > 2.17.1
>

[-- Attachment #2: Type: text/html, Size: 30046 bytes --]

      reply	other threads:[~2020-09-08 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01  9:49 RFC [PATCH] piix4: don't reserve hw resources when hotplug is off Ani Sinha
2020-09-01  9:49 ` [PATCH] piix4: don't reserve hw resources when hotplug is off globally Ani Sinha
2020-09-02 15:22   ` Ani Sinha
2020-09-08 14:04   ` Michael S. Tsirkin
2020-09-08 14:53     ` Ani Sinha [this message]

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=eca6c69e-3fc0-4876-8f28-995ce38271eb@Spark \
    --to=ani@anisinha.ca \
    --cc=aleksandar.qemu.devel@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jusual@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).