Re: svn commit: r339826 - in head: sys/amd64/vmm/intel usr.sbin/bhyve

2018-10-29 Thread Yuri Pankov
John Baldwin wrote:
> On 10/27/18 2:24 PM, Yuri Pankov wrote:
>> Author: yuripv
>> Date: Sat Oct 27 21:24:28 2018
>> New Revision: 339826
>> URL: https://svnweb.freebsd.org/changeset/base/339826
>>
>> Log:
>>   Provide basic descriptions for VMX exit reason (from "Intel 64 and IA-32
>>   Architectures Software Developer’s Manual Volume 3").  Add the document
>>   to SEE ALSO in bhyve.8 (and pet manlint here a bit).
>>   
>>   Reviewed by:   jhb, rgrimes, 0mp
>>   Approved by:   kib (mentor)
>>   Differential Revision: https://reviews.freebsd.org/D17531
> 
> I did ask you to commit the bhyve.8 style fixes separately from the content
> changes in the review.  While it is true we don't currently have active
> translations of manpages, it is still a good practice to follow to not mix
> style changes with content changes even in code commits as it obfuscates
> the content changes.

Understood, will do.  I just (incorrectly) assumed your review approval
to be "go ahead with this one, but next time don't mix content changes
and cleanups", sorry about that.



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r339826 - in head: sys/amd64/vmm/intel usr.sbin/bhyve

2018-10-29 Thread John Baldwin
On 10/27/18 2:24 PM, Yuri Pankov wrote:
> Author: yuripv
> Date: Sat Oct 27 21:24:28 2018
> New Revision: 339826
> URL: https://svnweb.freebsd.org/changeset/base/339826
> 
> Log:
>   Provide basic descriptions for VMX exit reason (from "Intel 64 and IA-32
>   Architectures Software Developer’s Manual Volume 3").  Add the document
>   to SEE ALSO in bhyve.8 (and pet manlint here a bit).
>   
>   Reviewed by:jhb, rgrimes, 0mp
>   Approved by:kib (mentor)
>   Differential Revision:  https://reviews.freebsd.org/D17531

I did ask you to commit the bhyve.8 style fixes separately from the content
changes in the review.  While it is true we don't currently have active
translations of manpages, it is still a good practice to follow to not mix
style changes with content changes even in code commits as it obfuscates
the content changes.

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r339826 - in head: sys/amd64/vmm/intel usr.sbin/bhyve

2018-10-27 Thread Yuri Pankov
Author: yuripv
Date: Sat Oct 27 21:24:28 2018
New Revision: 339826
URL: https://svnweb.freebsd.org/changeset/base/339826

Log:
  Provide basic descriptions for VMX exit reason (from "Intel 64 and IA-32
  Architectures Software Developer’s Manual Volume 3").  Add the document
  to SEE ALSO in bhyve.8 (and pet manlint here a bit).
  
  Reviewed by:  jhb, rgrimes, 0mp
  Approved by:  kib (mentor)
  Differential Revision:https://reviews.freebsd.org/D17531

Modified:
  head/sys/amd64/vmm/intel/vmcs.h
  head/usr.sbin/bhyve/bhyve.8
  head/usr.sbin/bhyve/bhyverun.c

Modified: head/sys/amd64/vmm/intel/vmcs.h
==
--- head/sys/amd64/vmm/intel/vmcs.h Sat Oct 27 21:17:01 2018
(r339825)
+++ head/sys/amd64/vmm/intel/vmcs.h Sat Oct 27 21:24:28 2018
(r339826)
@@ -338,6 +338,14 @@ vmcs_write(uint32_t encoding, uint64_t val)
 #define EXIT_REASON_WBINVD 54
 #define EXIT_REASON_XSETBV 55
 #defineEXIT_REASON_APIC_WRITE  56
+#defineEXIT_REASON_RDRAND  57
+#defineEXIT_REASON_INVPCID 58
+#defineEXIT_REASON_VMFUNC  59
+#defineEXIT_REASON_ENCLS   60
+#defineEXIT_REASON_RDSEED  61
+#defineEXIT_REASON_PM_LOG_FULL 62
+#defineEXIT_REASON_XSAVES  63
+#defineEXIT_REASON_XRSTORS 64
 
 /*
  * NMI unblocking due to IRET.

Modified: head/usr.sbin/bhyve/bhyve.8
==
--- head/usr.sbin/bhyve/bhyve.8 Sat Oct 27 21:17:01 2018(r339825)
+++ head/usr.sbin/bhyve/bhyve.8 Sat Oct 27 21:24:28 2018(r339826)
@@ -367,7 +367,11 @@ Emergency write is advertised, but no-op at present.
 .Pp
 Framebuffer devices:
 .Bl -tag -width 10n
-.It Oo rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= 
Ns Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= 
Ns Ar password Oc
+.It Xo
+.Oo rfb= Ns Oo Ar IP\&: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns
+.Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= 
Ns
+.Ar password Oc
+.Xc
 .Bl -tag -width 8n
 .It Ar IPv4:port No or Ar [IPv6%zone]:port
 An
@@ -398,8 +402,8 @@ and memory space
 .Pq 64KB at Ad 0xA .
 The default
 .Dq io
-option should be used for guests that attempt to issue BIOS
-calls which result in I/O port queries, and fail to boot if I/O decode is 
disabled.
+option should be used for guests that attempt to issue BIOS calls which result
+in I/O port queries, and fail to boot if I/O decode is disabled.
 .Pp
 The
 .Dq on
@@ -424,8 +428,8 @@ for configuration notes of particular guests.
 .It wait
 Instruct
 .Nm
-to only boot upon the initiation of a VNC connection, simplifying the 
installation
-of operating systems that require immediate keyboard input.
+to only boot upon the initiation of a VNC connection, simplifying the
+installation of operating systems that require immediate keyboard input.
 This can be removed for post-installation use.
 .It password
 This type of authentication is known to be cryptographically weak and is not
@@ -497,8 +501,9 @@ General purpose registers can be queried for each virt
 registers such as floating-point and system registers cannot be queried.
 .Ss Memory
 Memory (including memory mapped I/O regions) can be read by the debugger,
-but not written.  Memory operations use virtual addresses that are resolved
-to physical addresses via the current virtual CPU's active address translation.
+but not written.
+Memory operations use virtual addresses that are resolved to physical addresses
+via the current virtual CPU's active address translation.
 .Ss Control
 The running guest can be interrupted by the debugger at any time
 .Pq for example, by pressing Ctrl-C in the debugger .
@@ -609,6 +614,12 @@ bhyve -c 2 -m 4G -w -H \\
 .Xr ethers 5 ,
 .Xr bhyvectl 8 ,
 .Xr bhyveload 8
+.Pp
+.Rs
+.%A Intel
+.%B 64 and IA-32 Architectures Software Developer’s Manual
+.%V Volume 3
+.Re
 .Sh HISTORY
 .Nm
 first appeared in

Modified: head/usr.sbin/bhyve/bhyverun.c
==
--- head/usr.sbin/bhyve/bhyverun.c  Sat Oct 27 21:17:01 2018
(r339825)
+++ head/usr.sbin/bhyve/bhyverun.c  Sat Oct 27 21:24:28 2018
(r339826)
@@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
@@ -89,6 +91,73 @@ __FBSDID("$FreeBSD$");
 #define MB (1024UL * 1024)
 #define GB (1024UL * MB)
 
+static const char * const vmx_exit_reason_desc[] = {
+   [EXIT_REASON_EXCEPTION] = "Exception or non-maskable interrupt (NMI)",
+   [EXIT_REASON_EXT_INTR] = "External interrupt",
+   [EXIT_REASON_TRIPLE_FAULT] = "Triple fault",
+   [EXIT_REASON_INIT] = "INIT signal",
+   [EXIT_REASON_SIPI] =