[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2 07/23] xen/ioreq: Move x86's ioreq_gfn(server) to struct domain
 
- To: Paul Durrant <paul@xxxxxxx>
 
- From: Oleksandr <olekstysh@xxxxxxxxx>
 
- Date: Wed, 18 Nov 2020 14:09:28 +0200
 
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>
 
- Delivery-date: Wed, 18 Nov 2020 12:09:34 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
Hi Paul.
 
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -314,6 +314,8 @@ struct sched_unit {
  
  struct evtchn_port_ops;
  
+#define MAX_NR_IOREQ_SERVERS 8
+
  struct domain
  {
      domid_t          domain_id;
@@ -521,6 +523,21 @@ struct domain
      /* Argo interdomain communication support */
      struct argo_domain *argo;
  #endif
+
+#ifdef CONFIG_IOREQ_SERVER
+    /* Guest page range used for non-default ioreq servers */
+    struct {
+        unsigned long base;
+        unsigned long mask;
+        unsigned long legacy_mask; /* indexed by HVM param number */
+    } ioreq_gfn;
 
 I assume the whole ioreq_gfn struct doesn't need to be here. According 
to the new requirement to leave legacy interface x86 specific,
 these fields won't be used in common code anymore. I will move ioreq_gfn 
struct back to hvm_domain. Please confirm.
 
+
+    /* Lock protects all other values in the sub-struct and the default */
+    struct {
+        spinlock_t              lock;
+        struct ioreq_server     *server[MAX_NR_IOREQ_SERVERS];
+    } ioreq_server;
+#endif
  };
  
  static inline struct page_list_head *page_to_list(
 
--
Regards,
Oleksandr Tyshchenko
 
 
    
     |