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

Re: [Xen-devel] [PATCH v4 RFC 1/6] x86/PCI: add config space write abstract intercept logic



> -static bool_t pci_cfg_ok(struct domain *currd, bool_t write,
> -                         unsigned int start, unsigned int size)
> +static bool_t pci_cfg_ok(struct domain *currd, unsigned int start,
> +                         unsigned int size, uint32_t *write)
>  {
>      uint32_t machine_bdf;
>  
> @@ -1804,8 +1804,12 @@ static bool_t pci_cfg_ok(struct domain *
>              start |= CF8_ADDR_HI(currd->arch.pci_cf8);
>      }
>  
> -    return !xsm_pci_config_permission(XSM_HOOK, currd, machine_bdf,
> -                                      start, start + size - 1, write);
> +    if ( xsm_pci_config_permission(XSM_HOOK, currd, machine_bdf,
> +                                   start, start + size - 1, !!write) != 0 )
> +         return 0;
> +
> +    return !write ||
> +           pci_conf_write_intercept(0, machine_bdf, start, size, write) >= 0;

Won't the 'write' parameter cause an compiler error as it expects an pointer?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.