Package com.io7m.waxmill.machines

# Class WXMFlags

java.lang.Object
com.io7m.waxmill.machines.WXMFlags

All Implemented Interfaces:
  `WXMFlagsType`

    public final class WXMFlags
    extends java.lang.Object
    implements WXMFlagsType

The configuration flags associated with a virtual machine.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `WXMFlags.Builder` | Builds instances of type `WXMFlags`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static WXMFlags.Builder` | `builder()` | Creates a builder for `WXMFlags`.
  `static WXMFlags` | `copyOf​(WXMFlagsType instance)` | Creates an immutable copy of a `WXMFlagsType` value.
  `boolean` | `disableMPTableGeneration()` | Disable MP table generation.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMFlags` that have equal attribute values.
  `boolean` | `exitOnPAUSE()` | Force the guest virtual CPU to exit when a PAUSE instruction is detected.
  `boolean` | `forceVirtualIOPCIToUseMSI()` | Force virtio PCI device emulations to use MSI interrupts instead of MSI-X interrupts.
  `boolean` | `generateACPITables()` | Generate ACPI tables.
  `boolean` | `guestAPICIsX2APIC()` | The guest's local APIC is configured in x2APIC mode.
  `int` | `hashCode()` | Computes a hash code from attributes: `includeGuestMemoryInCoreFiles`, `yieldCPUOnHLT`, `exitOnPAUSE`, `generateACPITables`, `disableMPTableGeneration`, `forceVirtualIOPCIToUseMSI`, `guestAPICIsX2APIC`, `wireGuestMemory`, `realTimeClockIsUTC`, `ignoreUnimplementedModelSpecificRegisters`.
  `boolean` | `ignoreUnimplementedModelSpecificRegisters()` | Ignore accesses to unimplemented Model Specific Registers (MSRs).
  `boolean` | `includeGuestMemoryInCoreFiles()` | Include guest memory in core files.
  `boolean` | `realTimeClockIsUTC()` | RTC keeps UTC time.
  `java.lang.String` | `toString()` | Prints the immutable value `WXMFlags` with attribute values.
  `boolean` | `wireGuestMemory()` | Wire guest memory.
  `WXMFlags` | `withDisableMPTableGeneration​(boolean value)` | Copy the current immutable object by setting a value for the `disableMPTableGeneration` attribute.
  `WXMFlags` | `withExitOnPAUSE​(boolean value)` | Copy the current immutable object by setting a value for the `exitOnPAUSE` attribute.
  `WXMFlags` | `withForceVirtualIOPCIToUseMSI​(boolean value)` | Copy the current immutable object by setting a value for the `forceVirtualIOPCIToUseMSI` attribute.
  `WXMFlags` | `withGenerateACPITables​(boolean value)` | Copy the current immutable object by setting a value for the `generateACPITables` attribute.
  `WXMFlags` | `withGuestAPICIsX2APIC​(boolean value)` | Copy the current immutable object by setting a value for the `guestAPICIsX2APIC` attribute.
  `WXMFlags` | `withIgnoreUnimplementedModelSpecificRegisters​(boolean value)` | Copy the current immutable object by setting a value for the `ignoreUnimplementedModelSpecificRegisters` attribute.
  `WXMFlags` | `withIncludeGuestMemoryInCoreFiles​(boolean value)` | Copy the current immutable object by setting a value for the `includeGuestMemoryInCoreFiles` attribute.
  `WXMFlags` | `withRealTimeClockIsUTC​(boolean value)` | Copy the current immutable object by setting a value for the `realTimeClockIsUTC` attribute.
  `WXMFlags` | `withWireGuestMemory​(boolean value)` | Copy the current immutable object by setting a value for the `wireGuestMemory` attribute.
  `WXMFlags` | `withYieldCPUOnHLT​(boolean value)` | Copy the current immutable object by setting a value for the `yieldCPUOnHLT` attribute.
  `boolean` | `yieldCPUOnHLT()` | Yield the virtual CPU thread when a HLT instruction is detected.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### includeGuestMemoryInCoreFiles

    public boolean includeGuestMemoryInCoreFiles()
    Include guest memory in core files.
    Specified by:
      `includeGuestMemoryInCoreFiles` in interface `WXMFlagsType`
    Returns:
      `true` if guest memory should appear in core files.
    See Also:
      "-C option to bhyve"

  - ### yieldCPUOnHLT

    public boolean yieldCPUOnHLT()
    Yield the virtual CPU thread when a HLT instruction is detected. If this option is not specified, virtual CPUs will use 100% of a host CPU.
    Specified by:
      `yieldCPUOnHLT` in interface `WXMFlagsType`
    Returns:
      `true` if the virtual CPU should yield on HLT
    See Also:
      "-H option to bhyve"

  - ### exitOnPAUSE

    public boolean exitOnPAUSE()
    Force the guest virtual CPU to exit when a PAUSE instruction is detected.
    Specified by:
      `exitOnPAUSE` in interface `WXMFlagsType`
    Returns:
      `true` if the virtual CPU should exit on PAUSE
    See Also:
      "-P option to bhyve"

  - ### generateACPITables

    public boolean generateACPITables()
    Generate ACPI tables. Required for FreeBSD/amd64 guests.
    Specified by:
      `generateACPITables` in interface `WXMFlagsType`
    Returns:
      `true` if ACPI tables should be generated.
    See Also:
      "-A option to bhyve"

  - ### disableMPTableGeneration

    public boolean disableMPTableGeneration()
    Disable MP table generation.
    Specified by:
      `disableMPTableGeneration` in interface `WXMFlagsType`
    Returns:
      `true` if generation should be disabled
    See Also:
      "-Y option to bhyve"

  - ### forceVirtualIOPCIToUseMSI

    public boolean forceVirtualIOPCIToUseMSI()
    Force virtio PCI device emulations to use MSI interrupts instead of MSI-X interrupts.
    Specified by:
      `forceVirtualIOPCIToUseMSI` in interface `WXMFlagsType`
    Returns:
      `true` if MSI interrupts should be used
    See Also:
      "-W option to bhyve"

  - ### guestAPICIsX2APIC

    public boolean guestAPICIsX2APIC()
    The guest's local APIC is configured in x2APIC mode.
    Specified by:
      `guestAPICIsX2APIC` in interface `WXMFlagsType`
    Returns:
      `true` if the guest's local APIC is configured in x2APIC mode.
    See Also:
      "-x option to bhyve"

  - ### wireGuestMemory

    public boolean wireGuestMemory()
    Wire guest memory.
    Specified by:
      `wireGuestMemory` in interface `WXMFlagsType`
    Returns:
      `true` if the guest's memory should be wired
    See Also:
      "-S option to bhyve"

  - ### realTimeClockIsUTC

    public boolean realTimeClockIsUTC()
    RTC keeps UTC time.
    Specified by:
      `realTimeClockIsUTC` in interface `WXMFlagsType`
    Returns:
      `true` if the guest's RTC keeps UTC time.
    See Also:
      "-u option to bhyve"

  - ### ignoreUnimplementedModelSpecificRegisters

    public boolean ignoreUnimplementedModelSpecificRegisters()
    Ignore accesses to unimplemented Model Specific Registers (MSRs). This is intended for debug purposes.
    Specified by:
      `ignoreUnimplementedModelSpecificRegisters` in interface `WXMFlagsType`
    Returns:
      `true` if unimplemented accesses should be ignored
    See Also:
      "-w option to bhyve"

  - ### withIncludeGuestMemoryInCoreFiles

    public final WXMFlags withIncludeGuestMemoryInCoreFiles​(boolean value)
    Copy the current immutable object by setting a value for the `includeGuestMemoryInCoreFiles` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for includeGuestMemoryInCoreFiles
    Returns:
      A modified copy of the `this` object

  - ### withYieldCPUOnHLT

    public final WXMFlags withYieldCPUOnHLT​(boolean value)
    Copy the current immutable object by setting a value for the `yieldCPUOnHLT` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for yieldCPUOnHLT
    Returns:
      A modified copy of the `this` object

  - ### withExitOnPAUSE

    public final WXMFlags withExitOnPAUSE​(boolean value)
    Copy the current immutable object by setting a value for the `exitOnPAUSE` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for exitOnPAUSE
    Returns:
      A modified copy of the `this` object

  - ### withGenerateACPITables

    public final WXMFlags withGenerateACPITables​(boolean value)
    Copy the current immutable object by setting a value for the `generateACPITables` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for generateACPITables
    Returns:
      A modified copy of the `this` object

  - ### withDisableMPTableGeneration

    public final WXMFlags withDisableMPTableGeneration​(boolean value)
    Copy the current immutable object by setting a value for the `disableMPTableGeneration` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for disableMPTableGeneration
    Returns:
      A modified copy of the `this` object

  - ### withForceVirtualIOPCIToUseMSI

    public final WXMFlags withForceVirtualIOPCIToUseMSI​(boolean value)
    Copy the current immutable object by setting a value for the `forceVirtualIOPCIToUseMSI` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for forceVirtualIOPCIToUseMSI
    Returns:
      A modified copy of the `this` object

  - ### withGuestAPICIsX2APIC

    public final WXMFlags withGuestAPICIsX2APIC​(boolean value)
    Copy the current immutable object by setting a value for the `guestAPICIsX2APIC` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for guestAPICIsX2APIC
    Returns:
      A modified copy of the `this` object

  - ### withWireGuestMemory

    public final WXMFlags withWireGuestMemory​(boolean value)
    Copy the current immutable object by setting a value for the `wireGuestMemory` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for wireGuestMemory
    Returns:
      A modified copy of the `this` object

  - ### withRealTimeClockIsUTC

    public final WXMFlags withRealTimeClockIsUTC​(boolean value)
    Copy the current immutable object by setting a value for the `realTimeClockIsUTC` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for realTimeClockIsUTC
    Returns:
      A modified copy of the `this` object

  - ### withIgnoreUnimplementedModelSpecificRegisters

    public final WXMFlags withIgnoreUnimplementedModelSpecificRegisters​(boolean value)
    Copy the current immutable object by setting a value for the `ignoreUnimplementedModelSpecificRegisters` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for ignoreUnimplementedModelSpecificRegisters
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `WXMFlags` that have equal attribute values.
    Overrides:
      `equals` in class `java.lang.Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `includeGuestMemoryInCoreFiles`, `yieldCPUOnHLT`, `exitOnPAUSE`, `generateACPITables`, `disableMPTableGeneration`, `forceVirtualIOPCIToUseMSI`, `guestAPICIsX2APIC`, `wireGuestMemory`, `realTimeClockIsUTC`, `ignoreUnimplementedModelSpecificRegisters`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

    public java.lang.String toString()
    Prints the immutable value `WXMFlags` with attribute values.
    Overrides:
      `toString` in class `java.lang.Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static WXMFlags copyOf​(WXMFlagsType instance)
    Creates an immutable copy of a `WXMFlagsType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable WXMFlags instance

  - ### builder

    public static WXMFlags.Builder builder()
    Creates a builder for `WXMFlags`.

         WXMFlags.builder()
            .setIncludeGuestMemoryInCoreFiles(boolean) // optional includeGuestMemoryInCoreFiles
            .setYieldCPUOnHLT(boolean) // optional yieldCPUOnHLT
            .setExitOnPAUSE(boolean) // optional exitOnPAUSE
            .setGenerateACPITables(boolean) // optional generateACPITables
            .setDisableMPTableGeneration(boolean) // optional disableMPTableGeneration
            .setForceVirtualIOPCIToUseMSI(boolean) // optional forceVirtualIOPCIToUseMSI
            .setGuestAPICIsX2APIC(boolean) // optional guestAPICIsX2APIC
            .setWireGuestMemory(boolean) // optional wireGuestMemory
            .setRealTimeClockIsUTC(boolean) // optional realTimeClockIsUTC
            .setIgnoreUnimplementedModelSpecificRegisters(boolean) // optional ignoreUnimplementedModelSpecificRegisters
            .build();

    Returns:
      A new WXMFlags builder