Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-16 Thread Chen, Tiejun
On 2015/7/16 17:40, George Dunlap wrote: On Thu, Jul 16, 2015 at 3:05 AM, Chen, Tiejun tiejun.c...@intel.com wrote: Could you take a look at the original patch #06 ? Although Jan thought that is complicated, that is really one version that I can refine in current time slot. When you say

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-16 Thread George Dunlap
On Thu, Jul 16, 2015 at 3:05 AM, Chen, Tiejun tiejun.c...@intel.com wrote: Could you take a look at the original patch #06 ? Although Jan thought that is complicated, that is really one version that I can refine in current time slot. When you say original, which version are you talking about?

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
On 2015/7/16 0:14, George Dunlap wrote: On Wed, Jul 15, 2015 at 2:56 PM, George Dunlap george.dun...@eu.citrix.com wrote: Would it be possible, on a collision, to have one last stab at allocating the BAR somewhere else, without relocating memory (or relocating any other BARs)? At very least

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
On 2015/7/15 16:34, Jan Beulich wrote: On 15.07.15 at 06:27, tiejun.c...@intel.com wrote: Furthermore, could we have this solution as follows? Yet more special casing code you want to add. I said no to this model, and unless you can address the issue _without_ adding a lot of special casing

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Jan Beulich
On 15.07.15 at 06:27, tiejun.c...@intel.com wrote: Furthermore, could we have this solution as follows? Yet more special casing code you want to add. I said no to this model, and unless you can address the issue _without_ adding a lot of special casing code, the answer will remain no (subject

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
This is very similar to our current policy to [RESERVED_MEMORY_DYNAMIC_START, RESERVED_MEMORY_DYNAMIC_END] in patch #6 since actually this is also another rare possibility in real world. Even I can do this as well when we handle that conflict with [RESERVED_MEMORY_DYNAMIC_START,

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
Certainly appreciate your time. I didn't mean its wasting time at this point. I just want to express that its hard to implement that solution in one or two weeks to walking into 4.6 as an exception. Note I know this feature is still not accepted as an exception to 4.6 right now so I'm making an

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Jan Beulich
On 15.07.15 at 02:55, tiejun.c...@intel.com wrote: I agree we'd better overhaul this since we already found something unreasonable here. But one or two weeks is really not enough to fix this with a bitmap framework, and although a bitmap can make mmio allocation better, but more complicated

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Jan Beulich
On 15.07.15 at 10:59, tiejun.c...@intel.com wrote: On 2015/7/15 16:34, Jan Beulich wrote: On 15.07.15 at 06:27, tiejun.c...@intel.com wrote: Furthermore, could we have this solution as follows? Yet more special casing code you want to add. I said no to this model, and unless you can address

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
On 2015/7/15 19:05, George Dunlap wrote: On Wed, Jul 15, 2015 at 10:27 AM, Jan Beulich jbeul...@suse.com wrote: On 15.07.15 at 10:59, tiejun.c...@intel.com wrote: On 2015/7/15 16:34, Jan Beulich wrote: On 15.07.15 at 06:27, tiejun.c...@intel.com wrote: Furthermore, could we have this

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
Maybe I can move this chunk of codes downward those actual allocation to check if RDM conflicts with the final allocation, and then just disable those associated devices by writing PCI_COMMAND without BUG() like this draft code, And what would keep the guest from re-enabling the device? We

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
On 2015/7/15 19:27, Jan Beulich wrote: On 15.07.15 at 13:05, george.dun...@eu.citrix.com wrote: This patch series as a whole represents a lot of work and a lot of tangible improvements to the situation; and (unless the situation has changed) it's almost entirely acked apart from the MMIO

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread George Dunlap
On Wed, Jul 15, 2015 at 10:27 AM, Jan Beulich jbeul...@suse.com wrote: On 15.07.15 at 10:59, tiejun.c...@intel.com wrote: On 2015/7/15 16:34, Jan Beulich wrote: On 15.07.15 at 06:27, tiejun.c...@intel.com wrote: Furthermore, could we have this solution as follows? Yet more special casing

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Jan Beulich
On 15.07.15 at 12:34, tiejun.c...@intel.com wrote: Yet more special casing code you want to add. I said no to this model, and unless you can address the issue _without_ adding a lot of special casing code, the answer will remain no (subject What about this? @@ -301,6 +301,19 @@ void

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Jan Beulich
On 15.07.15 at 13:05, george.dun...@eu.citrix.com wrote: This patch series as a whole represents a lot of work and a lot of tangible improvements to the situation; and (unless the situation has changed) it's almost entirely acked apart from the MMIO placement part. If there is a simple way

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread George Dunlap
On 07/15/2015 12:20 PM, Chen, Tiejun wrote: On 2015/7/15 19:05, George Dunlap wrote: On Wed, Jul 15, 2015 at 10:27 AM, Jan Beulich jbeul...@suse.com wrote: On 15.07.15 at 10:59, tiejun.c...@intel.com wrote: On 2015/7/15 16:34, Jan Beulich wrote: On 15.07.15 at 06:27, tiejun.c...@intel.com

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
Yet more special casing code you want to add. I said no to this model, and unless you can address the issue _without_ adding a lot of special casing code, the answer will remain no (subject What about this? @@ -301,6 +301,19 @@ void pci_setup(void) pci_mem_start = 1; } +

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Jan Beulich
On 15.07.15 at 13:05, george.dun...@eu.citrix.com wrote: On Wed, Jul 15, 2015 at 10:27 AM, Jan Beulich jbeul...@suse.com wrote: On 15.07.15 at 10:59, tiejun.c...@intel.com wrote: What about this? @@ -301,6 +301,19 @@ void pci_setup(void) pci_mem_start = 1; } +for

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread George Dunlap
On 07/15/2015 12:24 PM, Jan Beulich wrote: On 15.07.15 at 13:05, george.dun...@eu.citrix.com wrote: On Wed, Jul 15, 2015 at 10:27 AM, Jan Beulich jbeul...@suse.com wrote: On 15.07.15 at 10:59, tiejun.c...@intel.com wrote: What about this? @@ -301,6 +301,19 @@ void pci_setup(void)

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Jan Beulich
On 15.07.15 at 15:40, dunl...@umich.edu wrote: On Mon, Jul 13, 2015 at 2:12 PM, Jan Beulich jbeul...@suse.com wrote: Therefore I'll not make any further comments on the rest of the patch, but instead outline an allocation model that I think would fit our needs: Subject to the constraints

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread George Dunlap
On Wed, Jul 15, 2015 at 2:56 PM, George Dunlap george.dun...@eu.citrix.com wrote: Would it be possible, on a collision, to have one last stab at allocating the BAR somewhere else, without relocating memory (or relocating any other BARs)? At very least then an administrator could work around

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Wei Liu
On Wed, Jul 15, 2015 at 09:32:34AM +0100, Jan Beulich wrote: On 15.07.15 at 02:55, tiejun.c...@intel.com wrote: I agree we'd better overhaul this since we already found something unreasonable here. But one or two weeks is really not enough to fix this with a bitmap framework, and although

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread Chen, Tiejun
Is not booting worse than what we have now -- which is, booting successfully but (probably) having issues due to MMIO ranges overlapping RMRRs? Its really so rare possibility here since in the real world we didn't see any RMRR regions = 0xF000 (the default pci memory start.) And I already

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread George Dunlap
On Mon, Jul 13, 2015 at 2:12 PM, Jan Beulich jbeul...@suse.com wrote: Therefore I'll not make any further comments on the rest of the patch, but instead outline an allocation model that I think would fit our needs: Subject to the constraints mentioned above, set up a bitmap (maximum size 64k

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-15 Thread George Dunlap
On Wed, Jul 15, 2015 at 3:00 PM, Jan Beulich jbeul...@suse.com wrote: On 15.07.15 at 15:40, dunl...@umich.edu wrote: On Mon, Jul 13, 2015 at 2:12 PM, Jan Beulich jbeul...@suse.com wrote: Therefore I'll not make any further comments on the rest of the patch, but instead outline an allocation

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-14 Thread Jan Beulich
On 14.07.15 at 08:39, tiejun.c...@intel.com wrote: -} *resource, mem_resource, high_mem_resource, io_resource; +} *resource, mem_resource, high_mem_resource, io_resource, exp_mem_resource; Despite having gone through description and the rest of the patch I can't seem to be able to

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-14 Thread Chen, Tiejun
Note here I don't address your comments above since I think we should achieve an agreement firstly. I think bitmap mechanism is a good idea but honestly, its not easy to cover all requirements here. And just like bootmem on Linux side, so its a little complicated to implement this entirely.

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-14 Thread Jan Beulich
On 14.07.15 at 12:54, tiejun.c...@intel.com wrote: I think bitmap mechanism is a good idea but honestly, its not easy to cover all requirements here. And just like bootmem on Linux side, so its a little complicated to implement this entirely. So I prefer not to introduce this way in current

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-14 Thread Chen, Tiejun
-} *resource, mem_resource, high_mem_resource, io_resource; +} *resource, mem_resource, high_mem_resource, io_resource, exp_mem_resource; Despite having gone through description and the rest of the patch I can't seem to be able to guess what exp_mem stands for. Meaningful variable

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-14 Thread Chen, Tiejun
I agree we'd better overhaul this since we already found something unreasonable here. But one or two weeks is really not enough to fix this with a bitmap framework, and although a bitmap can make mmio allocation better, but more complicated if we just want to allocate PCI mmio. So could we do

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-14 Thread Chen, Tiejun
On 2015/7/15 8:55, Chen, Tiejun wrote: I agree we'd better overhaul this since we already found something unreasonable here. But one or two weeks is really not enough to fix this with a bitmap framework, and although a bitmap can make mmio allocation better, but more complicated if we just want

Re: [Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-13 Thread Jan Beulich
On 09.07.15 at 07:33, tiejun.c...@intel.com wrote: @@ -50,17 +75,22 @@ void pci_setup(void) /* Resources assignable to PCI devices via BARs. */ struct resource { uint64_t base, max; -} *resource, mem_resource, high_mem_resource, io_resource; +} *resource,