qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1] pci: Don't register a specialized 'config_wr


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH v1] pci: Don't register a specialized 'config_write' if default behavior is intended
Date: Sun, 21 Jun 2015 11:16:50 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 06/17/2015 09:46 PM, Shmulik Ladkani wrote:
Hi,

On Wed, 17 Jun 2015 12:36:14 +0300, address@hidden wrote:
NOTE:
Not sure if my statement regarding ommitting 'config_write' holds
for the megasas case:
It's parent is TYPE_MEGASAS_BASE whose parent is TYPE_PCI_DEVICE.
Can we assume 'config_write' will be set to
'pci_default_write_config' in this case?
No need to assume here, you can simply add a trace and check.
However, the do_pci_register_device method assigns config_write method
to PCIDevice *instances* using the class method or the default
pci_default_write_config.

Since TYPE_MEGASAS_BASE does not define a config_write method, the
field will remain NULL. Anyway, you are welcomed to run it and
double-check.

Verified; do_pci_register_device indeed sets it to pci_default_write_config.

Thanks,
Shmulik

Cool!

Thanks,
Marcel




reply via email to

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