svn commit: r284894 - in stable/10: lib/libvmmapi share/examples/bhyve sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/modules/vmm usr.sbin/bhyve usr.sbin...

2015-06-27 Thread Neel Natu
Author: neel
Date: Sat Jun 27 22:48:22 2015
New Revision: 284894
URL: https://svnweb.freebsd.org/changeset/base/284894

Log:
  MFC r276428:
  Replace bhyve's minimal RTC emulation with a fully featured one in vmm.ko.
  
  MFC r276432:
  Initialize all fields of 'struct vm_exception exception' before passing it
  to vm_inject_exception().
  
  MFC r276763:
  Clear blocking due to STI or MOV SS in the hypervisor when an instruction is
  emulated or when the vcpu incurs an exception.
  
  MFC r277149:
  Clean up usage of 'struct vm_exception' to only to communicate information
  from userspace to vmm.ko when injecting an exception.
  
  MFC r277168:
  Fix typo (missing comma).
  
  MFC r277309:
  Make the error message explicit instead of just printing the usage if the
  virtual machine name is not specified.
  
  MFC r277310:
  Simplify instruction restart logic in bhyve.
  
  MFC r277359:
  Fix a bug in libvmmapi 'vm_copy_setup()' where it would return success even
  if the 'gpa' was in the guest MMIO region.
  
  MFC r277360:
  MOVS instruction emulation.
  
  MFC r277626:
  Add macro to identify AVIC capability (advanced virtual interrupt controller)
  in AMD processors.
  
  MFC r279220:
  Don't close a block context if it couldn't be opened avoiding a null deref.
  
  MFC r279225:
  Add -u option to bhyve(8) to indicate that the RTC should maintain UTC time.
  
  MFC r279227:
  Emulate MSR 0xC0011024 when running on AMD processors.
  
  MFC r279228:
  Always emulate MSR_PAT on Intel processors and don't rely on PAT save/restore
  capability of VT-x. This lets bhyve run nested in older VMware versions that
  don't support the PAT save/restore capability.
  
  MFC r279540:
  Fix warnings/errors when building vmm.ko with gcc.

Added:
  stable/10/sys/amd64/vmm/io/vrtc.c
 - copied unchanged from r276428, head/sys/amd64/vmm/io/vrtc.c
  stable/10/sys/amd64/vmm/io/vrtc.h
 - copied unchanged from r276428, head/sys/amd64/vmm/io/vrtc.h
Modified:
  stable/10/lib/libvmmapi/vmmapi.c
  stable/10/lib/libvmmapi/vmmapi.h
  stable/10/share/examples/bhyve/vmrun.sh
  stable/10/sys/amd64/include/vmm.h
  stable/10/sys/amd64/include/vmm_dev.h
  stable/10/sys/amd64/vmm/amd/svm.c
  stable/10/sys/amd64/vmm/amd/svm_softc.h
  stable/10/sys/amd64/vmm/amd/svm_support.S
  stable/10/sys/amd64/vmm/intel/vmcs.c
  stable/10/sys/amd64/vmm/intel/vmx.c
  stable/10/sys/amd64/vmm/intel/vmx.h
  stable/10/sys/amd64/vmm/intel/vmx_msr.c
  stable/10/sys/amd64/vmm/io/vhpet.c
  stable/10/sys/amd64/vmm/vmm.c
  stable/10/sys/amd64/vmm/vmm_dev.c
  stable/10/sys/amd64/vmm/vmm_instruction_emul.c
  stable/10/sys/amd64/vmm/vmm_ioport.c
  stable/10/sys/modules/vmm/Makefile
  stable/10/usr.sbin/bhyve/bhyve.8
  stable/10/usr.sbin/bhyve/bhyverun.c
  stable/10/usr.sbin/bhyve/bhyverun.h
  stable/10/usr.sbin/bhyve/inout.c
  stable/10/usr.sbin/bhyve/pci_ahci.c
  stable/10/usr.sbin/bhyve/rtc.c
  stable/10/usr.sbin/bhyve/rtc.h
  stable/10/usr.sbin/bhyve/task_switch.c
  stable/10/usr.sbin/bhyve/xmsr.c
  stable/10/usr.sbin/bhyvectl/bhyvectl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libvmmapi/vmmapi.c
==
--- stable/10/lib/libvmmapi/vmmapi.cSat Jun 27 20:39:13 2015
(r284893)
+++ stable/10/lib/libvmmapi/vmmapi.cSat Jun 27 22:48:22 2015
(r284894)
@@ -368,14 +368,13 @@ vm_get_register(struct vmctx *ctx, int v
 }
 
 int
-vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *vmexit)
+vm_run(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit)
 {
int error;
struct vm_run vmrun;
 
bzero(vmrun, sizeof(vmrun));
vmrun.cpuid = vcpu;
-   vmrun.rip = rip;
 
error = ioctl(ctx-fd, VM_RUN, vmrun);
bcopy(vmrun.vm_exit, vmexit, sizeof(struct vm_exit));
@@ -399,36 +398,22 @@ vm_reinit(struct vmctx *ctx)
return (ioctl(ctx-fd, VM_REINIT, 0));
 }
 
-static int
-vm_inject_exception_real(struct vmctx *ctx, int vcpu, int vector,
-int error_code, int error_code_valid)
+int
+vm_inject_exception(struct vmctx *ctx, int vcpu, int vector, int errcode_valid,
+uint32_t errcode, int restart_instruction)
 {
struct vm_exception exc;
 
-   bzero(exc, sizeof(exc));
exc.cpuid = vcpu;
exc.vector = vector;
-   exc.error_code = error_code;
-   exc.error_code_valid = error_code_valid;
+   exc.error_code = errcode;
+   exc.error_code_valid = errcode_valid;
+   exc.restart_instruction = restart_instruction;
 
return (ioctl(ctx-fd, VM_INJECT_EXCEPTION, exc));
 }
 
 int
-vm_inject_exception(struct vmctx *ctx, int vcpu, int vector)
-{
-
-   return (vm_inject_exception_real(ctx, vcpu, vector, 0, 0));
-}
-
-int
-vm_inject_exception2(struct vmctx *ctx, int vcpu, int vector, int errcode)
-{
-
-   return (vm_inject_exception_real(ctx, vcpu, vector, errcode, 1));
-}
-
-int
 vm_apicid2vcpu(struct vmctx *ctx, int apicid)
 {
/*
@@ 

svn commit: r284900 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/x86/include usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bh...

2015-06-27 Thread Neel Natu
Author: neel
Date: Sun Jun 28 03:22:26 2015
New Revision: 284900
URL: https://svnweb.freebsd.org/changeset/base/284900

Log:
  MFC r282209:
  Emulate the 'bit test' instruction.
  
  MFC r282259:
  Re-implement RTC current time calculation to eliminate the possibility of
  losing time.
  
  MFC r282281:
  Advertise the MTRR feature via CPUID and emulate the minimal set of MTRR MSRs.
  
  MFC r282284:
  When an instruction cannot be decoded just return to userspace so bhyve(8)
  can dump the instruction bytes.
  
  MFC r282287:
  Don't require sys/cpuset.h to be always included before machine/vmm.h.
  
  MFC r282296:
  Emulate MSR_SYSCFG which is accessed by Linux on AMD cpus when MTRRs are
  enabled.
  
  MFC r282301:
  Relax limits when transitioning a vector from the IRR to the ISR and also
  when extinguishing it from the ISR in response to an EOI.
  
  MFC r282335:
  Advertise an additional memory BAR in the dummy device emulation.
  
  MFC r282336:
  Emulate machine check related MSRs to allow guest OSes like Windows to boot.
  
  MFC r282351:
  Don't advertise the Intel SMX capability to the guest.
  
  MFC r282407:
  Emulate the 'CMP r/m8, imm8' instruction.
  
  MFC r282519:
  Add macros for AMD-specific bits in MSR_EFER: LMSLE, FFXSR and TCE.
  
  MFC r282520:
  Emulate guest writes to EFER_MSR properly.
  
  MFC r282558:
  Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().
  
  MFC r282571:
  Check 'td_owepreempt' and yield the vcpu thread if it is set.
  
  MFC r282595:
  Allow byte reads of AHCI registers.
  
  MFC r282784:
  Handling indirect descriptors is a capability of the host and not one that
  needs to be negotiated. Use the host capabilities field and not the negotiated
  field when verifying that indirect descriptors are supported.
  
  MFC r282788:
  Allow configuration of the sector size advertised to the guest.
  
  MFC r282865:
  Set the subvendor field in config space to the vendor ID. This is required
  by the Windows virtio drivers to correctly match a device.
  
  MFC r282922:
  Bump the size of the blockif scatter-gather list to 67.
  
  MFC r283075:
  Fix off-by-one in array index bounds check. bhyveload would allow you to
  create 33 entries on an array that only has 32 slots
  
  MFC r283168:
  Temporarily revert r282922 which bumped the max descriptors.
  
  MFC r283255:
  Emulate the CMP r/m, reg instruction (opcode 39H).
  
  MFC r283256:
  Add an option --get-vmcs-exit-inst-length to display the instruction length
  of the instruction that caused the VM-exit.
  
  MFC r283264:
  Change the header type of the emulated host-bridge from type 1 to type 0.
  
  MFC r283293:
  Don't rely on the 'VM-exit instruction length' field in the VMCS to always
  have an accurate length on an EPT violation.
  
  MFC r283299:
  Remove bogus verification of instruction length after instruction decode.
  
  MFC r283308:
  Exceptions don't deliver an error code in real mode.
  
  MFC r283657:
  Fix non-deterministic delays when accessing a vcpu that was in running or
  sleeping state.
  
  MFC r283973:
  Use tunable 'hw.vmm.svm.features' to disable specific SVM features even
  though they might be available in hardware. Use tunable 'hw.vmm.svm.num_asids'
  to limit the number of ASIDs used by the hypervisor.
  
  MFC r284046:
  Fix regression in 'verify_gla()' with the RIP-relative addressing mode.
  
  MFC r284174:
  Support guest writes to the TSC by enabling the use TSC offsetting
  execution control.

Modified:
  stable/10/lib/libvmmapi/vmmapi.c
  stable/10/lib/libvmmapi/vmmapi.h
  stable/10/sys/amd64/include/vmm.h
  stable/10/sys/amd64/include/vmm_instruction_emul.h
  stable/10/sys/amd64/vmm/amd/amdv.c
  stable/10/sys/amd64/vmm/amd/svm.c
  stable/10/sys/amd64/vmm/amd/svm_msr.c
  stable/10/sys/amd64/vmm/amd/vmcb.c
  stable/10/sys/amd64/vmm/intel/vmx.c
  stable/10/sys/amd64/vmm/intel/vmx.h
  stable/10/sys/amd64/vmm/intel/vmx_msr.c
  stable/10/sys/amd64/vmm/io/vatpic.c
  stable/10/sys/amd64/vmm/io/vatpit.c
  stable/10/sys/amd64/vmm/io/vhpet.c
  stable/10/sys/amd64/vmm/io/vioapic.c
  stable/10/sys/amd64/vmm/io/vlapic.c
  stable/10/sys/amd64/vmm/io/vpmtmr.c
  stable/10/sys/amd64/vmm/io/vrtc.c
  stable/10/sys/amd64/vmm/vmm.c
  stable/10/sys/amd64/vmm/vmm_dev.c
  stable/10/sys/amd64/vmm/vmm_instruction_emul.c
  stable/10/sys/amd64/vmm/vmm_ioport.c
  stable/10/sys/amd64/vmm/vmm_stat.c
  stable/10/sys/amd64/vmm/vmm_stat.h
  stable/10/sys/amd64/vmm/x86.c
  stable/10/sys/amd64/vmm/x86.h
  stable/10/sys/x86/include/specialreg.h
  stable/10/usr.sbin/bhyve/bhyve.8
  stable/10/usr.sbin/bhyve/bhyverun.c
  stable/10/usr.sbin/bhyve/block_if.c
  stable/10/usr.sbin/bhyve/inout.c
  stable/10/usr.sbin/bhyve/pci_ahci.c
  stable/10/usr.sbin/bhyve/pci_emul.c
  stable/10/usr.sbin/bhyve/pci_hostbridge.c
  stable/10/usr.sbin/bhyve/pci_virtio_block.c
  stable/10/usr.sbin/bhyve/pci_virtio_net.c
  stable/10/usr.sbin/bhyve/pci_virtio_rnd.c
  stable/10/usr.sbin/bhyve/task_switch.c
  

svn commit: r281134 - stable/10/usr.sbin/bhyve

2015-04-05 Thread Neel Natu
Author: neel
Date: Mon Apr  6 03:16:20 2015
New Revision: 281134
URL: https://svnweb.freebsd.org/changeset/base/281134

Log:
  MFC r272481.
  Add new fields in the FADT, required by IASL 20140926-64.

Modified:
  stable/10/usr.sbin/bhyve/acpi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bhyve/acpi.c
==
--- stable/10/usr.sbin/bhyve/acpi.c Mon Apr  6 03:02:20 2015
(r281133)
+++ stable/10/usr.sbin/bhyve/acpi.c Mon Apr  6 03:16:20 2015
(r281134)
@@ -430,7 +430,10 @@ basl_fwrite_fadt(FILE *fp)
EFPRINTF(fp, \n);
 
EFPRINTF(fp, [0001]\t\tValue to cause reset : 06\n);
-   EFPRINTF(fp, [0003]\t\tReserved : 00\n);
+   EFPRINTF(fp, [0002]\t\tARM Flags (decoded below): \n);
+   EFPRINTF(fp, \t\t\tPSCI Compliant : 0\n);
+   EFPRINTF(fp, \t\t\tMust use HVC for PSCI : 0\n);
+   EFPRINTF(fp, [0001]\t\tFADT Minor Revision : 01\n);
EFPRINTF(fp, [0008]\t\tFACS Address : %08X\n,
basl_acpi_base + FACS_OFFSET);
EFPRINTF(fp, [0008]\t\tDSDT Address : %08X\n,
___
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