All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/3] please pull xen-20170707-tag
@ 2017-07-07 18:29 ` Stefano Stabellini
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2017-07-07 18:29 UTC (permalink / raw)
  To: peter.maydell, stefanha
  Cc: sstabellini, stefanha, anthony.perard, xen-devel, qemu-devel

The following changes since commit b11365867568ba954de667a0bfe0945b8f78d6bd:

  Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170706' into staging (2017-07-06 11:42:59 +0100)

are available in the git repository at:


  git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20170707-tag

for you to fetch changes up to 4daf62594d13dfca2ce3a74dd3bddee5f54d7127:

  xen/pt: Fixup addr validation in xen_pt_pci_config_access_check (2017-07-07 11:13:10 -0700)

----------------------------------------------------------------
Xen 2017/07/07

----------------------------------------------------------------
Anoob Soman (1):
      xen/pt: Fixup addr validation in xen_pt_pci_config_access_check

Ross Lagerwall (1):
      xen-platform: Cleanup network infrastructure when emulated NICs are unplugged

Stefano Stabellini (1):
      xenfb: remove xen_init_display "temporary" hack

 hw/display/xenfb.c           | 81 ++++++++++----------------------------------
 hw/i386/xen/xen_platform.c   | 11 ++++++
 hw/xen/xen_pt.c              |  2 +-
 hw/xenpv/xen_machine_pv.c    |  3 --
 include/hw/xen/xen_backend.h |  2 --
 5 files changed, 30 insertions(+), 69 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PULL 0/3] please pull xen-20170707-tag
@ 2017-07-07 18:29 ` Stefano Stabellini
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2017-07-07 18:29 UTC (permalink / raw)
  To: peter.maydell, stefanha
  Cc: anthony.perard, xen-devel, sstabellini, qemu-devel, stefanha

The following changes since commit b11365867568ba954de667a0bfe0945b8f78d6bd:

  Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170706' into staging (2017-07-06 11:42:59 +0100)

are available in the git repository at:


  git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20170707-tag

for you to fetch changes up to 4daf62594d13dfca2ce3a74dd3bddee5f54d7127:

  xen/pt: Fixup addr validation in xen_pt_pci_config_access_check (2017-07-07 11:13:10 -0700)

----------------------------------------------------------------
Xen 2017/07/07

----------------------------------------------------------------
Anoob Soman (1):
      xen/pt: Fixup addr validation in xen_pt_pci_config_access_check

Ross Lagerwall (1):
      xen-platform: Cleanup network infrastructure when emulated NICs are unplugged

Stefano Stabellini (1):
      xenfb: remove xen_init_display "temporary" hack

 hw/display/xenfb.c           | 81 ++++++++++----------------------------------
 hw/i386/xen/xen_platform.c   | 11 ++++++
 hw/xen/xen_pt.c              |  2 +-
 hw/xenpv/xen_machine_pv.c    |  3 --
 include/hw/xen/xen_backend.h |  2 --
 5 files changed, 30 insertions(+), 69 deletions(-)

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [PULL 1/3] xenfb: remove xen_init_display "temporary" hack
  2017-07-07 18:29 ` Stefano Stabellini
@ 2017-07-07 18:30   ` Stefano Stabellini
  -1 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2017-07-07 18:30 UTC (permalink / raw)
  To: peter.maydell, stefanha
  Cc: sstabellini, stefanha, anthony.perard, xen-devel, qemu-devel

Initialize xenfb properly, as all other backends, from its own
"initialise" function.

Remove the dependency of vkbd on vfb: use qemu_console_lookup_by_index
to find the principal console (to get the size of the screen) instead of
relying on a vfb backend to be available (which adds a dependency
between the two).

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
---
 hw/display/xenfb.c           | 81 ++++++++++----------------------------------
 hw/xenpv/xen_machine_pv.c    |  3 --
 include/hw/xen/xen_backend.h |  2 --
 3 files changed, 18 insertions(+), 68 deletions(-)

diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index e76c0d8..df8b78f 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -46,7 +46,6 @@
 struct common {
     struct XenDevice  xendev;  /* must be first */
     void              *page;
-    QemuConsole       *con;
 };
 
 struct XenInput {
@@ -61,6 +60,7 @@ struct XenInput {
 
 struct XenFB {
     struct common     c;
+    QemuConsole       *con;
     size_t            fb_len;
     int               row_stride;
     int               depth;
@@ -71,7 +71,6 @@ struct XenFB {
     int               fbpages;
     int               feature_update;
     int               bug_trigger;
-    int               have_console;
     int               do_resize;
 
     struct {
@@ -80,6 +79,7 @@ struct XenFB {
     int               up_count;
     int               up_fullscreen;
 };
+static const GraphicHwOps xenfb_ops;
 
 /* -------------------------------------------------------------------- */
 
@@ -306,10 +306,18 @@ static void xenfb_mouse_event(void *opaque,
 			      int dx, int dy, int dz, int button_state)
 {
     struct XenInput *xenfb = opaque;
-    DisplaySurface *surface = qemu_console_surface(xenfb->c.con);
-    int dw = surface_width(surface);
-    int dh = surface_height(surface);
-    int i;
+    QemuConsole *con = qemu_console_lookup_by_index(0);
+    DisplaySurface *surface;
+    int dw, dh, i;
+
+    if (!con) {
+        xen_pv_printf(&xenfb->c.xendev, 0, "No QEMU console available");
+        return;
+    }
+
+    surface = qemu_console_surface(con);
+    dw = surface_width(surface);
+    dh = surface_height(surface);
 
     trace_xenfb_mouse_event(opaque, dx, dy, dz, button_state,
                             xenfb->abs_pointer_wanted);
@@ -344,11 +352,6 @@ static int input_initialise(struct XenDevice *xendev)
     struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
     int rc;
 
-    if (!in->c.con) {
-        xen_pv_printf(xendev, 1, "ds not set (yet)\n");
-        return -1;
-    }
-
     rc = common_bind(&in->c);
     if (rc != 0)
 	return rc;
@@ -608,7 +611,7 @@ static int xenfb_configure_fb(struct XenFB *xenfb, size_t fb_len_lim,
  */
 static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)
 {
-    DisplaySurface *surface = qemu_console_surface(xenfb->c.con);
+    DisplaySurface *surface = qemu_console_surface(xenfb->con);
     int line, oops = 0;
     int bpp = surface_bits_per_pixel(surface);
     int linesize = surface_stride(surface);
@@ -642,7 +645,7 @@ static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)
         xen_pv_printf(&xenfb->c.xendev, 0, "%s: oops: convert %d -> %d bpp?\n",
                       __FUNCTION__, xenfb->depth, bpp);
 
-    dpy_gfx_update(xenfb->c.con, x, y, w, h);
+    dpy_gfx_update(xenfb->con, x, y, w, h);
 }
 
 #ifdef XENFB_TYPE_REFRESH_PERIOD
@@ -728,7 +731,7 @@ static void xenfb_update(void *opaque)
             surface = qemu_create_displaysurface(xenfb->width, xenfb->height);
             break;
         }
-        dpy_gfx_replace_surface(xenfb->c.con, surface);
+        dpy_gfx_replace_surface(xenfb->con, surface);
         xen_pv_printf(&xenfb->c.xendev, 1,
                       "update: resizing: %dx%d @ %d bpp%s\n",
                       xenfb->width, xenfb->height, xenfb->depth,
@@ -877,16 +880,7 @@ static int fb_initialise(struct XenDevice *xendev)
     if (rc != 0)
 	return rc;
 
-#if 0  /* handled in xen_init_display() for now */
-    if (!fb->have_console) {
-        fb->c.ds = graphic_console_init(xenfb_update,
-                                        xenfb_invalidate,
-                                        NULL,
-                                        NULL,
-                                        fb);
-        fb->have_console = 1;
-    }
-#endif
+    fb->con = graphic_console_init(NULL, 0, &xenfb_ops, fb);
 
     if (xenstore_read_fe_int(xendev, "feature-update", &fb->feature_update) == -1)
 	fb->feature_update = 0;
@@ -972,42 +966,3 @@ static const GraphicHwOps xenfb_ops = {
     .gfx_update  = xenfb_update,
     .update_interval = xenfb_update_interval,
 };
-
-/*
- * FIXME/TODO: Kill this.
- * Temporary needed while DisplayState reorganization is in flight.
- */
-void xen_init_display(int domid)
-{
-    struct XenDevice *xfb, *xin;
-    struct XenFB *fb;
-    struct XenInput *in;
-    int i = 0;
-
-wait_more:
-    i++;
-    main_loop_wait(true);
-    xfb = xen_pv_find_xendev("vfb", domid, 0);
-    xin = xen_pv_find_xendev("vkbd", domid, 0);
-    if (!xfb || !xin) {
-        if (i < 256) {
-            usleep(10000);
-            goto wait_more;
-        }
-        xen_pv_printf(NULL, 1, "displaystate setup failed\n");
-        return;
-    }
-
-    /* vfb */
-    fb = container_of(xfb, struct XenFB, c.xendev);
-    fb->c.con = graphic_console_init(NULL, 0, &xenfb_ops, fb);
-    fb->have_console = 1;
-
-    /* vkbd */
-    in = container_of(xin, struct XenInput, c.xendev);
-    in->c.con = fb->c.con;
-
-    /* retry ->init() */
-    xen_be_check_state(xin);
-    xen_be_check_state(xfb);
-}
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index 79aef4e..31d2f25 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -94,9 +94,6 @@ static void xen_init_pv(MachineState *machine)
 
     /* config cleanup hook */
     atexit(xen_config_cleanup);
-
-    /* setup framebuffer */
-    xen_init_display(xen_domid);
 }
 
 static void xenpv_machine_init(MachineClass *mc)
diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h
index 852c2ea..8a6fbcb 100644
--- a/include/hw/xen/xen_backend.h
+++ b/include/hw/xen/xen_backend.h
@@ -55,8 +55,6 @@ extern struct XenDevOps xen_netdev_ops;       /* xen_nic.c         */
 extern struct XenDevOps xen_usb_ops;          /* xen-usb.c         */
 #endif
 
-void xen_init_display(int domid);
-
 /* configuration (aka xenbus setup) */
 void xen_config_cleanup(void);
 int xen_config_dev_blk(DriveInfo *disk);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 1/3] xenfb: remove xen_init_display "temporary" hack
@ 2017-07-07 18:30   ` Stefano Stabellini
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2017-07-07 18:30 UTC (permalink / raw)
  To: peter.maydell, stefanha
  Cc: anthony.perard, xen-devel, sstabellini, qemu-devel, stefanha

Initialize xenfb properly, as all other backends, from its own
"initialise" function.

Remove the dependency of vkbd on vfb: use qemu_console_lookup_by_index
to find the principal console (to get the size of the screen) instead of
relying on a vfb backend to be available (which adds a dependency
between the two).

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
---
 hw/display/xenfb.c           | 81 ++++++++++----------------------------------
 hw/xenpv/xen_machine_pv.c    |  3 --
 include/hw/xen/xen_backend.h |  2 --
 3 files changed, 18 insertions(+), 68 deletions(-)

diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index e76c0d8..df8b78f 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -46,7 +46,6 @@
 struct common {
     struct XenDevice  xendev;  /* must be first */
     void              *page;
-    QemuConsole       *con;
 };
 
 struct XenInput {
@@ -61,6 +60,7 @@ struct XenInput {
 
 struct XenFB {
     struct common     c;
+    QemuConsole       *con;
     size_t            fb_len;
     int               row_stride;
     int               depth;
@@ -71,7 +71,6 @@ struct XenFB {
     int               fbpages;
     int               feature_update;
     int               bug_trigger;
-    int               have_console;
     int               do_resize;
 
     struct {
@@ -80,6 +79,7 @@ struct XenFB {
     int               up_count;
     int               up_fullscreen;
 };
+static const GraphicHwOps xenfb_ops;
 
 /* -------------------------------------------------------------------- */
 
@@ -306,10 +306,18 @@ static void xenfb_mouse_event(void *opaque,
 			      int dx, int dy, int dz, int button_state)
 {
     struct XenInput *xenfb = opaque;
-    DisplaySurface *surface = qemu_console_surface(xenfb->c.con);
-    int dw = surface_width(surface);
-    int dh = surface_height(surface);
-    int i;
+    QemuConsole *con = qemu_console_lookup_by_index(0);
+    DisplaySurface *surface;
+    int dw, dh, i;
+
+    if (!con) {
+        xen_pv_printf(&xenfb->c.xendev, 0, "No QEMU console available");
+        return;
+    }
+
+    surface = qemu_console_surface(con);
+    dw = surface_width(surface);
+    dh = surface_height(surface);
 
     trace_xenfb_mouse_event(opaque, dx, dy, dz, button_state,
                             xenfb->abs_pointer_wanted);
@@ -344,11 +352,6 @@ static int input_initialise(struct XenDevice *xendev)
     struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
     int rc;
 
-    if (!in->c.con) {
-        xen_pv_printf(xendev, 1, "ds not set (yet)\n");
-        return -1;
-    }
-
     rc = common_bind(&in->c);
     if (rc != 0)
 	return rc;
@@ -608,7 +611,7 @@ static int xenfb_configure_fb(struct XenFB *xenfb, size_t fb_len_lim,
  */
 static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)
 {
-    DisplaySurface *surface = qemu_console_surface(xenfb->c.con);
+    DisplaySurface *surface = qemu_console_surface(xenfb->con);
     int line, oops = 0;
     int bpp = surface_bits_per_pixel(surface);
     int linesize = surface_stride(surface);
@@ -642,7 +645,7 @@ static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)
         xen_pv_printf(&xenfb->c.xendev, 0, "%s: oops: convert %d -> %d bpp?\n",
                       __FUNCTION__, xenfb->depth, bpp);
 
-    dpy_gfx_update(xenfb->c.con, x, y, w, h);
+    dpy_gfx_update(xenfb->con, x, y, w, h);
 }
 
 #ifdef XENFB_TYPE_REFRESH_PERIOD
@@ -728,7 +731,7 @@ static void xenfb_update(void *opaque)
             surface = qemu_create_displaysurface(xenfb->width, xenfb->height);
             break;
         }
-        dpy_gfx_replace_surface(xenfb->c.con, surface);
+        dpy_gfx_replace_surface(xenfb->con, surface);
         xen_pv_printf(&xenfb->c.xendev, 1,
                       "update: resizing: %dx%d @ %d bpp%s\n",
                       xenfb->width, xenfb->height, xenfb->depth,
@@ -877,16 +880,7 @@ static int fb_initialise(struct XenDevice *xendev)
     if (rc != 0)
 	return rc;
 
-#if 0  /* handled in xen_init_display() for now */
-    if (!fb->have_console) {
-        fb->c.ds = graphic_console_init(xenfb_update,
-                                        xenfb_invalidate,
-                                        NULL,
-                                        NULL,
-                                        fb);
-        fb->have_console = 1;
-    }
-#endif
+    fb->con = graphic_console_init(NULL, 0, &xenfb_ops, fb);
 
     if (xenstore_read_fe_int(xendev, "feature-update", &fb->feature_update) == -1)
 	fb->feature_update = 0;
@@ -972,42 +966,3 @@ static const GraphicHwOps xenfb_ops = {
     .gfx_update  = xenfb_update,
     .update_interval = xenfb_update_interval,
 };
-
-/*
- * FIXME/TODO: Kill this.
- * Temporary needed while DisplayState reorganization is in flight.
- */
-void xen_init_display(int domid)
-{
-    struct XenDevice *xfb, *xin;
-    struct XenFB *fb;
-    struct XenInput *in;
-    int i = 0;
-
-wait_more:
-    i++;
-    main_loop_wait(true);
-    xfb = xen_pv_find_xendev("vfb", domid, 0);
-    xin = xen_pv_find_xendev("vkbd", domid, 0);
-    if (!xfb || !xin) {
-        if (i < 256) {
-            usleep(10000);
-            goto wait_more;
-        }
-        xen_pv_printf(NULL, 1, "displaystate setup failed\n");
-        return;
-    }
-
-    /* vfb */
-    fb = container_of(xfb, struct XenFB, c.xendev);
-    fb->c.con = graphic_console_init(NULL, 0, &xenfb_ops, fb);
-    fb->have_console = 1;
-
-    /* vkbd */
-    in = container_of(xin, struct XenInput, c.xendev);
-    in->c.con = fb->c.con;
-
-    /* retry ->init() */
-    xen_be_check_state(xin);
-    xen_be_check_state(xfb);
-}
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index 79aef4e..31d2f25 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -94,9 +94,6 @@ static void xen_init_pv(MachineState *machine)
 
     /* config cleanup hook */
     atexit(xen_config_cleanup);
-
-    /* setup framebuffer */
-    xen_init_display(xen_domid);
 }
 
 static void xenpv_machine_init(MachineClass *mc)
diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h
index 852c2ea..8a6fbcb 100644
--- a/include/hw/xen/xen_backend.h
+++ b/include/hw/xen/xen_backend.h
@@ -55,8 +55,6 @@ extern struct XenDevOps xen_netdev_ops;       /* xen_nic.c         */
 extern struct XenDevOps xen_usb_ops;          /* xen-usb.c         */
 #endif
 
-void xen_init_display(int domid);
-
 /* configuration (aka xenbus setup) */
 void xen_config_cleanup(void);
 int xen_config_dev_blk(DriveInfo *disk);
-- 
1.9.1


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Qemu-devel] [PULL 2/3] xen-platform: Cleanup network infrastructure when emulated NICs are unplugged
  2017-07-07 18:30   ` Stefano Stabellini
@ 2017-07-07 18:30     ` Stefano Stabellini
  -1 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2017-07-07 18:30 UTC (permalink / raw)
  To: peter.maydell, stefanha
  Cc: sstabellini, stefanha, anthony.perard, xen-devel, qemu-devel,
	Ross Lagerwall

From: Ross Lagerwall <ross.lagerwall@citrix.com>

When the guest unplugs the emulated NICs, cleanup the peer for each NIC
as it is not needed anymore. Most importantly, this allows the tap
interfaces which QEMU holds open to be closed and removed.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
---
 hw/i386/xen/xen_platform.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index 1419fc9..f231558 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -102,8 +102,19 @@ static void unplug_nic(PCIBus *b, PCIDevice *d, void *o)
     }
 }
 
+/* Remove the peer of the NIC device. Normally, this would be a tap device. */
+static void del_nic_peer(NICState *nic, void *opaque)
+{
+    NetClientState *nc;
+
+    nc = qemu_get_queue(nic);
+    if (nc->peer)
+        qemu_del_net_client(nc->peer);
+}
+
 static void pci_unplug_nics(PCIBus *bus)
 {
+    qemu_foreach_nic(del_nic_peer, NULL);
     pci_for_each_device(bus, 0, unplug_nic, NULL);
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 2/3] xen-platform: Cleanup network infrastructure when emulated NICs are unplugged
@ 2017-07-07 18:30     ` Stefano Stabellini
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2017-07-07 18:30 UTC (permalink / raw)
  To: peter.maydell, stefanha
  Cc: sstabellini, qemu-devel, Ross Lagerwall, stefanha,
	anthony.perard, xen-devel

From: Ross Lagerwall <ross.lagerwall@citrix.com>

When the guest unplugs the emulated NICs, cleanup the peer for each NIC
as it is not needed anymore. Most importantly, this allows the tap
interfaces which QEMU holds open to be closed and removed.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
---
 hw/i386/xen/xen_platform.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index 1419fc9..f231558 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -102,8 +102,19 @@ static void unplug_nic(PCIBus *b, PCIDevice *d, void *o)
     }
 }
 
+/* Remove the peer of the NIC device. Normally, this would be a tap device. */
+static void del_nic_peer(NICState *nic, void *opaque)
+{
+    NetClientState *nc;
+
+    nc = qemu_get_queue(nic);
+    if (nc->peer)
+        qemu_del_net_client(nc->peer);
+}
+
 static void pci_unplug_nics(PCIBus *bus)
 {
+    qemu_foreach_nic(del_nic_peer, NULL);
     pci_for_each_device(bus, 0, unplug_nic, NULL);
 }
 
-- 
1.9.1


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Qemu-devel] [PULL 3/3] xen/pt: Fixup addr validation in xen_pt_pci_config_access_check
  2017-07-07 18:30   ` Stefano Stabellini
@ 2017-07-07 18:30     ` Stefano Stabellini
  -1 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2017-07-07 18:30 UTC (permalink / raw)
  To: peter.maydell, stefanha
  Cc: sstabellini, stefanha, anthony.perard, xen-devel, qemu-devel,
	Anoob Soman

From: Anoob Soman <anoob.soman@citrix.com>

xen_pt_pci_config_access_check checks if addr >= 0xFF. 0xFF is a valid
address and should not be ignored.

Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
---
 hw/xen/xen_pt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index b6d71bb..375efa6 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -85,7 +85,7 @@ void xen_pt_log(const PCIDevice *d, const char *f, ...)
 static int xen_pt_pci_config_access_check(PCIDevice *d, uint32_t addr, int len)
 {
     /* check offset range */
-    if (addr >= 0xFF) {
+    if (addr > 0xFF) {
         XEN_PT_ERR(d, "Failed to access register with offset exceeding 0xFF. "
                    "(addr: 0x%02x, len: %d)\n", addr, len);
         return -1;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 3/3] xen/pt: Fixup addr validation in xen_pt_pci_config_access_check
@ 2017-07-07 18:30     ` Stefano Stabellini
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2017-07-07 18:30 UTC (permalink / raw)
  To: peter.maydell, stefanha
  Cc: sstabellini, qemu-devel, stefanha, Anoob Soman, anthony.perard,
	xen-devel

From: Anoob Soman <anoob.soman@citrix.com>

xen_pt_pci_config_access_check checks if addr >= 0xFF. 0xFF is a valid
address and should not be ignored.

Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
---
 hw/xen/xen_pt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index b6d71bb..375efa6 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -85,7 +85,7 @@ void xen_pt_log(const PCIDevice *d, const char *f, ...)
 static int xen_pt_pci_config_access_check(PCIDevice *d, uint32_t addr, int len)
 {
     /* check offset range */
-    if (addr >= 0xFF) {
+    if (addr > 0xFF) {
         XEN_PT_ERR(d, "Failed to access register with offset exceeding 0xFF. "
                    "(addr: 0x%02x, len: %d)\n", addr, len);
         return -1;
-- 
1.9.1


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] [PULL 0/3] please pull xen-20170707-tag
  2017-07-07 18:29 ` Stefano Stabellini
@ 2017-07-10 11:11   ` Peter Maydell
  -1 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2017-07-10 11:11 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Anthony PERARD, xen-devel,
	QEMU Developers

On 7 July 2017 at 19:29, Stefano Stabellini <sstabellini@kernel.org> wrote:
> The following changes since commit b11365867568ba954de667a0bfe0945b8f78d6bd:
>
>   Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170706' into staging (2017-07-06 11:42:59 +0100)
>
> are available in the git repository at:
>
>
>   git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20170707-tag
>
> for you to fetch changes up to 4daf62594d13dfca2ce3a74dd3bddee5f54d7127:
>
>   xen/pt: Fixup addr validation in xen_pt_pci_config_access_check (2017-07-07 11:13:10 -0700)
>
> ----------------------------------------------------------------
> Xen 2017/07/07
>
> ----------------------------------------------------------------
> Anoob Soman (1):
>       xen/pt: Fixup addr validation in xen_pt_pci_config_access_check
>
> Ross Lagerwall (1):
>       xen-platform: Cleanup network infrastructure when emulated NICs are unplugged
>
> Stefano Stabellini (1):
>       xenfb: remove xen_init_display "temporary" hack
>
>  hw/display/xenfb.c           | 81 ++++++++++----------------------------------
>  hw/i386/xen/xen_platform.c   | 11 ++++++
>  hw/xen/xen_pt.c              |  2 +-
>  hw/xenpv/xen_machine_pv.c    |  3 --
>  include/hw/xen/xen_backend.h |  2 --
>  5 files changed, 30 insertions(+), 69 deletions(-)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PULL 0/3] please pull xen-20170707-tag
@ 2017-07-10 11:11   ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2017-07-10 11:11 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Anthony PERARD, Stefan Hajnoczi, QEMU Developers,
	Stefan Hajnoczi, xen-devel

On 7 July 2017 at 19:29, Stefano Stabellini <sstabellini@kernel.org> wrote:
> The following changes since commit b11365867568ba954de667a0bfe0945b8f78d6bd:
>
>   Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170706' into staging (2017-07-06 11:42:59 +0100)
>
> are available in the git repository at:
>
>
>   git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20170707-tag
>
> for you to fetch changes up to 4daf62594d13dfca2ce3a74dd3bddee5f54d7127:
>
>   xen/pt: Fixup addr validation in xen_pt_pci_config_access_check (2017-07-07 11:13:10 -0700)
>
> ----------------------------------------------------------------
> Xen 2017/07/07
>
> ----------------------------------------------------------------
> Anoob Soman (1):
>       xen/pt: Fixup addr validation in xen_pt_pci_config_access_check
>
> Ross Lagerwall (1):
>       xen-platform: Cleanup network infrastructure when emulated NICs are unplugged
>
> Stefano Stabellini (1):
>       xenfb: remove xen_init_display "temporary" hack
>
>  hw/display/xenfb.c           | 81 ++++++++++----------------------------------
>  hw/i386/xen/xen_platform.c   | 11 ++++++
>  hw/xen/xen_pt.c              |  2 +-
>  hw/xenpv/xen_machine_pv.c    |  3 --
>  include/hw/xen/xen_backend.h |  2 --
>  5 files changed, 30 insertions(+), 69 deletions(-)

Applied, thanks.

-- PMM

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-10 11:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 18:29 [Qemu-devel] [PULL 0/3] please pull xen-20170707-tag Stefano Stabellini
2017-07-07 18:29 ` Stefano Stabellini
2017-07-07 18:30 ` [Qemu-devel] [PULL 1/3] xenfb: remove xen_init_display "temporary" hack Stefano Stabellini
2017-07-07 18:30   ` Stefano Stabellini
2017-07-07 18:30   ` [Qemu-devel] [PULL 2/3] xen-platform: Cleanup network infrastructure when emulated NICs are unplugged Stefano Stabellini
2017-07-07 18:30     ` Stefano Stabellini
2017-07-07 18:30   ` [Qemu-devel] [PULL 3/3] xen/pt: Fixup addr validation in xen_pt_pci_config_access_check Stefano Stabellini
2017-07-07 18:30     ` Stefano Stabellini
2017-07-10 11:11 ` [Qemu-devel] [PULL 0/3] please pull xen-20170707-tag Peter Maydell
2017-07-10 11:11   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.