RFC: proposal for VM reset & shutdown hcall (v3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Version 3 changes
   -added "kvm," prefix to hcall properties in device tree
   -specified which registers ret and args will end up in
   -removed e500-specific comments

------------------------------------------------------------------------
KVM_CAP_EXIT_EPAPR_HCALL  Capability

A new capability KVM_CAP_EXIT_EPAPR_HCALL is defined to advertise
the new KVM_EXIT_EPAPR_HCALL exit .

------------------------------------------------------------------------
KVM_EXIT_EPAPR_HCALL exit definition

                /* KVM_EXIT_EPAPR_HCALL */
                struct {
                        __u64 nr;
                        __u64 ret;
                        __u64 args[8];
                } epapr_hcall;

This is used on Power/PowerPC platforms that support ePAPR hcalls.
It occurs when a guest does a hypercall (as defined
in the ePAPR 1.1) and the hcall is not handled by the kernel.

The 'nr' field contains the hypercall number (from the guest R11),
and 'args' contains the arguments (from the guest R3 - R10).
Userspace should put the return code in 'ret' and any extra returned
values in args[].   As per the ePAPR hcall ABI, the return value
should be returned to the guest in R3 and output return values
in R4 - R10.

------------------------------------------------------------------------
Advertising reset and shutdown in device tree.

A virtual machine can detect the availability of the reset 
and shutdown hcalls by looking at properties on the /hypervisor
node in the device tree passed to the VM.

    Property name: kvm,has-reset
    Value type: <none>
    Definition:  If the property is present the hypervisor supports
                 the KVM_HC_VM_RESET hcall.

    Property name: kvm,has-shutdown
    Value type: <none>
    Definition:  If the property is present the hypervisor supports
                 the KVM_HC_VM_SHUTDOWN hcall.

------------------------------------------------------------------------
Hypercall: KVM_HC_VM_RESET
Description:  Requests that the virtual machine be reset.  The
              hcall takes no arguments. If successful the hcall does not
              return.

Arguments:
     r11    hcall-token   KVM_HC_VM_RESET

Return values
     r3     status        Status of the hcall.  If the hcall succeeds
                          it does not return.  If an error occurs
                          EV_INTERNAL is returned.

------------------------------------------------------------------------
Hypercall: KVM_HC_VM_SHUTDOWN
Description:  Requests that the virtual machine be powered-off/halted.
              The hcall takes no arguments. If successful the hcall does not
              return.

Arguments:
     r11    hcall-token   KVM_HC_VM_SHUTDOWN

Return values
     r3     status        Status of the hcall.  If the hcall succeeds
                          it does not return.  If an error occurs
                          EV_INTERNAL is returned.


Regards,
Stuart


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux