Skip to content

Conversation

@likebreath
Copy link
Member

A BAR reprogramming of a PCI device will only happen when the (guest)
kernel write to its PCI config space, e.g. the detection of bar
reprogramming (detect_bar_repgraomming()) can be embedded to the PCI
config space write (write_config_register()). It simplifies APIs
exposed by the struct PciConfiguration and trait PciDevice. It also
prepares for easier handling of pending bar reprogramming when the MSE
bit of the COMMAND register is not enabled at the time of changing BAR
registers.

See: #7027 (comment)

A BAR reprogramming of a PCI device will only happen when the (guest)
kernel write to its PCI config space, e.g. the detection of bar
reprogramming (`detect_bar_repgraomming()`) can be embedded to the PCI
config space write (`write_config_register()`). It simplifies APIs
exposed by the `struct PciConfiguration` and `trait PciDevice`. It also
prepares for easier handling of pending bar reprogramming when the MSE
bit of the COMMAND register is not enabled at the time of changing BAR
registers.

See: cloud-hypervisor#7027 (comment)

Signed-off-by: Bo Chen <[email protected]>
Use the right bar index and bar address maintained internally by the
VMM when logging BAR reprogramming.

Signed-off-by: Bo Chen <[email protected]>
@likebreath likebreath force-pushed the 0509/refactor_detect_bar_reprog branch from f808864 to c1d1349 Compare May 14, 2025 16:42
@likebreath
Copy link
Member Author

@rbradford Can you please take a look at this one?

While we are working on a better solution to #7063, we can land this one first which is a pre-requisite anyway.

@likebreath likebreath added this pull request to the merge queue May 15, 2025
Merged via the queue into cloud-hypervisor:main with commit 59f98a2 May 15, 2025
38 of 39 checks passed
@likebreath likebreath deleted the 0509/refactor_detect_bar_reprog branch July 16, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants