Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Alexander Graf
On 10.11.14 14:55, Peter Maydell wrote: > On 10 November 2014 13:16, Alexander Graf wrote: >> Sorry, I don't understand this paragraph. Memory slots in general are >> accelerations for memory access - for MMIO (RAM is usually aligned), KVM >> can always exit to QEMU and just do a manual MMIO exi

Re: [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Alexander Graf
On 10.11.14 14:55, Igor Mammedov wrote: > On Mon, 10 Nov 2014 14:16:58 +0100 > Alexander Graf wrote: > >> >> >> On 10.11.14 13:31, Igor Mammedov wrote: >>> On Fri, 7 Nov 2014 22:18:45 +0100 >>> Alexander Graf wrote: >>> Memory slots have to be page aligned to get entered into KVM. There

Re: [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Igor Mammedov
On Mon, 10 Nov 2014 14:16:58 +0100 Alexander Graf wrote: > > > On 10.11.14 13:31, Igor Mammedov wrote: > > On Fri, 7 Nov 2014 22:18:45 +0100 > > Alexander Graf wrote: > > > >> Memory slots have to be page aligned to get entered into KVM. There > >> is existing logic that tries to ensure that

Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Peter Maydell
On 10 November 2014 13:16, Alexander Graf wrote: > Sorry, I don't understand this paragraph. Memory slots in general are > accelerations for memory access - for MMIO (RAM is usually aligned), KVM > can always exit to QEMU and just do a manual MMIO exit. ...you're a bit stuck if you were hoping to

Re: [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Paolo Bonzini
On 10/11/2014 14:16, Alexander Graf wrote: > No, because in that case you would map something as RAM that really > isn't RAM. > > Imagine you have the following memory layout: > > 0x1000 page size > > 1) 0x0 - 0x1 RAM > 2) 0x1 - 0x10100 MMIO > 3) 0x10100 - 0x2 RAM > > Then you

Re: [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Alexander Graf
On 10.11.14 13:31, Igor Mammedov wrote: > On Fri, 7 Nov 2014 22:18:45 +0100 > Alexander Graf wrote: > >> Memory slots have to be page aligned to get entered into KVM. There >> is existing logic that tries to ensure that we pad memory slots that >> are not page aligned to the biggest region tha

Re: [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Igor Mammedov
On Fri, 7 Nov 2014 22:18:45 +0100 Alexander Graf wrote: > Memory slots have to be page aligned to get entered into KVM. There > is existing logic that tries to ensure that we pad memory slots that > are not page aligned to the biggest region that would still fit in the > alignment requirements.

Re: [Qemu-ppc] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-07 Thread Alexander Graf
On 07.11.14 22:18, Alexander Graf wrote: > Memory slots have to be page aligned to get entered into KVM. There > is existing logic that tries to ensure that we pad memory slots that > are not page aligned to the biggest region that would still fit in the > alignment requirements. > > Unfortunate

[PATCH] kvm: Fix memory slot page alignment logic

2014-11-07 Thread Alexander Graf
Memory slots have to be page aligned to get entered into KVM. There is existing logic that tries to ensure that we pad memory slots that are not page aligned to the biggest region that would still fit in the alignment requirements. Unfortunately, that logic is broken. It tries to calculate the sta