Skip to contentSkip to conversation

vga: enable virtio-vga for pseries, vmsvga cursor checks.

GIT PULL Applied Gerd Hoffmann 2 participants 4 messages Oct 20, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

vga patch queue, featuring two small fixes.

please pull,
Gerd

The following changes since commit 26c7be842637ee65a79cd77f96a99c23ddcd90ad:

Merge remote-tracking branch 'remotes/sstabellini/tags/2015-10-19-tag' into staging (2015-10-19 12:13:27 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/pull-vga-20151020-1

for you to fetch changes up to 5829b097204189c56dd1fb62c7f827360394bb39:

vmsvga: more cursor checks (2015-10-20 09:26:36 +0200)

----------------------------------------------------------------
vga: enable virtio-vga for pseries, vmsvga cursor checks.

----------------------------------------------------------------
Benjamin Herrenschmidt (1):
ppc/spapr: Allow VIRTIO_VGA

Gerd Hoffmann (1):
vmsvga: more cursor checks

 default-configs/ppc64-softmmu.mak |  1 +
 hw/display/vmware_vga.c           | 11 +++++++----
 hw/ppc/spapr.c                    |  1 +
 3 files changed, 9 insertions(+), 4 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 1/2] ppc/spapr: Allow VIRTIO_VGA

From: Benjamin Herrenschmidt <[email protected]>

It works fine with the Linux driver out of the box

---
 default-configs/ppc64-softmmu.mak | 1 +
 hw/ppc/spapr.c                    | 1 +
 2 files changed, 2 insertions(+)
default-configs/ppc64-softmmu.mak +1 -0
index e77cb1a..bb71b23 100644
@@ -3,6 +3,7 @@
 include pci.mak
 include sound.mak
 include usb.mak
+CONFIG_VIRTIO_VGA=y
 CONFIG_ISA_MMIO=y
 CONFIG_ESCC=y
 CONFIG_M48T59=y
hw/ppc/spapr.c +1 -0
index d1b0e53..3852ad1 100644
@@ -1169,6 +1169,7 @@ static int spapr_vga_init(PCIBus *pci_bus)
     case VGA_DEVICE:
         return true;
     case VGA_STD:
+    case VGA_VIRTIO:
         return pci_vga_init(pci_bus) != NULL;
     default:
         fprintf(stderr, "This vga model is not supported,"
Signature · 1 line
1.8.3.1
#2 lore raw

[Qemu-devel] [PULL 2/2] vmsvga: more cursor checks

In reply to Gerd Hoffmann

Check the cursor size more carefully. Also switch to unsigned while being at it, so they can't be negative.

---
 hw/display/vmware_vga.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
hw/display/vmware_vga.c +7 -4
index 8e93509..9354037 100644
@@ -488,10 +488,10 @@ static inline int vmsvga_fill_rect(struct vmsvga_state_s *s,
 #endif
 
 struct vmsvga_cursor_definition_s {
-    int width;
-    int height;
+    uint32_t width;
+    uint32_t height;
     int id;
-    int bpp;
+    uint32_t bpp;
     int hot_x;
     int hot_y;
     uint32_t mask[1024];
@@ -658,7 +658,10 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
             cursor.bpp = vmsvga_fifo_read(s);
 
             args = SVGA_BITMAP_SIZE(x, y) + SVGA_PIXMAP_SIZE(x, y, cursor.bpp);
-            if (SVGA_BITMAP_SIZE(x, y) > sizeof cursor.mask ||
+            if (cursor.width > 256 ||
+                cursor.height > 256 ||
+                cursor.bpp > 32 ||
+                SVGA_BITMAP_SIZE(x, y) > sizeof cursor.mask ||
                 SVGA_PIXMAP_SIZE(x, y, cursor.bpp) > sizeof cursor.image) {
                     goto badcmd;
             }
Signature · 1 line
1.8.3.1
#3 lore raw
In reply to Gerd Hoffmann
Quoted 14 lines · Gerd Hoffmann

Hi,

vga patch queue, featuring two small fixes.

please pull,
Gerd

The following changes since commit 26c7be842637ee65a79cd77f96a99c23ddcd90ad:

Merge remote-tracking branch 'remotes/sstabellini/tags/2015-10-19-tag' into staging (2015-10-19 12:13:27 +0100)

are available in the git repository at:

Quoted 9 lines

git://git.kraxel.org/qemu tags/pull-vga-20151020-1

for you to fetch changes up to 5829b097204189c56dd1fb62c7f827360394bb39:

vmsvga: more cursor checks (2015-10-20 09:26:36 +0200)

----------------------------------------------------------------
vga: enable virtio-vga for pseries, vmsvga cursor checks.

Applied, thanks.

-- PMM