)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"ea23893f0eef5a280798c39873f31004ef860e90","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set iommu driver for virtio controllers too"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"bp amd-sev-libvirt-support"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I626c35d1653e6a25125320032d0a4a0c67ab8bcf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_893d9290","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":3},"updated":"2019-09-25 18:23:00.000000000","message":"This should be \"blueprint: amd-sev-libvirt-support\"","commit_id":"fca13201581dab3d45214224b1ee7602ac1a3701"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"af552b42a89624fc52b25019b1b3324a43dd0353","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set iommu driver for virtio controllers too"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"bp amd-sev-libvirt-support"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I626c35d1653e6a25125320032d0a4a0c67ab8bcf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_442a1f2c","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":3},"in_reply_to":"3fa7e38b_24f043fd","updated":"2019-09-25 19:31:07.000000000","message":"Oh yeah good point :)  Please message me before you start filing, to avoid a race condition.","commit_id":"fca13201581dab3d45214224b1ee7602ac1a3701"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a84c4a98e6184a470f378cf235f5f6ab031fc89","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set iommu driver for virtio controllers too"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"bp amd-sev-libvirt-support"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I626c35d1653e6a25125320032d0a4a0c67ab8bcf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_a447534c","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":3},"in_reply_to":"3fa7e38b_893d9290","updated":"2019-09-25 19:10:04.000000000","message":"That\u0027s closed now. Is this a new feature or a bug fix? Because either are going to be handled differently.","commit_id":"fca13201581dab3d45214224b1ee7602ac1a3701"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"b734572267516c372890cc9dc145ecacac9e4f4f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set iommu driver for virtio controllers too"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"bp amd-sev-libvirt-support"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I626c35d1653e6a25125320032d0a4a0c67ab8bcf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_24f043fd","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":3},"in_reply_to":"3fa7e38b_a447534c","updated":"2019-09-25 19:20:09.000000000","message":"this is a bugfix, i will post a bugreport (if no one does it before me)","commit_id":"fca13201581dab3d45214224b1ee7602ac1a3701"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a5a17f3196c1ffef0437be9d6a64a1fe8e15db22","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"[0] http://specs.openstack.org/openstack/nova-specs/specs/train/approved/amd-sev-libvirt-support.html#proposed-change"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Closes-Bug: #1845986"},{"line_number":38,"context_line":"Change-Id: I626c35d1653e6a25125320032d0a4a0c67ab8bcf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3fa7e38b_74039b77","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":6},"updated":"2019-11-13 16:56:27.000000000","message":"Partial\n\n(because there\u0027s another change needed)","commit_id":"4b032cd070a01e5dd17004829eeef3550f1d357d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d342167588a16ed4e23b02b5cee030d432055bd3","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    \u003cdriver iommu\u003d\"on\" /\u003e"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"We do not need to cover the case of a virtio-serial controller, since"},{"line_number":23,"context_line":"even though it is supported by libvirt, it is not currently used"},{"line_number":24,"context_line":"anywhere in Nova."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3fa7e38b_6233eff8","line":22,"range":{"start_line":22,"start_character":3,"end_line":22,"end_character":62},"updated":"2019-12-02 17:54:19.000000000","message":"Though IIUC your use of `in` would cover it anyway?","commit_id":"48d5099c4c57fb19ca1aec4ca5ff9ed54eb4e928"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"b556071537318fc4e9a217d91f1c05f9c36efe98","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    \u003cdriver iommu\u003d\"on\" /\u003e"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"We do not need to cover the case of a virtio-serial controller, since"},{"line_number":23,"context_line":"even though it is supported by libvirt, it is not currently used"},{"line_number":24,"context_line":"anywhere in Nova."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3fa7e38b_b31290fc","line":22,"range":{"start_line":22,"start_character":3,"end_line":22,"end_character":62},"in_reply_to":"3fa7e38b_6233eff8","updated":"2019-12-03 10:08:51.000000000","message":"`virtio-serial` is a value of `type` attribute. Here only `model` is covered.\n\nThough this line is indeed confusing, because the case of a virtio-serial controller is addressed right in the next patch. I will reword it","commit_id":"48d5099c4c57fb19ca1aec4ca5ff9ed54eb4e928"}],"doc/source/admin/configuration/hypervisor-kvm.rst":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bf33a63019df53176f4b7ad5278ccf9582a3d7e1","unresolved":false,"context_lines":[{"line_number":704,"context_line":"  (``virtio-blk`` is typically the default for libvirt disks on x86,"},{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"},{"line_number":707,"context_line":"  include using ``hw_disk_bus\u003dscsi`` with"},{"line_number":708,"context_line":"  ``hw_scsi_model\u003dvirtio-scsi`` , or ``hw_disk_bus\u003dsata``.  For"},{"line_number":709,"context_line":"  *non*-boot disks there should be no issue with the default"},{"line_number":710,"context_line":"  ``virtio-blk`` mode."},{"line_number":711,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3fa7e38b_0e6f0c93","line":708,"range":{"start_line":707,"start_character":17,"end_line":708,"end_character":31},"updated":"2019-10-01 17:27:51.000000000","message":"this combination is generally the perfered\n\nas virtio-scsis support trim amoung other thing which is important for thinly provisione stroage or ssd.\n\nit also has better perfomace when used with ceph so put together most peole should set \n\nhw_disk_bus\u003dscsi and hw_scsi_model\u003dvirtio-scsi\nunless they have measured or otherwise determined that they cant for some reason.","commit_id":"6af59065a8ff1bfffc378c20c9d1f4793be84e90"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"2920c5e018c7502d31d43839e2beb308f161aa51","unresolved":false,"context_lines":[{"line_number":704,"context_line":"  (``virtio-blk`` is typically the default for libvirt disks on x86,"},{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"},{"line_number":707,"context_line":"  include using ``hw_disk_bus\u003dscsi`` with"},{"line_number":708,"context_line":"  ``hw_scsi_model\u003dvirtio-scsi`` , or ``hw_disk_bus\u003dsata``.  For"},{"line_number":709,"context_line":"  *non*-boot disks there should be no issue with the default"},{"line_number":710,"context_line":"  ``virtio-blk`` mode."},{"line_number":711,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3fa7e38b_c1d545e7","line":708,"range":{"start_line":707,"start_character":17,"end_line":708,"end_character":31},"in_reply_to":"3fa7e38b_0e6f0c93","updated":"2019-10-01 18:42:43.000000000","message":"OK. That advice probably deserves to be documented but I guess this is not the right place to put it since it\u0027s not SEV-specific.","commit_id":"6af59065a8ff1bfffc378c20c9d1f4793be84e90"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ecc402db47e4377ba8b3bac6fa254e39f742c42c","unresolved":false,"context_lines":[{"line_number":704,"context_line":"  (``virtio-blk`` is typically the default for libvirt disks on x86,"},{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"},{"line_number":707,"context_line":"  include using ``hw_disk_bus\u003dscsi`` with"},{"line_number":708,"context_line":"  ``hw_scsi_model\u003dvirtio-scsi`` , or ``hw_disk_bus\u003dsata``.  For"},{"line_number":709,"context_line":"  *non*-boot disks there should be no issue with the default"},{"line_number":710,"context_line":"  ``virtio-blk`` mode."},{"line_number":711,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3fa7e38b_b5e4ff3d","line":708,"range":{"start_line":707,"start_character":17,"end_line":708,"end_character":31},"in_reply_to":"3fa7e38b_c1d545e7","updated":"2019-10-02 00:58:13.000000000","message":"useing virtio-scsi for ceph was documented and talked about at lenght a few years ago https://ceph.com/planet/more-recommendations-for-ceph-and-openstack/\n\nbut it was not imediatly clear that it was generaly the right option as the nova lvm drivers thin provisioning supprot is not really maintianed and back then it was till not that common for all compute nodes to run on vms on ssds.\n\nbut at this point given how prevalent thin provisioning onremove storage is and how common it is for ssd to be used you really want to use virtio-scsi to have trim work\n\nit also allow many more volumes to be attached to a vm as virtio-blk required 1 pci device per volumes where as virtio-scsi use 1 pci device for the scsi contolr and then volumes as addtion scsi drives to that contoler makeing it scale better.\n\nupstream qemu has also shifted there deveopment to virtio-scsi so virtio-blk is becoming the legacy options at this point. i have spoken to kasyap at some point baout shoudl we change the default in nova however it has not yet been pressing enough to do. e.g. no customer asked for it.\n\n\ni think this is captured in our docs somewhare but maybe not.","commit_id":"6af59065a8ff1bfffc378c20c9d1f4793be84e90"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bcabe1c56a5d0beaf4f45f58db28f7fb52c30ade","unresolved":false,"context_lines":[{"line_number":699,"context_line":""},{"line_number":700,"context_line":"  __ https://wiki.qemu.org/Features/VirtioVhostUser"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"- The boot disk of SEV-encrypted VMs can only be ``virtio`` (a.k.a."},{"line_number":703,"context_line":"  ``virtio-blk``) on newer kernels which contain the necessary fixes."},{"line_number":704,"context_line":"  (``virtio-blk`` is typically the default for libvirt disks on x86,"},{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_9538e39f","line":703,"range":{"start_line":702,"start_character":57,"end_line":703,"end_character":68},"updated":"2019-11-06 12:03:01.000000000","message":"i would remove this section.","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"1ce8d22f5a4859b7ec1166bace62977faec6dacb","unresolved":false,"context_lines":[{"line_number":699,"context_line":""},{"line_number":700,"context_line":"  __ https://wiki.qemu.org/Features/VirtioVhostUser"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"- The boot disk of SEV-encrypted VMs can only be ``virtio`` (a.k.a."},{"line_number":703,"context_line":"  ``virtio-blk``) on newer kernels which contain the necessary fixes."},{"line_number":704,"context_line":"  (``virtio-blk`` is typically the default for libvirt disks on x86,"},{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_39448919","line":703,"range":{"start_line":702,"start_character":57,"end_line":703,"end_character":68},"in_reply_to":"3fa7e38b_9538e39f","updated":"2019-11-06 15:48:46.000000000","message":"Done","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bcabe1c56a5d0beaf4f45f58db28f7fb52c30ade","unresolved":false,"context_lines":[{"line_number":703,"context_line":"  ``virtio-blk``) on newer kernels which contain the necessary fixes."},{"line_number":704,"context_line":"  (``virtio-blk`` is typically the default for libvirt disks on x86,"},{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"},{"line_number":707,"context_line":"  include using ``hw_disk_bus\u003dscsi`` with"},{"line_number":708,"context_line":"  ``hw_scsi_model\u003dvirtio-scsi`` , or ``hw_disk_bus\u003dsata``.  For"},{"line_number":709,"context_line":"  *non*-boot disks there should be no issue with the default"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_f5cb5770","line":706,"range":{"start_line":706,"start_character":54,"end_line":706,"end_character":58},"updated":"2019-11-06 12:03:01.000000000","message":"i would remove boot\n\ntechnically i know the restirion apply to the boot disk but you cant have different disk busses per disk as noted below.","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"1ce8d22f5a4859b7ec1166bace62977faec6dacb","unresolved":false,"context_lines":[{"line_number":703,"context_line":"  ``virtio-blk``) on newer kernels which contain the necessary fixes."},{"line_number":704,"context_line":"  (``virtio-blk`` is typically the default for libvirt disks on x86,"},{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"},{"line_number":707,"context_line":"  include using ``hw_disk_bus\u003dscsi`` with"},{"line_number":708,"context_line":"  ``hw_scsi_model\u003dvirtio-scsi`` , or ``hw_disk_bus\u003dsata``.  For"},{"line_number":709,"context_line":"  *non*-boot disks there should be no issue with the default"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_f94d913b","line":706,"range":{"start_line":706,"start_character":54,"end_line":706,"end_character":58},"in_reply_to":"3fa7e38b_f5cb5770","updated":"2019-11-06 15:48:46.000000000","message":"Done","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bcabe1c56a5d0beaf4f45f58db28f7fb52c30ade","unresolved":false,"context_lines":[{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"},{"line_number":707,"context_line":"  include using ``hw_disk_bus\u003dscsi`` with"},{"line_number":708,"context_line":"  ``hw_scsi_model\u003dvirtio-scsi`` , or ``hw_disk_bus\u003dsata``.  For"},{"line_number":709,"context_line":"  *non*-boot disks there should be no issue with the default"},{"line_number":710,"context_line":"  ``virtio-blk`` mode."},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"- QEMU and libvirt cannot yet expose the number of slots available for"},{"line_number":713,"context_line":"  encrypted guests in the memory controller on SEV hardware.  Until"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_55deeb3e","line":710,"range":{"start_line":708,"start_character":60,"end_line":710,"end_character":22},"updated":"2019-11-06 12:03:01.000000000","message":"hw_disk_bus is a vm wide option so i would remove this.","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"1ce8d22f5a4859b7ec1166bace62977faec6dacb","unresolved":false,"context_lines":[{"line_number":705,"context_line":"  but can also be explicitly set e.g. via the image property"},{"line_number":706,"context_line":"  ``hw_disk_bus\u003dvirtio``). Valid alternatives for the boot disk"},{"line_number":707,"context_line":"  include using ``hw_disk_bus\u003dscsi`` with"},{"line_number":708,"context_line":"  ``hw_scsi_model\u003dvirtio-scsi`` , or ``hw_disk_bus\u003dsata``.  For"},{"line_number":709,"context_line":"  *non*-boot disks there should be no issue with the default"},{"line_number":710,"context_line":"  ``virtio-blk`` mode."},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"- QEMU and libvirt cannot yet expose the number of slots available for"},{"line_number":713,"context_line":"  encrypted guests in the memory controller on SEV hardware.  Until"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_995c9df1","line":710,"range":{"start_line":708,"start_character":60,"end_line":710,"end_character":22},"in_reply_to":"3fa7e38b_55deeb3e","updated":"2019-11-06 15:48:46.000000000","message":"Done","commit_id":"c3196e061b82de90a3358719605fde4b659af882"}],"nova/tests/unit/virt/libvirt/fake_libvirt_data.py":[{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"3af30374e177984856aa41e4239692c0bdfab9dd","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    controller.model \u003d \u0027virtio-scsi\u0027  # usually set from image meta"},{"line_number":157,"context_line":"    controller.index \u003d 0"},{"line_number":158,"context_line":"    obj.add_device(controller)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    return obj"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_0468a7b6","line":159,"updated":"2019-09-25 19:13:22.000000000","message":"Do we also need a virtio-serial controller?","commit_id":"fca13201581dab3d45214224b1ee7602ac1a3701"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"b734572267516c372890cc9dc145ecacac9e4f4f","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    controller.model \u003d \u0027virtio-scsi\u0027  # usually set from image meta"},{"line_number":157,"context_line":"    controller.index \u003d 0"},{"line_number":158,"context_line":"    obj.add_device(controller)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    return obj"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_64eabb0f","line":159,"in_reply_to":"3fa7e38b_0468a7b6","updated":"2019-09-25 19:20:09.000000000","message":"no, it is not used right now anywhere in nova","commit_id":"fca13201581dab3d45214224b1ee7602ac1a3701"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"af552b42a89624fc52b25019b1b3324a43dd0353","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    controller.model \u003d \u0027virtio-scsi\u0027  # usually set from image meta"},{"line_number":157,"context_line":"    controller.index \u003d 0"},{"line_number":158,"context_line":"    obj.add_device(controller)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    return obj"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_84349794","line":159,"in_reply_to":"3fa7e38b_64eabb0f","updated":"2019-09-25 19:31:07.000000000","message":"OK thanks.","commit_id":"fca13201581dab3d45214224b1ee7602ac1a3701"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"64115a11d1275ac52817f4f4cbfbb4631fb9f002","unresolved":false,"context_lines":[{"line_number":247,"context_line":"      \u003crng model\u003d\u0027virtio\u0027\u003e"},{"line_number":248,"context_line":"          \u003crate period\u003d\u002712\u0027 bytes\u003d\u002734\u0027/\u003e"},{"line_number":249,"context_line":"          \u003cbackend model\u003d\u0027random\u0027\u003e/dev/urandom\u003c/backend\u003e"},{"line_number":250,"context_line":"      \u003c/rng\u003e"},{"line_number":251,"context_line":"      \u003ccontroller type\u003d\u0027scsi\u0027 index\u003d\u00270\u0027 model\u003d\u0027virtio-scsi\u0027\u003e"},{"line_number":252,"context_line":"      \u003c/controller\u003e"},{"line_number":253,"context_line":"      \u003ccontroller type\u003d\u0027scsi\u0027 index\u003d\u00271\u0027 model\u003d\u0027buslogic\u0027\u003e"},{"line_number":254,"context_line":"      \u003c/controller\u003e"},{"line_number":255,"context_line":"    \u003c/devices\u003e"},{"line_number":256,"context_line":"    \u003claunchSecurity type\u003d\"sev\"\u003e"},{"line_number":257,"context_line":"      \u003cpolicy\u003e0x0033\u003c/policy\u003e"},{"line_number":258,"context_line":"      \u003ccbitpos\u003e47\u003c/cbitpos\u003e"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_819762ec","line":255,"range":{"start_line":250,"start_character":4,"end_line":255,"end_character":14},"updated":"2019-09-30 17:51:15.000000000","message":"this is vaild form a libvirt point of view but will not happen in nova.\n\nwe will use the same scsi model for all scsi contolers","commit_id":"dc9725838f9ebd0359941c473993859ec92ef739"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bcabe1c56a5d0beaf4f45f58db28f7fb52c30ade","unresolved":false,"context_lines":[{"line_number":248,"context_line":"          \u003crate period\u003d\u002712\u0027 bytes\u003d\u002734\u0027/\u003e"},{"line_number":249,"context_line":"          \u003cbackend model\u003d\u0027random\u0027\u003e/dev/urandom\u003c/backend\u003e"},{"line_number":250,"context_line":"      \u003c/rng\u003e"},{"line_number":251,"context_line":"      \u003ccontroller type\u003d\u0027scsi\u0027 index\u003d\u00270\u0027 model\u003d\u0027virtio-scsi\u0027\u003e"},{"line_number":252,"context_line":"      \u003c/controller\u003e"},{"line_number":253,"context_line":"      \u003ccontroller type\u003d\u0027scsi\u0027 index\u003d\u00271\u0027 model\u003d\u0027buslogic\u0027\u003e"},{"line_number":254,"context_line":"      \u003c/controller\u003e"},{"line_number":255,"context_line":"    \u003c/devices\u003e"},{"line_number":256,"context_line":"    \u003claunchSecurity type\u003d\"sev\"\u003e"},{"line_number":257,"context_line":"      \u003cpolicy\u003e0x0033\u003c/policy\u003e"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_d5c2db53","line":254,"range":{"start_line":251,"start_character":5,"end_line":254,"end_character":19},"updated":"2019-11-06 12:03:01.000000000","message":"i noted this earlier but you cant actuly generate xml like this in nova. this is valid for libvirt but we require the busses all to be the same since we do not use the hw_disk_bus value form cinder volumes and hw_disk_bus in the root disk image is applied to all disks including swap and ephemeral not jsut the root disk","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"1ce8d22f5a4859b7ec1166bace62977faec6dacb","unresolved":false,"context_lines":[{"line_number":248,"context_line":"          \u003crate period\u003d\u002712\u0027 bytes\u003d\u002734\u0027/\u003e"},{"line_number":249,"context_line":"          \u003cbackend model\u003d\u0027random\u0027\u003e/dev/urandom\u003c/backend\u003e"},{"line_number":250,"context_line":"      \u003c/rng\u003e"},{"line_number":251,"context_line":"      \u003ccontroller type\u003d\u0027scsi\u0027 index\u003d\u00270\u0027 model\u003d\u0027virtio-scsi\u0027\u003e"},{"line_number":252,"context_line":"      \u003c/controller\u003e"},{"line_number":253,"context_line":"      \u003ccontroller type\u003d\u0027scsi\u0027 index\u003d\u00271\u0027 model\u003d\u0027buslogic\u0027\u003e"},{"line_number":254,"context_line":"      \u003c/controller\u003e"},{"line_number":255,"context_line":"    \u003c/devices\u003e"},{"line_number":256,"context_line":"    \u003claunchSecurity type\u003d\"sev\"\u003e"},{"line_number":257,"context_line":"      \u003cpolicy\u003e0x0033\u003c/policy\u003e"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_593dc58c","line":254,"range":{"start_line":251,"start_character":5,"end_line":254,"end_character":19},"in_reply_to":"3fa7e38b_d5c2db53","updated":"2019-11-06 15:48:46.000000000","message":"Done","commit_id":"c3196e061b82de90a3358719605fde4b659af882"}],"nova/tests/unit/virt/libvirt/test_config.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a5a17f3196c1ffef0437be9d6a64a1fe8e15db22","unresolved":false,"context_lines":[{"line_number":3369,"context_line":"        obj.model \u003d \u0027virtio-scsi\u0027"},{"line_number":3370,"context_line":"        obj.driver_iommu \u003d True"},{"line_number":3371,"context_line":""},{"line_number":3372,"context_line":"        self.assertTrue(obj.uses_virtio)"},{"line_number":3373,"context_line":""},{"line_number":3374,"context_line":"        xml \u003d obj.to_xml()"},{"line_number":3375,"context_line":"        self.assertXmlEqual(xml, \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_d4eb6fa1","line":3372,"range":{"start_line":3372,"start_character":8,"end_line":3372,"end_character":40},"updated":"2019-11-13 16:56:27.000000000","message":"The addition of the \u0027uses_virtio\u0027 property could and probably should be done separately. If you need to rework again, can you split this up, assuming that\u0027s possible?","commit_id":"4b032cd070a01e5dd17004829eeef3550f1d357d"}],"nova/tests/unit/virt/libvirt/test_designer.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"78d057a627528059e084f9819bf063fac956a838","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        # All disks/interfaces/memballoon are expected to be virtio,"},{"line_number":234,"context_line":"        # thus driver_iommu should be on"},{"line_number":235,"context_line":"        self.assertEqual(10, len(conf.devices))"},{"line_number":236,"context_line":"        for i in (0, 2, 3, 6, 8, 9):"},{"line_number":237,"context_line":"            dev \u003d conf.devices[i]"},{"line_number":238,"context_line":"            self.assertTrue("},{"line_number":239,"context_line":"                dev.driver_iommu,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_900dae41","line":236,"range":{"start_line":235,"start_character":8,"end_line":236,"end_character":36},"updated":"2019-12-09 17:28:09.000000000","message":"this is kind of fragile but so it would be nice to fix this up to be less hardcoded but it will for for now","commit_id":"e3a1c36f0950e14b5f879004510adadccefa5e61"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bcabe1c56a5d0beaf4f45f58db28f7fb52c30ade","unresolved":false,"context_lines":[{"line_number":988,"context_line":"        if len(iotune) \u003e 0:"},{"line_number":989,"context_line":"            dev.append(iotune)"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"    @property"},{"line_number":992,"context_line":"    def uses_virtio(self):"},{"line_number":993,"context_line":"        return \u0027virtio\u0027 in self.target_bus"},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"    def format_dom(self):"},{"line_number":996,"context_line":"        dev \u003d super(LibvirtConfigGuestDisk, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_35a7afbf","line":993,"range":{"start_line":991,"start_character":3,"end_line":993,"end_character":42},"updated":"2019-11-06 12:03:01.000000000","message":"+1","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bcabe1c56a5d0beaf4f45f58db28f7fb52c30ade","unresolved":false,"context_lines":[{"line_number":3040,"context_line":"        self.rate_bytes \u003d None"},{"line_number":3041,"context_line":"        self.driver_iommu \u003d False"},{"line_number":3042,"context_line":""},{"line_number":3043,"context_line":"    @property"},{"line_number":3044,"context_line":"    def uses_virtio(self):"},{"line_number":3045,"context_line":"        return True"},{"line_number":3046,"context_line":""},{"line_number":3047,"context_line":"    def format_dom(self):"},{"line_number":3048,"context_line":"        dev \u003d super(LibvirtConfigGuestRng, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_d5709b43","line":3045,"range":{"start_line":3043,"start_character":2,"end_line":3045,"end_character":19},"updated":"2019-11-06 12:03:01.000000000","message":"you can technically change this buy setting \nhw_rng_model so you shoudl do \n\n\u0027virtio\u0027 in self.device_model\n\nlike you do above.","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"1ce8d22f5a4859b7ec1166bace62977faec6dacb","unresolved":false,"context_lines":[{"line_number":3040,"context_line":"        self.rate_bytes \u003d None"},{"line_number":3041,"context_line":"        self.driver_iommu \u003d False"},{"line_number":3042,"context_line":""},{"line_number":3043,"context_line":"    @property"},{"line_number":3044,"context_line":"    def uses_virtio(self):"},{"line_number":3045,"context_line":"        return True"},{"line_number":3046,"context_line":""},{"line_number":3047,"context_line":"    def format_dom(self):"},{"line_number":3048,"context_line":"        dev \u003d super(LibvirtConfigGuestRng, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_d969b58c","line":3045,"range":{"start_line":3043,"start_character":2,"end_line":3045,"end_character":19},"in_reply_to":"3fa7e38b_d5709b43","updated":"2019-11-06 15:48:46.000000000","message":"Done","commit_id":"c3196e061b82de90a3358719605fde4b659af882"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a5a17f3196c1ffef0437be9d6a64a1fe8e15db22","unresolved":false,"context_lines":[{"line_number":877,"context_line":""},{"line_number":878,"context_line":"    @property"},{"line_number":879,"context_line":"    def uses_virtio(self):"},{"line_number":880,"context_line":"        return False"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"class LibvirtConfigGuestDisk(LibvirtConfigGuestDevice):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_b44593b6","line":880,"range":{"start_line":880,"start_character":8,"end_line":880,"end_character":20},"updated":"2019-11-13 16:56:27.000000000","message":"I wonder if this should raise NotImplementedError to ensure anyone writing future subclasses has to at least think about this? Probably not, given there are a large number of subclasses already that don\u0027t support this","commit_id":"4b032cd070a01e5dd17004829eeef3550f1d357d"}],"nova/virt/libvirt/designer.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"64115a11d1275ac52817f4f4cbfbb4631fb9f002","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"def set_driver_iommu_for_sev(conf):"},{"line_number":203,"context_line":"    virtio_attrs \u003d {"},{"line_number":204,"context_line":"        config.LibvirtConfigGuestController: \u0027model\u0027,"},{"line_number":205,"context_line":"        config.LibvirtConfigGuestDisk: \u0027target_bus\u0027,"},{"line_number":206,"context_line":"        config.LibvirtConfigGuestInterface: \u0027model\u0027,"},{"line_number":207,"context_line":"        config.LibvirtConfigGuestRng: \u0027device_model\u0027,"},{"line_number":208,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":209,"context_line":"    }"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    for dev in conf.devices:"},{"line_number":212,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":213,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":214,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_4112ca63","line":214,"range":{"start_line":204,"start_character":1,"end_line":214,"end_character":35},"updated":"2019-09-30 17:51:15.000000000","message":"i belive this is correct.\n\nthe in i need because for the scsi contoler model it will be set to virtio-scsi not virtio.\n\nthe LibvirtConfigGuestController element is used to configure a number of different type of device form storage contoler like ide/sata/scsi to usb to serial ports to pci controlers.\n\nhttps://libvirt.org/formatdomain.html#elementsControllers\n\ngivent that we want all vitio contols to enable the iommu in the dirver sub element this seams a robost solution.\n\nthat said the only ones that seam relevent here would be virtio-scsi and virtio-serial devices\n\nim not sure if you also need to handel virtio channels\nwhich are used for the qemu guest agent to comunicate with the host. https://libvirt.org/formatdomain.html#elementCharChannel\n\na virtio chanel is like a unix socket or serial port but with higher bandwithd. it typical shows up as a virt serial device in the gust and can be mapped to a number of different backend on the host.\n\nbased on the libvirt xml it also looks like we might be using virt channel when using spice\n\n \u003c!-- KVM virtio channel --\u003e\n  \u003cchannel type\u003d\u0027pty\u0027\u003e\n    \u003ctarget type\u003d\u0027virtio\u0027 name\u003d\u0027arbitrary.virtio.serial.port.name\u0027/\u003e\n  \u003c/channel\u003e\n  \u003cchannel type\u003d\u0027unix\u0027\u003e\n    \u003csource mode\u003d\u0027bind\u0027 path\u003d\u0027/var/lib/libvirt/qemu/f16x86_64.agent\u0027/\u003e\n    \u003ctarget type\u003d\u0027virtio\u0027 name\u003d\u0027org.qemu.guest_agent.0\u0027 state\u003d\u0027connected\u0027/\u003e\n  \u003c/channel\u003e\n  \u003cchannel type\u003d\u0027spicevmc\u0027\u003e\n    \u003ctarget type\u003d\u0027virtio\u0027 name\u003d\u0027com.redhat.spice.0\u0027/\u003e\n  \u003c/channel\u003e\n\n\ni belive that is used for either audio or use forwarding.","commit_id":"dc9725838f9ebd0359941c473993859ec92ef739"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"720062c9d4d7bd555f0c8e6eae37617dcffb7097","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"def set_driver_iommu_for_sev(conf):"},{"line_number":203,"context_line":"    virtio_attrs \u003d {"},{"line_number":204,"context_line":"        config.LibvirtConfigGuestController: \u0027model\u0027,"},{"line_number":205,"context_line":"        config.LibvirtConfigGuestDisk: \u0027target_bus\u0027,"},{"line_number":206,"context_line":"        config.LibvirtConfigGuestInterface: \u0027model\u0027,"},{"line_number":207,"context_line":"        config.LibvirtConfigGuestRng: \u0027device_model\u0027,"},{"line_number":208,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":209,"context_line":"    }"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    for dev in conf.devices:"},{"line_number":212,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":213,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":214,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_8c86b965","line":214,"range":{"start_line":204,"start_character":1,"end_line":214,"end_character":35},"in_reply_to":"3fa7e38b_4112ca63","updated":"2019-09-30 18:00:32.000000000","message":"Thanks for the info. Note I mentioned virtio-serial in the commit message.\n\nIn my testing I found that not all virtio devices need iommu, e.g. (IIRC) for mice it doesn\u0027t matter. So I suspect we\u0027re OK for those cases too - I\u0027ll ask the SEV experts, but if not they could be handled as follow-ups.","commit_id":"dc9725838f9ebd0359941c473993859ec92ef739"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"67894445815c779248f65ad6c28daa9f8d110278","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"def set_driver_iommu_for_sev(conf):"},{"line_number":203,"context_line":"    virtio_attrs \u003d {"},{"line_number":204,"context_line":"        config.LibvirtConfigGuestController: \u0027model\u0027,"},{"line_number":205,"context_line":"        config.LibvirtConfigGuestDisk: \u0027target_bus\u0027,"},{"line_number":206,"context_line":"        config.LibvirtConfigGuestInterface: \u0027model\u0027,"},{"line_number":207,"context_line":"        config.LibvirtConfigGuestRng: \u0027device_model\u0027,"},{"line_number":208,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":209,"context_line":"    }"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    for dev in conf.devices:"},{"line_number":212,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":213,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":214,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_7f88a821","line":214,"range":{"start_line":204,"start_character":1,"end_line":214,"end_character":35},"in_reply_to":"3fa7e38b_4ef664fc","updated":"2019-10-01 21:12:06.000000000","message":"Based on this reply from Jim, I think it is already handled correctly through LibvirtConfigGuestController:\n\n\u003e Channels of type \u0027virtio\u0027 use virtio-serial as a transport. See this old wiki for more info:\n\n\u003e https://fedoraproject.org/wiki/Features/VirtioSerial\n\u003e \n\u003e \n\u003e Virtio-Serial Summary\n\u003e \n\u003e \n\u003e This feature modifies the current single-port virtio-console device to guests running on top of qemu and kvm. It exposes multiple ports to the guest in the form of simple char devices for simple IO between the guest and host userspaces.\n\n\u003e So the channel just consumes a port on the virtio-serial controller, which should already have the iommu\u003d\u0027on\u0027 setting. E.g. a VM with the following XML config\n\n\u003e      \u003ccontroller type\u003d\u0027virtio-serial\u0027\u003e\n\u003e        \u003cdriver iommu\u003d\u0027on\u0027/\u003e\n\u003e      \u003c/controller\u003e\n\u003e      \u003cchannel type\u003d\u0027unix\u0027\u003e\n\u003e        \u003ctarget type\u003d\u0027virtio\u0027 name\u003d\u0027org.qemu.guest_agent.0\u0027/\u003e\n\u003e      \u003c/channel\u003e\n\n\u003e will have this qemu invocation: \n\n\u003e   -device virtio-serial-pci,id\u003dvirtio-serial0,iommu_platform\u003don,bus\u003dpci.5,addr\u003d0x0 -device virtserialport,bus\u003dvirtio-serial0.0,nr\u003d1,chardev\u003dcharchannel0,id\u003dchannel0,name\u003dorg.qemu.guest_agent.0\n\n\u003e Indeed this VM works fine for me and there are no problems interacting with the guest agent from the host.","commit_id":"dc9725838f9ebd0359941c473993859ec92ef739"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"c8fd3452f6454f62f918bf6a21dbb5196c9fd1d8","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"def set_driver_iommu_for_sev(conf):"},{"line_number":203,"context_line":"    virtio_attrs \u003d {"},{"line_number":204,"context_line":"        config.LibvirtConfigGuestController: \u0027model\u0027,"},{"line_number":205,"context_line":"        config.LibvirtConfigGuestDisk: \u0027target_bus\u0027,"},{"line_number":206,"context_line":"        config.LibvirtConfigGuestInterface: \u0027model\u0027,"},{"line_number":207,"context_line":"        config.LibvirtConfigGuestRng: \u0027device_model\u0027,"},{"line_number":208,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":209,"context_line":"    }"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    for dev in conf.devices:"},{"line_number":212,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":213,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":214,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_cbc48662","line":214,"range":{"start_line":204,"start_character":1,"end_line":214,"end_character":35},"in_reply_to":"3fa7e38b_8c86b965","updated":"2019-10-01 16:41:23.000000000","message":"I got a reply from Brijesh:\n\n\u003e All the virtio devices behind the PCI bus should have iommu_platform\u003don flag set for the SEV case. I believe qemu provides the iommu_platform flags for the following devices\n\u003e \n\u003e \n\u003e - virtio-serial \n\u003e - virtio-blk \n\u003e - virtio-scsi \n\u003e - virtio-rng \n\u003e - virtio-net \n\u003e - virtio-balloon \n\u003e - virtio-gpu \n\u003e - virtio-vga \n\nI guess these are the qemu names, so I need to translate them into libvirt-ese.  As mentioned before, Nova does not use virtio-serial.  The other ones map to Nova config classes as follows:\n\n    virtio-scsi     config.LibvirtConfigGuestController\n    virtio-blk      config.LibvirtConfigGuestDisk\n    virtio-net      config.LibvirtConfigGuestInterface\n    virtio-rng      config.LibvirtConfigGuestRng\n    virtio-balloon  config.LibvirtConfigMemoryBalloon\n\nI *think* virtio-gpu and virtio-vga both map to config.LibvirtConfigGuestVideo but I\u0027m not sure.  I found some web pages which suggest that virtio-gpu is enabled via\n\n    \u003cgraphics type\u003d\u0027spice\u0027\u003e\n      \u003clisten type\u003d\u0027none\u0027/\u003e\n      \u003cgl enable\u003d\u0027yes\u0027/\u003e\n    \u003c/graphics\u003e\n    \u003cvideo\u003e\n      \u003cmodel type\u003d\u0027virtio\u0027/\u003e\n    \u003c/video\u003e\n\nin which case we should add\n\n        config.LibvirtConfigGuestVideo: \u0027model\u0027,\n\nto the virtio_attrs dict above.  Sean does that make sense to you?\n\nBrijesh, you didn\u0027t mention the virtio channels which Sean refers to above.  Does this mean by implication that we don\u0027t need to worry about them?","commit_id":"dc9725838f9ebd0359941c473993859ec92ef739"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f134d961192e691b0a00b446adf9f871bafb0c4b","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"def set_driver_iommu_for_sev(conf):"},{"line_number":203,"context_line":"    virtio_attrs \u003d {"},{"line_number":204,"context_line":"        config.LibvirtConfigGuestController: \u0027model\u0027,"},{"line_number":205,"context_line":"        config.LibvirtConfigGuestDisk: \u0027target_bus\u0027,"},{"line_number":206,"context_line":"        config.LibvirtConfigGuestInterface: \u0027model\u0027,"},{"line_number":207,"context_line":"        config.LibvirtConfigGuestRng: \u0027device_model\u0027,"},{"line_number":208,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":209,"context_line":"    }"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    for dev in conf.devices:"},{"line_number":212,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":213,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":214,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_4ef664fc","line":214,"range":{"start_line":204,"start_character":1,"end_line":214,"end_character":35},"in_reply_to":"3fa7e38b_cbc48662","updated":"2019-10-01 17:21:04.000000000","message":"yes so i added support for requesting virtio video model expcitly in train. before it was enabeld for arm but was not requestable directly.\n\nas mentioned on irc as virtio-serial is used for the qemu guest agent i think that would also need to be handeled but we could fix that in a different patch.","commit_id":"dc9725838f9ebd0359941c473993859ec92ef739"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cdf37411b1b937107bb42fcfa12eb7df063824a9","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":210,"context_line":"    }"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    for dev in conf.devices:"},{"line_number":213,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":214,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":215,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_e16ac119","line":215,"range":{"start_line":212,"start_character":0,"end_line":215,"end_character":35},"updated":"2019-10-01 18:53:45.000000000","message":"Just musing here, what would be the effect/validity of just doing:\n\n def set_driver_iommu_for_sev(conf):\n     for dev in conf.devices:\n         if hasattr(dev, \u0027driver_iommu\u0027):\n             dev.driver_iommu \u003d True\n\ni.e. if SEV, set iommu to True for any dev where that\u0027s a thing.","commit_id":"6af59065a8ff1bfffc378c20c9d1f4793be84e90"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ecc402db47e4377ba8b3bac6fa254e39f742c42c","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":210,"context_line":"    }"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    for dev in conf.devices:"},{"line_number":213,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":214,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":215,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_d572db49","line":215,"range":{"start_line":212,"start_character":0,"end_line":215,"end_character":35},"in_reply_to":"3fa7e38b_1f097430","updated":"2019-10-02 00:58:13.000000000","message":"@eric\nmy understandiung is that setting this driver option forces the device memory to allocated form DMA memory which is a limited resources on some systems that said in general i think it would not have other negitive sideffect if it was not needed. however the libvirt and qemu folk chose not to make it the defult so there may be a reason beyond that.\n\n\ni dont think we would want to defualt to driver_iommu\u003dtrue\nas we run the risk of exausting DMA or DMA32 kenerl zones which are need for things like pci divice passthogh/sriov\ni guess we should SEV to that list of things that requrie DMA mappale memroy.\n\nthe DMA32 region is a kernel memory zone that reserves memory below 4G for use by device DMA buffers as a lot of hardware cant adress memory above 4G or 32bit of adress space. so the DMA32 zone is very important to perserve however its not the only DMA memory available on the system. DPDK use hugepages as a form of DMA memory and general system memroy can be used as DMA memroy for non hardware devieces e.g. virtio devices.\n\nthe other thing about DMA memroy is i dont belive it can be swapped so it would have weired effect on over subscription.\n\n@adam\nif you added uses_virtio i would prefer it to a property that internally did the check rather then a value we had to set independently of the model or the type. as i said above i dont htink we should default to enabling the iommu as im not sure if we we could exhaust avialble DMA memory on the host. \n\ngive its a resouce we can track but not contol we cant use placment or to even know in the schduler how much is free as we dont know how much each guest will need.\n\nso only forcing dma memroy to be used when its need seams prudent. this is the change set that intoduced the iommu paratmets to virtio  device by they way. https://www.redhat.com/archives/libvir-list/2017-June/msg00407.html\n\nbased on https://www.redhat.com/archives/libvir-list/2017-June/msg00416.html it can also be used on the file system elemtn when you are passing a folder on teh host to the guset but i dont think we use that in nova so you hsould not have to deal with it but yes apparently this can be set on a lot of different devices.","commit_id":"6af59065a8ff1bfffc378c20c9d1f4793be84e90"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"378d8371bd37a5f25ff08c896809e36053e53d53","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":210,"context_line":"    }"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    for dev in conf.devices:"},{"line_number":213,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":214,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":215,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_3fb0f0dd","line":215,"range":{"start_line":212,"start_character":0,"end_line":215,"end_character":35},"in_reply_to":"3fa7e38b_1fd8947d","updated":"2019-10-01 21:17:20.000000000","message":"\u003e that iommu wasn\u0027t needed in all cases.\n\nRight, but does it do any *harm* if it\u0027s not needed? Point of my whack-a-mole comment being that, if not, you\u0027d be covered, vs. trying to track down all the specific cases where it *is* needed (esp. future ones you don\u0027t know about yet).\n\n \u003e Also something seemed\n \u003e slightly evil about relying on introspection.\n\nWhat you\u0027ve got is arguably way more introspect-y.","commit_id":"6af59065a8ff1bfffc378c20c9d1f4793be84e90"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"4dc22794c1eb89dc52b504436cb32fa44b6a91e8","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":210,"context_line":"    }"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    for dev in conf.devices:"},{"line_number":213,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":214,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":215,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_1f097430","line":215,"range":{"start_line":212,"start_character":0,"end_line":215,"end_character":35},"in_reply_to":"3fa7e38b_3fb0f0dd","updated":"2019-10-01 22:07:24.000000000","message":"\u003e \u003e that iommu wasn\u0027t needed in all cases.\n \u003e \n \u003e Right, but does it do any *harm* if it\u0027s not needed?\n\nLike I already said, maybe not.  I don\u0027t know.\n\n \u003e Point of my whack-a-mole comment being that, if not, you\u0027d be covered, vs. trying to track down all the specific cases where it *is* needed (esp. future ones you don\u0027t know about yet).\n\nSure.\n\n \u003e \u003e Also something seemed slightly evil about relying on introspection.\n \u003e \n \u003e What you\u0027ve got is arguably way more introspect-y.\n\n*Way* more, really?  Yeah, that\u0027s definitely arguable ;-)  Use of hasattr is by definition introspection, whereas the getattr and .__class__ here are just allowing the syntactic sugar of allowing attribute lookup via the values of the dict.  They could easily be removed without changing the logic, as Stephen previously proposed here:\n\nhttps://review.opendev.org/#/c/644565/53/nova/virt/libvirt/designer.py@213\n\nIMHO checking class membership is definitely less introspect-y than checking whether an object has an attribute.\n\nBut anyway, Stephen\u0027s second proposal at that link of adding a \u0027uses_virtio\u0027 seems a lot nicer, so maybe I\u0027ll switch it to do that.","commit_id":"6af59065a8ff1bfffc378c20c9d1f4793be84e90"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"b07e6085e8e5457bc0421ff445f4b4360cdeb32b","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        config.LibvirtConfigMemoryBalloon: \u0027model\u0027,"},{"line_number":210,"context_line":"    }"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    for dev in conf.devices:"},{"line_number":213,"context_line":"        virtio_attr \u003d virtio_attrs.get(dev.__class__)"},{"line_number":214,"context_line":"        if virtio_attr and \u0027virtio\u0027 in getattr(dev, virtio_attr):"},{"line_number":215,"context_line":"            dev.driver_iommu \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_1fd8947d","line":215,"range":{"start_line":212,"start_character":0,"end_line":215,"end_character":35},"in_reply_to":"3fa7e38b_e16ac119","updated":"2019-10-01 20:46:52.000000000","message":"I think I actually had it doing that at one point, and then found that iommu wasn\u0027t needed in all cases.  Also something seemed slightly evil about relying on introspection.  But maybe it wouldn\u0027t have done any harm after all.","commit_id":"6af59065a8ff1bfffc378c20c9d1f4793be84e90"}]}
