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)
Sun, Oct 27, 4:11 AM
Unknown Object (File)
Oct 4 2024, 5:45 PM
Unknown Object (File)
Oct 2 2024, 4:29 AM
Unknown Object (File)
Sep 29 2024, 11:27 PM
Unknown Object (File)
Sep 26 2024, 3:05 PM
Unknown Object (File)
Sep 24 2024, 5:22 AM
Unknown Object (File)
Sep 23 2024, 4:37 PM
Unknown Object (File)
Sep 11 2024, 8:57 PM
Subscribers

Diff Detail

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

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 ↗(On Diff #14602)

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 ↗(On Diff #14602)

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.