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

[Xen-devel] [PATCH 13/19] xen: Distinguish between frontend and backend devops



xen_be_check_state should not be called for frontends
Use DEVOPS_FLAG_FE flag to distinguish a frontend.

Signed-off-by: Emil Condrea <emilcondrea@xxxxxxxxx>
Signed-off-by: Quan Xu <quan.xu@xxxxxxxxx>

---
Changes in v9:
 * Removed not needed strstr from xenstore_update_be
It was left over from first patch series when domu was included in xenstore
schema: "%s/backend/%s/%d/%d"
---
 hw/xen/xen_backend.c       | 4 +++-
 include/hw/xen/xen_pvdev.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c
index d0e3f50..3931128 100644
--- a/hw/xen/xen_backend.c
+++ b/hw/xen/xen_backend.c
@@ -488,7 +488,9 @@ void xenstore_update_be(char *watch, char *type, int dom,
         } else {
             free(bepath);
             xen_be_backend_changed(xendev, path);
-            xen_be_check_state(xendev);
+            if (!(ops->flags & DEVOPS_FLAG_FE)) {
+                xen_be_check_state(xendev);
+            }
         }
     }
 }
diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h
index c19e1df..c985a9d 100644
--- a/include/hw/xen/xen_pvdev.h
+++ b/include/hw/xen/xen_pvdev.h
@@ -14,6 +14,8 @@ struct XenDevice;
 #define DEVOPS_FLAG_NEED_GNTDEV   1
 /* don't expect frontend doing correct state transitions (aka console quirk) */
 #define DEVOPS_FLAG_IGNORE_STATE  2
+/*dev is frontend device*/
+#define DEVOPS_FLAG_FE            4
 
 struct XenDevOps {
     size_t    size;
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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