Skip to contentSkip to conversation

Graphic card

Qemu-devel Ricardo Almeida 6 participants 11 messages Oct 30, 2005 – Oct 31, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I'm sure you got this asked over and over again, but I joined the list recently :o)

I've installed qemu+kemu on linux and installed windows XP on it. The graphic card is slow :( and it's not possible to see videos :(

1- Will it be possible to see videos when some day the graphic card code is enhanced?
2- Cirrus card is too slow/some other issue to see videos?
3- Why not implement some betther graphic card with 3d support like 3DFX Voodoo3 (I believe it was the first 3DFX that was also a graphic card and not just a 3d accelarator)?
4- Why not implement some Qemu special driver for common installed systems that names itself as a Cirrus driver but it's a vmware-like driver.

I believe (4) should be the fastest, but I think the best relation "work required - benefit" is (3) as it works faster off-the-shelf with all the operating systems...

Regards,
Ricardo Almeida

#1 lore raw

Well, it basically comes down to the fact that QEMU isn't so optimised as much as VMware is. >_> I'm not really a developer, but I'll answer as best as I can, and maybe somebody will correct me!

1. You can technically see videos right now, but yeah, it's not very smooth. Oh, and the guest operating system itself will affect the speed. Using Windows 2000, NT4, or Win95 would be a lot faster than Windows XP (but you might not have any lower version). Someday, it might be possible to see videos at a decent speed...
2. Not sure what you're asking, really
3. Perhaps, but there's two things here. First of all, the card would have to be documented in a fair amount of low-level detail, something that big video card companies rarely or never do. Secondly, the complexity of the card might make its emulated implementation even slower than the Cirrus one used currently
4. It sounds reasonable, but it undermines one of QEMU's goals:
running guest operating system without modification (and drivers certainly count as one). Also, it'll possibly limit the number of operating systems you'd run in QEMU with fancy graphics... implementing Cirrus makes it possible to run many OSes with no (or few) video problems, including Windows 95, Win NT 4, almost every GNU/Linux, almost every BSD, Solaris, Darwin, Plan 9, QNX, DOS, BeOS, etc.

Quoted 17 lines · Ricardo Almeida

Hi,

I'm sure you got this asked over and over again, but I joined the list
recently :o)

I've installed qemu+kemu on linux and installed windows XP on it. The
graphic card is slow :( and it's not possible to see videos :(

1- Will it be possible to see videos when some day the graphic card code is
enhanced?
2- Cirrus card is too slow/some other issue to see videos?
3- Why not implement some betther graphic card with 3d support like 3DFX
Voodoo3 (I believe it was the first 3DFX that was also a graphic card and not just a 3d accelarator)?
4- Why not implement some Qemu special driver for common installed systems
that names itself as a Cirrus driver but it's a vmware-like driver.

Quoted 6 lines

I believe (4) should be the fastest, but I think the best relation "work
required - benefit" is (3) as it works faster off-the-shelf with all the operating systems...

Regards,
Ricardo Almeida

--
Mike

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 9 lines · Mike Swanson

4. It sounds reasonable, but it undermines one of QEMU's goals:
running guest operating system without modification (and drivers certainly count as one). Also, it'll possibly limit the number of operating systems you'd run in QEMU with fancy graphics... implementing Cirrus makes it possible to run many OSes with no (or few) video problems, including Windows 95, Win NT 4, almost every GNU/Linux, almost every BSD, Solaris, Darwin, Plan 9, QNX, DOS, BeOS, etc.

I agree that it's good that Qemu emulates such a wide-spread graphics card... But I also think it's some kind of dead end.
Not only does eg. BeOS not support that Cirrus card (last time I tried BeOS inside Qemu, it complained that the Cirrus card is too old :-) . Also I'm not sure whether the Cirrus card will ever be fast enough for that. Do "real" Cirrus 5446 cards offer hardware video acceleration? And do they offer 2d acceleration that can be used by DirectDraw? They certainly don't have 3d support, so if Qemu should have fast 3d graphics one day, it will certainly not work with the current graphics emulation.

So, I think we shouldn't dismiss the possibility of a special Qemu graphics card (and driver). The Cirrus card (and -std-vga) should still be available for those systems where the Qemu graphics driver is not available, while the users who run a wide-spread, recent system as guest can have faster graphics.

Just my two cents,
Oliver Gerlich
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDZLY+TFOM6DcNJ6cRAoCxAJ9yAC8Th6DfuXnPQJ1m7mn85RvPoQCeKj6D 2XyhMcUQQ+lsy5bQn1IOuHY=
=LoQ7
-----END PGP SIGNATURE-----

#3 lore raw
Quoted 3 lines · Oliver Gerlich

do they offer 2d acceleration that can be used by DirectDraw? They certainly don't have 3d support, so if Qemu should have fast 3d graphics one day, it will certainly not work with the current graphics emulation.

Fast 3d and emultion does not mix that well.. the more advanced graphics card you try to emulate the more complex (and also slower) the emulation of that graphics card is.

Quoted 2 lines

So, I think we shouldn't dismiss the possibility of a special Qemu graphics card (and driver).

Agreed, but it is not in the main focus of qemu I think. But I also do not think any of the developers would oppose if such solution is being contributed.

Regards
Henrik

#4 lore raw
Quoted 5 lines

Fast 3d and emultion does not mix that well.. the more advanced graphics card you try to emulate the more complex (and also slower) the emulation of that graphics card is.

As I said in my previous reply, 3D calls probably don't need to be emulated. Just as you don't have to emulate a x86 processor if you're running in one, you can specify that you can only emulate some 3D card if the real hardware have some OpenGL driver. That way you wouldn't be emulating them, just redirecting the calls..,

Regards,
Ricardo Almeida

#5 lore raw
Quoted 6 lines · Ricardo Almeida
Quoted 5 lines

Fast 3d and emultion does not mix that well.. the more advanced graphics card you try to emulate the more complex (and also slower) the emulation of that graphics card is.

Quoted 8 lines

As I said in my previous reply, 3D calls probably don't need to be emulated. Just as you don't have to emulate a x86 processor if you're running in one, you can specify that you can only emulate some 3D card if the real hardware have some OpenGL driver. That way you wouldn't be emulating them, just redirecting the calls..,

Regards,
Ricardo Almeida

Agreed.

One strategy that was being done is to use a custom OpenGL library (note, library not a driver) for the qemu guest. OpenGL calls get passed to qemu directly, which then does the 3d by calling OpenGL on the host.

Passing direct calls is doable, and takes far less of a hit. Of course there is the cost of requiring qemu to be linked to an OpenGL library. (I suppose Mesa is good enough for those who lack 3d cards.)

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#6 lore raw
Quoted 3 lines

One strategy that was being done is to use a custom OpenGL library (note, library not a driver) for the qemu guest. OpenGL calls get passed to qemu directly, which then does the 3d by calling OpenGL on the host.

There was someone implemented a prototype version of this, so it's definitely possible.

Quoted 3 lines

Passing direct calls is doable, and takes far less of a hit. Of course there is the cost of requiring qemu to be linked to an OpenGL library. (I suppose Mesa is good enough for those who lack 3d cards.)

OpenGL is relatively easy to link against dynamically (ie. LoadLibrary/dlopen), so it could be a commandline option.

Paul

#7 lore raw
In reply to Jim C. Brown
Quoted 3 lines · Jim C. Brown

One strategy that was being done is to use a custom OpenGL library (note, library not a driver) for the qemu guest. OpenGL calls get passed to qemu directly, which then does the 3d by calling OpenGL on the host.

This makes much more sense than asking for emulation of a 3D card.

Passing direct hardware calls from QEMU to the host graphics card is basically a no-option thing. It would both be technically very difficult, and extremely tied to a single host card model (specific model, not only vendor).

But providing OpenGL calabilities to the guest, mapped to OpenGL on the host is manageable, and not host hardware dependent.

Regards
Henrik

#8 lore raw
In reply to Oliver Gerlich
Quoted 14 lines · Oliver Gerlich

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 9 lines · Mike Swanson

4. It sounds reasonable, but it undermines one of QEMU's goals:
running guest operating system without modification (and drivers certainly count as one). Also, it'll possibly limit the number of operating systems you'd run in QEMU with fancy graphics... implementing Cirrus makes it possible to run many OSes with no (or few) video problems, including Windows 95, Win NT 4, almost every GNU/Linux, almost every BSD, Solaris, Darwin, Plan 9, QNX, DOS, BeOS, etc.

Quoted 8 lines

So, I think we shouldn't dismiss the possibility of a special Qemu graphics card (and driver). The Cirrus card (and -std-vga) should still be available for those systems where the Qemu graphics driver is not available, while the users who run a wide-spread, recent system as guest can have faster graphics.

Just my two cents,
Oliver Gerlich

There is (or was) work on a qemu-specific opengl library. It didn't require any special hardware - just a guest-side driver and some patches to qemu.

It'd accomplish the same effect as a custom driver, but perhaps more easily.

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#9 lore raw
In reply to Mike Swanson
Quoted 5 lines · Mike Swanson

3. Perhaps, but there's two things here. First of all, the card would have to be documented in a fair amount of low-level detail, something that big video card companies rarely or never do.

What about the Via/S3 Unichrome? Via allows access to the Linux Video Interface (http://www.viaarena.com/default.aspx?PageID=151) and there are open source drivers (http://sourceforge.net/projects/unichrome/) from where, to my believe, it's possible to understand the graphic card.
I'm just a java developer so I really can't help in any of the hard work. Just trying to make some suggestions to improve this great software :)

Secondly, the

Quoted 2 lines

complexity of the card might make its emulated implementation even slower than the Cirrus one used currently

This is something I tend to dissagree... People aren't going to emulate a full pc in a slow one. The worst graphic card sold today (picked a random online shop here in Portugal) is a GeForce FX5200, with DirectX 9.0 and OpenGL 1.4 hardware accelaration. I'm sure most calls to the emulated graphic card can have an almost direct call.
Cirrus card can still be emulated, but I don't see nothing wrong in having an emulated card that requires a 60€ graphic card to work...

4. It sounds reasonable, but it undermines one of QEMU's goals:

Quoted 7 lines

running guest operating system without modification (and drivers certainly count as one). Also, it'll possibly limit the number of operating systems you'd run in QEMU with fancy graphics... implementing Cirrus makes it possible to run many OSes with no (or few) video problems, including Windows 95, Win NT 4, almost every GNU/Linux, almost every BSD, Solaris, Darwin, Plan 9, QNX, DOS, BeOS, etc.

What I meant in 4 was to keep the Cirrus emulated but have a Cirrus++ driver made to take advantages of knowing it's not really a Cirrus card but an emulated one... But as I said, it's probably more work done than advantages get.

Quoted 14 lines · Ricardo Almeida
Quoted 8 lines

I'm sure you got this asked over and over again, but I joined the list recently :o)

I've installed qemu+kemu on linux and installed windows XP on it. The graphic card is slow :( and it's not possible to see videos :(

3- Why not implement some betther graphic card with 3d support like 3DFX Voodoo3 (I believe it was the first 3DFX that was also a graphic card

and

Quoted 2 lines

not just a 3d accelarator)?
4- Why not implement some Qemu special driver for common installed

systems

Quoted 1 line

that names itself as a Cirrus driver but it's a vmware-like driver.

#10 lore raw
Quoted 8 lines · Ricardo Almeida
Quoted 5 lines · Mike Swanson

3. Perhaps, but there's two things here. First of all, the card would have to be documented in a fair amount of low-level detail, something that big video card companies rarely or never do.

Quoted 7 lines

What about the Via/S3 Unichrome? Via allows access to the Linux Video Interface (http://www.viaarena.com/default.aspx?PageID=151) and there are open source drivers (http://sourceforge.net/projects/unichrome/) from where, to my believe, it's possible to understand the graphic card.
I'm just a java developer so I really can't help in any of the hard work. Just trying to make some suggestions to improve this great software :)

It will still be fairly hard to do, even if its completely open.

Since Via S3/Unichrome is supported by DRI, I'd say that it looks doable (at least on a first glance). Better than say a Nvidia or ATI card. Since those aren't open, we can't implement them without careful reverse engineering (even their open source drivers don't handle 3d).

Quoted 5 lines

Secondly, the

Quoted 2 lines

complexity of the card might make its emulated implementation even slower than the Cirrus one used currently

Quoted 8 lines

This is something I tend to dissagree... People aren't going to emulate a full pc in a slow one. The worst graphic card sold today (picked a random online shop here in Portugal) is a GeForce FX5200, with DirectX 9.0 and OpenGL 1.4 hardware accelaration. I'm sure most calls to the emulated graphic card can have an almost direct call.
Cirrus card can still be emulated, but I don't see nothing wrong in having an emulated card that requires a 60? graphic card to work...

See above. It is only plausible if the card's specs are completely open with respect to 3d acceleration.

Even then, "directly" rerouting calls only works if the host happens to have the same hardware. And that would probably require exclusive use of the video card.

It may be possible to route the low level calls from the emulated card to a higher level api on the host, such as OpenGL.

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.