1. 14 Jan, 2022 1 commit
  2. 05 May, 2020 2 commits
    • jhb's avatar
      Initial support for bhyve save and restore. · d3e4e512
      jhb authored
      Save and restore (also known as suspend and resume) permits a snapshot
      to be taken of a guest's state that can later be resumed.  In the
      current implementation, bhyve(8) creates a UNIX domain socket that is
      used by bhyvectl(8) to send a request to save a snapshot (and
      optionally exit after the snapshot has been taken).  A snapshot
      currently consists of two files: the first holds a copy of guest RAM,
      and the second file holds other guest state such as vCPU register
      values and device model state.
      
      To resume a guest, bhyve(8) must be started with a matching pair of
      command line arguments to instantiate the same set of device models as
      well as a pointer to the saved snapshot.
      
      While the current implementation is useful for several uses cases, it
      has a few limitations.  The file format for saving the guest state is
      tied to the ABI of internal bhyve structures and is not
      self-describing (in that it does not communicate the set of device
      models present in the system).  In addition, the state saved for some
      device models closely matches the internal data structures which might
      prove a challenge for compatibility of snapshot files across a range
      of bhyve versions.  The file format also does not currently support
      versioning of individual chunks of state.  As a result, the current
      file format is not a fixed binary format and future revisions to save
      and restore will break binary compatiblity of snapshot files.  The
      goal is to move to a more flexible format that adds versioning,
      etc. and at that point to commit to providing a reasonable level of
      compatibility.  As a result, the current implementation is not enabled
      by default.  It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option
      for userland builds, and the kernel option BHYVE_SHAPSHOT.
      
      Submitted by:	Mihai Tiganus, Flavius Anton, Darius Mihai
      Submitted by:	Elena Mihailescu, Mihai Carabas, Sergiu Weisz
      Relnotes:	yes
      Sponsored by:	University Politehnica of Bucharest
      Sponsored by:	Matthew Grooms (student scholarships)
      Sponsored by:	iXsystems
      Differential Revision:	https://reviews.freebsd.org/D19495
      d3e4e512
    • John Baldwin's avatar
      Initial support for bhyve save and restore. · 483d953a
      John Baldwin authored
      Save and restore (also known as suspend and resume) permits a snapshot
      to be taken of a guest's state that can later be resumed.  In the
      current implementation, bhyve(8) creates a UNIX domain socket that is
      used by bhyvectl(8) to send a request to save a snapshot (and
      optionally exit after the snapshot has been taken).  A snapshot
      currently consists of two files: the first holds a copy of guest RAM,
      and the second file holds other guest state such as vCPU register
      values and device model state.
      
      To resume a guest, bhyve(8) must be started with a matching pair of
      command line arguments to instantiate the same set of device models as
      well as a pointer to the saved snapshot.
      
      While the current implementation is useful for several uses cases, it
      has a few limitations.  The file format for saving the guest state is
      tied to the ABI of internal bhyve structures and is not
      self-describing (in that it does not communicate the set of device
      models present in the system).  In addition, the state saved for some
      device models closely matches the internal data structures which might
      prove a challenge for compatibility of snapshot files across a range
      of bhyve versions.  The file format also does not currently support
      versioning of individual chunks of state.  As a result, the current
      file format is not a fixed binary format and future revisions to save
      and restore will break binary compatiblity of snapshot files.  The
      goal is to move to a more flexible format that adds versioning,
      etc. and at that point to commit to providing a reasonable level of
      compatibility.  As a result, the current implementation is not enabled
      by default.  It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option
      for userland builds, and the kernel option BHYVE_SHAPSHOT.
      
      Submitted by:	Mihai Tiganus, Flavius Anton, Darius Mihai
      Submitted by:	Elena Mihailescu, Mihai Carabas, Sergiu Weisz
      Relnotes:	yes
      Sponsored by:	University Politehnica of Bucharest
      Sponsored by:	Matthew Grooms (student scholarships)
      Sponsored by:	iXsystems
      Differential Revision:	https://reviews.freebsd.org/D19495
      483d953a
  3. 31 Oct, 2018 2 commits
  4. 30 Oct, 2018 2 commits
  5. 13 Jun, 2018 2 commits
  6. 27 May, 2016 1 commit
  7. 11 Apr, 2016 2 commits
  8. 28 Jun, 2015 1 commit
    • neel's avatar
      MFC r282209: · 79b96fdb
      neel authored
      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.
      79b96fdb
  9. 02 May, 2015 2 commits
  10. 01 May, 2015 2 commits
  11. 30 Apr, 2015 4 commits
  12. 30 Dec, 2014 1 commit
    • neel's avatar
      MFC r273375 · 9a7db864
      neel authored
      Add support AMD processors with the SVM/AMD-V hardware extensions.
      
      MFC r273749
      Remove bhyve SVM feature printf's now that they are available in the general
      CPU feature detection code.
      
      MFC r273766
      Add missing 'break' pointed out by Coverity CID 1249760.
      
      MFC r276098
      Allow ktr(4) tracing of all guest exceptions via the tunable "hw.vmm.trace_guest_exceptions"
      
      MFC r276392
      Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT' on an
      AMD/SVM host.
      
      MFC r276402
      Remove "svn:mergeinfo" property that was dragged along when these files were
      svn copied in r273375.
      9a7db864
  13. 20 Sep, 2014 1 commit
    • neel's avatar
      IFC r271888. · ef294abb
      neel authored
      Restructure MSR emulation so it is all done in processor-specific code.
      ef294abb