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)
Feb 22 2024, 1:25 PM
Unknown Object (File)
Feb 22 2024, 5:16 AM
Unknown Object (File)
Dec 27 2023, 4:41 PM
Unknown Object (File)
Dec 2 2023, 5:20 PM
Unknown Object (File)
Nov 8 2023, 5:40 AM
Unknown Object (File)
Oct 25 2023, 8:44 AM
Unknown Object (File)
Oct 6 2023, 4:37 AM
Unknown Object (File)
Sep 23 2023, 10:36 AM
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.