)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"89fcf90eeb17460b3ea1a5eb8b29818d0ce43ed9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"So if a Nova user has applied all the CVE fixes, and is using a named"},{"line_number":27,"context_line":"CPU model (like \"IvyBridge\", or \"Westmere\" --- which specifically lack"},{"line_number":28,"context_line":"the said obscure \"PCID\" feature) they will incur severe performance"},{"line_number":29,"context_line":"impact."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"This change"},{"line_number":32,"context_line":"-----------"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f96bb07_98a171fb","line":29,"updated":"2018-01-16 21:13:05.000000000","message":"I should\u0027ve clarified: the *hardware* itself includes the \"PCID\" CPU feature; but the libvirt and QEMU CPU models with those names lack that flag --- hence we explicitly specify it for our virtual CPUs via this proposed config attribute.","commit_id":"ea65908205beaafa46b47d869c81bac11d4b424d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"97aad1f0cb27c95fb8c34d1f349732e917e6b38b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"[WIP] libvirt: Allow to specify granular CPU feature flags"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The motivation for this change is to mitigate the performance penalty of"},{"line_number":10,"context_line":"the \"Meltdown\" CVE fixes by allowing to specify individual CPU feature"},{"line_number":11,"context_line":"flags (in this case, \u0027PCID\u0027) via a new Nova config attribute:"},{"line_number":12,"context_line":"`cpu_model_extra_flags`."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"E.g. with this change, to explicitly specify the \u0027pcid\u0027 feature with"},{"line_number":15,"context_line":"Intel IvyBridge CPU model, set the following in /etc/nova.conf:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f9dbf25_e2aace17","line":12,"range":{"start_line":10,"start_character":0,"end_line":12,"end_character":24},"updated":"2018-02-28 12:41:58.000000000","message":"Maybe mention that qemu is considering adding these flags, but it would require a very new version so it\u0027s desirable to allow workarounds in nova for older qemu.","commit_id":"d74faaf8d3cb1f0a71cfd7ab6ad553d09095b995"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"18efcfe1ff3e8c5b4e4f06858585d0ddb5c366ce","unresolved":false,"context_lines":[{"line_number":7,"context_line":"[WIP] libvirt: Allow to specify granular CPU feature flags"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The motivation for this change is to mitigate the performance penalty of"},{"line_number":10,"context_line":"the \"Meltdown\" CVE fixes by allowing to specify individual CPU feature"},{"line_number":11,"context_line":"flags (in this case, \u0027PCID\u0027) via a new Nova config attribute:"},{"line_number":12,"context_line":"`cpu_model_extra_flags`."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"E.g. with this change, to explicitly specify the \u0027pcid\u0027 feature with"},{"line_number":15,"context_line":"Intel IvyBridge CPU model, set the following in /etc/nova.conf:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f9dbf25_3656b72b","line":12,"range":{"start_line":10,"start_character":0,"end_line":12,"end_character":24},"in_reply_to":"1f9dbf25_e2aace17","updated":"2018-02-28 13:55:56.000000000","message":"I don\u0027t think upstream QEMU is too eager[*] to add specific CPU feature flags to its existing CPU models.  As you may have noticed, QEMU already _allows_ to specify individual flags:\n\n  -cpu IvyBridge,pcid\u003don,aes\u003doff,invpcid\u003doff[...]\n\nSo it upto the management solutions to wire that up.\n\nSee this debate on the \u0027qemu-devel\u0027 list[*], they haven\u0027t merged it (and I don\u0027t think they will):\n\n[quote]\n    Sane VM management systems would know how to use \"-cpu \n    Westmere,+pcid\" without requiring new CPU model entries in QEMU. \n    What\u0027s missing in existing management stacks to allow that to\n    happen?\n[/quote]\n \n\n[*] https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg02714.html — \"[PATCH x86-next v2] target-i386: add PCID flag to Westmere, Sandy Bridge and Ivy Bridge\"","commit_id":"d74faaf8d3cb1f0a71cfd7ab6ad553d09095b995"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f421068d3a94ddeac0a02d3fd2a1920f982cdbd6","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  - Ability to use 1GB huge pages with Haswell model as one use case for"},{"line_number":31,"context_line":"    extra flags (thanks: Daniel Berrangé, for mentioning this scenario):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        cpu_model_extra_flags\u003dHaswell-noTSX-IBRS"},{"line_number":34,"context_line":"        cpu_model_extra_flags\u003d\"pdpe1gb\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"  - Nested Virtualization — an operator can specify the Intel \u0027vmx\u0027 or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f9dbf25_4285c2ac","line":33,"range":{"start_line":33,"start_character":8,"end_line":33,"end_character":29},"updated":"2018-02-28 12:39:58.000000000","message":"just \"cpu_model\", no?","commit_id":"d74faaf8d3cb1f0a71cfd7ab6ad553d09095b995"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"18efcfe1ff3e8c5b4e4f06858585d0ddb5c366ce","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  - Ability to use 1GB huge pages with Haswell model as one use case for"},{"line_number":31,"context_line":"    extra flags (thanks: Daniel Berrangé, for mentioning this scenario):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        cpu_model_extra_flags\u003dHaswell-noTSX-IBRS"},{"line_number":34,"context_line":"        cpu_model_extra_flags\u003d\"pdpe1gb\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"  - Nested Virtualization — an operator can specify the Intel \u0027vmx\u0027 or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f9dbf25_16485bca","line":33,"range":{"start_line":33,"start_character":8,"end_line":33,"end_character":29},"in_reply_to":"1f9dbf25_4285c2ac","updated":"2018-02-28 13:55:56.000000000","message":"Yep, that\u0027s true.  Will fix it.","commit_id":"d74faaf8d3cb1f0a71cfd7ab6ad553d09095b995"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ff74dd46993910b633f8967173fbdf1850c5e8c3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The motivation for this change is to mitigate the performance penalty of"},{"line_number":10,"context_line":"the \"Meltdown\" CVE fixes by allowing to specify individual CPU feature"},{"line_number":11,"context_line":"flags (in this case, \u0027PCID\u0027) via a new Nova config attribute:"},{"line_number":12,"context_line":"`cpu_model_extra_flags`."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"E.g. with this change, to explicitly specify the \u0027pcid\u0027 feature with"},{"line_number":15,"context_line":"Intel IvyBridge CPU model, set the following in /etc/nova.conf:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"df7087c5_e087c20e","line":12,"updated":"2018-03-12 17:04:10.000000000","message":"When I read this, I want to know why we can\u0027t just hardcode everyone to have pcid to avoid the slow down.\n\nLets answer that question in this commit message (more to help with any backport, should we decide to do that).","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"7af74ec0138994aa33f4eea3c6252519b41338a7","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The motivation for this change is to mitigate the performance penalty of"},{"line_number":10,"context_line":"the \"Meltdown\" CVE fixes by allowing to specify individual CPU feature"},{"line_number":11,"context_line":"flags (in this case, \u0027PCID\u0027) via a new Nova config attribute:"},{"line_number":12,"context_line":"`cpu_model_extra_flags`."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"E.g. with this change, to explicitly specify the \u0027pcid\u0027 feature with"},{"line_number":15,"context_line":"Intel IvyBridge CPU model, set the following in /etc/nova.conf:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"df7087c5_579af56d","line":12,"in_reply_to":"df7087c5_e087c20e","updated":"2018-03-12 18:05:46.000000000","message":"I think the answer is that not everything has PCID.  I think for Intel it\u0027s SandyBridge or later and the host kernel has to be \"new enough\" as well, though I think the bar is fairly low (like linux 3.6 or newer).","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"7d2d3a71220fec1603449562c16440d19c510068","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The motivation for this change is to mitigate the performance penalty of"},{"line_number":10,"context_line":"the \"Meltdown\" CVE fixes by allowing to specify individual CPU feature"},{"line_number":11,"context_line":"flags (in this case, \u0027PCID\u0027) via a new Nova config attribute:"},{"line_number":12,"context_line":"`cpu_model_extra_flags`."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"E.g. with this change, to explicitly specify the \u0027pcid\u0027 feature with"},{"line_number":15,"context_line":"Intel IvyBridge CPU model, set the following in /etc/nova.conf:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"df7087c5_c0993dc4","line":12,"in_reply_to":"df7087c5_e087c20e","updated":"2018-03-13 15:07:54.000000000","message":"There are good reasons why we shouldn\u0027t hardcore everyone to have PCID:\n\n(1) What Chris Friesen said below — to make matters more complicated,\n    not every Intel CPU model has PCID.  I.e.\n\n     - The only Intel CPU models that include the PCID capability are:\n       \u0027Haswell\u0027, \u0027Broadwell\u0027, and \u0027Skylake\u0027 variants.\n\n     - The libvirt / QEMU Intel CPU models: \u0027Nehalem\u0027, \u0027Westmere\u0027,\n       \u0027SandyBridge\u0027, and \u0027IvyBridge\u0027 will *not* expose the PCID\n       capability, even if the host CPUs by the same name include it.\n\n\n(2) Magically adding new CPU features flags under the users feet impacts\n    live migration.\n\n(Yes, I\u0027ll work some of this explanation into the commit message.)","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c22028c1ff74e52144c9fc7c18a01b600ad48fa5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  - Ability to use 1GB huge pages with Haswell model as one use case for"},{"line_number":31,"context_line":"    extra flags (thanks: Daniel Berrangé, for mentioning this scenario):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        cpu_model\u003dHaswell-noTSX-IBRS"},{"line_number":34,"context_line":"        cpu_model_extra_flags\u003d\"pdpe1gb\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"  - Nested Virtualization — an operator can specify the Intel \u0027vmx\u0027 or"},{"line_number":37,"context_line":"    AMD \u0027svm\u0027 flags in the level-1 Nova guest."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1f9dbf25_afe10a01","line":34,"range":{"start_line":33,"start_character":7,"end_line":34,"end_character":39},"updated":"2018-02-28 15:49:37.000000000","message":"i taught this was a kernel constratin not cpu specific?","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"e1ac88591ce5361c78af49af3d6917c359d55e9e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  - Ability to use 1GB huge pages with Haswell model as one use case for"},{"line_number":31,"context_line":"    extra flags (thanks: Daniel Berrangé, for mentioning this scenario):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        cpu_model\u003dHaswell-noTSX-IBRS"},{"line_number":34,"context_line":"        cpu_model_extra_flags\u003d\"pdpe1gb\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"  - Nested Virtualization — an operator can specify the Intel \u0027vmx\u0027 or"},{"line_number":37,"context_line":"    AMD \u0027svm\u0027 flags in the level-1 Nova guest."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1f9dbf25_cbdc6f76","line":34,"range":{"start_line":33,"start_character":7,"end_line":34,"end_character":39},"in_reply_to":"1f9dbf25_afe10a01","updated":"2018-03-01 21:26:27.000000000","message":"For what it\u0027s worth, I tried booting an instance *without* this flag on a compute node *with* this flag, and telling the guest kernel to allocate a 1GiB hugepage at boot time fails with \"hugepagesz: Unsupported page size 1024 M\".  The kernel boots but doesn\u0027t allocate any 1GiB hugepages.\n\nLooking at the kernel code, the setup_hugepagesz() function for x86 explicitly checks boot_cpu_has(X86_FEATURE_GBPAGES).","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c32f294a4de5367f7bf7fd99cc8d5a5cc2dd03d7","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    extra flags (thanks: Daniel Berrangé, for mentioning this scenario):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        cpu_model\u003dHaswell-noTSX-IBRS"},{"line_number":34,"context_line":"        cpu_model_extra_flags\u003d\"pdpe1gb\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"  - Nested Virtualization — an operator can specify the Intel \u0027vmx\u0027 or"},{"line_number":37,"context_line":"    AMD \u0027svm\u0027 flags in the level-1 Nova guest."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"df7087c5_edf88d7d","line":34,"in_reply_to":"1f9dbf25_cbdc6f76","updated":"2018-03-07 03:51:05.000000000","message":"Good to know, thats what i get for always using host-passthrough instead of host model since i have never hit that","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"}],"nova/conf/libvirt.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ff74dd46993910b633f8967173fbdf1850c5e8c3","unresolved":false,"context_lines":[{"line_number":525,"context_line":""},{"line_number":526,"context_line":"* ``virt_type``: Only the virtualization types ``kvm`` and ``qemu`` use this."},{"line_number":527,"context_line":"\"\"\"),"},{"line_number":528,"context_line":"    cfg.ListOpt(\u0027cpu_model_extra_flags\u0027,"},{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_4050ee5d","line":528,"range":{"start_line":528,"start_character":27,"end_line":528,"end_character":38},"updated":"2018-03-12 17:04:10.000000000","message":"extra_features seems to fit better than flags?","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"7d2d3a71220fec1603449562c16440d19c510068","unresolved":false,"context_lines":[{"line_number":525,"context_line":""},{"line_number":526,"context_line":"* ``virt_type``: Only the virtualization types ``kvm`` and ``qemu`` use this."},{"line_number":527,"context_line":"\"\"\"),"},{"line_number":528,"context_line":"    cfg.ListOpt(\u0027cpu_model_extra_flags\u0027,"},{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_0c0771cc","line":528,"range":{"start_line":528,"start_character":27,"end_line":528,"end_character":38},"in_reply_to":"df7087c5_4050ee5d","updated":"2018-03-13 15:07:54.000000000","message":"That works too.  However, the reason for \u0027_flags\u0027 is that all these extra CPU feature flags are enumerated under \u0027flags\u0027 for `/proc/cpuinfo`.  So I used a recognizable term.  \n\nGiven the above, on IRC you sounded either is fine; so I\u0027ll retain the existing name.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c22028c1ff74e52144c9fc7c18a01b600ad48fa5","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"},{"line_number":532,"context_line":"feature names (e.g. \u0027vmx\u0027, \u0027pcid\u0027, et cetera) can be found in the same"},{"line_number":533,"context_line":"file as CPU models -- ``cpu_map.xml``.  For example, to explicitly"},{"line_number":534,"context_line":"add the \u0027pcid\u0027 feature with Intel IvyBridge model:"},{"line_number":535,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f9dbf25_4f4ac627","line":532,"range":{"start_line":532,"start_character":21,"end_line":532,"end_character":24},"updated":"2018-02-28 15:49:37.000000000","message":"vmx can only be added to the guest when nested vertiralisation is truned on. will any validation be done by nova to see if the model is valid with this extra feature.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"9789fe92ffb8a9fafcbccb692d6904fee95f209d","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"},{"line_number":532,"context_line":"feature names (e.g. \u0027vmx\u0027, \u0027pcid\u0027, et cetera) can be found in the same"},{"line_number":533,"context_line":"file as CPU models -- ``cpu_map.xml``.  For example, to explicitly"},{"line_number":534,"context_line":"add the \u0027pcid\u0027 feature with Intel IvyBridge model:"},{"line_number":535,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f9dbf25_fe03340c","line":532,"range":{"start_line":532,"start_character":21,"end_line":532,"end_character":24},"in_reply_to":"1f9dbf25_4f4ac627","updated":"2018-03-01 10:36:33.000000000","message":"It would probably make sense to validate any that require host kernel support.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ff74dd46993910b633f8967173fbdf1850c5e8c3","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"},{"line_number":532,"context_line":"feature names (e.g. \u0027vmx\u0027, \u0027pcid\u0027, et cetera) can be found in the same"},{"line_number":533,"context_line":"file as CPU models -- ``cpu_map.xml``.  For example, to explicitly"},{"line_number":534,"context_line":"add the \u0027pcid\u0027 feature with Intel IvyBridge model:"},{"line_number":535,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_80d126fe","line":532,"range":{"start_line":532,"start_character":21,"end_line":532,"end_character":24},"in_reply_to":"1f9dbf25_fe03340c","updated":"2018-03-12 17:04:10.000000000","message":"... I can\u0027t remember what we do for the existing cpu_model option. Seems like we should be consistent, and checking the host is capable in both cases makes sense to me.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"7d2d3a71220fec1603449562c16440d19c510068","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"},{"line_number":532,"context_line":"feature names (e.g. \u0027vmx\u0027, \u0027pcid\u0027, et cetera) can be found in the same"},{"line_number":533,"context_line":"file as CPU models -- ``cpu_map.xml``.  For example, to explicitly"},{"line_number":534,"context_line":"add the \u0027pcid\u0027 feature with Intel IvyBridge model:"},{"line_number":535,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_205d99e8","line":532,"range":{"start_line":532,"start_character":21,"end_line":532,"end_character":24},"in_reply_to":"df7087c5_80d126fe","updated":"2018-03-13 15:07:54.000000000","message":"As noted in one my earlier responses, to validate if a given CPU model + extra flags are valid, we can use libvirt\u0027s compareCPU() to check if the *host* CPU supports them.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a1cca9c428c03dbfa3b83e62217f875f92a5d3e0","unresolved":false,"context_lines":[{"line_number":533,"context_line":"file as CPU models -- ``cpu_map.xml``.  For example, to explicitly"},{"line_number":534,"context_line":"add the \u0027pcid\u0027 feature with Intel IvyBridge model:"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    [libvirt]"},{"line_number":537,"context_line":"    cpu_model\u003dIvyBridge"},{"line_number":538,"context_line":"    cpu_model_extra_flags\u003d\"pcid\""},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"Note that the ``cpu_model_extra_flags`` config attribute makes sense"},{"line_number":541,"context_line":"only in combination with the ``cpu_model`` option."}],"source_content_type":"text/x-python","patch_set":5,"id":"1f9dbf25_ef507235","line":538,"range":{"start_line":536,"start_character":3,"end_line":538,"end_character":32},"updated":"2018-02-28 16:09:28.000000000","message":"to be more precise if we set these setting.\ncan the nova compute agent on startup\nparse these config values then ask libvirt if \nthis cpu model + these extra feature are can be supported on this host. \n\nif we dont do that with modeling cpu feature as traits in placement we would schedule instances to this compute host that would always fail to spawn because the cpu feautre requested are not supported by the host.\n\nexpectation would be we should log a error and the agent should exit until the operator correct the invalid config.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"327b8b02f17c5ec1a5c1bc5156bf04a5a5f3192d","unresolved":false,"context_lines":[{"line_number":533,"context_line":"file as CPU models -- ``cpu_map.xml``.  For example, to explicitly"},{"line_number":534,"context_line":"add the \u0027pcid\u0027 feature with Intel IvyBridge model:"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    [libvirt]"},{"line_number":537,"context_line":"    cpu_model\u003dIvyBridge"},{"line_number":538,"context_line":"    cpu_model_extra_flags\u003d\"pcid\""},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"Note that the ``cpu_model_extra_flags`` config attribute makes sense"},{"line_number":541,"context_line":"only in combination with the ``cpu_model`` option."}],"source_content_type":"text/x-python","patch_set":5,"id":"1f9dbf25_9e0d5092","line":538,"range":{"start_line":536,"start_character":3,"end_line":538,"end_character":32},"in_reply_to":"1f9dbf25_8b2194b7","updated":"2018-03-01 10:54:32.000000000","message":"Looks like we should be able to use Host.compare_cpu() to check if it\u0027s valid.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"9789fe92ffb8a9fafcbccb692d6904fee95f209d","unresolved":false,"context_lines":[{"line_number":533,"context_line":"file as CPU models -- ``cpu_map.xml``.  For example, to explicitly"},{"line_number":534,"context_line":"add the \u0027pcid\u0027 feature with Intel IvyBridge model:"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    [libvirt]"},{"line_number":537,"context_line":"    cpu_model\u003dIvyBridge"},{"line_number":538,"context_line":"    cpu_model_extra_flags\u003d\"pcid\""},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"Note that the ``cpu_model_extra_flags`` config attribute makes sense"},{"line_number":541,"context_line":"only in combination with the ``cpu_model`` option."}],"source_content_type":"text/x-python","patch_set":5,"id":"1f9dbf25_8b2194b7","line":538,"range":{"start_line":536,"start_character":3,"end_line":538,"end_character":32},"in_reply_to":"1f9dbf25_ef507235","updated":"2018-03-01 10:36:33.000000000","message":"Is there a way to ask libvirt whether a given combination of cpu_model and extra flags is valid?\n\nFor what it\u0027s worth, by default nova-compute will disable its service if instance spawn fails 10 times in a row.  So we wouldn\u0027t just sit there failing forever.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"ff5b8cb4b00d8f875918b9efeb98273cc30f29aa","unresolved":false,"context_lines":[{"line_number":533,"context_line":"file as CPU models -- ``cpu_map.xml``.  For example, to explicitly"},{"line_number":534,"context_line":"add the \u0027pcid\u0027 feature with Intel IvyBridge model:"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    [libvirt]"},{"line_number":537,"context_line":"    cpu_model\u003dIvyBridge"},{"line_number":538,"context_line":"    cpu_model_extra_flags\u003d\"pcid\""},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"Note that the ``cpu_model_extra_flags`` config attribute makes sense"},{"line_number":541,"context_line":"only in combination with the ``cpu_model`` option."}],"source_content_type":"text/x-python","patch_set":5,"id":"1f9dbf25_c1d53dbb","line":538,"range":{"start_line":536,"start_character":3,"end_line":538,"end_character":32},"in_reply_to":"1f9dbf25_ef507235","updated":"2018-03-01 11:38:56.000000000","message":"So, to your question (rephrasing) of \"If there\u0027s a way to ask libvirt whether a given combination of named CPU model and a set of extra CPU feature flags is valid?\"\n\nThere\u0027s no existing way to ask if the said combination is supported by KVM \u0026 a specific QEMU binary.\n\nBut, you *can* ask if they are supported by the *host* CPU — this can be done (as Chris also pointed out below) using the libvirt\u0027s compareCPU() method (Nova helper: nova/virt/libvirt/host.py --\u003e \u0027compare_cpu()\u0027) is a good enough starting point.\n\n(From an IRC chat, Dan Berrangé says, in future: ideally libvirt will add an extra new API to do more fine grained checking against a specific QEMU binary.)","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d15bfd69670d3944141fd9f0df10cd472228adfa","unresolved":false,"context_lines":[{"line_number":526,"context_line":"* ``virt_type``: Only the virtualization types ``kvm`` and ``qemu`` use this."},{"line_number":527,"context_line":"\"\"\"),"},{"line_number":528,"context_line":"    cfg.ListOpt(\u0027cpu_model_extra_flags\u0027,"},{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"},{"line_number":532,"context_line":"feature names (e.g. \u0027vmx\u0027, \u0027pcid\u0027, et cetera) can be found in the same"}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_1785465a","line":529,"updated":"2018-03-22 21:42:59.000000000","message":"If we go with my suggestion, choices\u003d[\u0027pcid\u0027] here I think to restrict it for the backport, and then we land another change on master only to remove choices\u003d.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"49808747ab61a7b6fce8f52f9b9ede0349d275f4","unresolved":false,"context_lines":[{"line_number":526,"context_line":"* ``virt_type``: Only the virtualization types ``kvm`` and ``qemu`` use this."},{"line_number":527,"context_line":"\"\"\"),"},{"line_number":528,"context_line":"    cfg.ListOpt(\u0027cpu_model_extra_flags\u0027,"},{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"},{"line_number":532,"context_line":"feature names (e.g. \u0027vmx\u0027, \u0027pcid\u0027, et cetera) can be found in the same"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf659307_ed588357","line":529,"in_reply_to":"bf659307_9e7fbdaa","updated":"2018-03-24 19:29:54.000000000","message":"Yeah, that is the most palatable and least churn for deployment tools.  I\u0027ll respin the patch accordingly.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"ba1b2894c8aa4b13fea0e608ba9f5780560de040","unresolved":false,"context_lines":[{"line_number":526,"context_line":"* ``virt_type``: Only the virtualization types ``kvm`` and ``qemu`` use this."},{"line_number":527,"context_line":"\"\"\"),"},{"line_number":528,"context_line":"    cfg.ListOpt(\u0027cpu_model_extra_flags\u0027,"},{"line_number":529,"context_line":"                default\u003d[],"},{"line_number":530,"context_line":"                help\u003d\"\"\""},{"line_number":531,"context_line":"Allow to specify granular CPU feature flags.  The list of known CPU"},{"line_number":532,"context_line":"feature names (e.g. \u0027vmx\u0027, \u0027pcid\u0027, et cetera) can be found in the same"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf659307_9e7fbdaa","line":529,"in_reply_to":"df7087c5_1785465a","updated":"2018-03-23 17:36:09.000000000","message":"I kind of like this idea of landing it with restrictions to simplify the backport, then opening it up in master in a followup.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d8b4fba3aaf6b8314f0d6c171f596970fa6e10c9","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        ),"},{"line_number":535,"context_line":"        default\u003d[],"},{"line_number":536,"context_line":"                help\u003d\"\"\""},{"line_number":537,"context_line":"This allows specifying granular CPU feature flags.  Currently, the"},{"line_number":538,"context_line":"choice is restricted only to one option: \u0027PCID\u0027 (Processor-Context ID)."},{"line_number":539,"context_line":"This is required to address the guest performance degradation as a"},{"line_number":540,"context_line":"result of applying the \"Meltdown\" CVE fixes on certain Intel CPU models."},{"line_number":541,"context_line":"In a future release, this restriction will be removed, and will allow"},{"line_number":542,"context_line":"to add (or remove) multiple CPU flags."},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"Example: To explicitly add the \u0027PCID\u0027 (specifying in the upper case will"},{"line_number":545,"context_line":"normalize it to lower case, \u0027pcid\u0027) CPU flag with Intel \"IvyBridge\""},{"line_number":546,"context_line":"model:"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    [libvirt]"},{"line_number":549,"context_line":"    cpu_mode\u003d custom"},{"line_number":550,"context_line":"    cpu_model\u003d IvyBridge"},{"line_number":551,"context_line":"    cpu_model_extra_flags\u003d pcid"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"NB: The ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":554,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"Note that when using this config attribute to set the \u0027PCID\u0027 flag, not"},{"line_number":557,"context_line":"all virtual (i.e. libvirt / QEMU) CPU models need it:"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"  * The only virtual CPU models that include the \u0027PCID\u0027 capability are"},{"line_number":560,"context_line":"    Intel \"Haswell\", \"Broadwell\", and \"Skylake\" variants."},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"  * The libvirt / QEMU CPU models \"Nehalem\", \"Westmere\", \"SandyBridge\","},{"line_number":563,"context_line":"    and \"IvyBridge\" will _not_ expose the \u0027PCID\u0027 capability by"},{"line_number":564,"context_line":"    default, even if the host CPUs by the same name include it.  I.e."},{"line_number":565,"context_line":"    \u0027PCID\u0027 needs to be explicitly specified when using the said virtual"},{"line_number":566,"context_line":"    CPU models."},{"line_number":567,"context_line":"\"\"\"),"},{"line_number":568,"context_line":"    cfg.StrOpt(\u0027snapshots_directory\u0027,"},{"line_number":569,"context_line":"               default\u003d\u0027$instances_path/snapshots\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_d1287b87","line":566,"range":{"start_line":537,"start_character":0,"end_line":566,"end_character":15},"updated":"2018-03-27 11:20:42.000000000","message":"ah so you move this form the release notes.\nthat will be a very well documented conf option :)\nbut this makes sense to me as the operator is more likely to see it.","commit_id":"6e0d6ec262b13778ba709305b74367f409d5d568"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        default\u003d[],"},{"line_number":537,"context_line":"                help\u003d\"\"\""},{"line_number":538,"context_line":"This allows specifying granular CPU feature flags.  Currently, the"},{"line_number":539,"context_line":"choice is restricted only to one option: \u0027PCID\u0027 (Processor-Context ID)."},{"line_number":540,"context_line":"This is required to address the guest performance degradation as a"},{"line_number":541,"context_line":"result of applying the \"Meltdown\" CVE fixes on certain Intel CPU models."},{"line_number":542,"context_line":"In a future release, this restriction will be removed, and will allow"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_d87394b0","line":539,"range":{"start_line":539,"start_character":42,"end_line":539,"end_character":46},"updated":"2018-03-28 14:45:19.000000000","message":"This is a bit confusing since the choices entry shows \u0027pcid\u0027 lower-case, even though I guess the config option is ignoring case.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"db3e66e7cb163ec06308adddd783475230b12b32","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        default\u003d[],"},{"line_number":537,"context_line":"                help\u003d\"\"\""},{"line_number":538,"context_line":"This allows specifying granular CPU feature flags.  Currently, the"},{"line_number":539,"context_line":"choice is restricted only to one option: \u0027PCID\u0027 (Processor-Context ID)."},{"line_number":540,"context_line":"This is required to address the guest performance degradation as a"},{"line_number":541,"context_line":"result of applying the \"Meltdown\" CVE fixes on certain Intel CPU models."},{"line_number":542,"context_line":"In a future release, this restriction will be removed, and will allow"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_e980f348","line":539,"range":{"start_line":539,"start_character":42,"end_line":539,"end_character":46},"in_reply_to":"bf659307_d87394b0","updated":"2018-03-29 12:50:53.000000000","message":"Right; I\u0027ll fix it.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"db3e66e7cb163ec06308adddd783475230b12b32","unresolved":false,"context_lines":[{"line_number":542,"context_line":"In a future release, this restriction will be removed, and will allow"},{"line_number":543,"context_line":"to add (or remove) multiple CPU flags."},{"line_number":544,"context_line":""},{"line_number":545,"context_line":"Example: To explicitly add the \u0027PCID\u0027 (uppercase and lowercase, both are"},{"line_number":546,"context_line":"valid) CPU flag with Intel \"IvyBridge\" model:"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    [libvirt]"},{"line_number":549,"context_line":"    cpu_mode\u003d custom"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_698ce37e","line":546,"range":{"start_line":545,"start_character":39,"end_line":546,"end_character":5},"updated":"2018-03-29 12:50:53.000000000","message":"I\u0027ll replace that with \"the option is case-insensitive\", it\u0027s shorter \u0026 clearer.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    cpu_model\u003d IvyBridge"},{"line_number":551,"context_line":"    cpu_model_extra_flags\u003d pcid"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"NB: The ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":554,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"Note that when using this config attribute to set the \u0027PCID\u0027 flag, not"},{"line_number":557,"context_line":"all virtual (i.e. libvirt / QEMU) CPU models need it:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_78afe8e2","line":554,"range":{"start_line":553,"start_character":0,"end_line":554,"end_character":54},"updated":"2018-03-28 14:45:19.000000000","message":"The release note goes into some detail about how non-custom cpu modes don\u0027t need to care about this, but that\u0027s not mentioned here, and arguably people are going to find the config option docs long after the release notes are published.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"db3e66e7cb163ec06308adddd783475230b12b32","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    cpu_model\u003d IvyBridge"},{"line_number":551,"context_line":"    cpu_model_extra_flags\u003d pcid"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"NB: The ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":554,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"Note that when using this config attribute to set the \u0027PCID\u0027 flag, not"},{"line_number":557,"context_line":"all virtual (i.e. libvirt / QEMU) CPU models need it:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_09868767","line":554,"range":{"start_line":553,"start_character":0,"end_line":554,"end_character":54},"in_reply_to":"bf659307_78afe8e2","updated":"2018-03-29 12:50:53.000000000","message":"Hmm, I\u0027ll clarify it.\n\n(I\u0027m glad you reviewed all the texts carefully; I was getting weary of reading my own text again and again.)","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"3b3f8355944c280c4b74b461ff775bf17bf31aac","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    cpu_model\u003d IvyBridge"},{"line_number":551,"context_line":"    cpu_model_extra_flags\u003d pcid"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"NB: The ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":554,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"Note that when using this config attribute to set the \u0027PCID\u0027 flag, not"},{"line_number":557,"context_line":"all virtual (i.e. libvirt / QEMU) CPU models need it:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_e7f9f0c7","line":554,"range":{"start_line":553,"start_character":0,"end_line":554,"end_character":54},"in_reply_to":"bf659307_78afe8e2","updated":"2018-03-29 21:15:47.000000000","message":"Hmm, clarifying for the record, when we remove \u0027choices\u0027 restriction, you actually *can* specify \u0027host-model\u0027 + CPU flags — the following can be a valid configuration:\n\n    [libvirt]\n    cpu_mode\u003d host-model\n    cpu_model_extra_flags\u003dvmx\n\nAs pointed out by Chris also earlier, the \u0027host-model\u0027 documentation[*] of upstream libvirt itself says:\n\n    \"Using the \u0027feature\u0027 element, specific flags may \n     be enabled or disabled specifically in addition to \n     the host model. This may be used to fine tune \n     features that can be emulated.\"\n\nTherefore me saying: \"The ``cpu_model_extra_flags`` config attribute is valid only in combination with ``cpu_mode`` + ``cpu_model`` options.\" is correct *only* with the \u0027choices\u0027 restricted to \u0027PCID\u0027.\n\n\n[*] https://libvirt.org/formatdomain.html#elementsCPU","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":534,"context_line":"            ignore_case\u003dTrue,"},{"line_number":535,"context_line":"        ),"},{"line_number":536,"context_line":"        default\u003d[],"},{"line_number":537,"context_line":"                help\u003d\"\"\""},{"line_number":538,"context_line":"This allows specifying granular CPU feature flags when specifying CPU"},{"line_number":539,"context_line":"models.  For example, to explicitly specify the \u0027pcid\u0027 (Process-Context"},{"line_number":540,"context_line":"ID, an Intel processor feature) flag to the \"IvyBridge\" virtual CPU"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_4249715d","line":537,"range":{"start_line":537,"start_character":8,"end_line":537,"end_character":16},"updated":"2018-04-03 09:52:55.000000000","message":"These shouldn\u0027t be here, I imagine","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        default\u003d[],"},{"line_number":537,"context_line":"                help\u003d\"\"\""},{"line_number":538,"context_line":"This allows specifying granular CPU feature flags when specifying CPU"},{"line_number":539,"context_line":"models.  For example, to explicitly specify the \u0027pcid\u0027 (Process-Context"},{"line_number":540,"context_line":"ID, an Intel processor feature) flag to the \"IvyBridge\" virtual CPU"},{"line_number":541,"context_line":"model:"},{"line_number":542,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_e258c531","line":539,"range":{"start_line":539,"start_character":48,"end_line":539,"end_character":54},"updated":"2018-04-03 09:52:55.000000000","message":"``pcid``? (and elsewhere here)","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":538,"context_line":"This allows specifying granular CPU feature flags when specifying CPU"},{"line_number":539,"context_line":"models.  For example, to explicitly specify the \u0027pcid\u0027 (Process-Context"},{"line_number":540,"context_line":"ID, an Intel processor feature) flag to the \"IvyBridge\" virtual CPU"},{"line_number":541,"context_line":"model:"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    [libvirt]"},{"line_number":544,"context_line":"    cpu_mode\u003d custom"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_0250590a","line":541,"range":{"start_line":541,"start_character":5,"end_line":541,"end_character":6},"updated":"2018-04-03 09:52:55.000000000","message":"You need two of these (::) to render a literal block below","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6c61dc16eb19a5e723d76f4aa69d9432e4f70cfc","unresolved":false,"context_lines":[{"line_number":543,"context_line":"    [libvirt]"},{"line_number":544,"context_line":"    cpu_mode\u003d custom"},{"line_number":545,"context_line":"    cpu_model\u003d IvyBridge"},{"line_number":546,"context_line":"    cpu_model_extra_flags\u003d pcid"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"Currently, the choice is restricted to only one option: \u0027pcid\u0027 (the"},{"line_number":549,"context_line":"option is case-insensitive, so \u0027PCID\u0027 is also valid).  This flag is now"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_9f1fe206","line":546,"updated":"2018-04-03 09:20:24.000000000","message":"Nit: good detail, but this doesn\u0027t look good in the docs:\nhttp://logs.openstack.org/84/534384/22/check/build-openstack-sphinx-docs/016a796/html/configuration/config.html","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"22c2d7e04e8041bd918b7e51741182ea85c4bd1c","unresolved":false,"context_lines":[{"line_number":543,"context_line":"    [libvirt]"},{"line_number":544,"context_line":"    cpu_mode\u003d custom"},{"line_number":545,"context_line":"    cpu_model\u003d IvyBridge"},{"line_number":546,"context_line":"    cpu_model_extra_flags\u003d pcid"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"Currently, the choice is restricted to only one option: \u0027pcid\u0027 (the"},{"line_number":549,"context_line":"option is case-insensitive, so \u0027PCID\u0027 is also valid).  This flag is now"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_a23e4db5","line":546,"in_reply_to":"bf659307_9f1fe206","updated":"2018-04-03 09:50:02.000000000","message":"That incorrect rendering in HTML is not the problem of this patch.  Stephen Finucane pointed out on IRC that it is a bug in \u0027oslo_config.sphinxext\u0027, and there\u0027s a patch series up to fix that:\n\nhttps://review.openstack.org/#/q/status:open+project:openstack/oslo.config+branch:master+topic:bug/1755783","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e5e2f3933db40088d780b9a4718606d2d1f1e467","unresolved":false,"context_lines":[{"line_number":543,"context_line":"    [libvirt]"},{"line_number":544,"context_line":"    cpu_mode\u003d custom"},{"line_number":545,"context_line":"    cpu_model\u003d IvyBridge"},{"line_number":546,"context_line":"    cpu_model_extra_flags\u003d pcid"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"Currently, the choice is restricted to only one option: \u0027pcid\u0027 (the"},{"line_number":549,"context_line":"option is case-insensitive, so \u0027PCID\u0027 is also valid).  This flag is now"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_a2f72d8b","line":546,"in_reply_to":"bf659307_a23e4db5","updated":"2018-04-03 10:59:31.000000000","message":"Its the wider formatting that stephen\u0027s pointed out that I was trying to point at here. Lets get this in good shape for when there is something working in there again. It did half work previously, but that has clearly regressed.","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":553,"context_line":"Note that when using this config attribute to set the \u0027PCID\u0027 CPU flag,"},{"line_number":554,"context_line":"not all virtual (i.e. libvirt / QEMU) CPU models need it:"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"  * The only virtual CPU models that include the \u0027PCID\u0027 capability are"},{"line_number":557,"context_line":"    Intel \"Haswell\", \"Broadwell\", and \"Skylake\" variants."},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"  * The libvirt / QEMU CPU models \"Nehalem\", \"Westmere\", \"SandyBridge\","},{"line_number":560,"context_line":"    and \"IvyBridge\" will _not_ expose the \u0027PCID\u0027 capability by"},{"line_number":561,"context_line":"    default, even if the host CPUs by the same name include it.  I.e."},{"line_number":562,"context_line":"    \u0027PCID\u0027 needs to be explicitly specified when using the said virtual"},{"line_number":563,"context_line":"    CPU models."},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"For now, the ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":566,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_622fd587","line":563,"range":{"start_line":556,"start_character":0,"end_line":563,"end_character":15},"updated":"2018-04-03 09:52:55.000000000","message":"This can\u0027t be indented else it renders as a block comment","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":565,"context_line":"For now, the ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":566,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"Besides ``custom``, the libvirt driver has two other CPU modes: The"},{"line_number":569,"context_line":"default, ``host-model``, tells it to do the right thing with respect to"},{"line_number":570,"context_line":"handling \u0027PCID\u0027 CPU flag for the guest -- *assuming* you are running"},{"line_number":571,"context_line":"updated processor microcode, host \u0026 guest kernel, libvirt, and QEMU."}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_6244b547","line":568,"range":{"start_line":568,"start_character":64,"end_line":568,"end_character":67},"updated":"2018-04-03 09:52:55.000000000","message":"s/The/the","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":568,"context_line":"Besides ``custom``, the libvirt driver has two other CPU modes: The"},{"line_number":569,"context_line":"default, ``host-model``, tells it to do the right thing with respect to"},{"line_number":570,"context_line":"handling \u0027PCID\u0027 CPU flag for the guest -- *assuming* you are running"},{"line_number":571,"context_line":"updated processor microcode, host \u0026 guest kernel, libvirt, and QEMU."},{"line_number":572,"context_line":"The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is available in"},{"line_number":573,"context_line":"the hardware, and if so directly passes it through to the Nova guests."},{"line_number":574,"context_line":"Thus, in context of \u0027PCID\u0027, with either of these CPU modes"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_c26ee1c7","line":571,"range":{"start_line":571,"start_character":34,"end_line":571,"end_character":35},"updated":"2018-04-03 09:52:55.000000000","message":"and","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":570,"context_line":"handling \u0027PCID\u0027 CPU flag for the guest -- *assuming* you are running"},{"line_number":571,"context_line":"updated processor microcode, host \u0026 guest kernel, libvirt, and QEMU."},{"line_number":572,"context_line":"The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is available in"},{"line_number":573,"context_line":"the hardware, and if so directly passes it through to the Nova guests."},{"line_number":574,"context_line":"Thus, in context of \u0027PCID\u0027, with either of these CPU modes"},{"line_number":575,"context_line":"(``host-model`` or ``host-paasthrough``), there is no need to use the"},{"line_number":576,"context_line":"``cpu_mode_extra_flags``."}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_a2672de9","line":573,"range":{"start_line":573,"start_character":12,"end_line":573,"end_character":13},"updated":"2018-04-03 09:52:55.000000000","message":"nit: drop","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":572,"context_line":"The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is available in"},{"line_number":573,"context_line":"the hardware, and if so directly passes it through to the Nova guests."},{"line_number":574,"context_line":"Thus, in context of \u0027PCID\u0027, with either of these CPU modes"},{"line_number":575,"context_line":"(``host-model`` or ``host-paasthrough``), there is no need to use the"},{"line_number":576,"context_line":"``cpu_mode_extra_flags``."},{"line_number":577,"context_line":"\"\"\"),"},{"line_number":578,"context_line":"    cfg.StrOpt(\u0027snapshots_directory\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_4262d1d9","line":575,"range":{"start_line":575,"start_character":26,"end_line":575,"end_character":37},"updated":"2018-04-03 09:52:55.000000000","message":"passthrough","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89d59d58929fba2d374489ff6136f1c2c0bd7487","unresolved":false,"context_lines":[{"line_number":574,"context_line":"Thus, in context of \u0027PCID\u0027, with either of these CPU modes"},{"line_number":575,"context_line":"(``host-model`` or ``host-paasthrough``), there is no need to use the"},{"line_number":576,"context_line":"``cpu_mode_extra_flags``."},{"line_number":577,"context_line":"\"\"\"),"},{"line_number":578,"context_line":"    cfg.StrOpt(\u0027snapshots_directory\u0027,"},{"line_number":579,"context_line":"               default\u003d\u0027$instances_path/snapshots\u0027,"},{"line_number":580,"context_line":"               help\u003d\u0027Location where libvirt driver will store snapshots \u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_e2a6850f","line":577,"range":{"start_line":577,"start_character":0,"end_line":577,"end_character":5},"updated":"2018-04-03 09:52:55.000000000","message":"You might add a \u0027Related\u0027 option section here just calling out the two options that this relies on","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e5e2f3933db40088d780b9a4718606d2d1f1e467","unresolved":false,"context_lines":[{"line_number":574,"context_line":"Thus, in context of \u0027PCID\u0027, with either of these CPU modes"},{"line_number":575,"context_line":"(``host-model`` or ``host-paasthrough``), there is no need to use the"},{"line_number":576,"context_line":"``cpu_mode_extra_flags``."},{"line_number":577,"context_line":"\"\"\"),"},{"line_number":578,"context_line":"    cfg.StrOpt(\u0027snapshots_directory\u0027,"},{"line_number":579,"context_line":"               default\u003d\u0027$instances_path/snapshots\u0027,"},{"line_number":580,"context_line":"               help\u003d\u0027Location where libvirt driver will store snapshots \u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_424731bd","line":577,"range":{"start_line":577,"start_character":0,"end_line":577,"end_character":5},"in_reply_to":"bf659307_e2a6850f","updated":"2018-04-03 10:59:31.000000000","message":"+1","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42324d9973ad445802b928bb3bf1eb8efff2212c","unresolved":false,"context_lines":[{"line_number":553,"context_line":"Note that when using this config attribute to set the \u0027PCID\u0027 CPU flag,"},{"line_number":554,"context_line":"not all virtual (i.e. libvirt / QEMU) CPU models need it:"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"* The only virtual CPU models that include the \u0027PCID\u0027 capability are"},{"line_number":557,"context_line":"  Intel \"Haswell\", \"Broadwell\", and \"Skylake\" variants."},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"* The libvirt / QEMU CPU models \"Nehalem\", \"Westmere\", \"SandyBridge\","},{"line_number":560,"context_line":"  and \"IvyBridge\" will _not_ expose the \u0027PCID\u0027 capability by default,"},{"line_number":561,"context_line":"  even if the host CPUs by the same name include it.  I.e.  \u0027PCID\u0027 needs"},{"line_number":562,"context_line":"  to be explicitly specified when using the said virtual CPU models."},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"For now, the ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":565,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_3f68d91f","line":562,"range":{"start_line":556,"start_character":0,"end_line":562,"end_character":68},"updated":"2018-04-05 13:46:29.000000000","message":"These don\u0027t render as bullets and thus look strange in the output.","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"67307a7189b26ee1b6ce4b0eaae9d115aaef30d2","unresolved":false,"context_lines":[{"line_number":553,"context_line":"Note that when using this config attribute to set the \u0027PCID\u0027 CPU flag,"},{"line_number":554,"context_line":"not all virtual (i.e. libvirt / QEMU) CPU models need it:"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"* The only virtual CPU models that include the \u0027PCID\u0027 capability are"},{"line_number":557,"context_line":"  Intel \"Haswell\", \"Broadwell\", and \"Skylake\" variants."},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"* The libvirt / QEMU CPU models \"Nehalem\", \"Westmere\", \"SandyBridge\","},{"line_number":560,"context_line":"  and \"IvyBridge\" will _not_ expose the \u0027PCID\u0027 capability by default,"},{"line_number":561,"context_line":"  even if the host CPUs by the same name include it.  I.e.  \u0027PCID\u0027 needs"},{"line_number":562,"context_line":"  to be explicitly specified when using the said virtual CPU models."},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"For now, the ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":565,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_d15e71e8","line":562,"range":{"start_line":556,"start_character":0,"end_line":562,"end_character":68},"in_reply_to":"bf659307_1149495f","updated":"2018-04-05 14:02:29.000000000","message":"Yup, this is as correct as we can have it for now. As soon as that bugfix is merged to oslo.config, this will go away.","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"a44252542b3918b3c0bd323ab950019b87030475","unresolved":false,"context_lines":[{"line_number":553,"context_line":"Note that when using this config attribute to set the \u0027PCID\u0027 CPU flag,"},{"line_number":554,"context_line":"not all virtual (i.e. libvirt / QEMU) CPU models need it:"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"* The only virtual CPU models that include the \u0027PCID\u0027 capability are"},{"line_number":557,"context_line":"  Intel \"Haswell\", \"Broadwell\", and \"Skylake\" variants."},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"* The libvirt / QEMU CPU models \"Nehalem\", \"Westmere\", \"SandyBridge\","},{"line_number":560,"context_line":"  and \"IvyBridge\" will _not_ expose the \u0027PCID\u0027 capability by default,"},{"line_number":561,"context_line":"  even if the host CPUs by the same name include it.  I.e.  \u0027PCID\u0027 needs"},{"line_number":562,"context_line":"  to be explicitly specified when using the said virtual CPU models."},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"For now, the ``cpu_model_extra_flags`` config attribute is valid only in"},{"line_number":565,"context_line":"combination with ``cpu_mode`` + ``cpu_model`` options."}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_1149495f","line":562,"range":{"start_line":556,"start_character":0,"end_line":562,"end_character":68},"in_reply_to":"bf659307_3f68d91f","updated":"2018-04-05 13:58:46.000000000","message":"I know; as I pointed out on PS-22, it is a bug in \u0027oslo_config.sphinxext\u0027 that will be fixed by this series[*].  Also note that the existing [libvirt]/`disk_cachemodes` is also broken, as it\u0027s using the same format as above.\n\n[*] https://review.openstack.org/#/q/status:open+project:openstack/oslo.config+branch:master+topic:bug/1755783","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42324d9973ad445802b928bb3bf1eb8efff2212c","unresolved":false,"context_lines":[{"line_number":572,"context_line":"the hardware, and if so directly passes it through to the Nova guests."},{"line_number":573,"context_line":"Thus, in context of \u0027PCID\u0027, with either of these CPU modes"},{"line_number":574,"context_line":"(``host-model`` or ``host-passthrough``), there is no need to use the"},{"line_number":575,"context_line":"``cpu_mode_extra_flags``."},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"Related options:"},{"line_number":578,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_3f23f907","line":575,"range":{"start_line":575,"start_character":6,"end_line":575,"end_character":10},"updated":"2018-04-05 13:46:29.000000000","message":"model","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42324d9973ad445802b928bb3bf1eb8efff2212c","unresolved":false,"context_lines":[{"line_number":576,"context_line":""},{"line_number":577,"context_line":"Related options:"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"* cpu_mode"},{"line_number":580,"context_line":"* cpu_model"},{"line_number":581,"context_line":"\"\"\"),"},{"line_number":582,"context_line":"    cfg.StrOpt(\u0027snapshots_directory\u0027,"},{"line_number":583,"context_line":"               default\u003d\u0027$instances_path/snapshots\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_9f600538","line":580,"range":{"start_line":579,"start_character":0,"end_line":580,"end_character":11},"updated":"2018-04-05 13:46:29.000000000","message":"Neither do these","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"a44252542b3918b3c0bd323ab950019b87030475","unresolved":false,"context_lines":[{"line_number":576,"context_line":""},{"line_number":577,"context_line":"Related options:"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"* cpu_mode"},{"line_number":580,"context_line":"* cpu_model"},{"line_number":581,"context_line":"\"\"\"),"},{"line_number":582,"context_line":"    cfg.StrOpt(\u0027snapshots_directory\u0027,"},{"line_number":583,"context_line":"               default\u003d\u0027$instances_path/snapshots\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_b1a89ddb","line":580,"range":{"start_line":579,"start_character":0,"end_line":580,"end_character":11},"in_reply_to":"bf659307_9f600538","updated":"2018-04-05 13:58:46.000000000","message":"Again; it\u0027s using the existing approach used by all othe config options.  (See the bug in \u0027oslo_config.sphinxext\u0027.)","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"67307a7189b26ee1b6ce4b0eaae9d115aaef30d2","unresolved":false,"context_lines":[{"line_number":576,"context_line":""},{"line_number":577,"context_line":"Related options:"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"* cpu_mode"},{"line_number":580,"context_line":"* cpu_model"},{"line_number":581,"context_line":"\"\"\"),"},{"line_number":582,"context_line":"    cfg.StrOpt(\u0027snapshots_directory\u0027,"},{"line_number":583,"context_line":"               default\u003d\u0027$instances_path/snapshots\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_b15dfdea","line":580,"range":{"start_line":579,"start_character":0,"end_line":580,"end_character":11},"in_reply_to":"bf659307_b1a89ddb","updated":"2018-04-05 14:02:29.000000000","message":"\u003e Again; it\u0027s using the existing approach used by all othe config\n \u003e options.  (See the bug in \u0027oslo_config.sphinxext\u0027.)\n\n+1","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"}],"nova/tests/unit/virt/libvirt/test_config.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a3d5adcc9ba53ccb710f0b9b1e3854548952933","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        obj.vendor \u003d \"Intel\""},{"line_number":354,"context_line":"        obj.arch \u003d obj_fields.Architecture.X86_64"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        obj.add_feature(config.LibvirtConfigCPUFeature(\"mtrr\"))"},{"line_number":357,"context_line":"        obj.add_feature(config.LibvirtConfigCPUFeature(\"apic\"))"},{"line_number":358,"context_line":"        obj.add_feature(config.LibvirtConfigCPUFeature(\"apic\"))"},{"line_number":359,"context_line":"        obj.add_feature(config.LibvirtConfigCPUFeature(\"mtrr\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_bd3eeb26","side":"PARENT","line":356,"updated":"2018-03-21 12:53:58.000000000","message":"Why did you have changed these lines?","commit_id":"f80b4e50093002f84b43ff245a605fbe44d34711"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"61b3231417537581def7fa376cd7022659e38eb4","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        obj.vendor \u003d \"Intel\""},{"line_number":354,"context_line":"        obj.arch \u003d obj_fields.Architecture.X86_64"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        obj.add_feature(config.LibvirtConfigCPUFeature(\"mtrr\"))"},{"line_number":357,"context_line":"        obj.add_feature(config.LibvirtConfigCPUFeature(\"apic\"))"},{"line_number":358,"context_line":"        obj.add_feature(config.LibvirtConfigCPUFeature(\"apic\"))"},{"line_number":359,"context_line":"        obj.add_feature(config.LibvirtConfigCPUFeature(\"mtrr\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_46e9fc17","side":"PARENT","line":356,"in_reply_to":"df7087c5_bd3eeb26","updated":"2018-03-21 15:14:23.000000000","message":"Hmm, accident, I was playing with tests locally \u0026 forgot to undo the change. \n\nFixing in next iteration.","commit_id":"f80b4e50093002f84b43ff245a605fbe44d34711"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a3d5adcc9ba53ccb710f0b9b1e3854548952933","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def test_config_simple_pcid(self):"},{"line_number":274,"context_line":"        obj \u003d config.LibvirtConfigGuestCPUFeature(\"pcid\")"},{"line_number":275,"context_line":"        obj.policy \u003d \"force\""},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        xml \u003d obj.to_xml()"},{"line_number":278,"context_line":"        self.assertXmlEqual(xml, \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_bdd02bf9","line":275,"updated":"2018-03-21 12:53:58.000000000","message":"Why are you changing the policy for the test. I think we want \"require\" is all case.","commit_id":"1110156e79666312c379b4d29181c0e499537aa7"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"61b3231417537581def7fa376cd7022659e38eb4","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def test_config_simple_pcid(self):"},{"line_number":274,"context_line":"        obj \u003d config.LibvirtConfigGuestCPUFeature(\"pcid\")"},{"line_number":275,"context_line":"        obj.policy \u003d \"force\""},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        xml \u003d obj.to_xml()"},{"line_number":278,"context_line":"        self.assertXmlEqual(xml, \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_0300d666","line":275,"in_reply_to":"df7087c5_bdd02bf9","updated":"2018-03-21 15:14:23.000000000","message":"Thinko; you\u0027re indeed right that we indeed need it to be \u0027require\u0027.  Fixed in next version.","commit_id":"1110156e79666312c379b4d29181c0e499537aa7"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a3d5adcc9ba53ccb710f0b9b1e3854548952933","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        obj.vendor \u003d \"Intel\""},{"line_number":433,"context_line":"        obj.arch \u003d obj_fields.Architecture.X86_64"},{"line_number":434,"context_line":"        obj.mode \u003d \"custom\""},{"line_number":435,"context_line":"        # obj.policy \u003d \"require\""},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        xml \u003d obj.to_xml()"},{"line_number":438,"context_line":"        self.assertXmlEqual(xml, \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_bdf90b81","line":435,"updated":"2018-03-21 12:53:58.000000000","message":"Please remove this","commit_id":"1110156e79666312c379b4d29181c0e499537aa7"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"61b3231417537581def7fa376cd7022659e38eb4","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        obj.vendor \u003d \"Intel\""},{"line_number":433,"context_line":"        obj.arch \u003d obj_fields.Architecture.X86_64"},{"line_number":434,"context_line":"        obj.mode \u003d \"custom\""},{"line_number":435,"context_line":"        # obj.policy \u003d \"require\""},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        xml \u003d obj.to_xml()"},{"line_number":438,"context_line":"        self.assertXmlEqual(xml, \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_e61cd014","line":435,"in_reply_to":"df7087c5_bdf90b81","updated":"2018-03-21 15:14:23.000000000","message":"Oops, crept in during testing.","commit_id":"1110156e79666312c379b4d29181c0e499537aa7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5493f0b9f686ec4677e4f2160f1e910e1d7acfe6","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            \u003c/cpu\u003e"},{"line_number":428,"context_line":"        \"\"\")"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def test_config_cpu_extra_flags_pcid(self):"},{"line_number":431,"context_line":"        obj \u003d config.LibvirtConfigGuestCPU()"},{"line_number":432,"context_line":"        obj.model \u003d \"IvyBridge\""},{"line_number":433,"context_line":"        obj.extra_flags \u003d \"pcid\""},{"line_number":434,"context_line":"        obj.vendor \u003d \"Intel\""},{"line_number":435,"context_line":"        obj.arch \u003d obj_fields.Architecture.X86_64"},{"line_number":436,"context_line":"        obj.mode \u003d \"custom\""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        obj.add_feature(config.LibvirtConfigGuestCPUFeature(\"pcid\"))"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        xml \u003d obj.to_xml()"},{"line_number":441,"context_line":"        self.assertXmlEqual(xml, \"\"\""},{"line_number":442,"context_line":"            \u003ccpu mode\u003d\"custom\" match\u003d\"exact\"\u003e"},{"line_number":443,"context_line":"              \u003carch\u003ex86_64\u003c/arch\u003e"},{"line_number":444,"context_line":"              \u003cmodel\u003eIvyBridge\u003c/model\u003e"},{"line_number":445,"context_line":"              \u003cvendor\u003eIntel\u003c/vendor\u003e"},{"line_number":446,"context_line":"              \u003cfeature name\u003d\"pcid\" policy\u003d\"require\"/\u003e"},{"line_number":447,"context_line":"            \u003c/cpu\u003e"},{"line_number":448,"context_line":"        \"\"\")"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"    def test_config_host(self):"},{"line_number":451,"context_line":"        obj \u003d config.LibvirtConfigGuestCPU()"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_5573f4b1","line":448,"range":{"start_line":430,"start_character":4,"end_line":448,"end_character":12},"updated":"2018-03-27 13:25:43.000000000","message":"This is duplicated with \u0027test_config_complex\u0027","commit_id":"6e0d6ec262b13778ba709305b74367f409d5d568"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"2878fbe9b09147be39081caa0cc4e6a26d7bd547","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            \u003c/cpu\u003e"},{"line_number":428,"context_line":"        \"\"\")"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def test_config_cpu_extra_flags_pcid(self):"},{"line_number":431,"context_line":"        obj \u003d config.LibvirtConfigGuestCPU()"},{"line_number":432,"context_line":"        obj.model \u003d \"IvyBridge\""},{"line_number":433,"context_line":"        obj.extra_flags \u003d \"pcid\""},{"line_number":434,"context_line":"        obj.vendor \u003d \"Intel\""},{"line_number":435,"context_line":"        obj.arch \u003d obj_fields.Architecture.X86_64"},{"line_number":436,"context_line":"        obj.mode \u003d \"custom\""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        obj.add_feature(config.LibvirtConfigGuestCPUFeature(\"pcid\"))"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        xml \u003d obj.to_xml()"},{"line_number":441,"context_line":"        self.assertXmlEqual(xml, \"\"\""},{"line_number":442,"context_line":"            \u003ccpu mode\u003d\"custom\" match\u003d\"exact\"\u003e"},{"line_number":443,"context_line":"              \u003carch\u003ex86_64\u003c/arch\u003e"},{"line_number":444,"context_line":"              \u003cmodel\u003eIvyBridge\u003c/model\u003e"},{"line_number":445,"context_line":"              \u003cvendor\u003eIntel\u003c/vendor\u003e"},{"line_number":446,"context_line":"              \u003cfeature name\u003d\"pcid\" policy\u003d\"require\"/\u003e"},{"line_number":447,"context_line":"            \u003c/cpu\u003e"},{"line_number":448,"context_line":"        \"\"\")"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"    def test_config_host(self):"},{"line_number":451,"context_line":"        obj \u003d config.LibvirtConfigGuestCPU()"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_a6c5883e","line":448,"range":{"start_line":430,"start_character":4,"end_line":448,"end_character":12},"in_reply_to":"bf659307_18d8537d","updated":"2018-03-27 15:18:40.000000000","message":"No, you\u0027re right.  I can actually remove this, the main test in test_driver.py takes care of this. Thanks for catching.","commit_id":"6e0d6ec262b13778ba709305b74367f409d5d568"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"1c76ab931f579738b81c44dac38c965ee0875ebe","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            \u003c/cpu\u003e"},{"line_number":428,"context_line":"        \"\"\")"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def test_config_cpu_extra_flags_pcid(self):"},{"line_number":431,"context_line":"        obj \u003d config.LibvirtConfigGuestCPU()"},{"line_number":432,"context_line":"        obj.model \u003d \"IvyBridge\""},{"line_number":433,"context_line":"        obj.extra_flags \u003d \"pcid\""},{"line_number":434,"context_line":"        obj.vendor \u003d \"Intel\""},{"line_number":435,"context_line":"        obj.arch \u003d obj_fields.Architecture.X86_64"},{"line_number":436,"context_line":"        obj.mode \u003d \"custom\""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        obj.add_feature(config.LibvirtConfigGuestCPUFeature(\"pcid\"))"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        xml \u003d obj.to_xml()"},{"line_number":441,"context_line":"        self.assertXmlEqual(xml, \"\"\""},{"line_number":442,"context_line":"            \u003ccpu mode\u003d\"custom\" match\u003d\"exact\"\u003e"},{"line_number":443,"context_line":"              \u003carch\u003ex86_64\u003c/arch\u003e"},{"line_number":444,"context_line":"              \u003cmodel\u003eIvyBridge\u003c/model\u003e"},{"line_number":445,"context_line":"              \u003cvendor\u003eIntel\u003c/vendor\u003e"},{"line_number":446,"context_line":"              \u003cfeature name\u003d\"pcid\" policy\u003d\"require\"/\u003e"},{"line_number":447,"context_line":"            \u003c/cpu\u003e"},{"line_number":448,"context_line":"        \"\"\")"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"    def test_config_host(self):"},{"line_number":451,"context_line":"        obj \u003d config.LibvirtConfigGuestCPU()"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_18d8537d","line":448,"range":{"start_line":430,"start_character":4,"end_line":448,"end_character":12},"in_reply_to":"bf659307_5573f4b1","updated":"2018-03-27 14:15:23.000000000","message":"Hmm, if you notice, I\u0027m explicitly testing the \n\n    obj.extra_flags \u003d \"pcid\"\n\nwhich isn\u0027t there in the \u0027test_config_complex\u0027.","commit_id":"6e0d6ec262b13778ba709305b74367f409d5d568"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"118c10800078586ac3c4ba8c1935f426ed0f4e61","unresolved":false,"context_lines":[{"line_number":6123,"context_line":"        conf \u003d drvr._get_guest_config(instance_ref,"},{"line_number":6124,"context_line":"                                      _fake_network_info(self, 1),"},{"line_number":6125,"context_line":"                                      image_meta, disk_info)"},{"line_number":6126,"context_line":"        self.assertIsInstance(conf.cpu,"},{"line_number":6127,"context_line":"                              vconfig.LibvirtConfigGuestCPU)"},{"line_number":6128,"context_line":"        self.assertEqual(conf.cpu.mode, \"custom\")"},{"line_number":6129,"context_line":"        self.assertEqual(conf.cpu.model, \"IvyBridge\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_be7246ac","line":6126,"updated":"2018-03-22 10:44:31.000000000","message":"please remove that","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"dea73cc9abeeca00b90c394797dcf334022ce2d6","unresolved":false,"context_lines":[{"line_number":6123,"context_line":"        conf \u003d drvr._get_guest_config(instance_ref,"},{"line_number":6124,"context_line":"                                      _fake_network_info(self, 1),"},{"line_number":6125,"context_line":"                                      image_meta, disk_info)"},{"line_number":6126,"context_line":"        self.assertIsInstance(conf.cpu,"},{"line_number":6127,"context_line":"                              vconfig.LibvirtConfigGuestCPU)"},{"line_number":6128,"context_line":"        self.assertEqual(conf.cpu.mode, \"custom\")"},{"line_number":6129,"context_line":"        self.assertEqual(conf.cpu.model, \"IvyBridge\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_fe919e47","line":6126,"in_reply_to":"df7087c5_be7246ac","updated":"2018-03-22 11:12:28.000000000","message":"I think this should stay in.","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b84c797814009adaee5a6af133f43cf8074ed137","unresolved":false,"context_lines":[{"line_number":6123,"context_line":"        conf \u003d drvr._get_guest_config(instance_ref,"},{"line_number":6124,"context_line":"                                      _fake_network_info(self, 1),"},{"line_number":6125,"context_line":"                                      image_meta, disk_info)"},{"line_number":6126,"context_line":"        self.assertIsInstance(conf.cpu,"},{"line_number":6127,"context_line":"                              vconfig.LibvirtConfigGuestCPU)"},{"line_number":6128,"context_line":"        self.assertEqual(conf.cpu.mode, \"custom\")"},{"line_number":6129,"context_line":"        self.assertEqual(conf.cpu.model, \"IvyBridge\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_1e91f299","line":6126,"in_reply_to":"df7087c5_be7246ac","updated":"2018-03-22 10:46:30.000000000","message":"well actually you can keep it... :)","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"25a7fed824b10b3c08f02fbe7048c68400fc8821","unresolved":false,"context_lines":[{"line_number":6125,"context_line":"                                      image_meta, disk_info)"},{"line_number":6126,"context_line":"        self.assertIsInstance(conf.cpu,"},{"line_number":6127,"context_line":"                              vconfig.LibvirtConfigGuestCPU)"},{"line_number":6128,"context_line":"        self.assertEqual(conf.cpu.mode, \"custom\")"},{"line_number":6129,"context_line":"        self.assertEqual(conf.cpu.model, \"IvyBridge\")"},{"line_number":6130,"context_line":"        self.assertEqual(conf.cpu.cpu_model_extra_flags, \"pcid\")"},{"line_number":6131,"context_line":"        self.assertEqual(conf.cpu.sockets, instance_ref.flavor.vcpus)"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_6d7646db","line":6128,"updated":"2018-03-22 09:21:23.000000000","message":"nit: Usually when using assertEqual it\u0027s better to have what we want in the first place. Some kind of convention but not always respected :)","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"118c10800078586ac3c4ba8c1935f426ed0f4e61","unresolved":false,"context_lines":[{"line_number":6127,"context_line":"                              vconfig.LibvirtConfigGuestCPU)"},{"line_number":6128,"context_line":"        self.assertEqual(conf.cpu.mode, \"custom\")"},{"line_number":6129,"context_line":"        self.assertEqual(conf.cpu.model, \"IvyBridge\")"},{"line_number":6130,"context_line":"        self.assertEqual(conf.cpu.cpu_model_extra_flags, \"pcid\")"},{"line_number":6131,"context_line":"        self.assertEqual(conf.cpu.sockets, instance_ref.flavor.vcpus)"},{"line_number":6132,"context_line":"        self.assertEqual(conf.cpu.cores, 1)"},{"line_number":6133,"context_line":"        self.assertEqual(conf.cpu.threads, 1)"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_5eae8ae7","line":6130,"updated":"2018-03-22 10:44:31.000000000","message":"This is not going to work.\n\nwhat you want is \n\n  self.assertEqual(\"pcid\", conf.cpu.features[0].name)","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"dea73cc9abeeca00b90c394797dcf334022ce2d6","unresolved":false,"context_lines":[{"line_number":6127,"context_line":"                              vconfig.LibvirtConfigGuestCPU)"},{"line_number":6128,"context_line":"        self.assertEqual(conf.cpu.mode, \"custom\")"},{"line_number":6129,"context_line":"        self.assertEqual(conf.cpu.model, \"IvyBridge\")"},{"line_number":6130,"context_line":"        self.assertEqual(conf.cpu.cpu_model_extra_flags, \"pcid\")"},{"line_number":6131,"context_line":"        self.assertEqual(conf.cpu.sockets, instance_ref.flavor.vcpus)"},{"line_number":6132,"context_line":"        self.assertEqual(conf.cpu.cores, 1)"},{"line_number":6133,"context_line":"        self.assertEqual(conf.cpu.threads, 1)"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_fec99e24","line":6130,"in_reply_to":"df7087c5_5eae8ae7","updated":"2018-03-22 11:12:28.000000000","message":"Yep; \u0027features\u0027 is a sub element of \u0027cpu\u0027.  So, as discussed on IRC, what\u0027s required is:\n\n  - self.assertEqual(\"pcid\", conf.cpu.features[0].name)\n  + self.assertEqual(\"pcid\", conf.cpu.features.pop().name)","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d59e256a5015fab285041d113371342042ba6416","unresolved":false,"context_lines":[{"line_number":6130,"context_line":"        self.assertIn(\"pcid\", conf.cpu.features.pop().name)"},{"line_number":6131,"context_line":"        self.assertEqual(conf.cpu.sockets, instance_ref.flavor.vcpus)"},{"line_number":6132,"context_line":"        self.assertEqual(conf.cpu.cores, 1)"},{"line_number":6133,"context_line":"        self.assertEqual(conf.cpu.threads, 1)"},{"line_number":6134,"context_line":""},{"line_number":6135,"context_line":"    @mock.patch.object(libvirt_driver.LOG, \u0027warning\u0027)"},{"line_number":6136,"context_line":"    def test_get_guest_cpu_config_host_model_with_extra_flags(self,"}],"source_content_type":"text/x-python","patch_set":21,"id":"bf659307_6b95a632","line":6133,"updated":"2018-03-30 06:03:46.000000000","message":"you should assert the warn is not called, then we can ensure this branch is correct behavior.","commit_id":"867db4f705ecec9bbaeccf046c9fb0e2c895297c"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"d1824deaed7767c3bf6d119a16a90b91df8489d7","unresolved":false,"context_lines":[{"line_number":6130,"context_line":"        self.assertIn(\"pcid\", conf.cpu.features.pop().name)"},{"line_number":6131,"context_line":"        self.assertEqual(conf.cpu.sockets, instance_ref.flavor.vcpus)"},{"line_number":6132,"context_line":"        self.assertEqual(conf.cpu.cores, 1)"},{"line_number":6133,"context_line":"        self.assertEqual(conf.cpu.threads, 1)"},{"line_number":6134,"context_line":""},{"line_number":6135,"context_line":"    @mock.patch.object(libvirt_driver.LOG, \u0027warning\u0027)"},{"line_number":6136,"context_line":"    def test_get_guest_cpu_config_host_model_with_extra_flags(self,"}],"source_content_type":"text/x-python","patch_set":21,"id":"bf659307_7a056a10","line":6133,"in_reply_to":"bf659307_6b95a632","updated":"2018-03-30 13:12:18.000000000","message":"Correct; fixed in next iteration.","commit_id":"867db4f705ecec9bbaeccf046c9fb0e2c895297c"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9da88c32c52c908d2ffc56199cf664171a550058","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"class LibvirtConfigGuestCPUFeature(LibvirtConfigCPUFeature):"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    def __init__(self, **kwargs):"},{"line_number":489,"context_line":"        super(LibvirtConfigGuestCPUFeature, self).__init__(root_name\u003d\"feature\","},{"line_number":490,"context_line":"                                                          **kwargs)"},{"line_number":491,"context_line":"        self.policy \u003d None"},{"line_number":492,"context_line":"        self.name \u003d None"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def format_dom(self):"},{"line_number":495,"context_line":"        ft \u003d super(LibvirtConfigGuestCPUFeature, self).format_dom()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        if self.policy is not None:"},{"line_number":498,"context_line":"            ft.set(\"policy\", self.policy)"},{"line_number":499,"context_line":"        if self.name is not None:"},{"line_number":500,"context_line":"            ft.set(\"name\", self.name)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        return ft"},{"line_number":503,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_8a9a375f","line":500,"range":{"start_line":488,"start_character":0,"end_line":500,"end_character":37},"updated":"2018-01-18 11:09:00.000000000","message":"I don\u0027t understand how this relates to the changes you made in driver?","commit_id":"ea65908205beaafa46b47d869c81bac11d4b424d"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c704b523a8d755b8cef3578656c60d886203dcc6","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"class LibvirtConfigGuestCPUFeature(LibvirtConfigCPUFeature):"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    def __init__(self, **kwargs):"},{"line_number":489,"context_line":"        super(LibvirtConfigGuestCPUFeature, self).__init__(root_name\u003d\"feature\","},{"line_number":490,"context_line":"                                                          **kwargs)"},{"line_number":491,"context_line":"        self.policy \u003d None"},{"line_number":492,"context_line":"        self.name \u003d None"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def format_dom(self):"},{"line_number":495,"context_line":"        ft \u003d super(LibvirtConfigGuestCPUFeature, self).format_dom()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        if self.policy is not None:"},{"line_number":498,"context_line":"            ft.set(\"policy\", self.policy)"},{"line_number":499,"context_line":"        if self.name is not None:"},{"line_number":500,"context_line":"            ft.set(\"name\", self.name)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        return ft"},{"line_number":503,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_eb6b64ee","line":500,"range":{"start_line":488,"start_character":0,"end_line":500,"end_character":37},"in_reply_to":"7f96bb07_8a9a375f","updated":"2018-01-22 16:04:52.000000000","message":"I think that will make sense when test will be added. It\u0027s always good practice to add this method.","commit_id":"ea65908205beaafa46b47d869c81bac11d4b424d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"43254679f5d4320889014558b7b2254efe72d9ed","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    def __init__(self, name\u003dNone, **kwargs):"},{"line_number":489,"context_line":"        super(LibvirtConfigGuestCPUFeature, self).__init__(name, **kwargs)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        self.policy \u003d None"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    def format_dom(self):"},{"line_number":494,"context_line":"        ft \u003d super(LibvirtConfigGuestCPUFeature, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_14b9e0ca","line":491,"updated":"2018-03-12 18:01:37.000000000","message":"are you proposing to use something other than \"require\" for the feature policy?  (Like maybe put a minus sign in front of the flag name to indicate disabling the flag.)\n\nIf not, then why do we need to touch this line?","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"7d2d3a71220fec1603449562c16440d19c510068","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    def __init__(self, name\u003dNone, **kwargs):"},{"line_number":489,"context_line":"        super(LibvirtConfigGuestCPUFeature, self).__init__(name, **kwargs)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        self.policy \u003d None"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    def format_dom(self):"},{"line_number":494,"context_line":"        ft \u003d super(LibvirtConfigGuestCPUFeature, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_e0a1e195","line":491,"in_reply_to":"df7087c5_14b9e0ca","updated":"2018-03-13 15:07:54.000000000","message":"In a further iteration, yes — I\u0027d want to indicate + / - for to add or remove specific feature flags.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d339c53e68b61f1c4ad6c9c61751926246b13037","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        if self.policy is not None:"},{"line_number":497,"context_line":"            pol \u003d etree.Element(\"policy\")"},{"line_number":498,"context_line":"            ft.set(\"policy\", self.policy)"},{"line_number":499,"context_line":"            ft.append(pol)"},{"line_number":500,"context_line":"        return ft"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_f15d5ee9","line":499,"updated":"2018-03-12 14:22:53.000000000","message":"I\u0027m missing where this change has any effect. It\u0027s touching LibvirtConfigGuestCPU, which is used in the next file, but not .policy. Can you explain?","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ff74dd46993910b633f8967173fbdf1850c5e8c3","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        if self.policy is not None:"},{"line_number":497,"context_line":"            pol \u003d etree.Element(\"policy\")"},{"line_number":498,"context_line":"            ft.set(\"policy\", self.policy)"},{"line_number":499,"context_line":"            ft.append(pol)"},{"line_number":500,"context_line":"        return ft"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_e01102ae","line":499,"in_reply_to":"df7087c5_d40e088c","updated":"2018-03-12 17:04:10.000000000","message":"Yes, I think this class represents the \u003cfeature /\u003e element inside the \u003ccpu\u003e tag.\n\nPlease see:\nhttps://github.com/openstack/nova/blob/476a07f967bc38f4a2d610d62e5905e32b1a970e/nova/tests/unit/virt/libvirt/test_config.py#L401","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"e99fb2307c8397e4c21993229e9db1b1540faf9b","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        if self.policy is not None:"},{"line_number":497,"context_line":"            pol \u003d etree.Element(\"policy\")"},{"line_number":498,"context_line":"            ft.set(\"policy\", self.policy)"},{"line_number":499,"context_line":"            ft.append(pol)"},{"line_number":500,"context_line":"        return ft"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_d40e088c","line":499,"in_reply_to":"df7087c5_f15d5ee9","updated":"2018-03-12 15:06:36.000000000","message":"You\u0027re not missing anything; the above bit is still wrong.  I\u0027m still fighting with the XML generation stuff.\n\nThe end goal is to generate a Nova guest XML to the following effect (for an example, \u0027IvyBridge\u0027):\n\n    [...]\n    \u003ccpu match\u003d\u0027exact\u0027\u003e\n      \u003cmodel fallback\u003d\u0027forbid\u0027\u003eIvyBridge\u003c/model\u003e\n      \u003cvendor\u003eIntel\u003c/vendor\u003e\n      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027pcid\u0027/\u003e\n      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027pdpe1gb\u0027/\u003e\n      ...\n    \u003c/cpu\u003e\n    [...]\n\n\nI\u0027m wrangling with four related classes:\n\n  - LibvirtConfigCPUFeature — base class for defining CPU features\n  - LibvirtConfigCPU — base class for defining CPU models\n  - LibvirtConfigGuestCPUFeature — extension for setting the guest\n    specific feature policy\n  - LibvirtConfigGuestCPU — extension for setting the guest specific match\n    policy, and allowing use of host CPU model passthrough\n\nAnd from what I learn, I need to create the LibvirtConfigGuestCPUFeature() objects for every CPU flag listed in \u0027nova.conf\u0027.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a3d5adcc9ba53ccb710f0b9b1e3854548952933","unresolved":false,"context_lines":[{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        ft.set(\"policy\", self.policy)"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        return ft"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"class LibvirtConfigGuestCPUNUMACell(LibvirtConfigObject):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_3dbc1bdb","side":"PARENT","line":498,"updated":"2018-03-21 12:53:58.000000000","message":"please remove this change","commit_id":"f80b4e50093002f84b43ff245a605fbe44d34711"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"61b3231417537581def7fa376cd7022659e38eb4","unresolved":false,"context_lines":[{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        ft.set(\"policy\", self.policy)"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        return ft"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"class LibvirtConfigGuestCPUNUMACell(LibvirtConfigObject):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_23039a75","side":"PARENT","line":498,"in_reply_to":"df7087c5_3dbc1bdb","updated":"2018-03-21 15:14:23.000000000","message":"Good catch; that was unintended.\n\nFixed in next iteration.","commit_id":"f80b4e50093002f84b43ff245a605fbe44d34711"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c704b523a8d755b8cef3578656c60d886203dcc6","unresolved":false,"context_lines":[{"line_number":3597,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen\","},{"line_number":3598,"context_line":"                  {\u0027mode\u0027: mode,"},{"line_number":3599,"context_line":"                   \u0027model\u0027: (model or \"\"),"},{"line_number":3600,"context_line":"                   \u0027extra_flags\u0027: (extra_flags or \"\")})"},{"line_number":3601,"context_line":""},{"line_number":3602,"context_line":"        cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":3603,"context_line":"        cpu.mode \u003d mode"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_2b306c07","line":3600,"updated":"2018-01-22 16:04:52.000000000","message":"The \u0027extra_flags\u0027 arg will never be printed. You forgot to add it to the message.","commit_id":"ea65908205beaafa46b47d869c81bac11d4b424d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"dc51c2a106bb112bd83288dcc576fd41de48634f","unresolved":false,"context_lines":[{"line_number":3597,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen\","},{"line_number":3598,"context_line":"                  {\u0027mode\u0027: mode,"},{"line_number":3599,"context_line":"                   \u0027model\u0027: (model or \"\"),"},{"line_number":3600,"context_line":"                   \u0027extra_flags\u0027: (extra_flags or \"\")})"},{"line_number":3601,"context_line":""},{"line_number":3602,"context_line":"        cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":3603,"context_line":"        cpu.mode \u003d mode"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_cfad049c","line":3600,"in_reply_to":"7f96bb07_2b306c07","updated":"2018-01-30 10:40:47.000000000","message":"Yeah, noticed it after hitting `git review` on the first revision. :-)  Fixed in v2.","commit_id":"ea65908205beaafa46b47d869c81bac11d4b424d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"1e4e100b903279163f9765d77d96471573d28fb1","unresolved":false,"context_lines":[{"line_number":3767,"context_line":"        cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":3768,"context_line":"        cpu.mode \u003d mode"},{"line_number":3769,"context_line":"        cpu.model \u003d model"},{"line_number":3770,"context_line":"        cpu.extra_flags \u003d extra_flags"},{"line_number":3771,"context_line":""},{"line_number":3772,"context_line":"        return cpu"},{"line_number":3773,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f9dbf25_f90a8088","line":3770,"updated":"2018-02-28 14:29:35.000000000","message":"I think you\u0027d want something like this to add 1G hugepages:\n\nxf \u003d vconfig.LibvirtConfigGuestCPUFeature()\nxf.name \u003d \u0027pdpe1gb\u0027\nxf.policy \u003d \u0027require\u0027\ncpu.features.add(xf)\n\n\nOr something like this to enable nested virtualization:\n\nvmx \u003d vconfig.LibvirtConfigGuestCPUFeature()\nvmx.name \u003d \u0027vmx\u0027\nvmx.policy \u003d \u0027require\u0027\ncpu.features.add(vmx)","commit_id":"d74faaf8d3cb1f0a71cfd7ab6ad553d09095b995"},{"author":{"_account_id":27970,"name":"yangjie","email":"yang.jie2@zte.com.cn"},"change_message_id":"bcafe3a7f6d3cb4936b486a34342b245dc7cbfba","unresolved":false,"context_lines":[{"line_number":3723,"context_line":"    def _get_guest_cpu_model_config(self):"},{"line_number":3724,"context_line":"        mode \u003d CONF.libvirt.cpu_mode"},{"line_number":3725,"context_line":"        model \u003d CONF.libvirt.cpu_model"},{"line_number":3726,"context_line":"        extra_flags \u003d CONF.libvirt.cpu_model_extra_flags"},{"line_number":3727,"context_line":""},{"line_number":3728,"context_line":"        if (CONF.libvirt.virt_type \u003d\u003d \"kvm\" or"},{"line_number":3729,"context_line":"            CONF.libvirt.virt_type \u003d\u003d \"qemu\"):"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_a89043ef","line":3726,"updated":"2018-03-17 02:57:25.000000000","message":"I understand you want to specify the CPU feature flags which don\u0027t declared in cpu_map.xml but supported by physical CPU.\nBut using Nova config means we need to restart nova-compute every time when we change it.Can we specify the feature flags by flavor extra_spec or instance_meta or iamge_metadata?","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"ca49e77f9c031bba41e0558e536e6426a898ed4b","unresolved":false,"context_lines":[{"line_number":3723,"context_line":"    def _get_guest_cpu_model_config(self):"},{"line_number":3724,"context_line":"        mode \u003d CONF.libvirt.cpu_mode"},{"line_number":3725,"context_line":"        model \u003d CONF.libvirt.cpu_model"},{"line_number":3726,"context_line":"        extra_flags \u003d CONF.libvirt.cpu_model_extra_flags"},{"line_number":3727,"context_line":""},{"line_number":3728,"context_line":"        if (CONF.libvirt.virt_type \u003d\u003d \"kvm\" or"},{"line_number":3729,"context_line":"            CONF.libvirt.virt_type \u003d\u003d \"qemu\"):"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_849d150c","line":3726,"in_reply_to":"df7087c5_a89043ef","updated":"2018-03-19 11:11:12.000000000","message":"That\u0027s a good point, yangjie.  I did consider it. But as a first step, I\u0027m looking at the config option.  In context of Spectre and Meltdown CVEs, you _anyway_ have to reboot all the hosts \u0026 guests for the fixes to be applied.  So in that cotext, `nova-compute` service would be restarted anyway.\n\nImage metadata property / flavor \u0027extra_spec\u0027 would be the next step.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ff74dd46993910b633f8967173fbdf1850c5e8c3","unresolved":false,"context_lines":[{"line_number":3776,"context_line":"        cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":3777,"context_line":"        cpu.mode \u003d mode"},{"line_number":3778,"context_line":"        cpu.model \u003d model"},{"line_number":3779,"context_line":"        cpu.extra_flags \u003d extra_flags"},{"line_number":3780,"context_line":""},{"line_number":3781,"context_line":"        return cpu"},{"line_number":3782,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_0063d643","line":3779,"updated":"2018-03-12 17:04:10.000000000","message":"Surely what you need here is a version of:\nhttps://github.com/openstack/nova/blob/476a07f967bc38f4a2d610d62e5905e32b1a970e/nova/tests/unit/virt/libvirt/test_config.py#L401\n\nSo something like:\n\n  for feature in extra_flags:\n    cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(feature))","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"43254679f5d4320889014558b7b2254efe72d9ed","unresolved":false,"context_lines":[{"line_number":3776,"context_line":"        cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":3777,"context_line":"        cpu.mode \u003d mode"},{"line_number":3778,"context_line":"        cpu.model \u003d model"},{"line_number":3779,"context_line":"        cpu.extra_flags \u003d extra_flags"},{"line_number":3780,"context_line":""},{"line_number":3781,"context_line":"        return cpu"},{"line_number":3782,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_d7128509","line":3779,"in_reply_to":"df7087c5_0063d643","updated":"2018-03-12 18:01:37.000000000","message":"Yes, I think this is the cleanest way of doing it.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"7d2d3a71220fec1603449562c16440d19c510068","unresolved":false,"context_lines":[{"line_number":3776,"context_line":"        cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":3777,"context_line":"        cpu.mode \u003d mode"},{"line_number":3778,"context_line":"        cpu.model \u003d model"},{"line_number":3779,"context_line":"        cpu.extra_flags \u003d extra_flags"},{"line_number":3780,"context_line":""},{"line_number":3781,"context_line":"        return cpu"},{"line_number":3782,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_00a9758e","line":3779,"in_reply_to":"df7087c5_0063d643","updated":"2018-03-13 15:07:54.000000000","message":"Yes, will rework it.","commit_id":"66ccc8d2bf958dc853f1ac2f0b6ea43788c3664d"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a3d5adcc9ba53ccb710f0b9b1e3854548952933","unresolved":false,"context_lines":[{"line_number":3859,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3860,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3861,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3864,"context_line":"                  \"with extra flags: \u0027%{extra_flags}\u0027\","},{"line_number":3865,"context_line":"                  {\u0027mode\u0027: mode,"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_3dd3bb3a","line":3862,"updated":"2018-03-21 12:53:58.000000000","message":"You should add check whether model is not None when extra_flags are set.","commit_id":"1110156e79666312c379b4d29181c0e499537aa7"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"61b3231417537581def7fa376cd7022659e38eb4","unresolved":false,"context_lines":[{"line_number":3859,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3860,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3861,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3864,"context_line":"                  \"with extra flags: \u0027%{extra_flags}\u0027\","},{"line_number":3865,"context_line":"                  {\u0027mode\u0027: mode,"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_a6b3384d","line":3862,"in_reply_to":"df7087c5_3dd3bb3a","updated":"2018-03-21 15:14:23.000000000","message":"Yep; addressed in next iteration.","commit_id":"1110156e79666312c379b4d29181c0e499537aa7"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a3d5adcc9ba53ccb710f0b9b1e3854548952933","unresolved":false,"context_lines":[{"line_number":3880,"context_line":"        # validation of a certain CPU model + CPU flags against a"},{"line_number":3881,"context_line":"        # specific QEMU binary."},{"line_number":3882,"context_line":""},{"line_number":3883,"context_line":"        for feature in extra_flags:"},{"line_number":3884,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(feature))"},{"line_number":3885,"context_line":""},{"line_number":3886,"context_line":"        return cpu"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_1db597cd","line":3883,"updated":"2018-03-21 12:53:58.000000000","message":"nit: I would have added a add_features() function which takes a list of flag and do the loop internally.","commit_id":"1110156e79666312c379b4d29181c0e499537aa7"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"25a7fed824b10b3c08f02fbe7048c68400fc8821","unresolved":false,"context_lines":[{"line_number":3860,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3861,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3864,"context_line":"              extra_flags):"},{"line_number":3865,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3866,"context_line":"                    \"when specifying a custom CPU model\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_ad6c5e08","line":3863,"updated":"2018-03-22 09:21:23.000000000","message":"Please add test for this condition","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"01731dc3af747fac5055155b8364ee3c7681b41d","unresolved":false,"context_lines":[{"line_number":3860,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3861,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3864,"context_line":"              extra_flags):"},{"line_number":3865,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3866,"context_line":"                    \"when specifying a custom CPU model\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_c39ba363","line":3863,"in_reply_to":"df7087c5_ad6c5e08","updated":"2018-03-22 10:18:32.000000000","message":"Working on it; that\u0027s what I noted in my Workflow -1","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"25a7fed824b10b3c08f02fbe7048c68400fc8821","unresolved":false,"context_lines":[{"line_number":3863,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3864,"context_line":"              extra_flags):"},{"line_number":3865,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3866,"context_line":"                    \"when specifying a custom CPU model\")"},{"line_number":3867,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3868,"context_line":""},{"line_number":3869,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_6db1668f","line":3866,"updated":"2018-03-22 09:21:23.000000000","message":"nit: You can be more specific by also adding something about the \"mode\"","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"01731dc3af747fac5055155b8364ee3c7681b41d","unresolved":false,"context_lines":[{"line_number":3863,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3864,"context_line":"              extra_flags):"},{"line_number":3865,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3866,"context_line":"                    \"when specifying a custom CPU model\")"},{"line_number":3867,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3868,"context_line":""},{"line_number":3869,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_43c0f32a","line":3866,"in_reply_to":"df7087c5_6db1668f","updated":"2018-03-22 10:18:32.000000000","message":"I reworded it as:\n\n    msg \u003d _(\"Setting extra CPU flags is only valid \"\n            \"in combination with a custom CPU model\")\n\nNo need to spell out about \u0027model\u0027, because: a custom CPU model is only possible with a \u0027custom\u0027 mode :-)","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4387482c55b1a08537c93fadc25e2695c4ede62d","unresolved":false,"context_lines":[{"line_number":3867,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3868,"context_line":""},{"line_number":3869,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3870,"context_line":"                  \"with extra flags: \u0027%{extra_flags}\u0027\","},{"line_number":3871,"context_line":"                  {\u0027mode\u0027: mode,"},{"line_number":3872,"context_line":"                   \u0027model\u0027: (model or \"\"),"},{"line_number":3873,"context_line":"                   \u0027extra_flags\u0027: (extra_flags or \"\")})"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_4ddfc2d5","line":3870,"updated":"2018-03-22 09:15:31.000000000","message":"you have made a type: \u0027%{extra_flags}s\u0027 (you have forgotten the \u0027s\u0027","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"01731dc3af747fac5055155b8364ee3c7681b41d","unresolved":false,"context_lines":[{"line_number":3867,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3868,"context_line":""},{"line_number":3869,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3870,"context_line":"                  \"with extra flags: \u0027%{extra_flags}\u0027\","},{"line_number":3871,"context_line":"                  {\u0027mode\u0027: mode,"},{"line_number":3872,"context_line":"                   \u0027model\u0027: (model or \"\"),"},{"line_number":3873,"context_line":"                   \u0027extra_flags\u0027: (extra_flags or \"\")})"}],"source_content_type":"text/x-python","patch_set":8,"id":"df7087c5_cda19248","line":3870,"in_reply_to":"df7087c5_4ddfc2d5","updated":"2018-03-22 10:18:32.000000000","message":"Yep; what I need is:\n\n  -            \"with extra flags: \u0027%{extra_flags}\u0027\",\n  +            \"with extra flags: \u0027%(extra_flags)s\u0027\",","commit_id":"fc8ca7d79ea9c1b45f2f10ae1611e7c5ba023e2f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"676384e3a0e73c40e219bc72ffadd6301bad5242","unresolved":false,"context_lines":[{"line_number":3856,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3857,"context_line":"                    \"model name was provided\")"},{"line_number":3858,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3859,"context_line":""},{"line_number":3860,"context_line":"        elif mode !\u003d \"custom\" and model is not None:"},{"line_number":3861,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3862,"context_line":"                    \"host CPU model is requested\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_b7101a50","line":3859,"updated":"2018-03-22 21:41:05.000000000","message":"Random whitespace damage","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"49808747ab61a7b6fce8f52f9b9ede0349d275f4","unresolved":false,"context_lines":[{"line_number":3856,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3857,"context_line":"                    \"model name was provided\")"},{"line_number":3858,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3859,"context_line":""},{"line_number":3860,"context_line":"        elif mode !\u003d \"custom\" and model is not None:"},{"line_number":3861,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3862,"context_line":"                    \"host CPU model is requested\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf659307_ed2de3a8","line":3859,"in_reply_to":"bf659307_412628ba","updated":"2018-03-24 19:29:54.000000000","message":"Okay, not to discuss this to death, but if we\u0027re removing the blank lines, then it\u0027d be cleaner if I just remove the extra blank lines (in total 2) in this set of \u0027if–elif\u0027 clause — it will be consistent with the entire file.\n\n(Dan on IRC said, \"it\u0027s not worth fixing\", without expanding further.  In general, I agree that we shouldn\u0027t do random white space changes; but this is contextual, so it seems fine here.)","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"ba1b2894c8aa4b13fea0e608ba9f5780560de040","unresolved":false,"context_lines":[{"line_number":3856,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3857,"context_line":"                    \"model name was provided\")"},{"line_number":3858,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3859,"context_line":""},{"line_number":3860,"context_line":"        elif mode !\u003d \"custom\" and model is not None:"},{"line_number":3861,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3862,"context_line":"                    \"host CPU model is requested\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf659307_412628ba","line":3859,"in_reply_to":"df7087c5_658e3b7a","updated":"2018-03-23 17:36:09.000000000","message":"I think we could remove the blank lines at 3859 and 3864 given that there aren\u0027t any blank lines before \"else\" clauses in the rest of this function.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"be505615f33af12aa247ec2849196adb5e3c432e","unresolved":false,"context_lines":[{"line_number":3856,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3857,"context_line":"                    \"model name was provided\")"},{"line_number":3858,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3859,"context_line":""},{"line_number":3860,"context_line":"        elif mode !\u003d \"custom\" and model is not None:"},{"line_number":3861,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3862,"context_line":"                    \"host CPU model is requested\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_658e3b7a","line":3859,"in_reply_to":"df7087c5_b7101a50","updated":"2018-03-23 13:34:29.000000000","message":"True; was already cautions while making that, as we one shouldn\u0027t up unrelated changes.  Did that out of OCD to maintain consistent spacing within that conditionals, which doesn\u0027t merit a separate change.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"676384e3a0e73c40e219bc72ffadd6301bad5242","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        # certain CPU model + CPU flags against a specific QEMU binary."},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"        for feature in extra_flags:"},{"line_number":3891,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(feature))"},{"line_number":3892,"context_line":""},{"line_number":3893,"context_line":"        return cpu"},{"line_number":3894,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_d7534e15","line":3891,"updated":"2018-03-22 21:41:05.000000000","message":"Do we want to maintain a list of valid values for this? Just allowing anything in here seems like it might be a little dangerous. Like if I typo a flag and put \"pcid/\" in there, we\u0027ll generate bad xml right? We don\u0027t need to be overly detailed I guess, but it seems like knowing what the valid values are here will help prevent operators from putting things in there that are totally invalid and getting weird issues creating instances.\n\nIf we\u0027re going to do that for the backport per my suggestion, we\u0027d already have it ready to go.\n\nCan we get a list of all supported values from libvirt?","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b633ff40010755ca114a9ffecbab5897c5ddd86b","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        # certain CPU model + CPU flags against a specific QEMU binary."},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"        for feature in extra_flags:"},{"line_number":3891,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(feature))"},{"line_number":3892,"context_line":""},{"line_number":3893,"context_line":"        return cpu"},{"line_number":3894,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_f9943346","line":3891,"in_reply_to":"df7087c5_6bd36939","updated":"2018-03-23 13:38:06.000000000","message":"Okay, thanks.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"be505615f33af12aa247ec2849196adb5e3c432e","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        # certain CPU model + CPU flags against a specific QEMU binary."},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"        for feature in extra_flags:"},{"line_number":3891,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(feature))"},{"line_number":3892,"context_line":""},{"line_number":3893,"context_line":"        return cpu"},{"line_number":3894,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_6bd36939","line":3891,"in_reply_to":"df7087c5_97ccf66a","updated":"2018-03-23 13:34:29.000000000","message":"To your question of \"how about allowing just features on the host CPU to be added to the guest\", a libvirt dev who works on the CPU modelling infrastructure said: \"That\u0027s what (allowing only CPU features supported on the host) libvirt did originally but failed, because: QEMU / KVM is able to enable features which are not supported by the host.\"  (E.g. \u0027x2apic\u0027 is emulated by QEMU even if the host does not support.)\n\n\nThat\u0027s why the libvirt developers are going to provide a new CPU comparison API (which needs \"new enough\" QEMU and libvirt) that will take QEMU / KVM capabilities into consideration.  Refer the libvirt RFC that I linked in my earlier comment.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"59965f5b193d2baaf09821977f141e0850a6858e","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        # certain CPU model + CPU flags against a specific QEMU binary."},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"        for feature in extra_flags:"},{"line_number":3891,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(feature))"},{"line_number":3892,"context_line":""},{"line_number":3893,"context_line":"        return cpu"},{"line_number":3894,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_2524c25f","line":3891,"in_reply_to":"df7087c5_d7534e15","updated":"2018-03-23 10:40:43.000000000","message":"\u003e Do we want to maintain a list of valid values for this? Just allowing anything in here seems like it might be a little dangerous. Like if I typo a flag and put \"pcid/\" in there, we\u0027ll generate bad xml right? We don\u0027t need to be overly detailed I guess, but it seems like knowing what the valid values are here will help prevent operators from putting things in there that are totally invalid and getting weird issues creating instances.\n\nWhen setting the features we also pass an argument \"policy\", we have hardcoded that value to \"required\" meaning that we can\u0027t pass something wrong. The host CPU should accept and support that feature.\n\nI can understand the point to have a whitelist to specify what we can accept but we can expect that the operators know better than us why they need a specific feature.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"be505615f33af12aa247ec2849196adb5e3c432e","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        # certain CPU model + CPU flags against a specific QEMU binary."},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"        for feature in extra_flags:"},{"line_number":3891,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(feature))"},{"line_number":3892,"context_line":""},{"line_number":3893,"context_line":"        return cpu"},{"line_number":3894,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_2befb11d","line":3891,"in_reply_to":"df7087c5_d7534e15","updated":"2018-03-23 13:34:29.000000000","message":"Firstly, the resulting guest XML we generate will have the \u0027policy\u0027 to be \"require\":\n\n    \u003cfeature name\u003d\"pcid\" policy\u003d\"require\"/\u003e\n\nWhich means: \"Guest creation will fail unless the feature is supported by host CPU or the hypervisor is able to emulate it\".\n\nHaving said that, it\u0027s not really practical for Nova to maintain whitelists of CPU flags.  There are some fragile ways we can try, by using the compareCPU() API, but that\u0027s going to miss some things, and just duplicate what libvirt \u0026 QEMU already do.\n\nAs of now, libvirt already does some validation at the guest start-up time (not the ideal solution).\n\nFor future, upstream libvirt devs are working on a new API to compare given model + flags against a given QEMU binary and KVM.  To that end, I filed this RFC to provide that new API:\n\n    https://bugzilla.redhat.com/show_bug.cgi?id\u003d1559832 --\n    [RFC] Fine-grained API to validate if a given CPU \n    model and flags are supported by QEMU / KVM\n\nMeanwhile, as Sean noted below, clear documentation and release notes is the step we can take to notify the action item on the Operator when using this.","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"85d22f6518621ba5f56c370acc5c1cb21228d0c2","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        # certain CPU model + CPU flags against a specific QEMU binary."},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"        for feature in extra_flags:"},{"line_number":3891,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(feature))"},{"line_number":3892,"context_line":""},{"line_number":3893,"context_line":"        return cpu"},{"line_number":3894,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_97ccf66a","line":3891,"in_reply_to":"df7087c5_d7534e15","updated":"2018-03-22 22:04:39.000000000","message":"there are some things like vmx that just wont work unless you have nested virt turned on in the host.\n\nat the end of the day unless nova plans to maintainer a whitelist in the code of knonw good values i think this really has to up to the operator until libvirt can check the compatility. the knonw good set would depend on you host cpu, your qemu and libvirt versions so i dont really think its something nova can validate.\n\ni would suggest a hefty warning and good docs/release notes\nstateing that this is an advanced feature and that operators should carfully think about the impact on migration/upgrades\nif they choose to use this feature.\n\nas for getting a list for libvirt you can get a list of the host cpu feature but qemu can emulate features that are not on the host too. for example it can supprot avx via sse3/4 instructions. generally if the host cpu does not have the feature we should not have it on the guest so perhaps that is a good starting point. just allow feature on the host cpu to be added?","commit_id":"4496eb740c679818cd80698fea70f1397691353c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5a1464bc966254a628fa5b4083d3ea6b5e0c5561","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        # other useful features."},{"line_number":3897,"context_line":"        for flag in extra_flags:"},{"line_number":3898,"context_line":"            if flag !\u003d \u0027pcid\u0027:"},{"line_number":3899,"context_line":"                raise exception.Invalid(\"The `cpu_model_extra_flags` \""},{"line_number":3900,"context_line":"                                        \"supports only the \u0027pcid\u0027 CPU \""},{"line_number":3901,"context_line":"                                        \"feature flag for now\")"},{"line_number":3902,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(flag))"}],"source_content_type":"text/x-python","patch_set":15,"id":"bf659307_a9601fd0","line":3899,"updated":"2018-03-26 14:44:53.000000000","message":"This will stop instances from being booted (abruptly) if the config has an invalid value in it. IMHO, just LOG.warning() and don\u0027t add the flag to the config.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"ca86f9a54ed7a16c6e03cf28d8707faf68521dcd","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        # other useful features."},{"line_number":3897,"context_line":"        for flag in extra_flags:"},{"line_number":3898,"context_line":"            if flag !\u003d \u0027pcid\u0027:"},{"line_number":3899,"context_line":"                raise exception.Invalid(\"The `cpu_model_extra_flags` \""},{"line_number":3900,"context_line":"                                        \"supports only the \u0027pcid\u0027 CPU \""},{"line_number":3901,"context_line":"                                        \"feature flag for now\")"},{"line_number":3902,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(flag))"}],"source_content_type":"text/x-python","patch_set":15,"id":"bf659307_7a6de396","line":3899,"in_reply_to":"bf659307_0c9fd903","updated":"2018-03-26 16:12:08.000000000","message":"Agreed, if we\u0027re going to fail hard it should be on nova-compute startup.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"79bd300bca1864dd51fe7f55cf35354bbcaa3aaa","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        # other useful features."},{"line_number":3897,"context_line":"        for flag in extra_flags:"},{"line_number":3898,"context_line":"            if flag !\u003d \u0027pcid\u0027:"},{"line_number":3899,"context_line":"                raise exception.Invalid(\"The `cpu_model_extra_flags` \""},{"line_number":3900,"context_line":"                                        \"supports only the \u0027pcid\u0027 CPU \""},{"line_number":3901,"context_line":"                                        \"feature flag for now\")"},{"line_number":3902,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(flag))"}],"source_content_type":"text/x-python","patch_set":15,"id":"bf659307_3076a7a6","line":3899,"in_reply_to":"bf659307_0c9fd903","updated":"2018-03-26 19:23:55.000000000","message":"Ah, thanks for clarifying.  I was thinking about the instance boot up vs. `nova-compute` start up, but got distracted. \n\nAlright, I agree that the check should more graceful when it is implemented during the instance boot up. I\u0027ll rework the patch.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"674dfeab513b72d9038b907de4e3252403abf9ef","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        # other useful features."},{"line_number":3897,"context_line":"        for flag in extra_flags:"},{"line_number":3898,"context_line":"            if flag !\u003d \u0027pcid\u0027:"},{"line_number":3899,"context_line":"                raise exception.Invalid(\"The `cpu_model_extra_flags` \""},{"line_number":3900,"context_line":"                                        \"supports only the \u0027pcid\u0027 CPU \""},{"line_number":3901,"context_line":"                                        \"feature flag for now\")"},{"line_number":3902,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(flag))"}],"source_content_type":"text/x-python","patch_set":15,"id":"bf659307_a655a152","line":3899,"in_reply_to":"bf659307_3076a7a6","updated":"2018-03-26 21:19:16.000000000","message":"Thinking a bit more: I agree  that failing at Nova start up is much better for the admin, so that they notice it much earlier.  However, it seems consistent if we *do* hard-fail on instance start up — just like the other checks a few lines above for `cpu_mode` and `cpu_model`.  Isn\u0027t it cleaner?\n\nIf we want to move this check to Nova start up, then it feels like we should move the other two checks (for CPU \u0027mode\u0027 and \u0027model\u0027) to Nova start up time too.  But that\u0027s a different surgery.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d712161e105dc57ecfd22f05678cacb0db59fa2a","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        # other useful features."},{"line_number":3897,"context_line":"        for flag in extra_flags:"},{"line_number":3898,"context_line":"            if flag !\u003d \u0027pcid\u0027:"},{"line_number":3899,"context_line":"                raise exception.Invalid(\"The `cpu_model_extra_flags` \""},{"line_number":3900,"context_line":"                                        \"supports only the \u0027pcid\u0027 CPU \""},{"line_number":3901,"context_line":"                                        \"feature flag for now\")"},{"line_number":3902,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(flag))"}],"source_content_type":"text/x-python","patch_set":15,"id":"bf659307_fb6c9509","line":3899,"in_reply_to":"bf659307_7a6de396","updated":"2018-03-26 18:20:18.000000000","message":"+1, the hard-fail case for choosing invalid flags should be on nova-compute startup only.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"fadc82cb578c769386eb97bce912b89a777b0c69","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        # other useful features."},{"line_number":3897,"context_line":"        for flag in extra_flags:"},{"line_number":3898,"context_line":"            if flag !\u003d \u0027pcid\u0027:"},{"line_number":3899,"context_line":"                raise exception.Invalid(\"The `cpu_model_extra_flags` \""},{"line_number":3900,"context_line":"                                        \"supports only the \u0027pcid\u0027 CPU \""},{"line_number":3901,"context_line":"                                        \"feature flag for now\")"},{"line_number":3902,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(flag))"}],"source_content_type":"text/x-python","patch_set":15,"id":"bf659307_214c1b9d","line":3899,"in_reply_to":"bf659307_a655a152","updated":"2018-03-26 22:14:12.000000000","message":"Meanwhile ... thanks to Melanie\u0027s pointer on the upstream list[*], it seems there\u0027s a (slightly convoluted) way to actually use Oslo\u0027s ListOpt() to specify \u0027choices\u0027 in conf/libvirt.py (thus, getting rid of the hard-coded check in libvirt/driver.py altogether):\n\n    [...]\n    cfg.ListOpt(\n        \u0027cpu_model_extra_flags\u0027,\n        item_type\u003dtypes.String(\n            choices\u003d[\u0027pcid\u0027]\n        ),\n        default\u003d[],\n                help\u003d\"\"\" ... \"\"\"\n    [...]\n\nIt works from my local testing (ran all the tests under \u0027nova.tests.unit.virt.libvirt\u0027).\n\nGoing to upload a change with the above; and remove the conditional check in libvirt.driver.py.\n\n[*] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128748.html","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4cf3c4830843b47b562dd02b6eec62418e3ad2f0","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        # other useful features."},{"line_number":3897,"context_line":"        for flag in extra_flags:"},{"line_number":3898,"context_line":"            if flag !\u003d \u0027pcid\u0027:"},{"line_number":3899,"context_line":"                raise exception.Invalid(\"The `cpu_model_extra_flags` \""},{"line_number":3900,"context_line":"                                        \"supports only the \u0027pcid\u0027 CPU \""},{"line_number":3901,"context_line":"                                        \"feature flag for now\")"},{"line_number":3902,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(flag))"}],"source_content_type":"text/x-python","patch_set":15,"id":"bf659307_ec24e50f","line":3899,"in_reply_to":"bf659307_a9601fd0","updated":"2018-03-26 15:27:24.000000000","message":"Hmm, but I\u0027m not quite sure if a warning would suffice.\n\nAnd I doubt Operators would notice it before it\u0027s too late.  By one benchmark[*], a simple within the guest:\n\n    `time for i in $(seq 1 1 50); do du -sx /; done`\n\ntakes 26 seconds *without* PCID, and 14 seconds *with* PCID; so the performance impact seems to be about 46%.\n\nIsn\u0027t it worth a bit more of a \"hard failure\"?\n\n[*] https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg01508.html","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"67f16ede385b8c5e12517e91fb12bb4c6a4f2415","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        # other useful features."},{"line_number":3897,"context_line":"        for flag in extra_flags:"},{"line_number":3898,"context_line":"            if flag !\u003d \u0027pcid\u0027:"},{"line_number":3899,"context_line":"                raise exception.Invalid(\"The `cpu_model_extra_flags` \""},{"line_number":3900,"context_line":"                                        \"supports only the \u0027pcid\u0027 CPU \""},{"line_number":3901,"context_line":"                                        \"feature flag for now\")"},{"line_number":3902,"context_line":"            cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature(flag))"}],"source_content_type":"text/x-python","patch_set":15,"id":"bf659307_0c9fd903","line":3899,"in_reply_to":"bf659307_ec24e50f","updated":"2018-03-26 15:30:40.000000000","message":"The failure is not for the pcid case, it\u0027s for the \"oh, I can add new libvirt cpu features to nova in queens now!\"\n\nThe performance impact of not specifying pcid here has nothing to do with the discussion of whether or not to hard-fail all boot requests if the operator specifies something invalid here.\n\nThe hard failure we were looking for with choices\u003d was on compute startup and not instance boot, which is more desirable I think. We could still do that in init_host or something, but if we\u0027re going to do it on instance boot, I think it needs to be more graceful.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5493f0b9f686ec4677e4f2160f1e910e1d7acfe6","unresolved":false,"context_lines":[{"line_number":3850,"context_line":"                    \"the current libvirt hypervisor \u0027%s\u0027 does not \""},{"line_number":3851,"context_line":"                    \"support selecting CPU models\") % CONF.libvirt.virt_type"},{"line_number":3852,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3853,"context_line":""},{"line_number":3854,"context_line":"        if mode \u003d\u003d \"custom\" and model is None:"},{"line_number":3855,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3856,"context_line":"                    \"model name was provided\")"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_d55e2411","side":"PARENT","line":3853,"updated":"2018-03-27 13:25:43.000000000","message":"extra line, we should remove","commit_id":"315a4d63c223690c66fa448a20d77ec23148016f"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"1c76ab931f579738b81c44dac38c965ee0875ebe","unresolved":false,"context_lines":[{"line_number":3850,"context_line":"                    \"the current libvirt hypervisor \u0027%s\u0027 does not \""},{"line_number":3851,"context_line":"                    \"support selecting CPU models\") % CONF.libvirt.virt_type"},{"line_number":3852,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3853,"context_line":""},{"line_number":3854,"context_line":"        if mode \u003d\u003d \"custom\" and model is None:"},{"line_number":3855,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3856,"context_line":"                    \"model name was provided\")"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_58cfabaf","side":"PARENT","line":3853,"in_reply_to":"bf659307_d55e2411","updated":"2018-03-27 14:15:23.000000000","message":"Will do","commit_id":"315a4d63c223690c66fa448a20d77ec23148016f"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"316b3202f4f27193b518c03614b3b61ecf24b5a3","unresolved":false,"context_lines":[{"line_number":3818,"context_line":"        mode \u003d CONF.libvirt.cpu_mode"},{"line_number":3819,"context_line":"        model \u003d CONF.libvirt.cpu_model"},{"line_number":3820,"context_line":"        extra_flags \u003d set([flag.lower() for flag"},{"line_number":3821,"context_line":"                          in CONF.libvirt.cpu_model_extra_flags])"},{"line_number":3822,"context_line":""},{"line_number":3823,"context_line":"        if (CONF.libvirt.virt_type \u003d\u003d \"kvm\" or"},{"line_number":3824,"context_line":"            CONF.libvirt.virt_type \u003d\u003d \"qemu\"):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bf659307_981783a4","line":3821,"updated":"2018-03-27 14:23:59.000000000","message":"Oops, found a bug: now that I moved to using \u0027choices\u0027 via ListOpt -\u003e StrOpt, the casing normalization is lost — I just did a functional test specifying the upper case \u0027PCID\u0027, but it wasn\u0027t picked up.\n\nSeems like I can use Oslo\u0027s \u0027ignore_case\u0027 in the StrOpt() class:\n\n    :param ignore_case: If True case differences (uppercase vs. lowercase)\n                        between \u0027choices\u0027 or \u0027regex\u0027 will be ignored.\n\n\nSo, I\u0027m going to pass that to \u0027types.String\u0027.","commit_id":"6e0d6ec262b13778ba709305b74367f409d5d568"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c402a47ab1066b5d4c64b10ff16b44791e49ae36","unresolved":false,"context_lines":[{"line_number":3860,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3861,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3862,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3863,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3864,"context_line":"              extra_flags):"},{"line_number":3865,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3866,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3867,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3868,"context_line":""},{"line_number":3869,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""}],"source_content_type":"text/x-python","patch_set":17,"id":"bf659307_67768aa7","line":3866,"range":{"start_line":3863,"start_character":8,"end_line":3866,"end_character":61},"updated":"2018-03-27 16:28:51.000000000","message":"do we really want to add this restriction for host-model?  if they have older qemu/libvirt/kernel/microcode then it might actually make sense to allow extra flags in conjunction with host-model.  (The libvirt docs specifically say this is legit: \"Using the feature element, specific flags may be enabled or disabled specifically in addition to the host model.\")","commit_id":"c6eacef0166c7520ce6ffdd0e68c7d16be8968db"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"f56ba7f22b248cac625999f934e6dfc26636cce0","unresolved":false,"context_lines":[{"line_number":3860,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3861,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3862,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3863,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3864,"context_line":"              extra_flags):"},{"line_number":3865,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3866,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3867,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3868,"context_line":""},{"line_number":3869,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""}],"source_content_type":"text/x-python","patch_set":17,"id":"bf659307_af1798a3","line":3866,"range":{"start_line":3863,"start_character":8,"end_line":3866,"end_character":61},"in_reply_to":"bf659307_67768aa7","updated":"2018-03-27 18:03:56.000000000","message":"That\u0027s a good point. We can remove that restriction on \u0027host-model\u0027 after the backports are done.  In our current case, we\u0027re limiting the extra_flags to just one, as you see.\n\nAnd \u0027host-model\u0027 + PCID doesn\u0027t make sense in this case — If QEMU already supports PCID, it would be enabled by \u0027host-model\u0027.  And if it is not supported, adding it doesn\u0027t make it magically appear :-)\n\nI also double-confirmed the above with libvirt developers.","commit_id":"c6eacef0166c7520ce6ffdd0e68c7d16be8968db"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a9cc61354cdf9f1df113c585164f32e2ff04c43f","unresolved":false,"context_lines":[{"line_number":3859,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3860,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3861,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3862,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3863,"context_line":"              extra_flags):"},{"line_number":3864,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3865,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3866,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bf659307_02b9a0ca","line":3863,"range":{"start_line":3862,"start_character":7,"end_line":3863,"end_character":27},"updated":"2018-03-28 12:32:44.000000000","message":"I have thought a question in the previous review, but I forget to raise it at the end of review. \n\nI confused on why we have check \u0027host-model\u0027, but no check for \u0027host-passthrough\u0027.","commit_id":"dd1cf44efd4ab6394c65bb3c0e0ef2f3338d4bab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"dd33634c3531e5be1dc240264c1df5b7a7a6718a","unresolved":false,"context_lines":[{"line_number":3860,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3861,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3862,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3863,"context_line":"              extra_flags):"},{"line_number":3864,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3865,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3866,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bf659307_a27234e2","line":3863,"updated":"2018-03-28 12:20:58.000000000","message":"We should also restrict for \u0027host-passthrough\u0027:\n\n+        elif ((mode \u003d\u003d \"host-model\" or mode \u003d\u003d \"host-passthrough\" or\n+              model is None) and extra_flags):\n\n(Thanks: Alex Xu, for spotting it.)","commit_id":"dd1cf44efd4ab6394c65bb3c0e0ef2f3338d4bab"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"647bc177b70056d131597ea9209d6cf45ca2bfb1","unresolved":false,"context_lines":[{"line_number":3859,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3860,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3861,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3862,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3863,"context_line":"              extra_flags):"},{"line_number":3864,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3865,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3866,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bf659307_3d55e5c6","line":3863,"range":{"start_line":3862,"start_character":7,"end_line":3863,"end_character":27},"in_reply_to":"bf659307_02b9a0ca","updated":"2018-03-28 12:34:11.000000000","message":"oops, this comment already talk with Kaskyap in the IRC, forget discard it in the end.","commit_id":"dd1cf44efd4ab6394c65bb3c0e0ef2f3338d4bab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"8016d8c7e5e6100d95cd9826933ba38327a82043","unresolved":false,"context_lines":[{"line_number":3859,"context_line":"            msg \u003d _(\"A CPU model name should not be set when a \""},{"line_number":3860,"context_line":"                    \"host CPU model is requested\")"},{"line_number":3861,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3862,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or model is None) and"},{"line_number":3863,"context_line":"              extra_flags):"},{"line_number":3864,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3865,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3866,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bf659307_fd63ed18","line":3863,"range":{"start_line":3862,"start_character":7,"end_line":3863,"end_character":27},"in_reply_to":"bf659307_3d55e5c6","updated":"2018-03-28 14:06:16.000000000","message":"Yep, addressed in PS 20, as you saw.\n\nThanks for the review :-)","commit_id":"dd1cf44efd4ab6394c65bb3c0e0ef2f3338d4bab"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"afa6a33665905945590d0d87def0d2b36793f05b","unresolved":false,"context_lines":[{"line_number":3850,"context_line":"                    \"the current libvirt hypervisor \u0027%s\u0027 does not \""},{"line_number":3851,"context_line":"                    \"support selecting CPU models\") % CONF.libvirt.virt_type"},{"line_number":3852,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3853,"context_line":""},{"line_number":3854,"context_line":"        if mode \u003d\u003d \"custom\" and model is None:"},{"line_number":3855,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3856,"context_line":"                    \"model name was provided\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_35adf987","side":"PARENT","line":3853,"updated":"2018-03-28 14:39:40.000000000","message":"Random whitespace change :(","commit_id":"315a4d63c223690c66fa448a20d77ec23148016f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":3850,"context_line":"                    \"the current libvirt hypervisor \u0027%s\u0027 does not \""},{"line_number":3851,"context_line":"                    \"support selecting CPU models\") % CONF.libvirt.virt_type"},{"line_number":3852,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3853,"context_line":""},{"line_number":3854,"context_line":"        if mode \u003d\u003d \"custom\" and model is None:"},{"line_number":3855,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3856,"context_line":"                    \"model name was provided\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_151eb56f","side":"PARENT","line":3853,"updated":"2018-03-28 14:45:19.000000000","message":"Undo this, because it could bite you in the ass with backports.","commit_id":"315a4d63c223690c66fa448a20d77ec23148016f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"695dcff0b5cc7596f99bcbac26fa84f5c3203d75","unresolved":false,"context_lines":[{"line_number":3850,"context_line":"                    \"the current libvirt hypervisor \u0027%s\u0027 does not \""},{"line_number":3851,"context_line":"                    \"support selecting CPU models\") % CONF.libvirt.virt_type"},{"line_number":3852,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3853,"context_line":""},{"line_number":3854,"context_line":"        if mode \u003d\u003d \"custom\" and model is None:"},{"line_number":3855,"context_line":"            msg \u003d _(\"Config requested a custom CPU model, but no \""},{"line_number":3856,"context_line":"                    \"model name was provided\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_f82e9841","side":"PARENT","line":3853,"in_reply_to":"bf659307_151eb56f","updated":"2018-03-28 14:53:27.000000000","message":"I point out that in previous patchset... but I miss that in the update. I\u0027m blind, I\u0027m blind, I\u0027m blind","commit_id":"315a4d63c223690c66fa448a20d77ec23148016f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"afa6a33665905945590d0d87def0d2b36793f05b","unresolved":false,"context_lines":[{"line_number":3872,"context_line":"              model is None) and extra_flags):"},{"line_number":3873,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3874,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3875,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3876,"context_line":""},{"line_number":3877,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3878,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_f5c78111","line":3875,"updated":"2018-03-28 14:39:40.000000000","message":"There is no test for this branch so I\u0027m not sure that Invalid properly formats with no options. Yes, it\u0027s raised similarly above, but there are no tests for those either. Since this is going to be a backport, we want to be extra careful that we\u0027re not backporting any new bugs.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":3872,"context_line":"              model is None) and extra_flags):"},{"line_number":3873,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3874,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3875,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3876,"context_line":""},{"line_number":3877,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3878,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_d80cf43c","line":3875,"updated":"2018-03-28 14:45:19.000000000","message":"Why fail for this? Why not just ignore it? Is it just to be clear so that operators don\u0027t think, \"why isn\u0027t cpu_model_extra_flags being used?\". We could just log a warning instead of kill the startup, but whatever.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"18cc158fc6275909ab68c4d77354be299a054a7c","unresolved":false,"context_lines":[{"line_number":3872,"context_line":"              model is None) and extra_flags):"},{"line_number":3873,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3874,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3875,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3876,"context_line":""},{"line_number":3877,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3878,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_aeb69af9","line":3875,"in_reply_to":"bf659307_b8f3400a","updated":"2018-03-28 15:49:28.000000000","message":"Agreed...in master we could conceivably remove the \"host-model\" check here but we\u0027d still want the warning for host-passthrough.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5714ba4ed83322e0f6eb7c4acc279c7c38ec5196","unresolved":false,"context_lines":[{"line_number":3872,"context_line":"              model is None) and extra_flags):"},{"line_number":3873,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3874,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3875,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3876,"context_line":""},{"line_number":3877,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3878,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_b8f3400a","line":3875,"in_reply_to":"bf659307_d80cf43c","updated":"2018-03-28 14:47:13.000000000","message":"Ah yeah good call on the warning. That makes it even less impactful.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"24828d387180db66ec45ace47d8b4d43c129685b","unresolved":false,"context_lines":[{"line_number":3872,"context_line":"              model is None) and extra_flags):"},{"line_number":3873,"context_line":"            msg \u003d _(\"Setting extra CPU flags is only valid \""},{"line_number":3874,"context_line":"                    \"in combination with a custom CPU model\")"},{"line_number":3875,"context_line":"            raise exception.Invalid(msg)"},{"line_number":3876,"context_line":""},{"line_number":3877,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3878,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":20,"id":"bf659307_c3114e54","line":3875,"in_reply_to":"bf659307_d80cf43c","updated":"2018-03-29 10:39:48.000000000","message":"Yes -- my thinking with the exception was that Operator will find out much later that the config wasn\u0027t used.  And not be surprised.  But \"whatever\"; can turn it into a warning.  Maybe it _is_ overkill to abort the start up.\n\n(And as Chris notes below, and the FIXME says above, we\u0027ll remove the check for the \"host-model\" in a future patch.)","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d59e256a5015fab285041d113371342042ba6416","unresolved":false,"context_lines":[{"line_number":3870,"context_line":"        # (b) Remove the below check for \"host-model\", as it is a"},{"line_number":3871,"context_line":"        #     valid configuration to supply additional CPU flags to it."},{"line_number":3872,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or mode \u003d\u003d \"host-passthrough\" or"},{"line_number":3873,"context_line":"              model is None) and extra_flags):"},{"line_number":3874,"context_line":"            LOG.warning(\"Setting extra CPU flags is only valid in \""},{"line_number":3875,"context_line":"                        \"combination with a custom CPU model. Refer \""},{"line_number":3876,"context_line":"                        \"to the \u0027nova.conf\u0027 documentation for \""}],"source_content_type":"text/x-python","patch_set":21,"id":"bf659307_2b024e70","line":3873,"range":{"start_line":3873,"start_character":14,"end_line":3873,"end_character":27},"updated":"2018-03-30 06:03:46.000000000","message":"Actually this is useless, we never reach to here when the mode is not equal host-model or host-passthrough and model is None. That will stop at line 3859","commit_id":"867db4f705ecec9bbaeccf046c9fb0e2c895297c"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"d1824deaed7767c3bf6d119a16a90b91df8489d7","unresolved":false,"context_lines":[{"line_number":3870,"context_line":"        # (b) Remove the below check for \"host-model\", as it is a"},{"line_number":3871,"context_line":"        #     valid configuration to supply additional CPU flags to it."},{"line_number":3872,"context_line":"        elif ((mode \u003d\u003d \"host-model\" or mode \u003d\u003d \"host-passthrough\" or"},{"line_number":3873,"context_line":"              model is None) and extra_flags):"},{"line_number":3874,"context_line":"            LOG.warning(\"Setting extra CPU flags is only valid in \""},{"line_number":3875,"context_line":"                        \"combination with a custom CPU model. Refer \""},{"line_number":3876,"context_line":"                        \"to the \u0027nova.conf\u0027 documentation for \""}],"source_content_type":"text/x-python","patch_set":21,"id":"bf659307_f5250b0a","line":3873,"range":{"start_line":3873,"start_character":14,"end_line":3873,"end_character":27},"in_reply_to":"bf659307_2b024e70","updated":"2018-03-30 13:12:18.000000000","message":"Hmm, that\u0027s true, it\u0027s caught earlier (but this doesn\u0027t hurt either).  Anyway, removed in the next iteration.","commit_id":"867db4f705ecec9bbaeccf046c9fb0e2c895297c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e5e2f3933db40088d780b9a4718606d2d1f1e467","unresolved":false,"context_lines":[{"line_number":3874,"context_line":"            LOG.warning(\"Setting extra CPU flags is only valid in \""},{"line_number":3875,"context_line":"                        \"combination with a custom CPU model. Refer \""},{"line_number":3876,"context_line":"                        \"to the \u0027nova.conf\u0027 documentation for \""},{"line_number":3877,"context_line":"                        \"\u0027[libvirt]/cpu_model_extra_flags\u0027\")"},{"line_number":3878,"context_line":""},{"line_number":3879,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3880,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_627a75ba","line":3877,"updated":"2018-04-03 10:59:31.000000000","message":"Should we not raise if you set extra flags with host-passthrough? That seems invalid?\n\nHere, should we not set \"extra_flags \u003d None\" or similar here? Seems we just warn and do it anyway with this code? The comments and docs seem to suggest it is invalid, but here we do it anyways? I maybe got confused.","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"18f2db65e5f2ea8234245c624d1e2950bee099a8","unresolved":false,"context_lines":[{"line_number":3874,"context_line":"            LOG.warning(\"Setting extra CPU flags is only valid in \""},{"line_number":3875,"context_line":"                        \"combination with a custom CPU model. Refer \""},{"line_number":3876,"context_line":"                        \"to the \u0027nova.conf\u0027 documentation for \""},{"line_number":3877,"context_line":"                        \"\u0027[libvirt]/cpu_model_extra_flags\u0027\")"},{"line_number":3878,"context_line":""},{"line_number":3879,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3880,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_ce0a8a1e","line":3877,"in_reply_to":"bf659307_627a75ba","updated":"2018-04-03 13:02:04.000000000","message":"OK, I see the context. Make this is simple for the backport.\n\nIn which case, I think we are missing the addition of this line (along an update in the FIXME to eventually raise here):\n\n  extra_flags \u003d None","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ec7c478c97db7e6fcd0f41ce8111b99a8e8bdb4b","unresolved":false,"context_lines":[{"line_number":3874,"context_line":"            LOG.warning(\"Setting extra CPU flags is only valid in \""},{"line_number":3875,"context_line":"                        \"combination with a custom CPU model. Refer \""},{"line_number":3876,"context_line":"                        \"to the \u0027nova.conf\u0027 documentation for \""},{"line_number":3877,"context_line":"                        \"\u0027[libvirt]/cpu_model_extra_flags\u0027\")"},{"line_number":3878,"context_line":""},{"line_number":3879,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3880,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_eec98e25","line":3877,"in_reply_to":"bf659307_ce0a8a1e","updated":"2018-04-03 13:36:27.000000000","message":"Ah yep, good call.","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"338a81aff0ad52f4632f58866da95369398d0f62","unresolved":false,"context_lines":[{"line_number":3874,"context_line":"            LOG.warning(\"Setting extra CPU flags is only valid in \""},{"line_number":3875,"context_line":"                        \"combination with a custom CPU model. Refer \""},{"line_number":3876,"context_line":"                        \"to the \u0027nova.conf\u0027 documentation for \""},{"line_number":3877,"context_line":"                        \"\u0027[libvirt]/cpu_model_extra_flags\u0027\")"},{"line_number":3878,"context_line":""},{"line_number":3879,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3880,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","}],"source_content_type":"text/x-python","patch_set":22,"id":"bf659307_ce5b6af3","line":3877,"in_reply_to":"bf659307_ce0a8a1e","updated":"2018-04-03 15:49:38.000000000","message":"Yeah, it is is invalid to set `host-model` or `host-passthrough` with PCID.  (But when we lift the restriction on \u0027extra_flags\u0027 in a future patch, \u0027host-model\u0027 can take additional flags.)\n\nI\u0027ll add the \u0027extra_flags \u003d None\u0027, instead of us quietly logging it and carrying on (which does feel a bit dirty).","commit_id":"06b475d2a6ba7824f3bc7da447d9759dc94c3245"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42324d9973ad445802b928bb3bf1eb8efff2212c","unresolved":false,"context_lines":[{"line_number":3880,"context_line":"                        \"to the \u0027nova.conf\u0027 documentation for \""},{"line_number":3881,"context_line":"                        \"\u0027[libvirt]/cpu_model_extra_flags\u0027\")"},{"line_number":3882,"context_line":""},{"line_number":3883,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3884,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","},{"line_number":3885,"context_line":"                  {\u0027mode\u0027: mode,"},{"line_number":3886,"context_line":"                   \u0027model\u0027: (model or \"\"),"}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_9fdb2520","line":3883,"range":{"start_line":3883,"start_character":67,"end_line":3883,"end_character":68},"updated":"2018-04-05 13:46:29.000000000","message":"You need an extra space after this, otherwise you\u0027ll get \"chosen,with\"","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"a44252542b3918b3c0bd323ab950019b87030475","unresolved":false,"context_lines":[{"line_number":3880,"context_line":"                        \"to the \u0027nova.conf\u0027 documentation for \""},{"line_number":3881,"context_line":"                        \"\u0027[libvirt]/cpu_model_extra_flags\u0027\")"},{"line_number":3882,"context_line":""},{"line_number":3883,"context_line":"        LOG.debug(\"CPU mode \u0027%(mode)s\u0027 model \u0027%(model)s\u0027 was chosen,\""},{"line_number":3884,"context_line":"                  \"with extra flags: \u0027%(extra_flags)s\u0027\","},{"line_number":3885,"context_line":"                  {\u0027mode\u0027: mode,"},{"line_number":3886,"context_line":"                   \u0027model\u0027: (model or \"\"),"}],"source_content_type":"text/x-python","patch_set":23,"id":"bf659307_516821b9","line":3883,"range":{"start_line":3883,"start_character":67,"end_line":3883,"end_character":68},"in_reply_to":"bf659307_9fdb2520","updated":"2018-04-05 13:58:46.000000000","message":"Eagle eyes; it\u0027s a \"regression\", I fixed it earlier, and got sneaked in.  Will fix.","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"}],"releasenotes/notes/libvirt-cpu-model-extra-flags-a23085f58bd22d27.yaml":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b9184afa7ef171e919401d2fc570283031b2f009","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    Note that Nova supports three distinct CPU modes::"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    (1) ``cpu_mode \u003d \"host-model\"``: Nova defaults to using this,"},{"line_number":30,"context_line":"        when ``virt_type\u003dkvm|qemu`` is set in ``nova/conf``.  Using this"},{"line_number":31,"context_line":"        CPU mode will make Nova do the right thing w.r.t \u0027PCID\u0027 -- the"},{"line_number":32,"context_line":"        prerequisite for this is that you must have updated packages of"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"bf659307_49594d58","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":65},"updated":"2018-03-26 09:35:43.000000000","message":"I haven\u0027t seen this style before. Can\u0027t say if it\u0027s correct or not. You could write it like a definition list though, which would be clearer and definitely correct.\n\n    ``cpu_mode \u003d \"host-model\"``\n        Nova defaults to...","commit_id":"066cc823bde2cfe3916c5998eb0842cbfb4f586b"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"8009e02e4d050dbfcbbbe7f027415bc82dd33639","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    Note that Nova supports three distinct CPU modes::"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    (1) ``cpu_mode \u003d \"host-model\"``: Nova defaults to using this,"},{"line_number":30,"context_line":"        when ``virt_type\u003dkvm|qemu`` is set in ``nova/conf``.  Using this"},{"line_number":31,"context_line":"        CPU mode will make Nova do the right thing w.r.t \u0027PCID\u0027 -- the"},{"line_number":32,"context_line":"        prerequisite for this is that you must have updated packages of"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"bf659307_5b24b0c6","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":65},"in_reply_to":"bf659307_49594d58","updated":"2018-03-26 10:10:14.000000000","message":"Hmm.  I considered definition lists, but went with a variant of enumerated lists as it felt visuall clearer and aligns with the earlier line \"three distinct CPU modes\".\n\nI\u0027ll try the official syntax of enumerated lists.","commit_id":"066cc823bde2cfe3916c5998eb0842cbfb4f586b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b9184afa7ef171e919401d2fc570283031b2f009","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        configure an explicit, named CPU model.  It is important to note"},{"line_number":45,"context_line":"        that when using the ``custom`` CPU mode:"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"          - The only virtual (i.e libvirt / QEMU) CPU models that"},{"line_number":48,"context_line":"            include the PCID capability are Intel \"Haswell\","},{"line_number":49,"context_line":"            \"Broadwell\", and \"Skylake\" variants."},{"line_number":50,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"bf659307_897685d8","line":47,"updated":"2018-03-26 09:35:43.000000000","message":"This looks like it\u0027s indented. It shouldn\u0027t be","commit_id":"066cc823bde2cfe3916c5998eb0842cbfb4f586b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b9184afa7ef171e919401d2fc570283031b2f009","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    packages; followed by a cold reboot (i.e. explicit stop \u0026 start) of"},{"line_number":65,"context_line":"    all Nova instances."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    .. note:: The ``cpu_model_extra_flags`` config option in OpenStack"},{"line_number":68,"context_line":"    \"Queens\" and \"Pike\" releases will restrict the choice of CPU feature"},{"line_number":69,"context_line":"    flags to just \u0027PCID\u0027 -- to address the earlier mentioned performance"},{"line_number":70,"context_line":"    degradation.  However, the \"Rocky\" release will remove this"},{"line_number":71,"context_line":"    restriction, and allow multiple CPU feature flags to be specified."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"bf659307_c9455d72","line":68,"range":{"start_line":67,"start_character":0,"end_line":68,"end_character":72},"updated":"2018-03-26 09:35:43.000000000","message":"You need to either indent the second line here or write this like so:\n\n    .. note::\n\n        The ``cpu_model_extra_flags``...","commit_id":"066cc823bde2cfe3916c5998eb0842cbfb4f586b"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"8009e02e4d050dbfcbbbe7f027415bc82dd33639","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    packages; followed by a cold reboot (i.e. explicit stop \u0026 start) of"},{"line_number":65,"context_line":"    all Nova instances."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    .. note:: The ``cpu_model_extra_flags`` config option in OpenStack"},{"line_number":68,"context_line":"    \"Queens\" and \"Pike\" releases will restrict the choice of CPU feature"},{"line_number":69,"context_line":"    flags to just \u0027PCID\u0027 -- to address the earlier mentioned performance"},{"line_number":70,"context_line":"    degradation.  However, the \"Rocky\" release will remove this"},{"line_number":71,"context_line":"    restriction, and allow multiple CPU feature flags to be specified."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"bf659307_dba0c0a8","line":68,"range":{"start_line":67,"start_character":0,"end_line":68,"end_character":72},"in_reply_to":"bf659307_c9455d72","updated":"2018-03-26 10:10:14.000000000","message":"Ah, I keep forgetting that; fixing in next revision.\n\nI ran `reno lint .`, and thought it\u0027d catch such things.  I should probably file a StoryBoard issue for this, as catching it early will save Gate resources.","commit_id":"066cc823bde2cfe3916c5998eb0842cbfb4f586b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e0162d975f37bfdfdb78591d52e6b527cbfabf52","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    CPU feature flag \u0027PCID\u0027 (\"Processor-Context ID\") to the _guest_ CPU."},{"line_number":14,"context_line":"    (Assuming that \u0027PCID\u0027 is available in the physical hardware itself.)"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    The ``cpu_model_extra_flags`` makes sense only in combination with"},{"line_number":17,"context_line":"    the ``custom`` CPU mode and a named ``cpu_model`` (e.g. \"Westmere\","},{"line_number":18,"context_line":"    \"Ivybridge\", etc).  For example, the following is the way to specify"},{"line_number":19,"context_line":"    the \u0027PCID\u0027 CPU flag for the Intel \"IvyBridge\" virtual CPU model in"},{"line_number":20,"context_line":"    ``nova.conf``, under the ``[libvirt]`` section::"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"        [libvirt]"},{"line_number":23,"context_line":"        cpu_mode \u003d \"custom\""},{"line_number":24,"context_line":"        cpu_model \u003d \"IvyBridge\""},{"line_number":25,"context_line":"        cpu_model_extra_flags \u003d \"pcid\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    Note that Nova supports three distinct CPU modes:"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    1. ``cpu_mode \u003d \"host-model\"``: Nova defaults to using this, when"},{"line_number":30,"context_line":"       ``virt_type\u003dkvm|qemu`` is set in ``nova/conf``.  Using this CPU"},{"line_number":31,"context_line":"       mode will make Nova do the right thing w.r.t \u0027PCID\u0027 -- the"},{"line_number":32,"context_line":"       prerequisite for this is that you must have updated packages of"},{"line_number":33,"context_line":"       libvirt, QEMU, Linux kernel and \"microcode\" to get relevant"},{"line_number":34,"context_line":"       \"Meltdown\" fixes."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    2. ``cpu_mode \u003d \"host-passthrough\"``: When using this CPU mode, if"},{"line_number":37,"context_line":"       the \u0027PCID\u0027 feature flag is available in the hardware, it will be"},{"line_number":38,"context_line":"       passed through to the Nova guests.  You need updated \"microcode\","},{"line_number":39,"context_line":"       Linux kernel and QEMU updates; libvirt update is not mandatory"},{"line_number":40,"context_line":"       when using this CPU mode to expose \u0027PCID\u0027 for the guest."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    3. ``cpu_mode \u003d \"custom\"``: As the name implies, this is used to"},{"line_number":43,"context_line":"       configure an explicit, named CPU model.  It is important to note"},{"line_number":44,"context_line":"       that when using the ``custom`` CPU mode:"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"       - The only virtual (i.e libvirt / QEMU) CPU models that include"},{"line_number":47,"context_line":"         the PCID capability are Intel \"Haswell\", \"Broadwell\", and"},{"line_number":48,"context_line":"         \"Skylake\" variants."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"       - The libvirt / QEMU CPU models \"Nehalem\", \"Westmere\","},{"line_number":51,"context_line":"         \"SandyBridge\", and \"IvyBridge\" will **not** expose the \u0027PCID\u0027"},{"line_number":52,"context_line":"         capability by default, even if the host CPUs by the same name"},{"line_number":53,"context_line":"         include it.  I.e. \u0027PCID\u0027 needs to be explicitly specified when"},{"line_number":54,"context_line":"         using the said virtual CPU models."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"upgrade:"},{"line_number":57,"context_line":"  - |"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bf659307_29e2cf04","line":54,"range":{"start_line":16,"start_character":4,"end_line":54,"end_character":43},"updated":"2018-03-26 14:52:52.000000000","message":"IMHO, this is way too verbose for a minor reno. Since you\u0027ve got a lot of the detail in the conf option help, I would just say \"see cpu_model_extra_flags for more information instead of all of this. No need to go into the background and explain all the various cpu modes.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4cf3c4830843b47b562dd02b6eec62418e3ad2f0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    CPU feature flag \u0027PCID\u0027 (\"Processor-Context ID\") to the _guest_ CPU."},{"line_number":14,"context_line":"    (Assuming that \u0027PCID\u0027 is available in the physical hardware itself.)"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    The ``cpu_model_extra_flags`` makes sense only in combination with"},{"line_number":17,"context_line":"    the ``custom`` CPU mode and a named ``cpu_model`` (e.g. \"Westmere\","},{"line_number":18,"context_line":"    \"Ivybridge\", etc).  For example, the following is the way to specify"},{"line_number":19,"context_line":"    the \u0027PCID\u0027 CPU flag for the Intel \"IvyBridge\" virtual CPU model in"},{"line_number":20,"context_line":"    ``nova.conf``, under the ``[libvirt]`` section::"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"        [libvirt]"},{"line_number":23,"context_line":"        cpu_mode \u003d \"custom\""},{"line_number":24,"context_line":"        cpu_model \u003d \"IvyBridge\""},{"line_number":25,"context_line":"        cpu_model_extra_flags \u003d \"pcid\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    Note that Nova supports three distinct CPU modes:"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    1. ``cpu_mode \u003d \"host-model\"``: Nova defaults to using this, when"},{"line_number":30,"context_line":"       ``virt_type\u003dkvm|qemu`` is set in ``nova/conf``.  Using this CPU"},{"line_number":31,"context_line":"       mode will make Nova do the right thing w.r.t \u0027PCID\u0027 -- the"},{"line_number":32,"context_line":"       prerequisite for this is that you must have updated packages of"},{"line_number":33,"context_line":"       libvirt, QEMU, Linux kernel and \"microcode\" to get relevant"},{"line_number":34,"context_line":"       \"Meltdown\" fixes."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    2. ``cpu_mode \u003d \"host-passthrough\"``: When using this CPU mode, if"},{"line_number":37,"context_line":"       the \u0027PCID\u0027 feature flag is available in the hardware, it will be"},{"line_number":38,"context_line":"       passed through to the Nova guests.  You need updated \"microcode\","},{"line_number":39,"context_line":"       Linux kernel and QEMU updates; libvirt update is not mandatory"},{"line_number":40,"context_line":"       when using this CPU mode to expose \u0027PCID\u0027 for the guest."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    3. ``cpu_mode \u003d \"custom\"``: As the name implies, this is used to"},{"line_number":43,"context_line":"       configure an explicit, named CPU model.  It is important to note"},{"line_number":44,"context_line":"       that when using the ``custom`` CPU mode:"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"       - The only virtual (i.e libvirt / QEMU) CPU models that include"},{"line_number":47,"context_line":"         the PCID capability are Intel \"Haswell\", \"Broadwell\", and"},{"line_number":48,"context_line":"         \"Skylake\" variants."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"       - The libvirt / QEMU CPU models \"Nehalem\", \"Westmere\","},{"line_number":51,"context_line":"         \"SandyBridge\", and \"IvyBridge\" will **not** expose the \u0027PCID\u0027"},{"line_number":52,"context_line":"         capability by default, even if the host CPUs by the same name"},{"line_number":53,"context_line":"         include it.  I.e. \u0027PCID\u0027 needs to be explicitly specified when"},{"line_number":54,"context_line":"         using the said virtual CPU models."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"upgrade:"},{"line_number":57,"context_line":"  - |"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bf659307_691f676c","line":54,"range":{"start_line":16,"start_character":4,"end_line":54,"end_character":43},"in_reply_to":"bf659307_29e2cf04","updated":"2018-03-26 15:27:24.000000000","message":"I was aware that this is a bit long for a minor feature.  Can snip it, and write a blog post.\n\nIf you read closely, the above three points are not merely describing the CPU modes, it\u0027s talking about what would Openrators do in *each* of the CPU modes.\n\nThe *reason* why I wrote that is I\u0027ve lost count of people asking about it on Virt IRC channels and mailing lists.  (\"Well, what should I do if I\u0027m using \u0027host-model\u0027, or \u0027host-passthrough\u0027?)","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e0162d975f37bfdfdb78591d52e6b527cbfabf52","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"upgrade:"},{"line_number":57,"context_line":"  - |"},{"line_number":58,"context_line":"    To make correct use of the newly introduced Nova configuration"},{"line_number":59,"context_line":"    attribute ``cpu_model_extra_flags``, Operators first have to apply"},{"line_number":60,"context_line":"    all the relevant \"Meltdown\" CVE fixes for various low-level"},{"line_number":61,"context_line":"    components on all relevant Compute nodes.  This includes updating"},{"line_number":62,"context_line":"    \"microcode\", Linux kernel on the host \u0026 guest, libvirt, and QEMU"},{"line_number":63,"context_line":"    packages; followed by a cold reboot (i.e. explicit stop \u0026 start) of"},{"line_number":64,"context_line":"    all Nova instances."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    .. note::"},{"line_number":67,"context_line":"        The ``cpu_model_extra_flags`` config option in OpenStack"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bf659307_29896f22","line":64,"range":{"start_line":58,"start_character":0,"end_line":64,"end_character":23},"updated":"2018-03-26 14:52:52.000000000","message":"This isn\u0027t really what the upgrade section is for, IMHO. This isn\u0027t really a nova upgrade issue they need to handle, and thus is probably not something we need to call out in detail here.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4cf3c4830843b47b562dd02b6eec62418e3ad2f0","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"upgrade:"},{"line_number":57,"context_line":"  - |"},{"line_number":58,"context_line":"    To make correct use of the newly introduced Nova configuration"},{"line_number":59,"context_line":"    attribute ``cpu_model_extra_flags``, Operators first have to apply"},{"line_number":60,"context_line":"    all the relevant \"Meltdown\" CVE fixes for various low-level"},{"line_number":61,"context_line":"    components on all relevant Compute nodes.  This includes updating"},{"line_number":62,"context_line":"    \"microcode\", Linux kernel on the host \u0026 guest, libvirt, and QEMU"},{"line_number":63,"context_line":"    packages; followed by a cold reboot (i.e. explicit stop \u0026 start) of"},{"line_number":64,"context_line":"    all Nova instances."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    .. note::"},{"line_number":67,"context_line":"        The ``cpu_model_extra_flags`` config option in OpenStack"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bf659307_6c045516","line":64,"range":{"start_line":58,"start_character":0,"end_line":64,"end_character":23},"in_reply_to":"bf659307_29896f22","updated":"2018-03-26 15:27:24.000000000","message":"True; can remove it.  This too, I wrote with the knowledge that this maybe not be the best place, as it\u0027s not strictly Nova upgrade problem, but I put it here for feedback.\n\n(But it is a prerequisite; I\u0027ll look about where this should go.)","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e0162d975f37bfdfdb78591d52e6b527cbfabf52","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    all Nova instances."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    .. note::"},{"line_number":67,"context_line":"        The ``cpu_model_extra_flags`` config option in OpenStack"},{"line_number":68,"context_line":"        \"Queens\" and \"Pike\" releases will restrict the choice of CPU"},{"line_number":69,"context_line":"        feature flags to just \u0027PCID\u0027 -- to address the earlier mentioned"},{"line_number":70,"context_line":"        performance degradation.  However, the \"Rocky\" release will"},{"line_number":71,"context_line":"        remove this restriction, and allow adding (or removing) multiple"},{"line_number":72,"context_line":"        CPU feature flags."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bf659307_49a143a9","line":72,"range":{"start_line":67,"start_character":8,"end_line":72,"end_character":26},"updated":"2018-03-26 14:52:52.000000000","message":"This is true for the master one as well. IMHO, this can be a single short sentence of \"pcid is the only valid value for this field currently\", and maybe even in the conf option instead of here.","commit_id":"63d78479a9274d75f12ce7c8c15c8f92b4b9c261"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5493f0b9f686ec4677e4f2160f1e910e1d7acfe6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"    Assuming that \u0027PCID\u0027 is available in the physical hardware itself."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model`` -- with this, Nova\u0027s libvirt driver will do"},{"line_number":20,"context_line":"    the right thing w.r.t exposing the \u0027PCID\u0027 for the guest CPU models."},{"line_number":21,"context_line":"    The other mode is ``host-passthrough`` -- when using this, if \u0027PCID\u0027"},{"line_number":22,"context_line":"    is available in the hardware, it will be directly passed through to"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"bf659307_f597a88f","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":27},"updated":"2018-03-27 13:25:43.000000000","message":"maybe \u0027The default ``host-model``\u0027, When there is \u0027,\u0027 between default and host-model, I thought the default and host-model are two values.","commit_id":"6e0d6ec262b13778ba709305b74367f409d5d568"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"1c76ab931f579738b81c44dac38c965ee0875ebe","unresolved":false,"context_lines":[{"line_number":16,"context_line":"    Assuming that \u0027PCID\u0027 is available in the physical hardware itself."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model`` -- with this, Nova\u0027s libvirt driver will do"},{"line_number":20,"context_line":"    the right thing w.r.t exposing the \u0027PCID\u0027 for the guest CPU models."},{"line_number":21,"context_line":"    The other mode is ``host-passthrough`` -- when using this, if \u0027PCID\u0027"},{"line_number":22,"context_line":"    is available in the hardware, it will be directly passed through to"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"bf659307_1879332e","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":27},"in_reply_to":"bf659307_f597a88f","updated":"2018-03-27 14:15:23.000000000","message":"I see what you mean.  But speaking of grammar, the following construction is valid:\n\n  \"The default, Foo, does the right thing.\"\n\n(The sentence conveys the meaning without the \",Foo,\" -- which is the same as putting it in brackets :-))","commit_id":"6e0d6ec262b13778ba709305b74367f409d5d568"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c402a47ab1066b5d4c64b10ff16b44791e49ae36","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    CPU feature flag \u0027PCID\u0027 (\"Processor-Context ID\") to the *guest* CPU."},{"line_number":16,"context_line":"    Assuming that \u0027PCID\u0027 is available in the physical hardware itself."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest.  The other mode,"},{"line_number":21,"context_line":"    ``host-passthrough``, checks if \u0027PCID\u0027 is available in the hardware,"},{"line_number":22,"context_line":"    and if so directly passes it through to the Nova guests.  Thus, with"},{"line_number":23,"context_line":"    either CPU mode, there is no need to use the new"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"bf659307_cc29bd9b","line":20,"range":{"start_line":18,"start_character":68,"end_line":20,"end_character":46},"updated":"2018-03-27 16:28:51.000000000","message":"I think it\u0027s valid to specify that \"doing the right thing\" is dependent on updated libvirt/qemu/kernel/microcode, so you might still want to specify the extra flag in conjunction with the host-model.","commit_id":"c6eacef0166c7520ce6ffdd0e68c7d16be8968db"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"f56ba7f22b248cac625999f934e6dfc26636cce0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    CPU feature flag \u0027PCID\u0027 (\"Processor-Context ID\") to the *guest* CPU."},{"line_number":16,"context_line":"    Assuming that \u0027PCID\u0027 is available in the physical hardware itself."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest.  The other mode,"},{"line_number":21,"context_line":"    ``host-passthrough``, checks if \u0027PCID\u0027 is available in the hardware,"},{"line_number":22,"context_line":"    and if so directly passes it through to the Nova guests.  Thus, with"},{"line_number":23,"context_line":"    either CPU mode, there is no need to use the new"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"bf659307_6f174053","line":20,"range":{"start_line":18,"start_character":68,"end_line":20,"end_character":46},"in_reply_to":"bf659307_cc29bd9b","updated":"2018-03-27 18:03:56.000000000","message":"Damn, I actually did that in an earlier version:\n\nhttps://review.openstack.org/#/c/534384/14/releasenotes/notes/libvirt-cpu-model-extra-flags-a23085f58bd22d27.yaml\n\nBut forgot to add it back while trimming it down, will clarify that, as that\u0027s important. (Although, for the careful reader there is a hint in the earlier paragraph: \"caused as a result of applying the \"Meltdown\" CVE fixes\".)\n\nI\u0027ll quickly reword it.","commit_id":"c6eacef0166c7520ce6ffdd0e68c7d16be8968db"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The libvirt driver now allows specifying individual CPU feature"},{"line_number":5,"context_line":"    flags for guests, via a new configuration attribute"},{"line_number":6,"context_line":"    ``cpu_model_extra_flags`` -- only when used in combination with a"},{"line_number":7,"context_line":"    ``custom`` CPU model.  Currently the choice is restricted to just"},{"line_number":8,"context_line":"    one flag (this restriction will be removed in a future release)."},{"line_number":9,"context_line":"    Refer to the ``nova.conf`` documentation for usage details."}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_d5111dae","line":6,"range":{"start_line":6,"start_character":6,"end_line":6,"end_character":27},"updated":"2018-03-28 14:45:19.000000000","message":"``[libvirt]/cpu_model_extra_flags`` right?","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"b3677339c475c9dfbaf5568fe2adf79098734e08","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The libvirt driver now allows specifying individual CPU feature"},{"line_number":5,"context_line":"    flags for guests, via a new configuration attribute"},{"line_number":6,"context_line":"    ``cpu_model_extra_flags`` -- only when used in combination with a"},{"line_number":7,"context_line":"    ``custom`` CPU model.  Currently the choice is restricted to just"},{"line_number":8,"context_line":"    one flag (this restriction will be removed in a future release)."},{"line_number":9,"context_line":"    Refer to the ``nova.conf`` documentation for usage details."}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_a399bac4","line":6,"range":{"start_line":6,"start_character":6,"end_line":6,"end_character":27},"in_reply_to":"bf659307_d5111dae","updated":"2018-03-29 12:08:49.000000000","message":"Yes.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The libvirt driver now allows specifying individual CPU feature"},{"line_number":5,"context_line":"    flags for guests, via a new configuration attribute"},{"line_number":6,"context_line":"    ``cpu_model_extra_flags`` -- only when used in combination with a"},{"line_number":7,"context_line":"    ``custom`` CPU model.  Currently the choice is restricted to just"},{"line_number":8,"context_line":"    one flag (this restriction will be removed in a future release)."},{"line_number":9,"context_line":"    Refer to the ``nova.conf`` documentation for usage details."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_b58349cc","line":7,"range":{"start_line":7,"start_character":15,"end_line":7,"end_character":24},"updated":"2018-03-28 14:45:19.000000000","message":"``[libvirt]/cpu_model`` for clarity.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The libvirt driver now allows specifying individual CPU feature"},{"line_number":5,"context_line":"    flags for guests, via a new configuration attribute"},{"line_number":6,"context_line":"    ``cpu_model_extra_flags`` -- only when used in combination with a"},{"line_number":7,"context_line":"    ``custom`` CPU model.  Currently the choice is restricted to just"},{"line_number":8,"context_line":"    one flag (this restriction will be removed in a future release)."},{"line_number":9,"context_line":"    Refer to the ``nova.conf`` documentation for usage details."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    One of the motivations for this is to alleviate the performance"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_b55ca97e","line":8,"range":{"start_line":7,"start_character":27,"end_line":8,"end_character":68},"updated":"2018-03-28 14:45:19.000000000","message":"This is going to be confusing to read in the release notes when you change this to be open-ended in rocky. It makes sense for a stable branch backport, but not master when it changes. I would just remove this from the release note and make sure the restrictions, per branch, are clear in the config option help text itself.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"b3677339c475c9dfbaf5568fe2adf79098734e08","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The libvirt driver now allows specifying individual CPU feature"},{"line_number":5,"context_line":"    flags for guests, via a new configuration attribute"},{"line_number":6,"context_line":"    ``cpu_model_extra_flags`` -- only when used in combination with a"},{"line_number":7,"context_line":"    ``custom`` CPU model.  Currently the choice is restricted to just"},{"line_number":8,"context_line":"    one flag (this restriction will be removed in a future release)."},{"line_number":9,"context_line":"    Refer to the ``nova.conf`` documentation for usage details."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    One of the motivations for this is to alleviate the performance"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_e30c92ed","line":8,"range":{"start_line":7,"start_character":27,"end_line":8,"end_character":68},"in_reply_to":"bf659307_b55ca97e","updated":"2018-03-29 12:08:49.000000000","message":"Yeah, I was wondering how to deal with that.  Your suggestion of clarifying it in the config file help text per-branch is much cleaner.  I\u0027ll do that.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    CPU feature flag \u0027PCID\u0027 (\"Processor-Context ID\") to the *guest* CPU,"},{"line_number":16,"context_line":"    assuming that it is available in the physical hardware itself."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest -- *assuming* you are"},{"line_number":21,"context_line":"    running updated processor microcode, host \u0026 guest kernel, libvirt,"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_b5ea6972","line":18,"range":{"start_line":18,"start_character":34,"end_line":18,"end_character":38},"updated":"2018-03-28 14:45:19.000000000","message":"The libvirt driver (cpu_mode is libvirt-specific).","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    CPU feature flag \u0027PCID\u0027 (\"Processor-Context ID\") to the *guest* CPU,"},{"line_number":16,"context_line":"    assuming that it is available in the physical hardware itself."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest -- *assuming* you are"},{"line_number":21,"context_line":"    running updated processor microcode, host \u0026 guest kernel, libvirt,"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_7504d14a","line":18,"range":{"start_line":18,"start_character":43,"end_line":18,"end_character":56},"updated":"2018-03-28 14:45:19.000000000","message":"two other","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"    assuming that it is available in the physical hardware itself."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest -- *assuming* you are"},{"line_number":21,"context_line":"    running updated processor microcode, host \u0026 guest kernel, libvirt,"},{"line_number":22,"context_line":"    and QEMU.  The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_1599d51d","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":11},"updated":"2018-03-28 14:45:19.000000000","message":"host-model is only the default for virt_type kvm or qemu, but the libvirt driver supports other virt types. One could argue that the default virt_type is kvm therefore the default cpu_mode is \u0027host-model\u0027, but anyway. I guess this is fine in that respect.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"b3677339c475c9dfbaf5568fe2adf79098734e08","unresolved":false,"context_lines":[{"line_number":16,"context_line":"    assuming that it is available in the physical hardware itself."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest -- *assuming* you are"},{"line_number":21,"context_line":"    running updated processor microcode, host \u0026 guest kernel, libvirt,"},{"line_number":22,"context_line":"    and QEMU.  The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_23628aaf","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":11},"in_reply_to":"bf659307_1599d51d","updated":"2018-03-29 12:08:49.000000000","message":"Yeah, I wrote it with that in mind, that the default \u0027virt_type\u0027 is KVM.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest -- *assuming* you are"},{"line_number":21,"context_line":"    running updated processor microcode, host \u0026 guest kernel, libvirt,"},{"line_number":22,"context_line":"    and QEMU.  The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is"},{"line_number":23,"context_line":"    available in the hardware, and if so directly passes it through to"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_95ade532","line":20,"range":{"start_line":20,"start_character":10,"end_line":20,"end_character":15},"updated":"2018-03-28 14:45:19.000000000","message":"expand this for non-English speakers","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"b3677339c475c9dfbaf5568fe2adf79098734e08","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest -- *assuming* you are"},{"line_number":21,"context_line":"    running updated processor microcode, host \u0026 guest kernel, libvirt,"},{"line_number":22,"context_line":"    and QEMU.  The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is"},{"line_number":23,"context_line":"    available in the hardware, and if so directly passes it through to"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_43677ebe","line":20,"range":{"start_line":20,"start_character":10,"end_line":20,"end_character":15},"in_reply_to":"bf659307_95ade532","updated":"2018-03-29 12:08:49.000000000","message":"Will do.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404bad91d7250df97f78936c9bcf0f345501f5c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest -- *assuming* you are"},{"line_number":21,"context_line":"    running updated processor microcode, host \u0026 guest kernel, libvirt,"},{"line_number":22,"context_line":"    and QEMU.  The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is"},{"line_number":23,"context_line":"    available in the hardware, and if so directly passes it through to"},{"line_number":24,"context_line":"    the Nova guests.  Thus, in context of \u0027PCID\u0027, with either CPU mode,"},{"line_number":25,"context_line":"    there is no need to use the new ``cpu_mode_extra_flags``."}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_d5491d8b","line":22,"range":{"start_line":21,"start_character":62,"end_line":22,"end_character":13},"updated":"2018-03-28 14:45:19.000000000","message":"Are there specific known minimum versions of libvirt/qemu that are needed for this to just do the right thing?","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"b3677339c475c9dfbaf5568fe2adf79098734e08","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    Note that besides ``custom``, Nova has two other two CPU modes: The"},{"line_number":19,"context_line":"    default, ``host-model``, tells Nova\u0027s libvirt driver to do the right"},{"line_number":20,"context_line":"    thing w.r.t handling \u0027PCID\u0027 for the guest -- *assuming* you are"},{"line_number":21,"context_line":"    running updated processor microcode, host \u0026 guest kernel, libvirt,"},{"line_number":22,"context_line":"    and QEMU.  The other mode, ``host-passthrough``, checks if \u0027PCID\u0027 is"},{"line_number":23,"context_line":"    available in the hardware, and if so directly passes it through to"},{"line_number":24,"context_line":"    the Nova guests.  Thus, in context of \u0027PCID\u0027, with either CPU mode,"},{"line_number":25,"context_line":"    there is no need to use the new ``cpu_mode_extra_flags``."}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bf659307_e3e7b2ab","line":22,"range":{"start_line":21,"start_character":62,"end_line":22,"end_character":13},"in_reply_to":"bf659307_d5491d8b","updated":"2018-03-29 12:08:49.000000000","message":"tl;dr: Using the versions is not an effective way, as you need the \nmicrocode, guest \u0026 host kernel updates for the libvirt / QEMU versions\nto have any effect.  \n\nI also double-checked with a libvirt dev who worked on the CPU models,\nand the answer is incredibly messy (because this whole \"Metldown /\nSpectre\" saga is an exceptional situation).  We can\u0027t just do the \"right \nthing\", without the processor microcode and host / guest kernels in\nplace.  But we can check at _runtime_ (but even that is messy):\n\n(a) We can use the libvirt\u0027s getDomainCapabilities() API, which tells us\n    the QEMU binary capabilities, to check whether \"*-IBRS\" CPU models\n    (which are the \"fixed variants\") are present with usable\u003d\u0027yes\u0027.\n    I.e.  check for this: \u003cmodel usable\u003d\u0027yes\u0027\u003eHaswell-IBRS\u003c/model\u003e\n\n(b) Or check if \"\u003cmodel fallback\u003d\u0027forbid\u0027\u003e-*IBRS\u003c/model\u003e\" exists\n    in the \u0027host-model\u0027 CPU section of getDomainCapabilities() output.\n\nAlthough both the above ways might not detect if we have a \"fixed stack\"\nif you\u0027re running some old versions of QEMU which got the backports \n(since they may not be able to tell us what is needed to provide\nthe data in getDomainCapabilities()).\n\nSo if it\u0027s in the getDomainCapbilities() output, you can use it, \notherwise it\u0027s more of aa trial-and-error.","commit_id":"3b3b0c435afac594cedda5cccf60270a9150faab"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42324d9973ad445802b928bb3bf1eb8efff2212c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    CPU modes: ``host-model`` (which is the default), and"},{"line_number":19,"context_line":"    ``host-passthrough``.  Refer to the"},{"line_number":20,"context_line":"    ``[libvirt]/cpu_model_extra_flags`` documentation for what to do"},{"line_number":21,"context_line":"    when you\u0027re using either of those CPU modes in context of \u0027PCID\u0027."}],"source_content_type":"text/x-yaml","patch_set":23,"id":"bf659307_7fa2d14d","line":21,"range":{"start_line":21,"start_character":9,"end_line":21,"end_character":15},"updated":"2018-04-05 13:46:29.000000000","message":"I think Matt previously asked you to expand contractions in any docs, and I agree. Not a huge deal and \"you\u0027re\" is not the most obscure, but I think it\u0027s a good idea to expand them if and when we can.","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"a44252542b3918b3c0bd323ab950019b87030475","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    CPU modes: ``host-model`` (which is the default), and"},{"line_number":19,"context_line":"    ``host-passthrough``.  Refer to the"},{"line_number":20,"context_line":"    ``[libvirt]/cpu_model_extra_flags`` documentation for what to do"},{"line_number":21,"context_line":"    when you\u0027re using either of those CPU modes in context of \u0027PCID\u0027."}],"source_content_type":"text/x-yaml","patch_set":23,"id":"bf659307_f1029509","line":21,"range":{"start_line":21,"start_character":9,"end_line":21,"end_character":15},"in_reply_to":"bf659307_7fa2d14d","updated":"2018-04-05 13:58:46.000000000","message":"Yep; interesting you point out.  I am conscious of this and catch myself using contractions and fix it.  Sometimes I miss out.","commit_id":"de49f83cf85516ffbc351b09073d6936a02f1973"}]}
