RE: [PATCH 02/10] x86/cpufeature: Kill cpu_has_hypervisor

2016-04-01 Thread Kershner, David A
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Tuesday, March 29, 2016 11:42 AM > To: X86 ML > Cc: LKML ; virtualization@lists.linux- > foundation.org; *S-Par-Maintainer > Subject:

Re: [PATCH v3 02/16] mm/compaction: support non-lru movable page migration

2016-04-01 Thread Vlastimil Babka
Might have been better as a separate migration patch and then a compaction patch. It's prefixed mm/compaction, but most changed are in mm/migrate.c On 03/30/2016 09:12 AM, Minchan Kim wrote: We have allowed migration for only LRU pages until now and it was enough to make high-order pages. But

[RFC v3 -net 1/2] virtio: Start feature MTU support

2016-04-01 Thread Aaron Conole
This commit adds the feature bit and associated mtu device entry for the virtio network device. Future commits will make use of these bits to support negotiated MTU. Signed-off-by: Aaron Conole --- v2,v3: * No change include/uapi/linux/virtio_net.h | 3 +++ 1 file changed,

[RFC v3 -next 0/2] virtio-net: Advised MTU feature

2016-04-01 Thread Aaron Conole
The following series adds the ability for a hypervisor to set an MTU on the guest during feature negotiation phase. This is useful for VM orchestration when, for instance, tunneling is involved and the MTU of the various systems should be homogenous. The first patch adds the feature bit as

[RFC v3 -next 2/2] virtio_net: Read the advised MTU

2016-04-01 Thread Aaron Conole
This patch checks the feature bit for the VIRTIO_NET_F_MTU feature. If it exists, read the advised MTU and use it. No proper error handling is provided for the case where a user changes the negotiated MTU. A future commit will add proper error handling. Instead, a warning is emitted if the guest

Re: [PATCH v3 03/16] mm: add non-lru movable page support document

2016-04-01 Thread Vlastimil Babka
On 03/30/2016 09:12 AM, Minchan Kim wrote: This patch describes what a subsystem should do for non-lru movable page supporting. Intentionally reading this first without studying the code to better catch things that would seem obvious otherwise. Cc: Jonathan Corbet

[RFC v5 5/5] VSOCK: Add Makefile and Kconfig

2016-04-01 Thread Stefan Hajnoczi
From: Asias He Enable virtio-vsock and vhost-vsock. Signed-off-by: Asias He Signed-off-by: Stefan Hajnoczi --- v4: * Make checkpatch.pl happy with longer option description * Clarify dependency on virtio rather than QEMU as suggested

[RFC v5 2/5] VSOCK: Introduce virtio_vsock_common.ko

2016-04-01 Thread Stefan Hajnoczi
From: Asias He This module contains the common code and header files for the following virtio_transporto and vhost_vsock kernel modules. Signed-off-by: Asias He Signed-off-by: Stefan Hajnoczi --- v5: * Add event virtqueue, struct

[RFC v5 3/5] VSOCK: Introduce virtio_transport.ko

2016-04-01 Thread Stefan Hajnoczi
From: Asias He VM sockets virtio transport implementation. This driver runs in the guest. Signed-off-by: Asias He Signed-off-by: Stefan Hajnoczi --- v5: * Add transport reset event handling * Drop ctrl virtqueue v4: * Add

[RFC v5 0/5] Add virtio transport for AF_VSOCK

2016-04-01 Thread Stefan Hajnoczi
This series is based on Michael Tsirkin's vhost branch (v4.5-rc6). I'm about to process Claudio Imbrenda's locking fixes for virtio-vsock but first I want to share the latest version of the code. Several people are playing with vsock now so sharing the latest code should avoid duplicate work.

[RFC v5 1/5] VSOCK: transport-specific vsock_transport functions

2016-04-01 Thread Stefan Hajnoczi
struct vsock_transport contains function pointers called by AF_VSOCK core code. The transport may want its own transport-specific function pointers and they can be added after struct vsock_transport. Allow the transport to fetch vsock_transport. It can downcast it to access transport-specific

Re: [PATCH v3 01/16] mm: use put_page to free page instead of putback_lru_page

2016-04-01 Thread Vlastimil Babka
On 03/30/2016 09:12 AM, Minchan Kim wrote: Procedure of page migration is as follows: First of all, it should isolate a page from LRU and try to migrate the page. If it is successful, it releases the page for freeing. Otherwise, it should put the page back to LRU list. For LRU pages, we have

[patch] virtio: silence uninitialized variable warnings

2016-04-01 Thread Dan Carpenter
Most ->get() functions seem to call BUG_ON() if offset + len is out of range, but rproc_virtio_get() returns early without initializing ret. Presumably it can't actually happen but it leads to a static checker warning. Let's just initialize "ret". Signed-off-by: Dan Carpenter

Re: Ballooning on TPS!=HPS hosts

2016-04-01 Thread Amit Shah
CC'ing virtualization list. On (Thu) 31 Mar 2016 [19:00:24], Dr. David Alan Gilbert wrote: > Hi, > I was reading the balloon code and am confused as to how/if ballooning > works on hosts where the host page size is larger than the > target page size. > > static void balloon_page(void *addr,

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
On 01/04/16 11:15, Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 11:03:21AM +0200, Juergen Gross wrote: >>> Maybe just make the vpin thing an option like: >>> >>> smp_call_on_cpu(int (*func)(void *), int phys_cpu); > >>> Also; is something like the vpin thing possible on KVM? because if

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Peter Zijlstra
On Fri, Apr 01, 2016 at 11:03:21AM +0200, Juergen Gross wrote: > > Maybe just make the vpin thing an option like: > > > > smp_call_on_cpu(int (*func)(void *), int phys_cpu); > > Also; is something like the vpin thing possible on KVM? because if we're > > going to expose it to generic code

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
On 01/04/16 10:44, Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 10:28:46AM +0200, Juergen Gross wrote: >> On 01/04/16 09:43, Peter Zijlstra wrote: >>> On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote: --- a/kernel/smp.c +++ b/kernel/smp.c @@ -14,6 +14,7 @@

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Peter Zijlstra
On Fri, Apr 01, 2016 at 10:28:46AM +0200, Juergen Gross wrote: > On 01/04/16 09:43, Peter Zijlstra wrote: > > On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote: > >> --- a/kernel/smp.c > >> +++ b/kernel/smp.c > >> @@ -14,6 +14,7 @@ > >> #include > >> #include > >> #include > >>

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
On 01/04/16 09:43, Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote: >> --- a/kernel/smp.c >> +++ b/kernel/smp.c >> @@ -14,6 +14,7 @@ >> #include >> #include >> #include >> +#include >> >> #include "smpboot.h" >> >> @@ -758,9 +759,14 @@ struct

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Peter Zijlstra
On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote: > --- a/kernel/smp.c > +++ b/kernel/smp.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > > #include "smpboot.h" > > @@ -758,9 +759,14 @@ struct smp_sync_call_struct { > static void

Re: [PATCH v3 2/6] smp: add function to execute a function synchronously on a physical cpu

2016-04-01 Thread Juergen Gross
On 01/04/16 09:37, Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 09:14:30AM +0200, Juergen Gross wrote: >> +if (cpu >= nr_cpu_ids) >> +return -EINVAL; > >> +if (cpu != 0) >> +return -EINVAL; > > The other functions return -ENXIO for this. Aah, okay. Will

Re: [PATCH v3 2/6] smp: add function to execute a function synchronously on a physical cpu

2016-04-01 Thread Peter Zijlstra
On Fri, Apr 01, 2016 at 09:14:30AM +0200, Juergen Gross wrote: > + if (cpu >= nr_cpu_ids) > + return -EINVAL; > + if (cpu != 0) > + return -EINVAL; The other functions return -ENXIO for this. ___ Virtualization mailing

[PATCH v3 1/6] xen: sync xen header

2016-04-01 Thread Juergen Gross
Import the actual version of include/xen/interface/sched.h from Xen. Signed-off-by: Juergen Gross --- include/xen/interface/sched.h | 100 ++ 1 file changed, 82 insertions(+), 18 deletions(-) diff --git a/include/xen/interface/sched.h

[PATCH v3 6/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-04-01 Thread Juergen Gross
Some hardware models (e.g. Dell Studio 1555 laptops) require calls to the firmware to be issued on cpu 0 only. As Dom0 might have to use these calls, add xen_pin_vcpu() to achieve this functionality. In case either the domain doesn't have the privilege to make the related hypercall or the

[PATCH v3 3/6] dcdbas: make use of smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
Use smp_call_sync_on_phys_cpu() to raise SMI on cpu 0. Signed-off-by: Juergen Gross --- drivers/firmware/dcdbas.c | 46 -- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/firmware/dcdbas.c

[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
Add generic virtualization support for pinning the current vcpu to a specified physical cpu. As this operation isn't performance critical (a very limited set of operations like BIOS calls and SMIs is expected to need this) just add a hypervisor specific indirection. Such a pinning should last as

[PATCH v3 2/6] smp: add function to execute a function synchronously on a physical cpu

2016-04-01 Thread Juergen Gross
On some hardware models (e.g. Dell Studio 1555 laptop) some hardware related functions (e.g. SMIs) are to be executed on physical cpu 0 only. Instead of open coding such a functionality multiple times in the kernel add a service function for this purpose. This will enable the possibility to take

[PATCH v3 0/6] Support calling functions on dedicated physical cpu

2016-04-01 Thread Juergen Gross
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This

[PATCH v3 4/6] hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k

2016-04-01 Thread Juergen Gross
Use the smp_call_sync_on_phys_cpu() function to call system management mode on cpu 0. Signed-off-by: Juergen Gross --- drivers/hwmon/dell-smm-hwmon.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/hwmon/dell-smm-hwmon.c