Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-19 Thread Michael S. Tsirkin
On Tue, Feb 19, 2013 at 05:58:38PM +0200, Avi Kivity wrote: > On Tue, Feb 19, 2013 at 4:41 PM, Michael S. Tsirkin wrote: > > On Thu, Feb 14, 2013 at 08:23:04PM +0200, Avi Kivity wrote: > >> On Thu, Feb 14, 2013 at 8:12 PM, Michael S. Tsirkin > >> wrote: > >> >> > >> >> Is there an actual real pr

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-19 Thread Avi Kivity
On Tue, Feb 19, 2013 at 6:08 PM, Michael S. Tsirkin wrote: >> >> The IOAPIC is actually closer to ISA, but again it's sufficient to >> move it to the PCI address space. I doubt its priority matters. > > Well moving IOAPIC to PCI seems strange, it's not a PCI thing, > and I think it can be moved o

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-19 Thread Avi Kivity
On Tue, Feb 19, 2013 at 4:41 PM, Michael S. Tsirkin wrote: > On Thu, Feb 14, 2013 at 08:23:04PM +0200, Avi Kivity wrote: >> On Thu, Feb 14, 2013 at 8:12 PM, Michael S. Tsirkin wrote: >> >> >> >> Is there an actual real problem that needs fixing? >> > >> > Yes. Guests sometimes cause device BARs t

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-19 Thread Michael S. Tsirkin
On Thu, Feb 14, 2013 at 08:23:04PM +0200, Avi Kivity wrote: > On Thu, Feb 14, 2013 at 8:12 PM, Michael S. Tsirkin wrote: > >> > >> Is there an actual real problem that needs fixing? > > > > Yes. Guests sometimes cause device BARs to temporary overlap > > the APIC range during BAR sizing. It works

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Avi Kivity
On Thu, Feb 14, 2013 at 8:12 PM, Michael S. Tsirkin wrote: >> >> Is there an actual real problem that needs fixing? > > Yes. Guests sometimes cause device BARs to temporary overlap > the APIC range during BAR sizing. It works fine on a physical > system but fails on KVM since pci has same priority

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Michael S. Tsirkin
On Thu, Feb 14, 2013 at 07:02:15PM +0200, Avi Kivity wrote: > On Thu, Feb 14, 2013 at 6:50 PM, Michael S. Tsirkin wrote: > >> > As you see, ioapic at 0xfec0 overlaps pci-hole. > >> > ioapic is guest programmable in theory - should use _overlap? > >> > pci-hole is not but can overlap with ioapi

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Avi Kivity
On Thu, Feb 14, 2013 at 6:50 PM, Michael S. Tsirkin wrote: >> > As you see, ioapic at 0xfec0 overlaps pci-hole. >> > ioapic is guest programmable in theory - should use _overlap? >> > pci-hole is not but can overlap with ioapic. >> > So also _overlap? >> >> It's a bug. The ioapic is in the pc

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Michael S. Tsirkin
On Thu, Feb 14, 2013 at 05:07:02PM +0200, Avi Kivity wrote: > On Thu, Feb 14, 2013 at 4:40 PM, Michael S. Tsirkin wrote: > > On Thu, Feb 14, 2013 at 04:14:39PM +0200, Avi Kivity wrote: > > > > But some parents are system created and shared by many devices so children > > for > > such have no idea

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Avi Kivity
On Thu, Feb 14, 2013 at 4:40 PM, Michael S. Tsirkin wrote: > On Thu, Feb 14, 2013 at 04:14:39PM +0200, Avi Kivity wrote: > > But some parents are system created and shared by many devices so children for > such have no idea who their siblings are. > > Please take a look at the typical map in this

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Michael S. Tsirkin
On Thu, Feb 14, 2013 at 02:34:20PM +, Peter Maydell wrote: > On 14 February 2013 14:02, Michael S. Tsirkin wrote: > > Well that's the status quo. One of the issues is, you have > > no idea what else uses each priority. With this change, > > at least you can grep for it. > > No, because most o

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Michael S. Tsirkin
On Thu, Feb 14, 2013 at 04:14:39PM +0200, Avi Kivity wrote: > On Thu, Feb 14, 2013 at 3:09 PM, Michael S. Tsirkin wrote: > > On Thu, Feb 14, 2013 at 12:56:02PM +, Peter Maydell wrote: > >> On 14 February 2013 12:45, Michael S. Tsirkin wrote: > >> > overlap flag in the region is currently unus

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Peter Maydell
On 14 February 2013 14:02, Michael S. Tsirkin wrote: > Well that's the status quo. One of the issues is, you have > no idea what else uses each priority. With this change, > at least you can grep for it. No, because most of the code you find will be setting priorities for completely irrelevant co

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Avi Kivity
On Thu, Feb 14, 2013 at 4:02 PM, Michael S. Tsirkin wrote: > On Thu, Feb 14, 2013 at 01:22:18PM +, Peter Maydell wrote: >> On 14 February 2013 13:09, Michael S. Tsirkin wrote: >> > On Thu, Feb 14, 2013 at 12:56:02PM +, Peter Maydell wrote: >> >> Up to the parent which controls the region

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Avi Kivity
On Thu, Feb 14, 2013 at 3:09 PM, Michael S. Tsirkin wrote: > On Thu, Feb 14, 2013 at 12:56:02PM +, Peter Maydell wrote: >> On 14 February 2013 12:45, Michael S. Tsirkin wrote: >> > overlap flag in the region is currently unused, most devices have no >> > idea whether their region overlaps wit

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Michael S. Tsirkin
On Thu, Feb 14, 2013 at 01:22:18PM +, Peter Maydell wrote: > On 14 February 2013 13:09, Michael S. Tsirkin wrote: > > On Thu, Feb 14, 2013 at 12:56:02PM +, Peter Maydell wrote: > >> Up to the parent which controls the region being mapped into. > > > > We could just assume same priority as

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Peter Maydell
On 14 February 2013 13:09, Michael S. Tsirkin wrote: > On Thu, Feb 14, 2013 at 12:56:02PM +, Peter Maydell wrote: >> Up to the parent which controls the region being mapped into. > > We could just assume same priority as parent Er, no. I mean the code in control of the parent MR sets the prio

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Michael S. Tsirkin
On Thu, Feb 14, 2013 at 12:56:02PM +, Peter Maydell wrote: > On 14 February 2013 12:45, Michael S. Tsirkin wrote: > > overlap flag in the region is currently unused, most devices have no > > idea whether their region overlaps with anything, so drop it, > > assume that all regions can overlap a

Re: [Qemu-devel] [PATCH RFC] memory: drop _overlap variant

2013-02-14 Thread Peter Maydell
On 14 February 2013 12:45, Michael S. Tsirkin wrote: > overlap flag in the region is currently unused, most devices have no > idea whether their region overlaps with anything, so drop it, > assume that all regions can overlap and always require priority. Devices themselves shouldn't care, for the