qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] spice: add qxl device


From: Gleb Natapov
Subject: Re: [Qemu-devel] Re: [PATCH] spice: add qxl device
Date: Thu, 18 Nov 2010 11:57:51 +0200

On Thu, Nov 18, 2010 at 11:30:27AM +0200, Michael S. Tsirkin wrote:
> On Thu, Nov 18, 2010 at 11:11:49AM +0200, Gleb Natapov wrote:
> > On Thu, Nov 18, 2010 at 11:03:21AM +0200, Michael S. Tsirkin wrote:
> > > On Thu, Nov 18, 2010 at 10:09:35AM +0200, Gleb Natapov wrote:
> > > > On Wed, Nov 17, 2010 at 08:00:08PM +0200, Michael S. Tsirkin wrote:
> > > > > > >>  If so: does qemu
> > > > > > >>emulate this correctly?
> > > > > > >
> > > > > > >It mostly does.
> > > > > > 
> > > > > > I doubt it actually enables/disables the legacy vga ports.
> > > > > 
> > > > > I'll check when I have the time. We can fix it if it doesn't,
> > > > > 
> > > > So many guests (all of them?) just assume that vga ports and
> > > > framebuffer is there.
> > > 
> > > Why do you think they disable io memory then?
> > > 
> > Who and how and when disables io memory?
> 
> I think guest will do this if you disable the device through the device
> manager. This might need a reboot to become effective.
> 
Try to do it with primary VGA adapter and tell us what happens :)

> > Some guests are designed to run
> > even on old ISA machines that have no way to disable anything. The
> > device is just there.
> > 
> > This is the same with IDE ports. BIOS "knows" legacy ISA ports and just
> > program them into PCI IO bars to be nice.
> 
> HAven't checked IDE, for VGA AFAIK BIOS does not program legacy ports in
> the card, they are hardwired there. However, the card must not claim any
> io transactions if IO memory is disabled in command register.
> 
Is this correct also for legacy ports? This wouldn't be backwards
compatible to ISA machines, so old software my not run properly back in
the days when transaction from ISA to PCI happened. So my guess is that
old ISA ports works in backwards compatible way.

> When qemu is started, it works correctly: the io memory is disabled and card 
> does
> not claim any io. Then BIOS comes along and enables io. At this point
> map callback is invoked and maps io memory, card starts claiming io.
Looking at the code I see that cirrus claims all IO ports and
framebuffer memory during init function unconditionally.

> 
> What is broken is that if BIOS/guest then disables IO memory,
> (I think - even if guest is rebooted!) we will keep claiming IO transactions.
> That our emulation does this seems to be a clear spec violation, we are
> just lucky that BIOS/guest does not do this at the moment.
> 
> 
> 
> > > > So what "fixing" this will buy us?
> > > 
> > > Besides spec compliancy, you mean?  Ability to support multiple VGA
> > > cards. That's how it works I think: BIOS enables IO on the primary
> > > VGA device only.
> > > 
> > What spec defines hot-plug for primary VGA adapter?
> 
> No idea about hotplug. I am talking about multiple VGA cards,
> enabling/disabling them dynamically should be possible.
Of course. With properly designed VGA card you should be able to have
more then one, but one of them will provide legacy functionality and is
not removable.

> 
> > Our BIOS should support
> > -M isa machine too.
> 
> > There is no way to disable VGA or even check if it
> > is present there.
> 
> So I guess with isa you can't have multiple VGA cards work.  With PCI
> I think you can.
> 
With isa you just need custom designed HW and software and you can have
as many VGA cards as you want :)

--
                        Gleb.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]