Skip to content

CP-308875: set Xen PCI MMIO BAR to WB #6591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ocaml/xenopsd/lib/xenopsd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ let default_vbd_backend_kind = ref "vbd"

let ca_140252_workaround = ref false

let xen_platform_pci_bar_uc = ref true
(* Optimize performance: set MTRR WB attribute on Xen PCI MMIO BAR.
This is useful for AMD, and mostly a noop on Intel (which achieves a similar
effect using Intel-only features in Xen)
Comment on lines +53 to +54
Copy link
Collaborator

Choose a reason for hiding this comment

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

The part in brackets is going to go stale quickly. In order to support encrypted memory (and later, encrypted VMs), we're going to have to stop using iPAT on Intel, at which point Intel will become like AMD and this control will be relevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, so doing this uniformly now on both Intel and AMD actually future proofs us against that. You can then change the Intel side from iPAT in Xen without further toolstack changes?

Copy link
Collaborator

Choose a reason for hiding this comment

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

correct


Turning on WB is done by disabling UC:
UnCached=false -> WriteBack=true
*)
let xen_platform_pci_bar_uc = ref false

let action_after_qemu_crash = ref None

Expand Down
4 changes: 3 additions & 1 deletion ocaml/xenopsd/xenopsd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,6 @@ disable-logging-for=http tracing tracing_export
# by grant tables is mapped as Uncached (UC, the default) or WriteBack
# (WB, the workaround). WB mapping could improve performance of devices
# using grant tables. This is useful on AMD platform only.
# xen-platform-pci-bar-uc=true
# On Intel a similar effect is already achieved with iPAT in Xen,
# but setting this to 0 works on Intel too.
# xen-platform-pci-bar-uc=false
Loading