All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/pciback: Update data filter intersection logic.
@ 2016-06-19 22:03 Andrey Grodzovsky
  2016-06-20  8:56 ` Jan Beulich
  0 siblings, 1 reply; 18+ messages in thread
From: Andrey Grodzovsky @ 2016-06-19 22:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Boris Ostrovsky, Jan Beulich, Andrey Grodzovsky, jw

Follow up on http://www.gossamer-threads.com/lists/xen/devel/436000#436000
Using http://eli.thegreenplace.net/2008/08/15/intersection-of-1d-segments as
reference.

	    New value
	|---------------|

f1			      f5
|---|			    |-----|
      f2	      f4
    |-----|    f3   |-----|
	    |-----|

Given a new value of the type above, Current logic will not
allow applying parts of the new value overlapping with f3 filter.
only f2 and f4.

This change allows all 3 types of overlapes to be included.
More specifically for passthrough an Industrial Ethernet Interface
(Hilscher GmbH CIFX 50E-DP(M/S)) on a HVM DomU running the
Xen 4.6 Hypervisor it allows to restore the LATENCY TIMER field
given a quirk to allow read/write for that field is already in place.
Device driver logic is such that the entire confspace  is
written in 4 byte chunks s.t. LATENCY_TIMER AND CACHE_LINE_SIZE are
arriving together in one call to xen_pcibk_config_write.

Cc: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Andrey Grodzovsky <andrey2805@gmail.com>
---
 drivers/xen/xen-pciback/conf_space.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/xen/xen-pciback/conf_space.c b/drivers/xen/xen-pciback/conf_space.c
index 8e67336..317fb14 100644
--- a/drivers/xen/xen-pciback/conf_space.c
+++ b/drivers/xen/xen-pciback/conf_space.c
@@ -230,8 +230,7 @@ int xen_pcibk_config_write(struct pci_dev *dev, int offset, int size, u32 value)
 		field_start = OFFSET(cfg_entry);
 		field_end = OFFSET(cfg_entry) + field->size;
 
-		if ((req_start >= field_start && req_start < field_end)
-		    || (req_end > field_start && req_end <= field_end)) {
+		 if (req_end >= field_start || field_end >= req_start) {
 			tmp_val = 0;
 
 			err = xen_pcibk_config_read(dev, field_start,
-- 
2.1.4


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

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

end of thread, other threads:[~2016-06-22  6:44 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-19 22:03 [PATCH] xen/pciback: Update data filter intersection logic Andrey Grodzovsky
2016-06-20  8:56 ` Jan Beulich
2016-06-20 12:58   ` Boris Ostrovsky
2016-06-20 13:30     ` Jan Beulich
2016-06-20 13:36       ` Boris Ostrovsky
2016-06-20 13:55         ` Jan Beulich
2016-06-20 15:01           ` Boris Ostrovsky
2016-06-20 15:14             ` Jan Beulich
2016-06-20 15:47               ` Boris Ostrovsky
2016-06-20 15:15   ` Andrey Grodzovsky
2016-06-20 15:38     ` Jan Beulich
2016-06-20 16:23       ` Andrey Grodzovsky
2016-06-20 18:13         ` Andrey Grodzovsky
2016-06-21  9:04         ` Jan Beulich
2016-06-21  9:23           ` Jan Beulich
2016-06-21 14:56             ` Andrey Grodzovsky
2016-06-22  6:44               ` Jan Beulich
2016-06-20 15:39     ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.