[v2,03/10] vm_event: Add 'struct domain' backpointer to vm_event_domain.
diff mbox series

Message ID c7e5c600bbe00646d35eb3fa65b1894f7146e0df.1563293545.git.ppircalabu@bitdefender.com
State New
Headers show
Series
  • Per vcpu vm_event channels
Related show

Commit Message

Petre Ovidiu PIRCALABU July 16, 2019, 5:06 p.m. UTC
Signed-off-by: Petre Pircalabu <ppircalabu@bitdefender.com>
---
 xen/common/vm_event.c   | 2 ++
 xen/include/xen/sched.h | 2 ++
 2 files changed, 4 insertions(+)

Comments

Tamas K Lengyel July 16, 2019, 9:02 p.m. UTC | #1
On Tue, Jul 16, 2019 at 11:06 AM Petre Pircalabu
<ppircalabu@bitdefender.com> wrote:
>
> Signed-off-by: Petre Pircalabu <ppircalabu@bitdefender.com>

Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
Jan Beulich July 17, 2019, 9:28 a.m. UTC | #2
On 16.07.2019 19:06, Petre Pircalabu wrote:
> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -279,6 +279,8 @@ struct vcpu
>   /* VM event */
>   struct vm_event_domain
>   {
> +    /* Domain reference */
> +    struct domain *d;
>       spinlock_t lock;
>       /* The ring has 64 entries */
>       unsigned char foreign_producers;

This structure should actually move out of here, now that it
has been only pointers which other structures in this header
use. Doing so would simplify the process of getting acks for
changes like this one.

Jan

Patch
diff mbox series

diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c
index 515a917..787c61c 100644
--- a/xen/common/vm_event.c
+++ b/xen/common/vm_event.c
@@ -71,6 +71,8 @@  static int vm_event_enable(
     if ( rc < 0 )
         goto err;
 
+    ved->d = d;
+
     rc = prepare_ring_for_helper(d, ring_gfn, &ved->ring_pg_struct,
                                  &ved->ring_page);
     if ( rc < 0 )
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 97a3ab5..e3093d3 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -279,6 +279,8 @@  struct vcpu
 /* VM event */
 struct vm_event_domain
 {
+    /* Domain reference */
+    struct domain *d;
     spinlock_t lock;
     /* The ring has 64 entries */
     unsigned char foreign_producers;