Page MenuHomeFreeBSD

vt_vga: use textmode when we're running on hypervisor
ClosedPublic

Authored by decui_microsoft.com on Mar 25 2016, 1:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 31, 1:12 AM
Unknown Object (File)
Tue, Jan 14, 10:04 AM
Unknown Object (File)
Dec 24 2024, 7:44 AM
Unknown Object (File)
Dec 7 2024, 7:46 AM
Unknown Object (File)
Dec 4 2024, 3:31 AM
Unknown Object (File)
Oct 27 2024, 4:11 AM
Unknown Object (File)
Oct 4 2024, 5:45 PM
Unknown Object (File)
Oct 2 2024, 4:29 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3002
Build 3032: arc lint + arc unit

Event Timeline

decui_microsoft.com retitled this revision from to vt_vga: use texemode when we runnning on hypervisor.
decui_microsoft.com updated this object.
decui_microsoft.com edited the test plan for this revision. (Show Details)

The idea is correct, but implementation is arguably not. TUNABLE_XXX_FETCH() keeps the variable unchanged if the env var is not present. The correct logic would be

textmode = vm_guest != VM_GUEST_NO;
TUNABLE_INT_FETCH("hw.vga.textmode", &textmode);

This would give the desired behaviour of enabling textmode by default for guests only, but also allowing user to override it as she wants.

In D5739#122559, @kib wrote:

The idea is correct, but implementation is arguably not. TUNABLE_XXX_FETCH() keeps the variable unchanged if the env var is not present. The correct logic would be

textmode = vm_guest != VM_GUEST_NO;
TUNABLE_INT_FETCH("hw.vga.textmode", &textmode);

This would give the desired behaviour of enabling textmode by default for guests only, but also allowing user to override it as she wants.

@kib, Thanks! I'll update the patch as you suggested.

decui_microsoft.com edited edge metadata.
decui_microsoft.com removed rS FreeBSD src repository - subversion as the repository for this revision.

I improved the patch as kib suggested.

kib edited edge metadata.
kib added inline comments.
sys/dev/vt/hw/vga/vt_vga.c
1237

You do not need braces there, and style(9) requests to not put redundand braces.

This revision is now accepted and ready to land.Mar 25 2016, 4:04 PM
decui_microsoft.com edited edge metadata.

removed the unnecessary braces as kib suggested.

This revision now requires review to proceed.Mar 25 2016, 4:15 PM
decui_microsoft.com added inline comments.
sys/dev/vt/hw/vga/vt_vga.c
1237

OK. I updated the patch.

kib edited edge metadata.
This revision is now accepted and ready to land.Mar 25 2016, 4:23 PM
decui_microsoft.com retitled this revision from vt_vga: use texemode when we runnning on hypervisor to vt_vga: use textmode when we're running on hypervisor.Mar 25 2016, 4:52 PM
decui_microsoft.com edited edge metadata.
This revision was automatically updated to reflect the committed changes.