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

Re: [Xen-API] [Xen-devel] [PATCH 1 of 5 v4] common/sysctl: Introduce hypercall to query the console ring size



On 13/03/13 12:52, Andrew Cooper wrote:
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Keir/Jan: Ping - this is a hypervisor change.

~Andrew

>
> --
> Changes since v2:
>  * Rebase on top of coverage patches.
>  * Reword hypercall comments.
>
> diff -r a6b81234b189 -r 89f3c6846f6b xen/common/sysctl.c
> --- a/xen/common/sysctl.c
> +++ b/xen/common/sysctl.c
> @@ -358,6 +358,10 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xe
>      }
>      break;
>  
> +    case XEN_SYSCTL_consoleringsize:
> +        ret = console_ring_size(&op->u.consoleringsize);
> +        break;
> +
>  #ifdef TEST_COVERAGE
>      case XEN_SYSCTL_coverage_op:
>          ret = sysctl_coverage_op(&op->u.coverage_op);
> diff -r a6b81234b189 -r 89f3c6846f6b xen/drivers/char/console.c
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -226,6 +226,12 @@ long read_console_ring(struct xen_sysctl
>      return 0;
>  }
>  
> +long console_ring_size(struct xen_sysctl_consoleringsize * op)
> +{
> +    op->size = conring_size;
> +    return 0;
> +}
> +
>  
>  /*
>   * *******************************************************
> diff -r a6b81234b189 -r 89f3c6846f6b xen/include/public/sysctl.h
> --- a/xen/include/public/sysctl.h
> +++ b/xen/include/public/sysctl.h
> @@ -632,6 +632,14 @@ typedef struct xen_sysctl_coverage_op xe
>  DEFINE_XEN_GUEST_HANDLE(xen_sysctl_coverage_op_t);
>  
>  
> +/* XEN_SYSCTL_consoleringsize */
> +/* Get the size of the hypervisor console ring in bytes. */
> +struct xen_sysctl_consoleringsize {
> +    uint64_t size; /* OUT */
> +};
> +typedef struct xen_sysctl_consoleringsize xen_sysctl_consoleringsize_t;
> +DEFINE_XEN_GUEST_HANDLE(xen_sysctl_consoleringsize_t);
> +
>  struct xen_sysctl {
>      uint32_t cmd;
>  #define XEN_SYSCTL_readconsole                    1
> @@ -653,6 +661,7 @@ struct xen_sysctl {
>  #define XEN_SYSCTL_cpupool_op                    18
>  #define XEN_SYSCTL_scheduler_op                  19
>  #define XEN_SYSCTL_coverage_op                   20
> +#define XEN_SYSCTL_consoleringsize               21
>      uint32_t interface_version; /* XEN_SYSCTL_INTERFACE_VERSION */
>      union {
>          struct xen_sysctl_readconsole       readconsole;
> @@ -674,6 +683,7 @@ struct xen_sysctl {
>          struct xen_sysctl_cpupool_op        cpupool_op;
>          struct xen_sysctl_scheduler_op      scheduler_op;
>          struct xen_sysctl_coverage_op       coverage_op;
> +        struct xen_sysctl_consoleringsize   consoleringsize;
>          uint8_t                             pad[128];
>      } u;
>  };
> diff -r a6b81234b189 -r 89f3c6846f6b xen/include/xen/console.h
> --- a/xen/include/xen/console.h
> +++ b/xen/include/xen/console.h
> @@ -12,6 +12,8 @@
>  
>  struct xen_sysctl_readconsole;
>  long read_console_ring(struct xen_sysctl_readconsole *op);
> +struct xen_sysctl_consoleringsize;
> +long console_ring_size(struct xen_sysctl_consoleringsize *op);
>  
>  void console_init_preirq(void);
>  void console_init_postirq(void);
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

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