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

Re: [PATCH v5 2/2] xl: Add escape character argument to xl console


  • To: Peter Hoyes <peter.hoyes@xxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 25 Jul 2023 16:52:23 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <bertrand.marquis@xxxxxxx>, <wei.chen@xxxxxxx>, <luca.fancellu@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Tue, 25 Jul 2023 15:52:38 +0000
  • Ironport-data: A9a23:hUD2KaIeFmHtzW0kFE+ROZUlxSXFcZb7ZxGr2PjKsXjdYENS02cGy 2RLDDrUbP+KajbyKNh1bNu/90MOv5XXz4I2TABlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpKrfrawP9TlK6q4mhA4QZjPakjUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5cJG5O9 MEzIQstNCHchuyZkK+mSORj05FLwMnDZOvzu1llxDDdS/0nXYrCU+PB4towMDUY354UW6yEP oxANGQpNU6bC/FMEg5/5JYWleG0hn75YntApUicv6Yf6GnP1g1hlrPqNbI5f/TTHJoFxB7J/ D+uE2LRBg0dF/yllwO8tU2Q3LWQvGThaZIKPejtnhJtqALKnTFCYPEMbnOjrOW0kAi+XMNSM GQd4C9opq83nGS7Q9+4UxCmrXqsuh8HR8EWA+A88BuKyKff/0CeHGdsZjRMcsA8vck6Azkjz EaUnsjBDCZq9raSTBq16bqV6ziyNC49JHUHIyQDSGMt58Toqcc9hxTEQ9JnDYa8lNizEjb1q xiVqAAuirNVitQEv4258krAmCmEvYXSQ0g+4QC/dmu94xlwfoKNe42i4l+d5vFFRLt1VXHY4 iJCwZLHqrlTU9fUznflrPgx8K+BzNOKMDzhqldUP8MQqDWj1C6+YIJd72QrTKt2CfroaQMFc WeK51IJvsAJZybzBUNkS9nvUpp3lMAMAfygD6mJNYQWP/CdYSfdpElTiVisM3cBeaTGuYU2I t+lfMmlFh724ow3nWPtF4/xPVLGrx3SJF8/prihlXxLKZLEOBaopU4taTNilNwR4qKeuxny+ N1CLcaMwBg3eLSgM3GNq9VPfQ9WdiRT6XXKRyp/LLXrzu1OQT9JNhMs6el5J9wNc1p9y48kA U1RqmcHkQGi1BUr2C2Ba2x5aaOHYHqMhStTAMDYBn7xgyJLSd/2vM8im24fIeFPGBpLkaQlE JHouqyoXpxyd9gw021ANcat9NI4KXxGR2umZkKYXdT2RLY4LyShxzMuVlGHGPUmZsZvifYDn g==
  • Ironport-hdrordr: A9a23:bL3jRqNRPbuEFsBcTuqjsMiBIKoaSvp037BL7TEVdfUxSKb0qy nAppgmPHPP5wr5IUtQ4OxoW5PwI080l6QU3WB5B97LYOCBggWVxepZnOjfKlPbehEWwdQtsZ uII5IUNDQpNykAsS8h2njfLz/8+qjhzEl1v5an856yd3ARV51d
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jul 12, 2023 at 11:29:17AM +0100, Peter Hoyes wrote:
> @@ -1968,9 +1979,12 @@ int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, 
> int cons_num,
>   * guests using pygrub.
>   * If notify_fd is not -1, xenconsole will write 0x00 to it to nofity
>   * the caller that it has connected to the guest console.
> + * If escape_character is not NULL, the provided value is used to exit
> + * the guest console.
>   */
>  int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm,
> -                               int notify_fd);
> +                               int notify_fd,
> +                               char* escape_character);
>  
>  #if defined(LIBXL_API_VERSION) && LIBXL_API_VERSION < 0x040800
>  
> @@ -1989,6 +2003,25 @@ static inline int 
> libxl_primary_console_exec_0x040700(libxl_ctx *ctx,
>  }
>  #define libxl_primary_console_exec libxl_primary_console_exec_0x040700
>  
> +#elif defined(LIBXL_API_VERSION) && LIBXL_API_VERSION < 0x041800
> +
> +static inline int libxl_console_exec_0x041800(libxl_ctx *ctx, uint32_t domid,

Is is preferred to name these compatibility function with the version of
Xen that last presented this API, so could you rename it to
"libxl_console_exec_0x041700" ?

> +                                              int cons_num,
> +                                              libxl_console_type type,
> +                                              int notify_fd)
> +{
> +    return libxl_console_exec(ctx, domid, cons_num, type, notify_fd, NULL);
> +}
> +#define libxl_console_exec libxl_console_exec_0x041800
> +
> +static inline int libxl_primary_console_exec_0x041800(libxl_ctx *ctx,

Same thing here.

> +                                                      uint32_t domid_vm,
> +                                                      int notify_fd)
> +{
> +    return libxl_primary_console_exec(ctx, domid_vm, notify_fd, NULL);
> +}
> +#define libxl_primary_console_exec libxl_primary_console_exec_0x041800
> +

Also, could you add the extra NULL argument in the function call of both
"libxl_console_exec_0x040700()" and
"libxl_primary_console_exec_0x040700()" ?

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.