Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-04 Thread Paolo Bonzini
Il 04/11/2013 07:06, Michael S. Tsirkin ha scritto: > The page table logic in exec.c assumes > that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS. > > But pci addresses are full 64 bit so if we try to render them ignoring > the extra bits, we get strange effects with sections overlappin

Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-04 Thread Paolo Bonzini
Il 04/11/2013 13:04, Michael S. Tsirkin ha scritto: > > > > Also, I'm not sure what will this test tell > > > > us: inl reads io space, not memory, right? > > > > The number of levels in the dispatch radix tree is independent of the > > size of the AddressSpace; it is P_L2_LEVELS for both the 64K

Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-04 Thread Michael S. Tsirkin
On Mon, Nov 04, 2013 at 12:22:35PM +0100, Paolo Bonzini wrote: > Il 04/11/2013 12:14, Michael S. Tsirkin ha scritto: > >> > > >> > This patch looks good; however, on top of it can you test > >> > kvm-unit-tests with TARGET_PHYS_ADDR_SPACE_BITS=64 and see whether > >> > there is a measurable slow

Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-04 Thread Paolo Bonzini
Il 04/11/2013 12:14, Michael S. Tsirkin ha scritto: >> > >> > This patch looks good; however, on top of it can you test >> > kvm-unit-tests with TARGET_PHYS_ADDR_SPACE_BITS=64 and see whether >> > there is a measurable slowdown (in the inl_from_qemu tests)? If not, >> > we can just get rid of

Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-04 Thread Michael S. Tsirkin
On Mon, Nov 04, 2013 at 11:54:34AM +0100, Paolo Bonzini wrote: > Il 04/11/2013 11:07, Michael S. Tsirkin ha scritto: > > On Mon, Nov 04, 2013 at 11:50:05AM +0200, Marcel Apfelbaum wrote: > >> On Mon, 2013-11-04 at 08:06 +0200, Michael S. Tsirkin wrote: > >>> The page table logic in exec.c assumes >

Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-04 Thread Paolo Bonzini
Il 04/11/2013 11:07, Michael S. Tsirkin ha scritto: > On Mon, Nov 04, 2013 at 11:50:05AM +0200, Marcel Apfelbaum wrote: >> On Mon, 2013-11-04 at 08:06 +0200, Michael S. Tsirkin wrote: >>> The page table logic in exec.c assumes >>> that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS. >>> >

Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-04 Thread Michael S. Tsirkin
On Mon, Nov 04, 2013 at 11:50:05AM +0200, Marcel Apfelbaum wrote: > On Mon, 2013-11-04 at 08:06 +0200, Michael S. Tsirkin wrote: > > The page table logic in exec.c assumes > > that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS. > > > > But pci addresses are full 64 bit so if we try to r

Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-04 Thread Marcel Apfelbaum
On Mon, 2013-11-04 at 08:06 +0200, Michael S. Tsirkin wrote: > The page table logic in exec.c assumes > that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS. > > But pci addresses are full 64 bit so if we try to render them ignoring > the extra bits, we get strange effects with sections o

Re: [Qemu-devel] [PATCH] exec: limit system memory size

2013-11-03 Thread Michael S. Tsirkin
On Mon, Nov 04, 2013 at 08:06:08AM +0200, Michael S. Tsirkin wrote: > The page table logic in exec.c assumes > that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS. > > But pci addresses are full 64 bit so if we try to render them ignoring > the extra bits, we get strange effects with sec

[Qemu-devel] [PATCH] exec: limit system memory size

2013-11-03 Thread Michael S. Tsirkin
The page table logic in exec.c assumes that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS. But pci addresses are full 64 bit so if we try to render them ignoring the extra bits, we get strange effects with sections overlapping each other. To fix, simply limit the system memory size to