[libvirt] [PATCH 00/12] Drop KVM assignment

Michal Privoznik posted 12 patches 4 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1566311075.git.mprivozn@redhat.com
Test syntax-check passed
docs/news.xml                                 |  13 +
src/libvirt_private.syms                      |   1 -
src/qemu/qemu_capabilities.c                  |   6 -
src/qemu/qemu_command.c                       |  48 +--
src/qemu/qemu_command.h                       |   3 -
src/qemu/qemu_driver.c                        |  14 +-
src/qemu/qemu_hostdev.c                       |  44 +-
src/qemu/qemu_hostdev.h                       |   1 -
src/qemu/qemu_hotplug.c                       |  20 +-
src/util/virhostdev.c                         |  97 +++--
src/util/virpci.c                             | 403 +-----------------
src/util/virpci.h                             |   2 -
.../qemu_1.7.0.x86_64.xml                     |   1 -
.../qemu_2.12.0-virt.aarch64.xml              |   1 -
.../qemu_2.12.0.ppc64.xml                     |   1 -
.../qemu_2.12.0.s390x.xml                     |   1 -
.../qemu_2.12.0.x86_64.xml                    |   1 -
.../qemu_2.6.0-virt.aarch64.xml               |   1 -
.../qemu_2.6.0.aarch64.xml                    |   1 -
.../domaincapsschemadata/qemu_2.6.0.ppc64.xml |   1 -
.../qemu_2.6.0.x86_64.xml                     |   1 -
.../domaincapsschemadata/qemu_2.7.0.s390x.xml |   1 -
.../qemu_2.8.0-tcg.x86_64.xml                 |   1 -
.../domaincapsschemadata/qemu_2.8.0.s390x.xml |   1 -
.../qemu_2.8.0.x86_64.xml                     |   1 -
.../qemu_2.9.0-q35.x86_64.xml                 |   1 -
.../qemu_2.9.0-tcg.x86_64.xml                 |   1 -
.../qemu_2.9.0.x86_64.xml                     |   1 -
.../domaincapsschemadata/qemu_3.0.0.s390x.xml |   1 -
.../qemu_3.1.0.x86_64.xml                     |   1 -
.../domaincapsschemadata/qemu_4.0.0.s390x.xml |   1 -
.../qemu_4.0.0.x86_64.xml                     |   1 -
.../qemu_4.1.0.x86_64.xml                     |   1 -
tests/domaincapstest.c                        |   4 +-
tests/virpcimock.c                            | 137 +-----
35 files changed, 92 insertions(+), 722 deletions(-)
[libvirt] [PATCH 00/12] Drop KVM assignment
Posted by Michal Privoznik 4 years, 8 months ago
The KVM style of PCI assignment is not used, and it hasn't been for a
while. Any attempt to start a domain with it would result in error as
kernel dropped its support in 4.12.0 (after being deprecated for 1.5
years).

Michal Prívozník (12):
  qemu: Drop KVM assignment
  tests: Remove 'kvm' PCI backend from domaincapstest
  virhostdev: Unify virDomainHostdevDef to virPCIDevice translation
  qemu: Drop unused qemuOpenPCIConfig()
  virhostdev: Disable legacy kvm assignment
  virpci: Drop 'pci-stub' driver
  virpci: Remove unused virPCIDeviceWaitForCleanup
  virpci: Drop newid style of PCI device detach
  virpcimock: Don't create "pci-stub" driver
  virpcimock: Don't create new_id or remove_id files
  virpcimock: Drop @driverActions enum
  news: Document KVM assignment removal

 docs/news.xml                                 |  13 +
 src/libvirt_private.syms                      |   1 -
 src/qemu/qemu_capabilities.c                  |   6 -
 src/qemu/qemu_command.c                       |  48 +--
 src/qemu/qemu_command.h                       |   3 -
 src/qemu/qemu_driver.c                        |  14 +-
 src/qemu/qemu_hostdev.c                       |  44 +-
 src/qemu/qemu_hostdev.h                       |   1 -
 src/qemu/qemu_hotplug.c                       |  20 +-
 src/util/virhostdev.c                         |  97 +++--
 src/util/virpci.c                             | 403 +-----------------
 src/util/virpci.h                             |   2 -
 .../qemu_1.7.0.x86_64.xml                     |   1 -
 .../qemu_2.12.0-virt.aarch64.xml              |   1 -
 .../qemu_2.12.0.ppc64.xml                     |   1 -
 .../qemu_2.12.0.s390x.xml                     |   1 -
 .../qemu_2.12.0.x86_64.xml                    |   1 -
 .../qemu_2.6.0-virt.aarch64.xml               |   1 -
 .../qemu_2.6.0.aarch64.xml                    |   1 -
 .../domaincapsschemadata/qemu_2.6.0.ppc64.xml |   1 -
 .../qemu_2.6.0.x86_64.xml                     |   1 -
 .../domaincapsschemadata/qemu_2.7.0.s390x.xml |   1 -
 .../qemu_2.8.0-tcg.x86_64.xml                 |   1 -
 .../domaincapsschemadata/qemu_2.8.0.s390x.xml |   1 -
 .../qemu_2.8.0.x86_64.xml                     |   1 -
 .../qemu_2.9.0-q35.x86_64.xml                 |   1 -
 .../qemu_2.9.0-tcg.x86_64.xml                 |   1 -
 .../qemu_2.9.0.x86_64.xml                     |   1 -
 .../domaincapsschemadata/qemu_3.0.0.s390x.xml |   1 -
 .../qemu_3.1.0.x86_64.xml                     |   1 -
 .../domaincapsschemadata/qemu_4.0.0.s390x.xml |   1 -
 .../qemu_4.0.0.x86_64.xml                     |   1 -
 .../qemu_4.1.0.x86_64.xml                     |   1 -
 tests/domaincapstest.c                        |   4 +-
 tests/virpcimock.c                            | 137 +-----
 35 files changed, 92 insertions(+), 722 deletions(-)

-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 00/12] Drop KVM assignment
Posted by Daniel Henrique Barboza 4 years, 8 months ago

On 8/20/19 11:30 AM, Michal Privoznik wrote:
> The KVM style of PCI assignment is not used, and it hasn't been for a
> while. Any attempt to start a domain with it would result in error as
> kernel dropped its support in 4.12.0 (after being deprecated for 1.5
> years).

LGTM. Just a comment in patch 01.


After applying the whole series I tried to find the remaining references
of 'pci-assign'. This is what git grep returns:


$ git grep 'pci-assign'
src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_CONFIGFD, /* 
pci-assign.configfd */
src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_BOOTINDEX, /* 
pci-assign.bootindex */
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies:      "name": 
"kvm-pci-assign",
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies:      "name": 
"kvm-pci-assign"
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies:      "name": 
"kvm-pci-assign"


And with 'configfd':

$ git grep 'configfd'
docs/news-2011.html.in:      qemu: simplify PCI configfd handling in 
monitor (Eric Blake),<br/>
src/qemu/qemu_capabilities.c:              "pci-configfd",
src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_CONFIGFD, /* 
pci-assign.configfd */
tests/qemustatusxml2xmldata/migration-in-params-in.xml:    <flag 
name='pci-configfd'/>
tests/qemustatusxml2xmldata/migration-out-params-in.xml:    <flag 
name='pci-configfd'/>



Do we still need X_QEMU_CAPS_PCI_CONFIGFD and X_QEMU_CAPS_PCI_BOOTINDEX
after this series?



Thanks,


DHB

>
> Michal Prívozník (12):
>    qemu: Drop KVM assignment
>    tests: Remove 'kvm' PCI backend from domaincapstest
>    virhostdev: Unify virDomainHostdevDef to virPCIDevice translation
>    qemu: Drop unused qemuOpenPCIConfig()
>    virhostdev: Disable legacy kvm assignment
>    virpci: Drop 'pci-stub' driver
>    virpci: Remove unused virPCIDeviceWaitForCleanup
>    virpci: Drop newid style of PCI device detach
>    virpcimock: Don't create "pci-stub" driver
>    virpcimock: Don't create new_id or remove_id files
>    virpcimock: Drop @driverActions enum
>    news: Document KVM assignment removal
>
>   docs/news.xml                                 |  13 +
>   src/libvirt_private.syms                      |   1 -
>   src/qemu/qemu_capabilities.c                  |   6 -
>   src/qemu/qemu_command.c                       |  48 +--
>   src/qemu/qemu_command.h                       |   3 -
>   src/qemu/qemu_driver.c                        |  14 +-
>   src/qemu/qemu_hostdev.c                       |  44 +-
>   src/qemu/qemu_hostdev.h                       |   1 -
>   src/qemu/qemu_hotplug.c                       |  20 +-
>   src/util/virhostdev.c                         |  97 +++--
>   src/util/virpci.c                             | 403 +-----------------
>   src/util/virpci.h                             |   2 -
>   .../qemu_1.7.0.x86_64.xml                     |   1 -
>   .../qemu_2.12.0-virt.aarch64.xml              |   1 -
>   .../qemu_2.12.0.ppc64.xml                     |   1 -
>   .../qemu_2.12.0.s390x.xml                     |   1 -
>   .../qemu_2.12.0.x86_64.xml                    |   1 -
>   .../qemu_2.6.0-virt.aarch64.xml               |   1 -
>   .../qemu_2.6.0.aarch64.xml                    |   1 -
>   .../domaincapsschemadata/qemu_2.6.0.ppc64.xml |   1 -
>   .../qemu_2.6.0.x86_64.xml                     |   1 -
>   .../domaincapsschemadata/qemu_2.7.0.s390x.xml |   1 -
>   .../qemu_2.8.0-tcg.x86_64.xml                 |   1 -
>   .../domaincapsschemadata/qemu_2.8.0.s390x.xml |   1 -
>   .../qemu_2.8.0.x86_64.xml                     |   1 -
>   .../qemu_2.9.0-q35.x86_64.xml                 |   1 -
>   .../qemu_2.9.0-tcg.x86_64.xml                 |   1 -
>   .../qemu_2.9.0.x86_64.xml                     |   1 -
>   .../domaincapsschemadata/qemu_3.0.0.s390x.xml |   1 -
>   .../qemu_3.1.0.x86_64.xml                     |   1 -
>   .../domaincapsschemadata/qemu_4.0.0.s390x.xml |   1 -
>   .../qemu_4.0.0.x86_64.xml                     |   1 -
>   .../qemu_4.1.0.x86_64.xml                     |   1 -
>   tests/domaincapstest.c                        |   4 +-
>   tests/virpcimock.c                            | 137 +-----
>   35 files changed, 92 insertions(+), 722 deletions(-)
>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 00/12] Drop KVM assignment
Posted by Ján Tomko 4 years, 8 months ago
On Tue, Aug 20, 2019 at 02:53:32PM -0300, Daniel Henrique Barboza wrote:
>
>
>On 8/20/19 11:30 AM, Michal Privoznik wrote:
>>The KVM style of PCI assignment is not used, and it hasn't been for a
>>while. Any attempt to start a domain with it would result in error as
>>kernel dropped its support in 4.12.0 (after being deprecated for 1.5
>>years).
>
>LGTM. Just a comment in patch 01.
>
>
>After applying the whole series I tried to find the remaining references
>of 'pci-assign'. This is what git grep returns:
>

Yes, the 'kvm-pci-assign' device was present in those QEMU versions so
it was listed in the replies.

>
>$ git grep 'pci-assign'
>src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_CONFIGFD, /* 
>pci-assign.configfd */
>src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_BOOTINDEX, /* 
>pci-assign.bootindex */
>tests/qemucapabilitiesdata/caps_1.5.3.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_1.6.0.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_1.7.0.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_2.1.1.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies:      "name": 
>"kvm-pci-assign",
>tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies:      "name": 
>"kvm-pci-assign"
>tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies:      "name": 
>"kvm-pci-assign"
>
>
>And with 'configfd':
>
>$ git grep 'configfd'
>docs/news-2011.html.in:      qemu: simplify PCI configfd handling in 
>monitor (Eric Blake),<br/>
>src/qemu/qemu_capabilities.c:              "pci-configfd",
>src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_CONFIGFD, /* 
>pci-assign.configfd */
>tests/qemustatusxml2xmldata/migration-in-params-in.xml:    <flag 
>name='pci-configfd'/>
>tests/qemustatusxml2xmldata/migration-out-params-in.xml:    <flag 
>name='pci-configfd'/>
>
>
>
>Do we still need X_QEMU_CAPS_PCI_CONFIGFD and X_QEMU_CAPS_PCI_BOOTINDEX
>after this series?
>

We need to be capable of parsing the qemu capability flags produced by
older libvirt even though we aren't taking them into account.

When upgrading libvirt while a domain is running, or migrating to a host
with newer libvirt, rejecting the capability might break existing guests
even though they did not use that particular capability.

So we keep it around with an X- prefix and the corresponding string
representation unchanged and just quietly ignore it.

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 00/12] Drop KVM assignment
Posted by Daniel Henrique Barboza 4 years, 8 months ago

On 8/21/19 9:53 AM, Ján Tomko wrote:
> On Tue, Aug 20, 2019 at 02:53:32PM -0300, Daniel Henrique Barboza wrote:
>>
>>
>> On 8/20/19 11:30 AM, Michal Privoznik wrote:
>>> The KVM style of PCI assignment is not used, and it hasn't been for a
>>> while. Any attempt to start a domain with it would result in error as
>>> kernel dropped its support in 4.12.0 (after being deprecated for 1.5
>>> years).
>>
>> LGTM. Just a comment in patch 01.
>>
>>
>> After applying the whole series I tried to find the remaining references
>> of 'pci-assign'. This is what git grep returns:
>>
>
> Yes, the 'kvm-pci-assign' device was present in those QEMU versions so
> it was listed in the replies.
>
>>
>> $ git grep 'pci-assign'
>> src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_CONFIGFD, /* 
>> pci-assign.configfd */
>> src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_BOOTINDEX, /* 
>> pci-assign.bootindex */
>> tests/qemucapabilitiesdata/caps_1.5.3.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_1.6.0.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_1.7.0.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_2.1.1.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies: "name": 
>> "kvm-pci-assign",
>> tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies: "name": 
>> "kvm-pci-assign"
>> tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies: "name": 
>> "kvm-pci-assign"
>>
>>
>> And with 'configfd':
>>
>> $ git grep 'configfd'
>> docs/news-2011.html.in:      qemu: simplify PCI configfd handling in 
>> monitor (Eric Blake),<br/>
>> src/qemu/qemu_capabilities.c:              "pci-configfd",
>> src/qemu/qemu_capabilities.h:    X_QEMU_CAPS_PCI_CONFIGFD, /* 
>> pci-assign.configfd */
>> tests/qemustatusxml2xmldata/migration-in-params-in.xml: <flag 
>> name='pci-configfd'/>
>> tests/qemustatusxml2xmldata/migration-out-params-in.xml: <flag 
>> name='pci-configfd'/>
>>
>>
>>
>> Do we still need X_QEMU_CAPS_PCI_CONFIGFD and X_QEMU_CAPS_PCI_BOOTINDEX
>> after this series?
>>
>
> We need to be capable of parsing the qemu capability flags produced by
> older libvirt even though we aren't taking them into account.
>
> When upgrading libvirt while a domain is running, or migrating to a host
> with newer libvirt, rejecting the capability might break existing guests
> even though they did not use that particular capability.
>
> So we keep it around with an X- prefix and the corresponding string
> representation unchanged and just quietly ignore it.


Got it. Thanks for the explanation!


DHB

>
> Jano

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 00/12] Drop KVM assignment
Posted by Michal Privoznik 4 years, 7 months ago
On 8/20/19 4:30 PM, Michal Privoznik wrote:
 >

Thank you guys for review. I've pushed these.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list