Re: [PATCH v1 00/23] Q35 support for Xen

2023-08-22 Thread Joel Upham
I was doing this for work and at the moment got pulled off to work on some things for our release. Most of these patches will exist as they are, except for Xen wanting to handle the PCIe PT code a bit differently. XC-PNG is also working on getting patches for q35 and I have been sharing my code wit

Re: [PATCH v1 00/23] Q35 support for Xen

2023-07-05 Thread Joel Upham
: > > > Am 20. Juni 2023 17:24:33 UTC schrieb Joel Upham : > >These are the Qemu changes needed to support the q35 chipset for xen > >I based the patches from 2017 found on the mailing list here: > > > https://lists.xenproject.org/archives/html/xen-devel/2018-03/msg01176.h

Re: [PATCH v1 23/23] s3 support: enabling s3 with q35

2023-06-21 Thread Joel Upham
On Wed, Jun 21, 2023 at 7:34 AM Igor Mammedov wrote: > On Tue, 20 Jun 2023 13:24:57 -0400 > Joel Upham wrote: > > > Resetting pci devices after s3 causes guest freezes, as xen usually > > likes to handle resetting devices. > > I'd prefer Xen side being fixed i

Re: [PATCH v1 03/23] q35/acpi/xen: Provide ACPI PCI hotplug interface for Xen on Q35

2023-06-21 Thread Joel Upham
On Wed, Jun 21, 2023 at 7:28 AM Igor Mammedov wrote: > On Tue, 20 Jun 2023 13:24:37 -0400 > Joel Upham wrote: > > > This patch allows to use ACPI PCI hotplug functionality for Xen on Q35. > > All added code depends on xen_enabled(), so no functionality change for > >

Re: [PATCH v1 02/23] pc/q35: Apply PCI bus BSEL property for Xen PCI device hotplug

2023-06-21 Thread Joel Upham
On Wed, Jun 21, 2023 at 7:28 AM Igor Mammedov wrote: > On Tue, 20 Jun 2023 13:24:36 -0400 > Joel Upham wrote: > > > On Q35 we still need to assign BSEL property to bus(es) for PCI device > > add/hotplug to work. > > Extend acpi_set_pci_info() function to support Q35

Re: [PATCH v1 01/23] pc/xen: Xen Q35 support: provide IRQ handling for PCI devices

2023-06-21 Thread Joel Upham
Thank you, I was working off the Xen-devel and didn’t find his email. I will update my qemu and xen patches for the next version. -Joel On Wed, Jun 21, 2023 at 3:17 AM Daniel P. Berrangé wrote: > On Tue, Jun 20, 2023 at 01:24:34PM -0400, Joel Upham wrote: > > > > Signed

Re: [PATCH v1 1/1] Q35 Support

2023-06-21 Thread Joel Upham
covered elsewhere. -Joel Upham On Wed, Jun 21, 2023 at 7:10 AM David Hildenbrand wrote: > On 20.06.23 19:24, Joel Upham wrote: > > Inexpressive patch subject and non-existant patch desciption. I have no > clue what this is supposed to do, except that it involes q35 and xen

[PATCH v1 21/23] pc/q35: setup q35 for xen

2023-06-20 Thread Joel Upham
Mirrored the init done for piix devices when xen is being used. This is needed for xen memory to be initialized and used with q35. Signed-off-by: Joel Upham --- hw/i386/pc_q35.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386

[PATCH v1 12/23] xen/pt: allow to hide PCIe Extended Capabilities

2023-06-20 Thread Joel Upham
D value is returned. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt.c | 11 ++- hw/xen/xen_pt.h | 4 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index f757978800..2399fabb2b 100644 --- a/hw/xen/xen_pt.

[PATCH v1 15/23] xen/pt: add AER PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
The patch provides Advanced Error Reporting PCIe Extended Capability description structure and corresponding capability sizing function. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 72 + 1 file changed, 72

[PATCH v1 01/23] pc/xen: Xen Q35 support: provide IRQ handling for PCI devices

2023-06-20 Thread Joel Upham
warning is logged. Things have changed a bit in modern Qemu, and more changes to the IRQ mapping had to be done inside the lpc_ich9 to write the irqs and setup the mappings. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/i386/pc_piix.c | 3 +- hw/i386/xen/xen-h

[PATCH v1 1/1] Q35 Support

2023-06-20 Thread Joel Upham
--- hw/acpi/ich9.c| 22 +- hw/acpi/pcihp.c |6 +- hw/core/machine.c | 19 + hw/i386/pc_piix.c |3 +- hw/i386/pc_q35.c | 39 +- hw/i386/xen/xen-hvm.c |7 +- hw/i386/xen/xen_platform.c| 19 +- hw/isa/l

[PATCH v1 23/23] s3 support: enabling s3 with q35

2023-06-20 Thread Joel Upham
Resetting pci devices after s3 causes guest freezes, as xen usually likes to handle resetting devices. Signed-off-by: Joel Upham --- hw/acpi/ich9.c| 12 hw/pci-host/q35.c | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c

[PATCH v1 20/23] xen platform: unplug ahci object

2023-06-20 Thread Joel Upham
for 6 cdrom devices to be added, and 6 qemu hard disks. Signed-off-by: Joel Upham --- hw/i386/xen/xen_platform.c | 19 ++- hw/pci/pci.c | 17 + include/hw/pci/pci.h | 3 +++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/hw/i386

[PATCH v1 09/23] xen/pt: Xen PCIe passthrough support for Q35: bypass PCIe topology check

2023-06-20 Thread Joel Upham
r no negative side effects were encountered while using this approach, so it's a good temporary solution until multiple PCI bus support will be added to Xen. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 49 ++

[PATCH v1 11/23] xen/pt: handle PCIe Extended Capabilities Next register

2023-06-20 Thread Joel Upham
the Next capability pointer value. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 87 +++-- 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index

[PATCH v1 16/23] xen/pt: add descriptors and size calculation for RCLD/ACS/PMUX/DPA/MCAST/TPH/DPC PCIe Extended Capabilities

2023-06-20 Thread Joel Upham
is hidden) Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 224 1 file changed, 224 insertions(+) diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index 9fd0531bc4..1fba0b9d6c 100644 --

[PATCH v1 06/23] xen/pt: XenHostPCIDevice: provide functions for PCI Capabilities and PCIe Extended Capabilities enumeration

2023-06-20 Thread Joel Upham
beginning). In order not to probe PCIe Extended Capabilities existence every time, xen_host_pci_find_next_ext_cap makes use of the new 'has_pcie_ext_caps' field in XenHostPCIDevice structure which is filled only once (in xen_host_pci_device_get). Signed-off-by: Alexey Gerasimenko Signe

[PATCH v1 22/23] qdev-monitor/pt: bypass root device check

2023-06-20 Thread Joel Upham
On xen we need to be able to have hotpluggable root devices, even on Q35 at the moment. Having this check disables PT of devices, so lets turn it off for now. Signed-off-by: Joel Upham --- softmmu/qdev-monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/softmmu/qdev

[PATCH v1 05/23] q35: Fix incorrect values for PCIEXBAR masks

2023-06-20 Thread Joel Upham
Gerasimenko Signed-off-by: Joel Upham --- hw/pci-host/q35.c | 16 +--- include/hw/pci-host/q35.h | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index fe5fc0f47c..1fe4e5a5c9 100644 --- a/hw/pci-host/q35.c +++ b/hw

[PATCH v1 07/23] xen/pt: avoid reading PCIe device type and cap version multiple times

2023-06-20 Thread Joel Upham
descriptive get_pcie_device_type and get_pcie_capability_version. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen-host-pci-device.c | 15 +++ hw/xen/xen-host-pci-device.h | 1 + hw/xen/xen_pt_config_init.c | 34 ++ 3 files

[PATCH v1 17/23] xen/pt: add Resizable BAR PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
ff-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 28 1 file changed, 28 insertions(+) diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index 1fba0b9d6c..c5157ee3ee 100644 --- a/hw/xen/xen_pt_config_init.c +++ b/hw/xen/xen_pt_config_init.c @@ -2

[PATCH v1 18/23] xen/pt: add VC/VC9/MFVC PCIe Extended Capabilities descriptors and sizing

2023-06-20 Thread Joel Upham
. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 191 1 file changed, 191 insertions(+) diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index c5157ee3ee..4e14adf2b2 100644 --- a/hw/xen

[PATCH v1 04/23] q35/xen: Add Xen platform device support for Q35

2023-06-20 Thread Joel Upham
ged later to xen-platform-dev property as well. This way we can use a single machine type (q35) and change just xen-platform-dev value to on/off to control Xen platform device. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/core/machine.c | 19 +++ hw/i386/

[PATCH v1 08/23] xen/pt: determine the legacy/PCIe mode for a passed through device

2023-06-20 Thread Joel Upham
ss_check. This way we get consistent behavior when the same PCIe device being passed through to either i440 domain or Q35 one. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt.c | 28 ++-- hw/xen/xen_pt.h | 1 + 2 files changed, 27 insertio

[PATCH v1 13/23] xen/pt: add Vendor-specific PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
The patch provides Vendor-specific PCIe Extended Capability description structure and corresponding sizing function. In this particular case the size of the Vendor capability is available in the VSEC Length field. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen

[PATCH v1 03/23] q35/acpi/xen: Provide ACPI PCI hotplug interface for Xen on Q35

2023-06-20 Thread Joel Upham
). Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/acpi/ich9.c | 10 ++ hw/acpi/pcihp.c | 2 +- include/hw/acpi/pcihp.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 25e2c7243e..1c236be1c7 100644

[PATCH v1 00/23] Q35 support for Xen

2023-06-20 Thread Joel Upham
35 chipset or PCIe technology. This is my first patch to this mailing list. Joel Upham (23): pc/xen: Xen Q35 support: provide IRQ handling for PCI devices pc/q35: Apply PCI bus BSEL property for Xen PCI device hotplug q35/acpi/xen: Provide ACPI PCI hotplug interface for Xen on Q35 q35/xe

[PATCH v1 10/23] xen/pt: add support for PCIe Extended Capabilities and larger config space

2023-06-20 Thread Joel Upham
if it's an Extended one by using IS_PCIE_EXT_CAP_ID(cap) macro, passing the real capabiliy ID value to either xen_host_pci_find_next_ext_cap or xen_host_pci_find_next_cap. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt.c | 10 - hw/xen/xen_pt.h

[PATCH v1 19/23] xen/pt: Fake capability id

2023-06-20 Thread Joel Upham
linked list of capabilities (as it is the first entry in the list), so we must fake its Capability ID in PCIe Extended Capability header, leaving the Next Ptr field intact while returning zeroes on attempts to read capability body (writes are ignored). Signed-off-by: Alexey Gerasimenko Signed-off

[PATCH v1 14/23] xen/pt: add fixed-size PCIe Extended Capabilities descriptors

2023-06-20 Thread Joel Upham
registers are passed through at the moment (unless they belong to a "hardwired" capability which is hidden) Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 183 1 file changed, 183 insertions(+) diff --gi

[PATCH v1 02/23] pc/q35: Apply PCI bus BSEL property for Xen PCI device hotplug

2023-06-20 Thread Joel Upham
-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/acpi/pcihp.c | 4 +++- hw/pci-host/q35.c| 9 + include/hw/i386/pc.h | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index cdd6f775a1..f4e39d7a9c 100644 --- a/hw/acpi