Log in


March 2017
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

airlied [userpic]
qemu vmware + vmwgfx

So just as an aside to radeon stuff, I spent an hour or two today on a break playing with qemu's vmware gfx + VMware's new vmwgfx kms driver.

I've managed to get it as far as showing me the console which was good,


is the hacks against git://git.freedesktop.org/git/mesa/vmwgfx.git

the first hack looks like a bug in qemu, really it should expose a second PCI bar with the FIFO in it according to the VMware SVGA specification.

the second looks like a possible bug in vmwgfx if no irq is advertised from the device, which in this case there isn't,
vmwgfx gets a capability bit for having an IRQ from what I can see.

third looks like it should be necessary, but I'd need to read the vmware svga spec a bit more, without it, we get the
wrong fb size.

the fourth looks like a bug in qemu confusing depth and bpp, bpp can be 32, but depth is generally 24.

I'm not sure what I'll be doing further on it, it was just a neat afternoon hack I meant to try for a while

Would love to ditch Cirrus for QEMU guests in virt-manager

If you get the QEMU vmware + Xorg vmware drivers working nicely, we'd love to try and ditch the ancient Cirrus Logic card we expose to guests by default. We could easily configure virt-manager to export a VMWare card to, say, Fedora 13 guests.

I wouldn't be at all surprised if the QEMU vmware driver impl still mixed up depth+bpp in some places, because there have certainly been bugs where it did crazy things like that in the recent past.

VMware have a similar product to Red Hat's virtual desktop, so perhaps this could evolve to Red Hat being preferred Linux OS for virtual desktops?

KMS vmwgfx plymouth

I also tried vmwgfx in my vmware player with linux inside.
I patched it using your commnts disabling IRQ

I put video=vmwgfx on kernel boot line after putting vmwgfx in my initrd of a new shining 2.6.32 kernel.
It boots fine (it recognize my video card):
[ 3.262496] Freeing unused kernel memory: 320k freed
[ 3.579150] [vmwgfx] Initialized drm 1.1.0 20060810
[ 3.581032] [vmwgfx] Capabilities:
[ 3.581050] [vmwgfx] Rect copy.
[ 3.581067] [vmwgfx] Cursor.
[ 3.581085] [vmwgfx] Cursor bypass.
[ 3.581102] [vmwgfx] Cursor bypass 2.
[ 3.581120] [vmwgfx] 8bit emulation.
[ 3.581137] [vmwgfx] Alpha cursor.
[ 3.581155] [vmwgfx] Extended Fifo.
[ 3.581173] [vmwgfx] Multimon.
[ 3.581190] [vmwgfx] Pitchlock.
[ 3.581208] [vmwgfx] Max GMR ids is 0
[ 3.581225] [vmwgfx] Max GMR descriptors is 0
[ 3.581243] [vmwgfx] VRAM at 0xf0000000 size is 16384 kiB
[ 3.581260] [vmwgfx] MMIO at 0xe8000000 size is 2048 kiB
[ 3.581278] [vmwgfx] global init.
[ 3.581400] [TTM] Zone kernel: Available graphics memory: 257548 kiB.
[ 3.583030] [vmwgfx:vmw_driver_load] *ERROR* Failed installing irq: -22
[ 3.584059] [vmwgfx] width 640
[ 3.584077] [vmwgfx] height 480
[ 3.584094] [vmwgfx] bpp 32
[ 3.586037] [vmwgfx] Fifo max 0x00200000 min 0x00001000 cap 0x00000007
[ 3.619034] Console: switching to colour frame buffer device 100x37
[ 3.623032] [vmwgfx] Initialized vmwgfx 0.1.2 20090724 for 0000:00:0f.0 on mi
nor 0

and also plymouth start as well.

The only thing that is not correct is the fb dimension:
You can see it at http://imagebin.ca/view/BiXd36.html

I tried to patch with this:
diff --git a/vmwgfx_fb.c b/vmwgfx_fb.c
index 4dfdf7c..65d8de8 100644
--- a/vmwgfx_fb.c
+++ b/vmwgfx_fb.c
@@ -183,10 +183,12 @@ static int vmw_fb_set_par(struct fb_info *info)
vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffs
vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres);
vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres);
+ vmw_write(vmw_priv, SVGA_REG_ENABLE, 1);
vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
} else {
vmw_write(vmw_priv, SVGA_REG_WIDTH, info->var.xres);
vmw_write(vmw_priv, SVGA_REG_HEIGHT, info->var.yres);
+ vmw_write(vmw_priv, SVGA_REG_ENABLE, 1);

/* TODO check if pitch and offset changes */

But always wrong resolution as you see in the image.

Anyway great work, we're waiting for xorg module intergration.