qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] pci: add standard bridge device


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH] pci: add standard bridge device
Date: Sun, 4 Sep 2011 19:20:31 +0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Sep 04, 2011 at 06:49:34PM +0300, Avi Kivity wrote:
> On 09/04/2011 06:46 PM, Michael S. Tsirkin wrote:
> >>
> >>  Why pointers?  Regular fields require less upkeep.
> >
> >Good point. Why does PIIX use pointers? I just copied that ...
> >
> 
> It doesn't, at least not completely:
> 
> 
> struct PCII440FXState {
>     PCIDevice dev;
>     MemoryRegion *system_memory;
>     MemoryRegion *pci_address_space;
>     MemoryRegion *ram_memory;
>     MemoryRegion pci_hole;
>     MemoryRegion pci_hole_64bit;
>     PAMMemoryRegion pam_regions[13];
>     MemoryRegion smram_region;
>     uint8_t smm_enabled;
>     bool smram_enabled;
>     PIIX3State *piix3;
> };
> 
> Arguably, ram_memory and pci_address_space should not be pointers,
> since this address space is supplied by 440fx.
> 
> (pci_hole, pci_hole64, pam_regions[], and smram_regions are all
> aliases analogous to the bridge windows)


I'll switch my code to that, you take care of piix.

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



reply via email to

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