From: Luis Chamberlain <mcgrof@kernel.org>
To: kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 2/5] guestfs_q35: use hex for pci addr
Date: Wed, 6 Mar 2024 16:14:23 -0800 [thread overview]
Message-ID: <20240307001426.565390-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20240307001426.565390-1-mcgrof@kernel.org>
Since we are prepending as a hex value ensure the input is converted
as such. This creates no functional changes but if we later want to
increase the drives beyond 9 then this will ensure we use the address
space appropriately. This will become more important later when we
add support for large-io experimentation to guestfs which does add
tons of drives onto a guest, enough to be able to experiment with
LBS support on different types of drives all in one system.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml b/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
index 86b26346..ee340aca 100644
--- a/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
+++ b/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
@@ -187,7 +187,7 @@
{% elif libvirt_extra_storage_drive_virtio %}
{% for n in range(0,4) %}
<qemu:arg value='-device'/>
- <qemu:arg value='pcie-root-port,id=pcie-port-for-virtio-{{ n }},multifunction=on,bus=pcie.1,addr=0x{{ n }},chassis=5{{ n }}'/>
+ <qemu:arg value='pcie-root-port,id=pcie-port-for-virtio-{{ n }},multifunction=on,bus=pcie.1,addr=0x{{ "%0x" | format( n | int) }},chassis=5{{ n }}'/>
<qemu:arg value="-object"/>
<qemu:arg value="iothread,id=kdevops-virtio-iothread-{{ n }}"/>
<qemu:arg value="-drive"/>
@@ -198,7 +198,7 @@
{% elif libvirt_extra_storage_drive_nvme %}
{% for n in range(0,4) %}
<qemu:arg value='-device'/>
- <qemu:arg value='pcie-root-port,id=pcie-port-for-nvme-{{ n }},multifunction=on,bus=pcie.1,addr=0x{{ n }},chassis=5{{ n }}'/>
+ <qemu:arg value='pcie-root-port,id=pcie-port-for-nvme-{{ n }},multifunction=on,bus=pcie.1,addr=0x{{ "%0x" | format( n | int) }},chassis=5{{ n }}'/>
<qemu:arg value='-drive'/>
<qemu:arg value='file={{ kdevops_storage_pool_path }}/guestfs/{{ hostname }}/extra{{ n }}.{{ libvirt_extra_drive_format }},format={{ libvirt_extra_drive_format }},if=none,id=drv{{ n }}'/>
<qemu:arg value='-device'/>
--
2.43.0
next prev parent reply other threads:[~2024-03-07 0:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 0:14 [PATCH 0/5] guestfs: start moving guest data to macros Luis Chamberlain
2024-03-07 0:14 ` [PATCH 1/5] bringup_guestfs.sh: use bash as the default shell Luis Chamberlain
2024-03-07 0:14 ` Luis Chamberlain [this message]
2024-03-07 0:14 ` [PATCH 3/5] guestfs_q35: use libvirt_extra_storage_nvme_logical_block_size Luis Chamberlain
2024-03-07 0:14 ` [PATCH 4/5] gen_nodes: move drive generation for guestfs to macros Luis Chamberlain
2024-03-07 0:14 ` [PATCH 5/5] guestfs: add large IO support Luis Chamberlain
2024-03-07 18:43 ` [PATCH 0/5] guestfs: start moving guest data to macros Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240307001426.565390-3-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox