[Qemu-devel] Re: [PATCH] Don't explicitly set BAR values for VMware VGA

2008-02-23 Thread Avi Kivity

Anthony Liguori wrote:

Right now we set explict base addresses for the PCI IO regions in the VMware
VGA device.  We don't register the second region at all and instead directly
map the physical memory.

The problem is, the addresses we're setting in the BAR is not taken into
account in the e820 mapping.

This patch removes the explicit BARs and registers the second region through
the normal PCI code.

I've only tested with a Linux guest and the open source VMware VGA driver.

This patch needs -p2 to apply against the QEMU CVS tree.

  


Since it seems like qemu will apply this soon, I'll pick it up via the 
next merge.


--
error compiling committee.c: too many arguments to function





[Qemu-devel] Re: [PATCH] Don't explicitly set BAR values for VMware VGA

2008-02-22 Thread andrzej zaborowski
On 22/02/2008, Anthony Liguori [EMAIL PROTECTED] wrote:
 Right now we set explict base addresses for the PCI IO regions in the VMware
  VGA device.  We don't register the second region at all and instead directly
  map the physical memory.

  The problem is, the addresses we're setting in the BAR is not taken into
  account in the e820 mapping.

  This patch removes the explicit BARs and registers the second region through
  the normal PCI code.

  I've only tested with a Linux guest and the open source VMware VGA driver.

I have a very similar patch on my HD but I haven't included it because
it causes my testing Ms Windows install to stop detecting the card.  I
just tested your patch and the same thing happens, i.e. with the patch
it works as a vga card but is detected as an Unknown adapter and only
the 640x480x8 mode can be used.  I can't explain this.

Currently the io port numbers can be set by the guest and the memory
io regions are fixed.  Earlier both settings were hardcoded.  This is
because in one version of the X driver (which was/is the only
documentation available) these settings were metioned as *the* correct
values for this card.  This may of course cause different types of
breakage but so far worked ok, except when it was found that in
various combinations qemu segfaulted due to different PCI cards
registering the same port range as our default.  When this happened I
tried to make these settings settable through PCI registers but found
that this broke Ms Windows.  Luckily Ms Windows still worked if only
port ranges were assigned dynamically and the segfault went away so I
left it at this but it perhaps needs better looking at.
-- 
Please do not print this email unless absolutely necessary. Spread
environmental awareness.




[Qemu-devel] Re: [PATCH] Don't explicitly set BAR values for VMware VGA

2008-02-22 Thread Anthony Liguori

andrzej zaborowski wrote:

On 22/02/2008, Anthony Liguori [EMAIL PROTECTED] wrote:
  

Right now we set explict base addresses for the PCI IO regions in the VMware
 VGA device.  We don't register the second region at all and instead directly
 map the physical memory.

 The problem is, the addresses we're setting in the BAR is not taken into
 account in the e820 mapping.

 This patch removes the explicit BARs and registers the second region through
 the normal PCI code.

 I've only tested with a Linux guest and the open source VMware VGA driver.



I have a very similar patch on my HD but I haven't included it because
it causes my testing Ms Windows install to stop detecting the card.  I
just tested your patch and the same thing happens, i.e. with the patch
it works as a vga card but is detected as an Unknown adapter and only
the 640x480x8 mode can be used.  I can't explain this.
  


Can you describe how you setup your Windows install?  I'll try to 
reproduce it and dig into it.


Regards,

Anthony Liguori


Currently the io port numbers can be set by the guest and the memory
io regions are fixed.  Earlier both settings were hardcoded.  This is
because in one version of the X driver (which was/is the only
documentation available) these settings were metioned as *the* correct
values for this card.  This may of course cause different types of
breakage but so far worked ok, except when it was found that in
various combinations qemu segfaulted due to different PCI cards
registering the same port range as our default.  When this happened I
tried to make these settings settable through PCI registers but found
that this broke Ms Windows.  Luckily Ms Windows still worked if only
port ranges were assigned dynamically and the segfault went away so I
left it at this but it perhaps needs better looking at.
  






[Qemu-devel] Re: [PATCH] Don't explicitly set BAR values for VMware VGA

2008-02-22 Thread andrzej zaborowski
On 23/02/2008, Anthony Liguori [EMAIL PROTECTED] wrote:
 andrzej zaborowski wrote:
   I have a very similar patch on my HD but I haven't included it because
   it causes my testing Ms Windows install to stop detecting the card.  I
   just tested your patch and the same thing happens, i.e. with the patch
   it works as a vga card but is detected as an Unknown adapter and only
   the 640x480x8 mode can be used.  I can't explain this.
  


 Can you describe how you setup your Windows install?  I'll try to
  reproduce it and dig into it.

Oh, good question, and I think the answer be the reason why it's not
working here (*slaps self*).  I'll apply the patch if you can confirm
that it works with some Ms Windows install.

I just launched the VM and checked what kind of Ms Windows set up this
is and it's a Windows XP professional 2002 with VMware Tools
installed, and all the files on it have last modification date in 2004
or earlier.  Apparently I stole the already set up VM from my dad's
computer on which he used VMware, somewhere in 2004.  I then converted
the image to raw and always performed my tests with -snapshot on.
This may be why the system is unwilling to use different base
addresses.
-- 
Please do not print this email unless absolutely necessary. Spread
environmental awareness.