From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Liu Ping Fan <qemulist@gmail.com>,
jan.kiszka@siemens.com
Subject: [Qemu-devel] [PATCH 07/15] acpi: add memory_region_set_owner calls
Date: Sun, 2 Jun 2013 17:43:24 +0200 [thread overview]
Message-ID: <1370187812-13191-8-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1370187812-13191-1-git-send-email-pbonzini@redhat.com>
ACPI regions are added directly to the I/O address space, without
going through BARs. Thus they need the owner to be set directly.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/acpi/ich9.c | 1 +
hw/acpi/piix4.c | 5 +++++
hw/isa/apm.c | 1 +
3 files changed, 7 insertions(+)
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 4a17f32..0b19864 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -223,6 +223,7 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
8);
memory_region_add_subregion(&pm->io, ICH9_PMIO_SMI_EN, &pm->io_smi);
+ memory_region_set_owner(&pm->io, OBJECT(lpc_pci));
pm->irq = sci_irq;
qemu_register_reset(pm_reset, pm);
pm->powerdown_notifier.notify = pm_powerdown_req;
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index c4af1cc..d097592 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -433,6 +433,8 @@ static int piix4_pm_initfn(PCIDevice *dev)
acpi_pm1_cnt_init(&s->ar, &s->io, s->s4_val);
acpi_gpe_init(&s->ar, GPE_LEN);
+ memory_region_set_owner(&s->io, OBJECT(s));
+
s->powerdown_notifier.notify = piix4_pm_powerdown_req;
qemu_register_powerdown_notifier(&s->powerdown_notifier);
@@ -672,10 +674,12 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
{
memory_region_init_io(&s->io_gpe, &piix4_gpe_ops, s, "apci-gpe0",
GPE_LEN);
+ memory_region_set_owner(&s->io_gpe, OBJECT(s));
memory_region_add_subregion(parent, GPE_BASE, &s->io_gpe);
memory_region_init_io(&s->io_pci, &piix4_pci_ops, s, "apci-pci-hotplug",
PCI_HOTPLUG_SIZE);
+ memory_region_set_owner(&s->io_pci, OBJECT(s));
memory_region_add_subregion(parent, PCI_HOTPLUG_ADDR,
&s->io_pci);
pci_bus_hotplug(bus, piix4_device_hotplug, &s->dev.qdev);
@@ -683,6 +687,7 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
qemu_for_each_cpu(piix4_init_cpu_status, &s->gpe_cpu);
memory_region_init_io(&s->io_cpu, &cpu_hotplug_ops, s, "apci-cpu-hotplug",
PIIX4_PROC_LEN);
+ memory_region_set_owner(&s->io_cpu, OBJECT(s));
memory_region_add_subregion(parent, PIIX4_PROC_BASE, &s->io_cpu);
s->cpu_added_notifier.notify = piix4_cpu_added_req;
qemu_register_cpu_added_notifier(&s->cpu_added_notifier);
diff --git a/hw/isa/apm.c b/hw/isa/apm.c
index 5f21d21..376c564 100644
--- a/hw/isa/apm.c
+++ b/hw/isa/apm.c
@@ -97,6 +97,7 @@ void apm_init(PCIDevice *dev, APMState *apm, apm_ctrl_changed_t callback,
/* ioport 0xb2, 0xb3 */
memory_region_init_io(&apm->io, &apm_ops, apm, "apm-io", 2);
+ memory_region_set_owner(&apm->io, OBJECT(dev));
memory_region_add_subregion(pci_address_space_io(dev), APM_CNT_IOPORT,
&apm->io);
}
--
1.8.1.4
next prev parent reply other threads:[~2013-06-02 15:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-02 15:43 [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 01/15] memory: add getter/setter for owner Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 02/15] memory: add ref/unref Paolo Bonzini
2013-06-02 15:58 ` Peter Maydell
2013-06-03 6:49 ` Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 03/15] memory: add ref/unref calls Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 04/15] exec: add a reference to the region returned by address_space_translate Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 05/15] pci: set owner for BARs Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 06/15] sysbus: set owner for MMIO regions Paolo Bonzini
2013-06-02 15:43 ` Paolo Bonzini [this message]
2013-06-02 15:43 ` [Qemu-devel] [PATCH 08/15] misc: add memory_region_set_owner calls Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 09/15] isa/portio: allow setting an owner Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 10/15] vga: add memory_region_set_owner calls Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 11/15] pci-assign: " Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 12/15] vfio: " Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 13/15] exec: check MRU in qemu_ram_addr_from_host Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 14/15] memory: return MemoryRegion from qemu_ram_addr_from_host Paolo Bonzini
2013-06-02 16:04 ` Peter Maydell
2013-06-03 6:40 ` Paolo Bonzini
2013-06-03 10:51 ` Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 15/15] memory: ref/unref memory across address_space_map/unmap Paolo Bonzini
2013-06-02 16:12 ` [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership Peter Maydell
2013-06-03 6:47 ` Paolo Bonzini
2013-06-03 9:22 ` Peter Maydell
2013-06-03 9:40 ` Paolo Bonzini
2013-06-03 9:58 ` Peter Maydell
2013-06-03 10:12 ` Paolo Bonzini
2013-06-03 10:25 ` Peter Maydell
2013-06-03 11:05 ` Paolo Bonzini
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=1370187812-13191-8-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemulist@gmail.com \
/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).