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

Re: [libvirt] [PATCH 4/6 V4] inject-nmi: Implementing the remote protocol



On 05/10/2011 02:26 AM, Lai Jiangshan wrote:
> ---
>  daemon/remote_generator.pl   |    2 +-
>  src/remote/remote_driver.c   |    2 +-
>  src/remote/remote_protocol.x |    8 +++++++-
>  src/remote_protocol-structs  |    4 ++++
>  4 files changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
> index 062ccc1..74fa769 100755
> --- a/daemon/remote_generator.pl
> +++ b/daemon/remote_generator.pl
> @@ -35,7 +35,7 @@ sub name_to_ProcName {
>      @elems = map { $_ =~ s/Nwfilter/NWFilter/; $_ =~ s/Xml/XML/;
>                     $_ =~ s/Uri/URI/; $_ =~ s/Uuid/UUID/; $_ =~ s/Id/ID/;
>                     $_ =~ s/Mac/MAC/; $_ =~ s/Cpu/CPU/; $_ =~ s/Os/OS/;
> -                   $_ } @elems;
> +                   $_ =~ s/Nmi/NMI/; $_ } @elems;

Do we really want yet another difference in spelling?  But cleaning that
up affects more than just your new API, so I'll leave it for a later patch.

> +++ b/src/remote/remote_protocol.x
> @@ -817,6 +817,11 @@ struct remote_domain_undefine_args {
>      remote_nonnull_domain dom;
>  };
>  
> +struct remote_domain_inject_nmi_args {
> +    remote_nonnull_domain dom;
> +    unsigned int flags;
> +};
> +
>  struct remote_domain_set_vcpus_args {

This file layout...

> +++ b/src/remote_protocol-structs
> @@ -1435,3 +1435,7 @@ struct remote_message_header {
>          u_int                      serial;
>          remote_message_status      status;
>  };
> +struct remote_domain_inject_nmi_args {
> +        remote_nonnull_domain      dom;
> +        unsigned int               flags;
> +};

didn't match this layout - I had to adjust the structs to come in the
same order.  On Fedora, if you install the 'dwarves' package, then 'make
check' would catch this for you.  Also, dwarves settles on u_int rather
than unsigned int.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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