From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, mst@redhat.com, ehabkost@redhat.com
Cc: quintela@redhat.com
Subject: [Qemu-devel] [PATCH 1/2] pcie_root_port: Allow ACS to be disabled
Date: Tue, 30 Jul 2019 10:37:18 +0100 [thread overview]
Message-ID: <20190730093719.12958-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20190730093719.12958-1-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ACS was added in 4.0 unconditionally, this breaks migration
compatibility.
Allow ACS to be disabled by adding a property that's
checked by pcie_root_port.
Unfortunately pcie-root-port doesn't have any instance data,
so there's no where for that flag to live, so stuff it into
PCIESlot.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hw/pci-bridge/pcie_root_port.c | 3 ++-
include/hw/pci/pcie_port.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/pci-bridge/pcie_root_port.c b/hw/pci-bridge/pcie_root_port.c
index 09019ca05d..1d8a778709 100644
--- a/hw/pci-bridge/pcie_root_port.c
+++ b/hw/pci-bridge/pcie_root_port.c
@@ -111,7 +111,7 @@ static void rp_realize(PCIDevice *d, Error **errp)
pcie_aer_root_init(d);
rp_aer_vector_update(d);
- if (rpc->acs_offset) {
+ if (rpc->acs_offset && !s->disable_acs) {
pcie_acs_init(d, rpc->acs_offset);
}
return;
@@ -145,6 +145,7 @@ static void rp_exit(PCIDevice *d)
static Property rp_props[] = {
DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present,
QEMU_PCIE_SLTCAP_PCP_BITNR, true),
+ DEFINE_PROP_BOOL("disable-acs", PCIESlot, disable_acs, false),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/include/hw/pci/pcie_port.h b/include/hw/pci/pcie_port.h
index 09586f4641..7515430087 100644
--- a/include/hw/pci/pcie_port.h
+++ b/include/hw/pci/pcie_port.h
@@ -53,6 +53,8 @@ struct PCIESlot {
PCIExpLinkSpeed speed;
PCIExpLinkWidth width;
+ /* Disable ACS (really for a pcie_root_port) */
+ bool disable_acs;
QLIST_ENTRY(PCIESlot) next;
};
--
2.21.0
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Juan Quintela <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: [Qemu-devel] [PULL 1/2] pcie_root_port: Allow ACS to be disabled
Date: Tue, 30 Jul 2019 15:45:58 -0400 [thread overview]
Message-ID: <20190730093719.12958-2-dgilbert@redhat.com> (raw)
Message-ID: <20190730194558.JsFYg9CxvKhAv43tztQxHDFUlhsY5iljDrPlrgYFnEY@z> (raw)
In-Reply-To: <20190730194519.3689-1-mst@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ACS was added in 4.0 unconditionally, this breaks migration
compatibility.
Allow ACS to be disabled by adding a property that's
checked by pcie_root_port.
Unfortunately pcie-root-port doesn't have any instance data,
so there's no where for that flag to live, so stuff it into
PCIESlot.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20190730093719.12958-2-dgilbert@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/pci-bridge/pcie_root_port.c | 3 ++-
include/hw/pci/pcie_port.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/pci-bridge/pcie_root_port.c b/hw/pci-bridge/pcie_root_port.c
index 09019ca05d..1d8a778709 100644
--- a/hw/pci-bridge/pcie_root_port.c
+++ b/hw/pci-bridge/pcie_root_port.c
@@ -111,7 +111,7 @@ static void rp_realize(PCIDevice *d, Error **errp)
pcie_aer_root_init(d);
rp_aer_vector_update(d);
- if (rpc->acs_offset) {
+ if (rpc->acs_offset && !s->disable_acs) {
pcie_acs_init(d, rpc->acs_offset);
}
return;
@@ -145,6 +145,7 @@ static void rp_exit(PCIDevice *d)
static Property rp_props[] = {
DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present,
QEMU_PCIE_SLTCAP_PCP_BITNR, true),
+ DEFINE_PROP_BOOL("disable-acs", PCIESlot, disable_acs, false),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/include/hw/pci/pcie_port.h b/include/hw/pci/pcie_port.h
index 09586f4641..7515430087 100644
--- a/include/hw/pci/pcie_port.h
+++ b/include/hw/pci/pcie_port.h
@@ -53,6 +53,8 @@ struct PCIESlot {
PCIExpLinkSpeed speed;
PCIExpLinkWidth width;
+ /* Disable ACS (really for a pcie_root_port) */
+ bool disable_acs;
QLIST_ENTRY(PCIESlot) next;
};
--
MST
next prev parent reply other threads:[~2019-07-30 9:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 9:37 [Qemu-devel] [for 4.1 PATCH 0/2] Disable PCIe ACS on older machines Dr. David Alan Gilbert (git)
2019-07-30 9:37 ` Dr. David Alan Gilbert (git) [this message]
2019-07-30 10:25 ` [Qemu-devel] [PATCH 1/2] pcie_root_port: Allow ACS to be disabled Igor Mammedov
2019-07-30 11:13 ` Dr. David Alan Gilbert
2019-07-30 12:03 ` Igor Mammedov
2019-07-30 12:41 ` Dr. David Alan Gilbert
2019-07-30 13:42 ` Juan Quintela
2019-07-30 19:45 ` [Qemu-devel] [PULL " Michael S. Tsirkin
2019-07-30 9:37 ` [Qemu-devel] [PATCH 2/2] pcie_root_port: Disable ACS on older machines Dr. David Alan Gilbert (git)
2019-07-30 12:05 ` Igor Mammedov
2019-07-30 13:42 ` Juan Quintela
2019-07-30 19:46 ` [Qemu-devel] [PULL " Michael S. Tsirkin
-- strict thread matches above, loose matches on Subject: below --
2019-07-30 19:45 [Qemu-devel] [PULL 0/2] pci: bugfix Michael S. Tsirkin
2019-08-02 14:06 ` Peter Maydell
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=20190730093719.12958-2-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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).