Author: mav
Date: Mon Mar 30 07:11:49 2015
New Revision: 280839
URL: https://svnweb.freebsd.org/changeset/base/280839

Log:
  MFC r280134:
  Report ARAT (APIC-Timer-always-running) feature for virtual CPU.
  
  This makes FreeBSD guest to not avoid using LAPIC timer, preferring HPET
  due to worries about non-existing for virtual CPUs deep sleep states.
  
  Benchmarks of usleep(1) on guest and host show such extra latencies:
   - 51us for virtual HPET,
   - 22us for virtual LAPIC timer,
   - 22us for host HPET and
   - 3us for host LAPIC timer.

Modified:
  stable/10/sys/amd64/vmm/x86.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/vmm/x86.c
==============================================================================
--- stable/10/sys/amd64/vmm/x86.c       Mon Mar 30 07:09:07 2015        
(r280838)
+++ stable/10/sys/amd64/vmm/x86.c       Mon Mar 30 07:11:49 2015        
(r280839)
@@ -361,6 +361,12 @@ x86_emulate_cpuid(struct vm *vm, int vcp
                        break;
 
                case CPUID_0000_0006:
+                       regs[0] = CPUTPM1_ARAT;
+                       regs[1] = 0;
+                       regs[2] = 0;
+                       regs[3] = 0;
+                       break;
+
                case CPUID_0000_000A:
                        /*
                         * Handle the access, but report 0 for
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to