qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] questions on default_config_write in hw/pci.c
@ 2009-04-30 16:15 Michael S. Tsirkin
  2009-04-30 16:35 ` [Qemu-devel] " Anthony Liguori
  2009-04-30 17:15 ` Marcelo Tosatti
  0 siblings, 2 replies; 9+ messages in thread
From: Michael S. Tsirkin @ 2009-04-30 16:15 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Anthony Liguori, Marcelo Tosatti, qemu-devel

Hi,
I've been looking at hw/pci.c, specifically at how config
read/write are implemented, and have a couple of questions
about default_config_write:

1. The code at the beginning (if len == 4 ...)
   seems to only update pci base registers if a dword write 
   is performed. I think it's legal for the guest to perform 4
   single-byte writes. Should this be supported?

2. The large switch statement at the end of this function
   uses hard-coded register offsets. Would it make sense
   to change it to use macros from hw/pci.h?

3. Still there I see:
        switch(d->config[0x0e]) {
        case 0x00:
        case 0x80:
   register 0x0e is header type, which has defined values
   of 0x00 (device or host bridge), 0x01 (pci to pci bridge) and
   0x02 (cardbus bridge). What is 0x80 and when is it used?
   Would it make sense to remove this?

4. Still there, there's some handling done for type 1 devices.
   This support seems imcomplete.
   Are there any PCI-to-PCI bridges emulated by qemu?
   Would it make sense to remove this code?

Thanks,
MST

-- 
MST

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

end of thread, other threads:[~2009-05-01  4:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-30 16:15 [Qemu-devel] questions on default_config_write in hw/pci.c Michael S. Tsirkin
2009-04-30 16:35 ` [Qemu-devel] " Anthony Liguori
2009-04-30 17:15 ` Marcelo Tosatti
2009-04-30 17:28   ` M. Warner Losh
2009-04-30 17:33     ` Michael S. Tsirkin
2009-04-30 17:29   ` Michael S. Tsirkin
2009-04-30 17:45     ` Anthony Liguori
2009-04-30 19:26     ` Marcelo Tosatti
2009-05-01  4:50     ` M. Warner Losh

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).