-
Notifications
You must be signed in to change notification settings - Fork 292
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
CP-308875: set Xen PCI MMIO BAR to WB #6591
Conversation
09fd590
to
b494899
Compare
I'll rebase this on #6566 (comment) once that is in and change the defaults there. |
0be2cd6
to
7c15ef6
Compare
Rebased on the other PR by tweaking the newly introduced xenopsd.conf default, thanks for pointing it out. |
The default for the Xen PCI MMIO BAR is UnCachable. Setting this to WriteBack in the MTRR shows a massive performance improvement on AMD, at least for Linux guests. On Intel this is already set to WriteBack by Xen via another mechanism. To be effective this also requires the corresponding [Xen commit](https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=22650d6054625be10172fe0c78b9cadd1a39bd63), old versions will just ignore this xenstore key. The optimization is not enabled by default in Xen due to the wide range of guests it supports, but XAPI supports a much narrower set of guest OSes. Setting the cache attribute to WB is done by setting UC=false. Signed-off-by: Edwin Török <[email protected]>
7c15ef6
to
37a42e0
Compare
This is useful for AMD, and mostly a noop on Intel (which achieves a similar | ||
effect using Intel-only features in Xen) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
The default for the Xen PCI MMIO BAR is UnCachable. Setting this to WriteBack in the MTRR shows a massive performance improvement on AMD, at least for Linux guests.
On Intel this is already set to WriteBack by Xen via another mechanism.
To be effective this also requires the corresponding Xen commit, old versions will just ignore this xenstore key.
The optimization is not enabled by default in Xen due to the wide range of guests it supports, but XAPI supports a much narrower set of guest OSes.
Setting the cache attribute to WB is done by setting UC=0.