[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-11-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

John Baldwin  changed:

   What|Removed |Added

 Status|In Progress |Closed
 Resolution|--- |FIXED
  Flags|mfc-stable10?,  |mfc-stable10-,
   |mfc-stable11?   |mfc-stable11+

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-11-17 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

--- Comment #6 from commit-h...@freebsd.org ---
A commit references this bug:

Author: jhb
Date: Sun Nov 18 01:07:37 UTC 2018
New revision: 340545
URL: https://svnweb.freebsd.org/changeset/base/340545

Log:
  MFC 339312,339364: Restore more descriptors during VM exits.

  339312:
  Fully restore the GDTR, IDTR, and LDTR after VT-x VM exits.

  The VT-x VMCS only stores the base address of the GDTR and IDTR.  As a
  result, VM exits use a fixed limit of 0x for the host GDTR and
  IDTR losing the smaller limits set in when the initial GDT is loaded
  on each CPU during boot.  Explicitly save and restore the full GDTR
  and IDTR contents around VM entries and exits to restore the correct
  limit.

  Similarly, explicitly save and restore the LDT selector.  VM exits
  always clear the host LDTR as if the LDT was loaded with a NULL
  selector and a userspace hypervisor is probably using a NULL selector
  anyway, but save and restore the LDT explicitly just to be safe.

  339364:
  Reload the LDT selector after an AMD-v #VMEXIT.

  cpu_switch() always reloads the LDT, so this can only affect the
  hypervisor process itself.  Fix this by explicitly reloading the host
  LDT selector after each #VMEXIT.  The stock bhyve process on FreeBSD
  never uses a custom LDT, so this change is cosmetic.

  PR:   230773

Changes:
_U  stable/11/
  stable/11/sys/amd64/include/cpufunc.h
  stable/11/sys/amd64/vmm/amd/svm.c
  stable/11/sys/amd64/vmm/intel/vmx.c

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-11-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

John Baldwin  changed:

   What|Removed |Added

 Blocks|228911  |

--- Comment #5 from John Baldwin  ---
No, it was committed to head before the 12 branch.  But I do think that means
it is no longer a 12.0 blocker.


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228911
[Bug 228911] FreeBSD 12.0 Release action items
-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-11-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

--- Comment #4 from Ed Maste  ---
Still waiting on merge to 12?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-10-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

John Baldwin  changed:

   What|Removed |Added

 Status|Open|In Progress
  Flags||mfc-stable10?,
   ||mfc-stable11?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-10-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

--- Comment #3 from commit-h...@freebsd.org ---
A commit references this bug:

Author: jhb
Date: Thu Oct 11 18:27:20 UTC 2018
New revision: 339312
URL: https://svnweb.freebsd.org/changeset/base/339312

Log:
  Fully restore the GDTR, IDTR, and LDTR after VT-x VM exits.

  The VT-x VMCS only stores the base address of the GDTR and IDTR.  As a
  result, VM exits use a fixed limit of 0x for the host GDTR and
  IDTR losing the smaller limits set in when the initial GDT is loaded
  on each CPU during boot.  Explicitly save and restore the full GDTR
  and IDTR contents around VM entries and exits to restore the correct
  limit.

  Similarly, explicitly save and restore the LDT selector.  VM exits
  always clear the host LDTR as if the LDT was loaded with a NULL
  selector and a userspace hypervisor is probably using a NULL selector
  anyway, but save and restore the LDT explicitly just to be safe.

  PR:   230773
  Reported by:  John Levon 
  Reviewed by:  kib
  Tested by:araujo
  Approved by:  re (rgrimes)
  MFC after:1 week

Changes:
  head/sys/amd64/include/cpufunc.h
  head/sys/amd64/vmm/intel/vmx.c

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-09-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

John Baldwin  changed:

   What|Removed |Added

 Blocks||228911


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228911
[Bug 228911] FreeBSD 12.0 Release action items
-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-08-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

--- Comment #2 from John Levon  ---
Hi, just to clarify, the patch I referred to is just for reference.

I mainly filed this bug upstream as the implications are pretty unpleasant,
hopefully one of you can handle the fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-08-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

Marcelo Araujo  changed:

   What|Removed |Added

 CC||ara...@freebsd.org
 Status|New |Open

--- Comment #1 from Marcelo Araujo  ---
Could you please make a patch against FreeBSD HEAD and attach it here?

Best,

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 230773] [bhyve] GDT limit needs reset on VMX exit

2018-08-20 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230773

Mark Linimon  changed:

   What|Removed |Added

   Assignee|b...@freebsd.org|virtualizat...@freebsd.org
Summary|GDT limit needs reset on|[bhyve] GDT limit needs
   |VMX exit|reset on VMX exit

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"