Re: [PATCH v1 00/23] Q35 support for Xen
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 with them, so I am hoping progress is moving forward on the Xen side. I wish I could work on this full time to get everything as it needs to be soon. -Joel On Tue, Aug 22, 2023 at 10:18 AM Anthony PERARD wrote: > Hi Joel, > > We had a design session about Q35 support during Xen Summit, and I think > the result of it is that some more changes are going to be needed, > right? > > So, is it worth it for me to spend some time on review this patch series > in its current form, or should I wait until the next revision? And same > question for the xen toolstack side. > > Cheers, > > -- > Anthony PERARD >
Re: [PATCH v1 00/23] Q35 support for Xen
Hi Joel, We had a design session about Q35 support during Xen Summit, and I think the result of it is that some more changes are going to be needed, right? So, is it worth it for me to spend some time on review this patch series in its current form, or should I wait until the next revision? And same question for the xen toolstack side. Cheers, -- Anthony PERARD
Re: [PATCH v1 00/23] Q35 support for Xen
Am 5. Juli 2023 16:50:28 UTC schrieb Joel Upham : >I believe it might have been master unstable branch. Last commit before my >patches was: > >commit 19a720b74fde7e859d19f12c66a72e545947a657 >Merge: c6a5fc2ac7 367189efae >Author: Richard Henderson >Date: Thu Jun 1 08:30:29 2023 -0700 Indeed! I've rebased your series and changed the first commit of your series to only touch pc_q35.c: https://github.com/shentok/qemu/commits/q35-xen . Judging just from compilation my work on decoupling Xen and PIIX seems to have provided a good blueprint for the ICH9 LPC device model (no changes needed there). How can one run Xen/Q35? I've tried running Xen/PC with the PIIX4 rather than the usual PIIX3 south bridge before which essentially only changes the PCI IDs. But that didn't work. With Q35/ICH9 the differences would be way bigger... Thanks, Bernhard P.S.: I'm waiting for Xen to become compilable again with my Linux distribution such that I could add PIIX4 support to Xen. > >-Joel > >On Thu, Jun 22, 2023 at 1:11 PM Bernhard Beschow wrote: > >> >> >> 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.html >> > >> >I have been using a version of these patches on Xen 4.16 with Qemu >> >version 4.1 for over 6 months. The guest VMs are very stable, and PCIe >> >PT is working as was designed (all of the PCIe devices are on the root >> >PCIe device). I have successfully passed through GPUs, NICs, etc. I was >> >asked by those in the community to attempt to once again upstream the >> >patches. I have them working with Seabios and OVMF (patches are needed >> >to OVMF which I will be sending to the mailing list). The Qemu patches >> >allow for the xenvbd to properly unplug the AHCI SATA device, and all >> >xen pv windows drivers work as intended. >> > >> >I used the original author of the patches to get a majority of this to >> work: >> >Alexey Gerasimenko. I fixed the patches to be in line with the upstream >> >Qemu and Xen versions. Any original issues may still exist; however, I >> >am sure in time they can be improved. If the code doesn't exist then they >> >can't be actively looked at by the community. >> > >> >I am not an expert on the Q35 chipset or PCIe technology. This is my >> >first patch to this mailing list. >> >> Patchew was unable to apply this series onto master: >> https://patchew.org/QEMU/cover.1687278381.git.jupham...@gmail.com/ What >> revision is the series based on? >> >> Can you rebase? Rebasing this series will probably cause quite some work >> since it will simplify here and there, as indicated by Igor and by my >> comments in "version zero" of this series. >> >> Best regards, >> Bernhard >> >> > >> > >> >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/xen: Add Xen platform device support for Q35 >> > q35: Fix incorrect values for PCIEXBAR masks >> > xen/pt: XenHostPCIDevice: provide functions for PCI Capabilities and >> >PCIe Extended Capabilities enumeration >> > xen/pt: avoid reading PCIe device type and cap version multiple times >> > xen/pt: determine the legacy/PCIe mode for a passed through device >> > xen/pt: Xen PCIe passthrough support for Q35: bypass PCIe topology >> >check >> > xen/pt: add support for PCIe Extended Capabilities and larger config >> >space >> > xen/pt: handle PCIe Extended Capabilities Next register >> > xen/pt: allow to hide PCIe Extended Capabilities >> > xen/pt: add Vendor-specific PCIe Extended Capability descriptor and >> >sizing >> > xen/pt: add fixed-size PCIe Extended Capabilities descriptors >> > xen/pt: add AER PCIe Extended Capability descriptor and sizing >> > xen/pt: add descriptors and size calculation for >> >RCLD/ACS/PMUX/DPA/MCAST/TPH/DPC PCIe Extended Capabilities >> > xen/pt: add Resizable BAR PCIe Extended Capability descriptor and >> >sizing >> > xen/pt: add VC/VC9/MFVC PCIe Extended Capabilities descriptors and >> >sizing >> > xen/pt: Fake capability id >> > xen platform: unplug ahci object >> > pc/q35: setup q35 for xen >> > qdev-monitor/pt: bypass root device check >> > s3 support: enabling s3 with q35 >> > >> > 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/lpc_ich9.c | 53 +- >> > hw/isa/piix3.c|2 +- >> > hw/pci-host/q35.c | 28 +- >> > hw/pci/pci.c | 17
Re: [PATCH v1 00/23] Q35 support for Xen
I believe it might have been master unstable branch. Last commit before my patches was: commit 19a720b74fde7e859d19f12c66a72e545947a657 Merge: c6a5fc2ac7 367189efae Author: Richard Henderson Date: Thu Jun 1 08:30:29 2023 -0700 -Joel On Thu, Jun 22, 2023 at 1:11 PM Bernhard Beschow wrote: > > > 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.html > > > >I have been using a version of these patches on Xen 4.16 with Qemu > >version 4.1 for over 6 months. The guest VMs are very stable, and PCIe > >PT is working as was designed (all of the PCIe devices are on the root > >PCIe device). I have successfully passed through GPUs, NICs, etc. I was > >asked by those in the community to attempt to once again upstream the > >patches. I have them working with Seabios and OVMF (patches are needed > >to OVMF which I will be sending to the mailing list). The Qemu patches > >allow for the xenvbd to properly unplug the AHCI SATA device, and all > >xen pv windows drivers work as intended. > > > >I used the original author of the patches to get a majority of this to > work: > >Alexey Gerasimenko. I fixed the patches to be in line with the upstream > >Qemu and Xen versions. Any original issues may still exist; however, I > >am sure in time they can be improved. If the code doesn't exist then they > >can't be actively looked at by the community. > > > >I am not an expert on the Q35 chipset or PCIe technology. This is my > >first patch to this mailing list. > > Patchew was unable to apply this series onto master: > https://patchew.org/QEMU/cover.1687278381.git.jupham...@gmail.com/ What > revision is the series based on? > > Can you rebase? Rebasing this series will probably cause quite some work > since it will simplify here and there, as indicated by Igor and by my > comments in "version zero" of this series. > > Best regards, > Bernhard > > > > > > >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/xen: Add Xen platform device support for Q35 > > q35: Fix incorrect values for PCIEXBAR masks > > xen/pt: XenHostPCIDevice: provide functions for PCI Capabilities and > >PCIe Extended Capabilities enumeration > > xen/pt: avoid reading PCIe device type and cap version multiple times > > xen/pt: determine the legacy/PCIe mode for a passed through device > > xen/pt: Xen PCIe passthrough support for Q35: bypass PCIe topology > >check > > xen/pt: add support for PCIe Extended Capabilities and larger config > >space > > xen/pt: handle PCIe Extended Capabilities Next register > > xen/pt: allow to hide PCIe Extended Capabilities > > xen/pt: add Vendor-specific PCIe Extended Capability descriptor and > >sizing > > xen/pt: add fixed-size PCIe Extended Capabilities descriptors > > xen/pt: add AER PCIe Extended Capability descriptor and sizing > > xen/pt: add descriptors and size calculation for > >RCLD/ACS/PMUX/DPA/MCAST/TPH/DPC PCIe Extended Capabilities > > xen/pt: add Resizable BAR PCIe Extended Capability descriptor and > >sizing > > xen/pt: add VC/VC9/MFVC PCIe Extended Capabilities descriptors and > >sizing > > xen/pt: Fake capability id > > xen platform: unplug ahci object > > pc/q35: setup q35 for xen > > qdev-monitor/pt: bypass root device check > > s3 support: enabling s3 with q35 > > > > 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/lpc_ich9.c | 53 +- > > hw/isa/piix3.c|2 +- > > hw/pci-host/q35.c | 28 +- > > hw/pci/pci.c | 17 + > > hw/xen/xen-host-pci-device.c | 106 +++- > > hw/xen/xen-host-pci-device.h |6 +- > > hw/xen/xen_pt.c | 49 +- > > hw/xen/xen_pt.h | 18 +- > > hw/xen/xen_pt_config_init.c | 1103 ++--- > > include/hw/acpi/pcihp.h |2 + > > include/hw/boards.h |1 + > > include/hw/i386/pc.h |3 + > > include/hw/pci-host/q35.h |4 +- > > include/hw/pci/pci.h |3 + > > include/hw/southbridge/ich9.h |1 + > > include/hw/xen/xen.h |4 +- > > qemu-options.hx |1 + > > softmmu/qdev-monitor.c|4 +- > > stubs/xen-hw-stub.c |4 +- > > 26 files changed, 1394 insertions(+), 130 deletions(-) > > >
Re: [PATCH v1 00/23] Q35 support for Xen
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.html > >I have been using a version of these patches on Xen 4.16 with Qemu >version 4.1 for over 6 months. The guest VMs are very stable, and PCIe >PT is working as was designed (all of the PCIe devices are on the root >PCIe device). I have successfully passed through GPUs, NICs, etc. I was >asked by those in the community to attempt to once again upstream the >patches. I have them working with Seabios and OVMF (patches are needed >to OVMF which I will be sending to the mailing list). The Qemu patches >allow for the xenvbd to properly unplug the AHCI SATA device, and all >xen pv windows drivers work as intended. > >I used the original author of the patches to get a majority of this to work: >Alexey Gerasimenko. I fixed the patches to be in line with the upstream >Qemu and Xen versions. Any original issues may still exist; however, I >am sure in time they can be improved. If the code doesn't exist then they >can't be actively looked at by the community. > >I am not an expert on the Q35 chipset or PCIe technology. This is my >first patch to this mailing list. Patchew was unable to apply this series onto master: https://patchew.org/QEMU/cover.1687278381.git.jupham...@gmail.com/ What revision is the series based on? Can you rebase? Rebasing this series will probably cause quite some work since it will simplify here and there, as indicated by Igor and by my comments in "version zero" of this series. Best regards, Bernhard > > >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/xen: Add Xen platform device support for Q35 > q35: Fix incorrect values for PCIEXBAR masks > xen/pt: XenHostPCIDevice: provide functions for PCI Capabilities and >PCIe Extended Capabilities enumeration > xen/pt: avoid reading PCIe device type and cap version multiple times > xen/pt: determine the legacy/PCIe mode for a passed through device > xen/pt: Xen PCIe passthrough support for Q35: bypass PCIe topology >check > xen/pt: add support for PCIe Extended Capabilities and larger config >space > xen/pt: handle PCIe Extended Capabilities Next register > xen/pt: allow to hide PCIe Extended Capabilities > xen/pt: add Vendor-specific PCIe Extended Capability descriptor and >sizing > xen/pt: add fixed-size PCIe Extended Capabilities descriptors > xen/pt: add AER PCIe Extended Capability descriptor and sizing > xen/pt: add descriptors and size calculation for >RCLD/ACS/PMUX/DPA/MCAST/TPH/DPC PCIe Extended Capabilities > xen/pt: add Resizable BAR PCIe Extended Capability descriptor and >sizing > xen/pt: add VC/VC9/MFVC PCIe Extended Capabilities descriptors and >sizing > xen/pt: Fake capability id > xen platform: unplug ahci object > pc/q35: setup q35 for xen > qdev-monitor/pt: bypass root device check > s3 support: enabling s3 with q35 > > 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/lpc_ich9.c | 53 +- > hw/isa/piix3.c|2 +- > hw/pci-host/q35.c | 28 +- > hw/pci/pci.c | 17 + > hw/xen/xen-host-pci-device.c | 106 +++- > hw/xen/xen-host-pci-device.h |6 +- > hw/xen/xen_pt.c | 49 +- > hw/xen/xen_pt.h | 18 +- > hw/xen/xen_pt_config_init.c | 1103 ++--- > include/hw/acpi/pcihp.h |2 + > include/hw/boards.h |1 + > include/hw/i386/pc.h |3 + > include/hw/pci-host/q35.h |4 +- > include/hw/pci/pci.h |3 + > include/hw/southbridge/ich9.h |1 + > include/hw/xen/xen.h |4 +- > qemu-options.hx |1 + > softmmu/qdev-monitor.c|4 +- > stubs/xen-hw-stub.c |4 +- > 26 files changed, 1394 insertions(+), 130 deletions(-) >
[PATCH v1 00/23] Q35 support for Xen
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.html I have been using a version of these patches on Xen 4.16 with Qemu version 4.1 for over 6 months. The guest VMs are very stable, and PCIe PT is working as was designed (all of the PCIe devices are on the root PCIe device). I have successfully passed through GPUs, NICs, etc. I was asked by those in the community to attempt to once again upstream the patches. I have them working with Seabios and OVMF (patches are needed to OVMF which I will be sending to the mailing list). The Qemu patches allow for the xenvbd to properly unplug the AHCI SATA device, and all xen pv windows drivers work as intended. I used the original author of the patches to get a majority of this to work: Alexey Gerasimenko. I fixed the patches to be in line with the upstream Qemu and Xen versions. Any original issues may still exist; however, I am sure in time they can be improved. If the code doesn't exist then they can't be actively looked at by the community. I am not an expert on the Q35 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/xen: Add Xen platform device support for Q35 q35: Fix incorrect values for PCIEXBAR masks xen/pt: XenHostPCIDevice: provide functions for PCI Capabilities and PCIe Extended Capabilities enumeration xen/pt: avoid reading PCIe device type and cap version multiple times xen/pt: determine the legacy/PCIe mode for a passed through device xen/pt: Xen PCIe passthrough support for Q35: bypass PCIe topology check xen/pt: add support for PCIe Extended Capabilities and larger config space xen/pt: handle PCIe Extended Capabilities Next register xen/pt: allow to hide PCIe Extended Capabilities xen/pt: add Vendor-specific PCIe Extended Capability descriptor and sizing xen/pt: add fixed-size PCIe Extended Capabilities descriptors xen/pt: add AER PCIe Extended Capability descriptor and sizing xen/pt: add descriptors and size calculation for RCLD/ACS/PMUX/DPA/MCAST/TPH/DPC PCIe Extended Capabilities xen/pt: add Resizable BAR PCIe Extended Capability descriptor and sizing xen/pt: add VC/VC9/MFVC PCIe Extended Capabilities descriptors and sizing xen/pt: Fake capability id xen platform: unplug ahci object pc/q35: setup q35 for xen qdev-monitor/pt: bypass root device check s3 support: enabling s3 with q35 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/lpc_ich9.c | 53 +- hw/isa/piix3.c|2 +- hw/pci-host/q35.c | 28 +- hw/pci/pci.c | 17 + hw/xen/xen-host-pci-device.c | 106 +++- hw/xen/xen-host-pci-device.h |6 +- hw/xen/xen_pt.c | 49 +- hw/xen/xen_pt.h | 18 +- hw/xen/xen_pt_config_init.c | 1103 ++--- include/hw/acpi/pcihp.h |2 + include/hw/boards.h |1 + include/hw/i386/pc.h |3 + include/hw/pci-host/q35.h |4 +- include/hw/pci/pci.h |3 + include/hw/southbridge/ich9.h |1 + include/hw/xen/xen.h |4 +- qemu-options.hx |1 + softmmu/qdev-monitor.c|4 +- stubs/xen-hw-stub.c |4 +- 26 files changed, 1394 insertions(+), 130 deletions(-) -- 2.34.1