Re: [PATCH V2 2/5] implement remote protocol for domainSendSysrq

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

 




On 12/12/2014 04:04 AM, Chunyan Liu wrote:
> Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
> ---
>  src/remote/remote_driver.c   |  2 +-
>  src/remote/remote_protocol.x | 13 ++++++++++++-
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index 999f16d..97ea64b 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c
> @@ -7941,7 +7941,6 @@ remoteDomainGetFSInfo(virDomainPtr dom,
>      return rv;
>  }
>  
> -
>  /* get_nonnull_domain and get_nonnull_network turn an on-wire
>   * (name, uuid) pair into virDomainPtr or virNetworkPtr object.
>   * These can return NULL if underlying memory allocations fail,
> @@ -8285,6 +8284,7 @@ static virHypervisorDriver hypervisor_driver = {
>      .connectGetAllDomainStats = remoteConnectGetAllDomainStats, /* 1.2.8 */
>      .nodeAllocPages = remoteNodeAllocPages, /* 1.2.9 */
>      .domainGetFSInfo = remoteDomainGetFSInfo, /* 1.2.11 */
> +    .domainSendSysrq = remoteDomainSendSysrq, /* 1.2.11 */
>  };
>  
>  static virNetworkDriver network_driver = {
> diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
> index cbd3ec7..d988182 100644
> --- a/src/remote/remote_protocol.x
> +++ b/src/remote/remote_protocol.x
> @@ -1084,6 +1084,11 @@ struct remote_domain_send_key_args {
>      unsigned int flags;
>  };
>  
> +struct remote_domain_send_sysrq_args {
> +    remote_nonnull_domain dom;
> +    remote_nonnull_string key;
> +};
> +
>  struct remote_domain_send_process_signal_args {
>      remote_nonnull_domain dom;
>      hyper pid_value;
> @@ -5550,5 +5555,11 @@ enum remote_procedure {
>       * @generate: none
>       * @acl: domain:fs_freeze
>       */
> -    REMOTE_PROC_DOMAIN_GET_FSINFO = 349
> +    REMOTE_PROC_DOMAIN_GET_FSINFO = 349,
> +
> +    /**
> +     * @generate: both
> +     * @acl: domain:send_input
> +     */

Just send_input?  The result of the send is essentially 'init_control'
right? Like a shutdown. Perhaps even like destroy (eg, 'stop'). Or
'shutdown'... I'm not sure of all the options here, but this seems much
more invasive than just sending input because the result of the sent key
is a bit more "final".

John
> +    REMOTE_PROC_DOMAIN_SEND_SYSRQ = 350
>  };
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]