RE: [PATCH v2 4/7] KVM: arm/arm64: enable irqchip routing

2015-07-15 Thread Pavel Fedin
Hello! > >> + struct kvm_msi msi; > >> + > >> + msi.address_lo = e->msi.address_lo; > >> + msi.address_hi = e->msi.address_hi; > >> + msi.data = e->msi.data; > >> + if (e->type == KVM_IRQ_ROUTING_EXTENDED_MSI) { > >> + msi.devid = e->devid; > >> + msi.flags = KVM_MSI_VALID_

RE: [PATCH v2 15/15] KVM: arm64: enable ITS emulation as a virtual MSI controller

2015-07-15 Thread Pavel Fedin
Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia > -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > Of Andre Przywara > Sent: Friday, July 10, 2015 5:22 PM > To: marc.zyng...@arm.com; christoffer.d..

Re: [PATCH v2 15/15] KVM: arm64: enable ITS emulation as a virtual MSI controller

2015-07-15 Thread Andre Przywara
On 15/07/15 10:10, Pavel Fedin wrote: >> -Original Message- >> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf >> Of Andre Przywara >> Sent: Friday, July 10, 2015 5:22 PM >> To: marc.zyng...@arm.com; christoffer.d...@linaro.org; >> kvm...@lists.cs.columbia.edu

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Laszlo Ersek
On 07/15/15 00:37, Jordan Justen wrote: > On 2015-07-14 14:29:11, Laszlo Ersek wrote: >> On 07/14/15 23:15, Paolo Bonzini wrote: The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC phase of OVMF decompresses an

RE: [PATCH v2 15/15] KVM: arm64: enable ITS emulation as a virtual MSI controller

2015-07-15 Thread Pavel Fedin
Hello! > But why would it need the capability to create models? Actually it doesn't. > The idea is to > check the capability before the actual KVM_SIGNAL_MSI or > KVM_SET_GSI_ROUTING ioctl (and cache that result). I have a function > with a static variable to do that, so it looks like: > > +

[PULL] vhost: cleanups and fixes

2015-07-15 Thread Michael S. Tsirkin
The following changes since commit 59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee: virtio-pci: alloc only resources actually used. (2015-06-24 08:15:09 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch change

[patch] vhost: NULL vs ERR_PTR bug

2015-07-15 Thread Dan Carpenter
There is only one caller for vhost_kvzalloc() and it expects NULL on allocation failure. Most people would probably expect that so let's change ERR_PTR(-ENOMEM) to NULL. Fixes: 4de7255f7d2b ('vhost: extend memory regions allocation to vmalloc') Signed-off-by: Dan Carpenter diff --git a/drivers/

Re: [PULL] vhost: cleanups and fixes

2015-07-15 Thread Michael S. Tsirkin
On Wed, Jul 15, 2015 at 01:50:24PM +0300, Michael S. Tsirkin wrote: > The following changes since commit 59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee: > > virtio-pci: alloc only resources actually used. (2015-06-24 08:15:09 +0200) > > are available in the git repository at: > > git://git.kernel.

Re: [patch] vhost: NULL vs ERR_PTR bug

2015-07-15 Thread Michael S. Tsirkin
On Wed, Jul 15, 2015 at 02:16:59PM +0300, Dan Carpenter wrote: > There is only one caller for vhost_kvzalloc() and it expects NULL on > allocation failure. Most people would probably expect that so let's > change ERR_PTR(-ENOMEM) to NULL. > > Fixes: 4de7255f7d2b ('vhost: extend memory regions all

Re: [patch] vhost: NULL vs ERR_PTR bug

2015-07-15 Thread walter harms
Am 15.07.2015 13:28, schrieb Michael S. Tsirkin: > On Wed, Jul 15, 2015 at 02:16:59PM +0300, Dan Carpenter wrote: >> There is only one caller for vhost_kvzalloc() and it expects NULL on >> allocation failure. Most people would probably expect that so let's >> change ERR_PTR(-ENOMEM) to NULL. >>

Re: [patch] vhost: NULL vs ERR_PTR bug

2015-07-15 Thread Dan Carpenter
On Wed, Jul 15, 2015 at 01:35:16PM +0200, walter harms wrote: > Is this function needed at all ? > It tries to kmalloc() memory and if it can't then it tries to vmalloc() it. There are a bunch of these functions. Eventually someone should put one in a common header. regards, dan carpenter -- T

RE: [PATCH v2 00/15] KVM: arm64: GICv3 ITS emulation

2015-07-15 Thread Pavel Fedin
Hello! > this respin tries to address all comments I got so far from the list. > Thanks to Eric, Pavel and Christoffer for the review! Tested-by: Pavel Fedin Works fine. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia -- To unsubscribe from this list:

Re: [patch] vhost: NULL vs ERR_PTR bug

2015-07-15 Thread Julia Lawall
On Wed, 15 Jul 2015, walter harms wrote: > > > Am 15.07.2015 13:28, schrieb Michael S. Tsirkin: > > On Wed, Jul 15, 2015 at 02:16:59PM +0300, Dan Carpenter wrote: > >> There is only one caller for vhost_kvzalloc() and it expects NULL on > >> allocation failure. Most people would probably expect t

Re: [patch] vhost: NULL vs ERR_PTR bug

2015-07-15 Thread Dan Carpenter
On Wed, Jul 15, 2015 at 10:21:12AM -0400, Julia Lawall wrote: > At least it looks like one could return the result of vzalloc directly? > > julia That's a true... I was tempted to re-write it a bit. I think one of the Lustre people are eventually going to export this function and we will delete

[PATCH] fixup! vhost: extend memory regions allocation to vmalloc

2015-07-15 Thread Igor Mammedov
callers of vhost_kvzalloc() expect the same behaviour on allocation error as from kmalloc/vmalloc i.e. NULL return value. So just return vzmalloc() returned value instead of returning ERR_PTR(-ENOMEM) issue introduced by 4de7255f7d2be5e51664c6ac6011ffd6e5463571 in vhost-next tree Spotted-by: Da

Re: KVM slow LAMP guest

2015-07-15 Thread Hansa
On 14-7-2015 23:16, Paolo Bonzini wrote: On 14/07/2015 21:54, "Hansa" wrote: [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f7819512996361280b86259222456fcf15aad926 Sorry David. That is not an option. It's a production server on 2.6 kernel. 4.0 kernel is not in

Re: [PATCH -mm v8 5/7] mmu-notifier: add clear_young callback

2015-07-15 Thread Andres Lagar-Cavilla
On Wed, Jul 15, 2015 at 6:54 AM, Vladimir Davydov wrote: > In the scope of the idle memory tracking feature, which is introduced by > the following patch, we need to clear the referenced/accessed bit not > only in primary, but also in secondary ptes. The latter is required in > order to estimate w

[PATCH 2/3] KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type

2015-07-15 Thread Xiao Guangrong
From: Xiao Guangrong kvm_mtrr_get_guest_memory_type never returns -1 which is implied in the current code since if @type = -1 (means no MTRR contains the range), iter.partial_map must be true Simplify the code to indicate this fact Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mtrr.c | 19 ++

[PATCH 1/3] KVM: MTRR: fix memory type handling if MTRR is completely disabled

2015-07-15 Thread Xiao Guangrong
From: Xiao Guangrong Currently code uses default memory type if MTRR is fully disabled, fix it by using UC instead Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mtrr.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/

[PATCH 3/3] KVM: x86: quirkily apply WB to all memory if cache is disabled

2015-07-15 Thread Xiao Guangrong
From: Xiao Guangrong Current firmware depends on WB to fast boot, please refer to https://lkml.org/lkml/2015/7/12/115 Let's us WB if CR0.CD is set to make this kind of firmware happy This quirk can be dropped by using KVM_ENABLE_CAP API with KVM_CAP_DISABLE_QUIRKS if the broken firmware i

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Xiao Guangrong
Hi, I have posted the pachset to make OVMF happy and have CCed you guys, could you please check it if it works for you? On 07/15/2015 05:15 AM, Paolo Bonzini wrote: The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC ph

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Laszlo Ersek
On 07/15/15 21:30, Xiao Guangrong wrote: > > Hi, > > I have posted the pachset to make OVMF happy and have CCed you guys, > could you please check it if it works for you? Sorry, I can't check it; I don't have an environment that exposes the issue in the first place. Perhaps Alex can check it, or

Re: KVM slow LAMP guest

2015-07-15 Thread C. Bröcker
On 14-7-2015 23:16, Paolo Bonzini wrote: On 14/07/2015 21:54, "Hansa" wrote: [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f7819512996361280b86259222456fcf15aad926 Sorry David. That is not an option. It's a production server on 2.6 kernel. 4.0 kernel is not in

Re: [PATCH 1/3] KVM: MTRR: fix memory type handling if MTRR is completely disabled

2015-07-15 Thread Alex Williamson
On Thu, 2015-07-16 at 03:25 +0800, Xiao Guangrong wrote: > From: Xiao Guangrong > > Currently code uses default memory type if MTRR is fully disabled, > fix it by using UC instead > > Signed-off-by: Xiao Guangrong > --- Seems to work for me. I don't see a 0th patch, but for the series: Teste