qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA
@ 2007-08-09 19:27 Jeremy Katz
  2007-08-10 16:28 ` Paul Brook
  0 siblings, 1 reply; 7+ messages in thread
From: Jeremy Katz @ 2007-08-09 19:27 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

The attached adds a PCI subsystem vendor ID of 0x514D (QM ascii->hex)
for the Cirrus emulation so that you can tell that the system is running
under qemu.  This will make it so that, eg, we can detect that in X and
know that resolutions > 800x600 won't blow up a monitor.

Downside is that it's not an officially registered vendor ID as it looks
like that requires joining the PCI-SIG.  Also, if this is interesting,
it's probably also worth doing for other emulated PCI devices as well.

Jeremy

[-- Attachment #2: qemu-vendor-subsystem.patch --]
[-- Type: text/x-patch, Size: 764 bytes --]

Index: hw/cirrus_vga.c
===================================================================
RCS file: /sources/qemu/qemu/hw/cirrus_vga.c,v
retrieving revision 1.26
diff -u -u -r1.26 cirrus_vga.c
--- hw/cirrus_vga.c	31 Jul 2007 23:26:00 -0000	1.26
+++ hw/cirrus_vga.c	9 Aug 2007 19:27:03 -0000
@@ -3247,6 +3247,11 @@
     pci_conf[0x0a] = PCI_CLASS_SUB_VGA;
     pci_conf[0x0b] = PCI_CLASS_BASE_DISPLAY;
     pci_conf[0x0e] = PCI_CLASS_HEADERTYPE_00h;
+#define SUBSYSTEM_VENDOR_QEMU 0x514D
+    pci_conf[0x2c] = (uint8_t) (SUBSYSTEM_VENDOR_QEMU & 0xff);
+    pci_conf[0x2d] = (uint8_t) (SUBSYSTEM_VENDOR_QEMU >> 8);
+    pci_conf[0x2e] = (uint8_t) (device_id & 0xff);
+    pci_conf[0x2f] = (uint8_t) (device_id >> 8);
 
     /* setup VGA */
     s = &d->cirrus_vga;

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

* Re: [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA
  2007-08-09 19:27 [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA Jeremy Katz
@ 2007-08-10 16:28 ` Paul Brook
  2007-08-10 17:13   ` Jeremy Katz
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Brook @ 2007-08-10 16:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jeremy Katz

On Thursday 09 August 2007, Jeremy Katz wrote:
> The attached adds a PCI subsystem vendor ID of 0x514D (QM ascii->hex)
> for the Cirrus emulation so that you can tell that the system is running
> under qemu.  This will make it so that, eg, we can detect that in X and
> know that resolutions > 800x600 won't blow up a monitor.

I'd rather not. If you want autodetection to work then implement vesa DDC 
emulation.

Paul

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

* Re: [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA
  2007-08-10 16:28 ` Paul Brook
@ 2007-08-10 17:13   ` Jeremy Katz
  2007-08-10 18:16     ` Paul Brook
  2007-08-10 18:55     ` Anthony Liguori
  0 siblings, 2 replies; 7+ messages in thread
From: Jeremy Katz @ 2007-08-10 17:13 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel

On Fri, 2007-08-10 at 17:28 +0100, Paul Brook wrote:
> On Thursday 09 August 2007, Jeremy Katz wrote:
> > The attached adds a PCI subsystem vendor ID of 0x514D (QM ascii->hex)
> > for the Cirrus emulation so that you can tell that the system is running
> > under qemu.  This will make it so that, eg, we can detect that in X and
> > know that resolutions > 800x600 won't blow up a monitor.
> 
> I'd rather not. If you want autodetection to work then implement vesa DDC 
> emulation.

The Cirrus hardware never supported it, so it's basically going to be
making up all new code for the emulation, the drivers, etc.  For
basically dead end emulation, this seems a bit overkill.  Especially as
subsystem vendor/device ids are strongly recommended anyway by the PCI
spec (though not required)

Longer term, getting emulation of more capable video chipsets is the
better answer (including DDC or some of the stuff that the VMware SVGA
adapter supports for passing information back and forth).  

Jeremy

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

* Re: [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA
  2007-08-10 17:13   ` Jeremy Katz
@ 2007-08-10 18:16     ` Paul Brook
  2007-08-10 18:55     ` Anthony Liguori
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Brook @ 2007-08-10 18:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jeremy Katz

On Friday 10 August 2007, Jeremy Katz wrote:
> On Fri, 2007-08-10 at 17:28 +0100, Paul Brook wrote:
> > On Thursday 09 August 2007, Jeremy Katz wrote:
> > > The attached adds a PCI subsystem vendor ID of 0x514D (QM ascii->hex)
> > > for the Cirrus emulation so that you can tell that the system is
> > > running under qemu.  This will make it so that, eg, we can detect that
> > > in X and know that resolutions > 800x600 won't blow up a monitor.
> >
> > I'd rather not. If you want autodetection to work then implement vesa DDC
> > emulation.
>
> The Cirrus hardware never supported it, so it's basically going to be
> making up all new code for the emulation, the drivers, etc.

My sources say otherwise.
The current Xorg cirrus driver clearly has DDC (aka i2c) support, and there's 
a patch for linux framebuffer support here: http://lkml.org/lkml/2006/7/4/230

qemu already have a generic i2c framework, and i2c EEPROM devices (used to 
hold the EDID), so all you need to implement is the cirrus host bits.
It's not entirely trivial as the card sees to just expose the raw signal 
lines. However i2c is fairly straightforward, so it shouldn't be that hard to 
implement.

Paul

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

* Re: [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA
  2007-08-10 17:13   ` Jeremy Katz
  2007-08-10 18:16     ` Paul Brook
@ 2007-08-10 18:55     ` Anthony Liguori
  2007-08-10 22:47       ` WaxDragon
  2007-08-11 17:14       ` andrzej zaborowski
  1 sibling, 2 replies; 7+ messages in thread
From: Anthony Liguori @ 2007-08-10 18:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paul Brook

Jeremy Katz wrote:
> On Fri, 2007-08-10 at 17:28 +0100, Paul Brook wrote:
>   
>> On Thursday 09 August 2007, Jeremy Katz wrote:
>>     
>>> The attached adds a PCI subsystem vendor ID of 0x514D (QM ascii->hex)
>>> for the Cirrus emulation so that you can tell that the system is running
>>> under qemu.  This will make it so that, eg, we can detect that in X and
>>> know that resolutions > 800x600 won't blow up a monitor.
>>>       
>> I'd rather not. If you want autodetection to work then implement vesa DDC 
>> emulation.
>>     
>
> The Cirrus hardware never supported it, so it's basically going to be
> making up all new code for the emulation, the drivers, etc.  For
> basically dead end emulation, this seems a bit overkill.  Especially as
> subsystem vendor/device ids are strongly recommended anyway by the PCI
> spec (though not required)
>
> Longer term, getting emulation of more capable video chipsets is the
> better answer (including DDC or some of the stuff that the VMware SVGA
> adapter supports for passing information back and forth).  
>   

QEMU already supports the VMware SVGA adapter nicely but the issue is 
that AFAIK the Windows driver is not licensed in such a way that it 
could be utilized for QEMU.

I suspect our best long term bet is a new paravirtual graphics driver 
that's also a standard VESA device and the hope that someone writes a 
proper Windows driver for it.

Regards,

Anthony Liguori

> Jeremy
>
>
>
>
>   

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

* Re: [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA
  2007-08-10 18:55     ` Anthony Liguori
@ 2007-08-10 22:47       ` WaxDragon
  2007-08-11 17:14       ` andrzej zaborowski
  1 sibling, 0 replies; 7+ messages in thread
From: WaxDragon @ 2007-08-10 22:47 UTC (permalink / raw)
  To: qemu-devel

On 8/10/07, Anthony Liguori <anthony@codemonkey.ws> wrote:

> I suspect our best long term bet is a new paravirtual graphics driver
> that's also a standard VESA device and the hope that someone writes a
> proper Windows driver for it.
>
> Regards,
>
> Anthony Liguori
>

Too bad we don't know of any open source OS projects that would be
interested in having a "proper windows driver" for this card-to-be.

*cough*ReactOS*cough*

WD
-- 
22:38 <@WaxDragon> false ^ true
22:39 < false> :(
22:39 < false> dont you think you can XOR me and get away with it! I
always return!

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

* Re: [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA
  2007-08-10 18:55     ` Anthony Liguori
  2007-08-10 22:47       ` WaxDragon
@ 2007-08-11 17:14       ` andrzej zaborowski
  1 sibling, 0 replies; 7+ messages in thread
From: andrzej zaborowski @ 2007-08-11 17:14 UTC (permalink / raw)
  To: qemu-devel

On 10/08/07, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Jeremy Katz wrote:
> > On Fri, 2007-08-10 at 17:28 +0100, Paul Brook wrote:
> >
> >> On Thursday 09 August 2007, Jeremy Katz wrote:
> >>
> >>> The attached adds a PCI subsystem vendor ID of 0x514D (QM ascii->hex)
> >>> for the Cirrus emulation so that you can tell that the system is running
> >>> under qemu.  This will make it so that, eg, we can detect that in X and
> >>> know that resolutions > 800x600 won't blow up a monitor.
> >>>
> >> I'd rather not. If you want autodetection to work then implement vesa DDC
> >> emulation.
> >>
> >
> > The Cirrus hardware never supported it, so it's basically going to be
> > making up all new code for the emulation, the drivers, etc.  For
> > basically dead end emulation, this seems a bit overkill.  Especially as
> > subsystem vendor/device ids are strongly recommended anyway by the PCI
> > spec (though not required)
> >
> > Longer term, getting emulation of more capable video chipsets is the
> > better answer (including DDC or some of the stuff that the VMware SVGA
> > adapter supports for passing information back and forth).
> >
>
> QEMU already supports the VMware SVGA adapter nicely but the issue is
> that AFAIK the Windows driver is not licensed in such a way that it
> could be utilized for QEMU.

I believe Ms Windows now ships with the VMware SVGA driver of its own.
For reactOS the X driver should be partially reusable.

Regards,
Andrzej (away until mid-September(?))

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

end of thread, other threads:[~2007-08-11 17:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 19:27 [Qemu-devel] [PATCH/RFC] Set a (distinguishable) subsystem id for Cirrus VGA Jeremy Katz
2007-08-10 16:28 ` Paul Brook
2007-08-10 17:13   ` Jeremy Katz
2007-08-10 18:16     ` Paul Brook
2007-08-10 18:55     ` Anthony Liguori
2007-08-10 22:47       ` WaxDragon
2007-08-11 17:14       ` andrzej zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).