Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vmm: add explicit PCI BDF support for Rng device - #8163

Merged
rbradford merged 1 commit into
cloud-hypervisor:mainfrom
phip1611:upstream-bdf-rng
May 8, 2026
Merged

rbradford merged 1 commit into
cloud-hypervisor:mainfrom
phip1611:upstream-bdf-rng

Conversation

@phip1611

@phip1611 phip1611 commented May 7, 2026

Copy link
Copy Markdown
Member

This was missing in [0] but is required for proper explicit PCI BDF management, e.g., when a VM is created via libvirt and each device has an explicit BDF. Also important for live migration.

Without this, the BDF could change after a live migration, due to implicit BDF allocation! Further, management software wants full control over PCI BDFs.

[0] #7965

@phip1611 phip1611 self-assigned this May 7, 2026
@phip1611
phip1611 requested a review from a team as a code owner May 7, 2026 13:56
@phip1611 phip1611 changed the title vmm: add PCI BDF support for Rng device vmm: add explicit PCI BDF support for Rng device May 7, 2026
@phip1611
phip1611 marked this pull request as draft May 7, 2026 13:57
@phip1611
phip1611 force-pushed the upstream-bdf-rng branch from b552b65 to b8715d8 Compare May 7, 2026 14:16
Comment thread vmm/src/config.rs Outdated
@@ -1750,23 +1750,25 @@ impl NetConfig {
}

impl RngConfig {
pub const SYNTAX: &'static str =
"Random number generator parameters \"src=<path:/dev/urandom>,pci_device_id=<pci_slot>\"";

@phip1611 phip1611 May 7, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open question. should I advertise pci_segment here or not? Technically it is supported by the parsing logic but I am not sure if it would work.

We (@cyberus-technology) do not need support for this. We just need pci_device_id

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would hook the segment up.

@phip1611 phip1611 May 8, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

image

@phip1611
phip1611 force-pushed the upstream-bdf-rng branch 2 times, most recently from 2a0c74a to c97e82e Compare May 7, 2026 14:34
@phip1611
phip1611 marked this pull request as ready for review May 7, 2026 14:38
@phip1611
phip1611 force-pushed the upstream-bdf-rng branch from c97e82e to 43ad8dc Compare May 7, 2026 14:42
@phip1611
phip1611 force-pushed the upstream-bdf-rng branch from 43ad8dc to 4f1f26b Compare May 7, 2026 17:22
@phip1611

phip1611 commented May 7, 2026

Copy link
Copy Markdown
Member Author

@rbradford it would be lovely if we can get this merged before the upcoming v52 release. I think it is fairly uncontroversial and a nice fix/feature

@rbradford rbradford left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, We can definitely land this soon.

Comment thread vmm/src/device_manager.rs Outdated
Comment thread vmm/src/config.rs Outdated
}

impl RngConfig {
// We ignore `id` and `pci_segment` as we use hard-coded internal defaults for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment still accurate?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes, will remove it. Thank!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ready to merge!

@rbradford

Copy link
Copy Markdown
Member

Sorry @phip1611 i'd missed you'd updated this PR today. I wonder if GH is having notification issues.

@phip1611
phip1611 force-pushed the upstream-bdf-rng branch from 58d5714 to 48e975d Compare May 8, 2026 18:52
This was missing in [0] but is required for proper explicit PCI BDF
management, e.g., when a VM is created via libvirt and each device has
an explicit BDF.

[0] cloud-hypervisor#7965

On-behalf-of: SAP [email protected]
Signed-off-by: Philipp Schuster <[email protected]>
@phip1611
phip1611 force-pushed the upstream-bdf-rng branch from 48e975d to c6cee78 Compare May 8, 2026 18:52
@rbradford
rbradford added this pull request to the merge queue May 8, 2026
Merged via the queue into cloud-hypervisor:main with commit bad10f3 May 8, 2026
41 checks passed
@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Done in Cloud Hypervisor Roadmap May 14, 2026
@phip1611
phip1611 deleted the upstream-bdf-rng branch May 21, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants