| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/pciback: Update data filter intersection logic.
 On Mon, Jun 20, 2016 at 4:56 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote: Andrey>>> On 20.06.16 at 00:03, <andrey2805@xxxxxxxxx> wrote: f1-f5 would be config_field[] such as header_common in conf_space_header.c or any other config_field added (by adding quirks for example). 
 To me current behaviour looks generally inconsistent  because given a request to wrote 4 bytes starting with 0xC let's look what's happening inside xen_pcibk_config_write [81664.632262 <    0.000035>] xen-pciback: 0000:06:00.0: write request 4 bytes at 0xc = 4000 [81664.632264 <    0.000002>] xen-pciback: 0000:06:00.0: read 1 bytes at 0xc [81664.632275 <    0.000011>] xen-pciback: 0000:06:00.0: read 1 bytes at 0xc = 0  [81664.632282 <    0.000002>] xen-pciback: 0000:06:00.0: read 1 bytes at 0xf [81664.632292 <    0.000010>] xen-pciback: 0000:06:00.0: read 1 bytes at 0xf = 0 So you can see that current logic will allow to read/write 0xc which is PCI_CACHE_LINE_SIZE, skips PCI_LATENCY_TIMER also there is a quirk in place there which allows writes to this memory, skips 0xE (which is fine since this field is not allowed to be accessed) and then writes 0xf PCI_BIST So using my previous sketch adjusted for this use case  |----4b write request starting at 0xc----|  |--f1--|              |--f2--|                 |--f3--| Where  f1 ==   PCI_CACHE_LINE_SIZE  f2 ==   PCI_LATENCY_TIMER f3 ==   PCI_BIST With ciurrent logic Only f1 and f3 are allowed but not f2 even when there is a field and  a quirk in place allowing read write access to that memory location. To me it seems as a generally inconsistent behaviour and not specifically related to our driver. With my patch (and a fix from || to && Thanks a lot for pointing this out to me.) f1, f2 and f3 are being treated the same which IMHO is more correct. > --- a/drivers/xen/xen-pciback/conf_space.c I am not sure I understand - please clarify.  
 Totally agree, than you for this insight!  
 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel 
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |