Page MenuHomeFreeBSD

bhyve: emulate CLFLUSH and CLFLUSHOPT.
ClosedPublic

Authored by kib on Oct 9 2018, 2:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 8:41 PM
Unknown Object (File)
Thu, Apr 11, 3:54 PM
Unknown Object (File)
Apr 8 2024, 6:59 PM
Unknown Object (File)
Feb 7 2024, 5:01 PM
Unknown Object (File)
Feb 1 2024, 8:38 PM
Unknown Object (File)
Jan 14 2024, 5:22 AM
Unknown Object (File)
Dec 29 2023, 10:13 AM
Unknown Object (File)
Dec 20 2023, 3:55 AM

Details

Summary

Apparently CLFLUSH on mmio can cause VM exit, as reported in PR 232081.
I do not see that anything useful can be done except emulating page faults on invalid addresses.

Can you suggest a way to test this ?

Diff Detail

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

Event Timeline

avg added a subscriber: avg.

Looks good to me.

Though this may fix running 12.0 on 12.0 we well need EN's back to 11 and perhaps even 10 as the issue exists there as well.
How badly do we need that CLFLUSH instruction in 12?

Though this may fix running 12.0 on 12.0 we well need EN's back to 11 and perhaps even 10 as the issue exists there as well.

It is not about 'fixing 12 on 12'. If CLFLUSH may cause vm exit, then it needs to be emulated regardless of the FreeBSD use of CLFLUSH.
Anyway, the patch attached at the referenced PR makes FreeBSD 12 not to use CLFLUSH under virtualization, same as it was some time before.

How badly do we need that CLFLUSH instruction in 12?

I do not understand this question.

This revision is now accepted and ready to land.Oct 10 2018, 4:27 PM

Simplify. There is no sense in reading the first byte in the cacheline, the supplied address is good enough as well. A cacheline is always fully contained in the page which access permissions we probe.

This revision now requires review to proceed.Oct 12 2018, 12:25 PM
This revision was not accepted when it landed; it landed in state Needs Review.Oct 12 2018, 3:30 PM
This revision was automatically updated to reflect the committed changes.