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

Re: [Minios-devel] [UNIKRAFT PATCH v3 2/4] plat/xen/common: Move event channel functions in events.h


  • To: radunicolau102@xxxxxxxxx, minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Mon, 3 Dec 2018 14:44:25 +0200
  • Delivery-date: Mon, 03 Dec 2018 12:44:32 +0000
  • Ironport-phdr: 9a23:kMoNQxbM4BzjMl62uLQ1UGb/LSx+4OfEezUN459isYplN5qZr8i6bnLW6fgltlLVR4KTs6sC17KG9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa+bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjAk7m/XhMx+gqFVrh2vqBNwwZLbbo6OOfpifK7QZ88WSXZPU8tTUSFKH4Oyb5EID+oEJetVsY79p0ASrRu/AwmnGeXhyiJQhn/rwKY31PguEQbd3Aw8HtIOtm7YrNHoNKcKTOC417XHzS7ZY/NOxDfy85LEcgomofyVW797bMnfyVE3Gg/YgVictJbpMjCV2+gXrWSX8ehtWfihhmI/tg18rSWjyt0vh4TJnI4Z1F7J+CtjzIooKtC0Vkh2asO+HpRKrSGVLY52T9snQ2FvpSk11KULuYW+fCgW0JQnwAPfa+Cff4iI/B3jUOGRLC9mhHJgYr2/hhKy/VK8xe3nTMW0yEtKoTFfntnWsXABzx3T6s6ZRfth5kqtxDmC2x3J5uxHIU04j7TXJ4Ajz7IqmJcfqUHDETX3mEXygq+WbEIk+u2w5uv7ZbXmvYOcN45yig3kNqQuh9S/AfkjPwcSRGiX4/y81KD48kHjWrVKieU6krPFv5DCOcQbuqm5DhdP0ok59hm/EjGm0NUEknkAKFJKYg+Hg5X1N13QO/34AvK/jE6tkDdv3fzJIrrhApDVJHjZjLjhZap961JbyAcryNBf5pRUCrAGIPLoQ0P+qcLXDgEnPAyw2OvnDNR91pgCWWKUGKOYP73dsVmS6uIoOemMa9xdhDGoMfEp+vjvhng9kEJEJfOB0p4eaXT+FfNjZw2cYHzthcxEHWoUsw4WSO3xlEbEQTNVIXGoUPES/DY+XamhFpvCQMiJnaSclHOwGYZKZ2YADk2UDF/jbMOcRv1KciXEcZwpqSANSbX0E9xp7hqprgKvk7c=
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Reviewed-by: Costin Lupu <costin.lupu@xxxxxxxxx>

On 11/24/18 1:23 PM, radunicolau102@xxxxxxxxx wrote:
> From: Radu Nicolau <radunicolau102@xxxxxxxxx>
> 
> Move mask_evtchn, unmask_evtchn and clear_evtchn function
> prototypes from hypervisor.h to events.h. Change parameter
> type to evtchn_port_t. Remove hypervisor.h inclusion from
> arm/arch_events.c and arm/arch_time.c
> 
> Signed-off-by: Radu Nicolau <radunicolau102@xxxxxxxxx>
> ---
>  plat/xen/arm/arch_events.c           |  1 -
>  plat/xen/arm/arch_time.c             |  1 -
>  plat/xen/events.c                    |  8 +++-----
>  plat/xen/include/common/events.h     | 16 ++++++++++++++++
>  plat/xen/include/common/hypervisor.h |  3 ---
>  5 files changed, 19 insertions(+), 10 deletions(-)
> 
> diff --git a/plat/xen/arm/arch_events.c b/plat/xen/arm/arch_events.c
> index 91f0ecb..2037aca 100644
> --- a/plat/xen/arm/arch_events.c
> +++ b/plat/xen/arm/arch_events.c
> @@ -26,7 +26,6 @@
>  
>  #include <xen-arm/os.h>
>  #include <common/events.h>
> -#include <common/hypervisor.h>
>  #include <uk/print.h>
>  #include <uk/assert.h>
>  #include <uk/essentials.h>
> diff --git a/plat/xen/arm/arch_time.c b/plat/xen/arm/arch_time.c
> index c5d4551..fec89da 100644
> --- a/plat/xen/arm/arch_time.c
> +++ b/plat/xen/arm/arch_time.c
> @@ -25,7 +25,6 @@
>   */
>  
>  #include <xen-arm/os.h>
> -#include <common/hypervisor.h>
>  #include <common/events.h>
>  #include <xen-arm/traps.h>
>  #include <uk/print.h>
> diff --git a/plat/xen/events.c b/plat/xen/events.c
> index 6df3e4b..3a1d155 100644
> --- a/plat/xen/events.c
> +++ b/plat/xen/events.c
> @@ -291,16 +291,14 @@ int evtchn_get_peercontext(evtchn_port_t local_port, 
> char *ctx, int size)
>       return rc;
>  }
>  
> -/* TODO - these were moved from hypervisor.c; integrate into evtchn */
> -
> -inline void mask_evtchn(uint32_t port)
> +inline void mask_evtchn(evtchn_port_t port)
>  {
>       shared_info_t *s = HYPERVISOR_shared_info;
>  
>       uk_set_bit(port, &s->evtchn_mask[0]);
>  }
>  
> -inline void unmask_evtchn(uint32_t port)
> +inline void unmask_evtchn(evtchn_port_t port)
>  {
>       shared_info_t *s = HYPERVISOR_shared_info;
>       vcpu_info_t *vcpu_info = &s->vcpu_info[smp_processor_id()];
> @@ -323,7 +321,7 @@ inline void unmask_evtchn(uint32_t port)
>       }
>  }
>  
> -inline void clear_evtchn(uint32_t port)
> +inline void clear_evtchn(evtchn_port_t port)
>  {
>       shared_info_t *s = HYPERVISOR_shared_info;
>  
> diff --git a/plat/xen/include/common/events.h 
> b/plat/xen/include/common/events.h
> index 971dff9..f5d8661 100644
> --- a/plat/xen/include/common/events.h
> +++ b/plat/xen/include/common/events.h
> @@ -65,6 +65,22 @@ evtchn_port_t bind_pirq(uint32_t pirq, int will_share,
>  evtchn_port_t bind_evtchn(evtchn_port_t port, evtchn_handler_t handler,
>                         void *data);
>  void unbind_evtchn(evtchn_port_t port);
> +
> +/* Disable events for <port> by setting the masking bit */
> +void mask_evtchn(evtchn_port_t port);
> +
> +/*
> + * Enable events for <port> by unsetting the masking bit.
> + * If pending events are present, call ukplat_lcpu_irqs_handle_pending
> + */
> +void unmask_evtchn(evtchn_port_t port);
> +
> +/*
> + * Clear pending events from <port> by unsetting the pending
> + * events bit
> + */
> +void clear_evtchn(evtchn_port_t port);
> +
>  void init_events(void);
>  int evtchn_alloc_unbound(domid_t pal, evtchn_handler_t handler,
>                        void *data, evtchn_port_t *port);
> diff --git a/plat/xen/include/common/hypervisor.h 
> b/plat/xen/include/common/hypervisor.h
> index 4587b86..417498e 100644
> --- a/plat/xen/include/common/hypervisor.h
> +++ b/plat/xen/include/common/hypervisor.h
> @@ -71,9 +71,6 @@ shared_info_t *map_shared_info(void *p);
>  //TODO START from here on we have to cleanup/refactor/move stuff
>  /* hypervisor.c */
>  void do_hypervisor_callback(struct __regs *regs);
> -void mask_evtchn(uint32_t port);
> -void unmask_evtchn(uint32_t port);
> -void clear_evtchn(uint32_t port);
>  //TODO END
>  
>  extern int in_callback;
> 

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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