Page MenuHomeFreeBSD

fix-up for configuration of AMD Family 10h processors borrowed from Linux
ClosedPublic

Authored by avg on Apr 22 2016, 1:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 10:03 AM
Unknown Object (File)
Oct 7 2024, 7:40 AM
Unknown Object (File)
Oct 6 2024, 10:28 PM
Unknown Object (File)
Oct 4 2024, 4:57 PM
Unknown Object (File)
Oct 2 2024, 5:40 AM
Unknown Object (File)
Oct 2 2024, 2:30 AM
Unknown Object (File)
Oct 2 2024, 12:36 AM
Unknown Object (File)
Sep 30 2024, 9:28 PM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avg retitled this revision from to fix-up for configuration of AMD Family 10h processors borrowed from Linux.
avg updated this object.
avg edited the test plan for this revision. (Show Details)
avg added reviewers: kib, jhb.
sys/amd64/amd64/initcpu.c
87 ↗(On Diff #15491)

Is CD == Cache Disabled ? We and Intel usually call the mode UC (uncaheable).

Also, I do not understand the reference to 'guest VMs' in the comment. Is this about bhyve ? IMO the normal behaviour for the drivers would be suboptimal, most important.

sys/amd64/amd64/initcpu.c
87 ↗(On Diff #15491)

Is CD == Cache Disabled ? We and Intel usually call the mode UC (uncaheable).

It's indeed Cache Disabled, but AMD64 Architecture Programmer's Manual, Volume 2: System Programming[1] documents both UC and CD and says (in section 7.4):

The CD memory type is a form of uncacheable memory type that occurs
when caches are disabled (CR0.CD=1). With CD memory, it is possible for the address to be
cached due to an earlier cacheable access, or due to two virtual-addresses aliasing to a single
physical address.

Also, I do not understand the reference to 'guest VMs' in the comment. Is this about bhyve ? IMO the normal behaviour for the drivers would be suboptimal, most important.

I guess that it is about any guest that uses Nested Paging and that includes bhyve.
I do not think that WC+ type can be set on host-only pages, it seems that that type emerges internally for certain combination of guest and host memory types. That's described in section 15.25.8 of the same document. So, I am not sure how this could affect the drivers.

All that said, I am not an expert in this area, I just picked up something that I noticed in the Linux code.

[1] Publication No. 24593 Revision 3.23

Adding people who might have more insights into AMD SVM.

I am going to commit this unless anyone explicitly objects.

kib edited edge metadata.
This revision is now accepted and ready to land.May 17 2016, 8:56 AM
This revision was automatically updated to reflect the committed changes.