[Devel] [PATCH vz7.6 v2] kvm: x86: hyperv: avoid livelock in oneshot SynIC timers

2017-07-24 Thread Roman Kagan
If the SynIC timer message delivery fails due to SINT message slot being busy, there's no point to attempt starting the timer again until we're notified of the slot being released by the guest (via EOM or EOI). Even worse, when a oneshot timer fails to deliver its message, its re-arming with an ex

[Devel] [PATCH] systemd-autofs-restart.sh: return meaningful value from restore_mountpoint

2017-07-24 Thread Stanislav Kinsburskiy
Its result is threated as a reason to print or supress error message. Signed-off-by: Stanislav Kinsburskiy --- scripts/systemd-autofs-restart.sh | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/systemd-autofs-restart.sh b/scripts/systemd-autofs-restart

Re: [Devel] [PATCH vz7.6 v2] kvm: x86: hyperv: avoid livelock in oneshot SynIC timers

2017-07-24 Thread Konstantin Khorenko
Once more: need this in vz7 update 5 or later? -- Best regards, Konstantin Khorenko, Virtuozzo Linux Kernel Team On 07/24/2017 10:33 AM, Roman Kagan wrote: If the SynIC timer message delivery fails due to SINT message slot being busy, there's no point to attempt starting the timer again until

Re: [Devel] [PATCH vz7.6 v2] kvm: x86: hyperv: avoid livelock in oneshot SynIC timers

2017-07-24 Thread Denis V. Lunev
On 07/24/2017 11:36 AM, Konstantin Khorenko wrote: > Once more: need this in vz7 update 5 or later? > update6, as written in the subject ;) > -- > Best regards, > > Konstantin Khorenko, > Virtuozzo Linux Kernel Team > > On 07/24/2017 10:33 AM, Roman Kagan wrote: >> If the SynIC timer message del

[Devel] [PATCH RHEL7 COMMIT] fs: ioctl_fiemap must check what filemap_write_and_wait_range returns

2017-07-24 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-514.26.1.vz7.33.15 --> commit 626a0ce8c510703a4d2d979f49cef7f54ea29f07 Author: Maxim Patlasov Date: Mon Jul 24 13:31:04 2017 +0400 fs: ioctl

[Devel] [PATCH] criu: update second "iptables restore" helper to work in VE#0

2017-07-24 Thread Stanislav Kinsburskiy
Surprisingly CRIU has 2 equal helpers for iptables restore. Initial series patched only one the them. This patch updates the second one. https://jira.sw.ru/browse/PSBM-58574 Signed-off-by: Stanislav Kinsburskiy --- criu/net.c | 30 +- 1 file changed, 29 insertions(

[Devel] [PATCH] Revert "KVM: nested VMX: disable perf cpuid reporting"

2017-07-24 Thread Denis Plotnikov
From: Jim Mattson This reverts commit bc6134942dbbf31c25e9bd7c876be5da81c9e1ce. A CPUID instruction executed in VMX non-root mode always causes a VM-exit, regardless of the leaf being queried. Fixes: bc6134942dbb ("KVM: nested VMX: disable perf cpuid reporting") Signed-off-by: Jim Mattson [The

Re: [Devel] [PATCH] Revert "KVM: nested VMX: disable perf cpuid reporting"

2017-07-24 Thread Denis V. Lunev
On 07/24/2017 05:31 PM, Denis Plotnikov wrote: > From: Jim Mattson > > This reverts commit bc6134942dbbf31c25e9bd7c876be5da81c9e1ce. > > A CPUID instruction executed in VMX non-root mode always causes a > VM-exit, regardless of the leaf being queried. > > Fixes: bc6134942dbb ("KVM: nested VMX: dis

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Andrei Vagin
On Fri, Jul 21, 2017 at 10:42:03AM +0300, Stanislav Kinsburskiy wrote: > This is needed to be able to restore container vwith disabled netfilter. > When netfilter is disabled, its denties and operations are forbiddedn in CTs > VE. > Thus we need to switch to VE#0. This is done by forking a child, w

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Cyrill Gorcunov
On Mon, Jul 24, 2017 at 08:34:52AM -0700, Andrei Vagin wrote: > > > > -static int iptables_tool_restore(char *def_cmd, int fdin) > > +static int __iptables_tool_restore(char *def_cmd, int fdin) > > { > > + if (join_ve(root_item->pid->real, false)) > > Do you switch here into VE0? Could you ad

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Andrei Vagin
On Mon, Jul 24, 2017 at 06:38:15PM +0300, Cyrill Gorcunov wrote: > On Mon, Jul 24, 2017 at 08:34:52AM -0700, Andrei Vagin wrote: > > > > > > -static int iptables_tool_restore(char *def_cmd, int fdin) > > > +static int __iptables_tool_restore(char *def_cmd, int fdin) > > > { > > > + if (join_ve(r

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Andrei Vagin
On Mon, Jul 24, 2017 at 06:38:15PM +0300, Cyrill Gorcunov wrote: > On Mon, Jul 24, 2017 at 08:34:52AM -0700, Andrei Vagin wrote: > > > > > > -static int iptables_tool_restore(char *def_cmd, int fdin) > > > +static int __iptables_tool_restore(char *def_cmd, int fdin) > > > { > > > + if (join_ve(r

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Stanislav Kinsburskiy
24.07.2017 18:46, Andrei Vagin пишет: > On Mon, Jul 24, 2017 at 06:38:15PM +0300, Cyrill Gorcunov wrote: >> On Mon, Jul 24, 2017 at 08:34:52AM -0700, Andrei Vagin wrote: -static int iptables_tool_restore(char *def_cmd, int fdin) +static int __iptables_tool_restore(char *def_cmd,

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Cyrill Gorcunov
On Mon, Jul 24, 2017 at 06:52:31PM +0300, Stanislav Kinsburskiy wrote: > > >> int join_ve(pid_t pid, bool veX) > > > > Does pid have to be 0 in this case? > > > > Maybe interface to this helper should be reworked? In criu/cr_restore.c #define join_veX(pid) join_ve(pid, true) #define join_v

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Stanislav Kinsburskiy
24 июля 2017 г. 7:04 PM пользователь Kirill Gorkunov написал: On Mon, Jul 24, 2017 at 06:52:31PM +0300, Stanislav Kinsburskiy wrote: > > >> int join_ve(pid_t pid, bool veX) > > > > Does pid have to be 0 in this case? > > > > Maybe interface to this helper should be reworked? In criu/cr_restore

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Cyrill Gorcunov
On Mon, Jul 24, 2017 at 07:09:39PM +0300, Stanislav Kinsburskiy wrote: > >Well, no. I don't like this defines. >And I don't think that pid has to be explicitly provided. At least for >ve0. >But frankly, I don't want to do it anyways. Man, it happened that cgroup interace works wit

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Andrey Vagin
On Mon, Jul 24, 2017 at 07:12:50PM +0300, Cyrill Gorcunov wrote: > On Mon, Jul 24, 2017 at 07:09:39PM +0300, Stanislav Kinsburskiy wrote: > > > >Well, no. I don't like this defines. > >And I don't think that pid has to be explicitly provided. At least for > >ve0. > >But frankly, I

Re: [Devel] [PATCH] mounts: support NFS bind-mounts in the same shared group

2017-07-24 Thread Andrei Vagin
On Wed, Jul 19, 2017 at 10:43:26AM +0300, Stanislav Kinsburskiy wrote: > Initial patch was supporting only slave mounts as bind-mounts. > > https://jira.sw.ru/browse/PSBM-68663 > Reviewed-by: Andrei Vagin > Signed-off-by: Stanislav Kinsburskiy > --- > criu/mount.c | 13 - > 1 f

Re: [Devel] [PATCH 2/3] net: iptables_tool_{dump, restore} helpers introduced

2017-07-24 Thread Andrei Vagin
On Fri, Jul 21, 2017 at 10:41:58AM +0300, Stanislav Kinsburskiy wrote: > A couple of simple helpers to destinguish between iptables dump and restore. > Will be useful later, when iptables restore will happen in VE#0. > > Signed-off-by: Stanislav Kinsburskiy > --- > criu/net.c | 19

[Devel] [PATCH] ve: allow to do anything from init_user_ns

2017-07-24 Thread Andrei Vagin
From: Andrei Vagin current_user_ns_initial() is used to restrict operations, which are allowed in a ve initial userns, but aren't allowed in sub-user-namespaces. But now this function doesn't take into account init_user_ns. init user_ns is a root item in the hierarchy of user namespaces, so it is

Re: [Devel] [PATCH] ve: allow to do anything from init_user_ns

2017-07-24 Thread Andrei Vagin
On Mon, Jul 24, 2017 at 11:55:55PM +0300, Andrei Vagin wrote: > From: Andrei Vagin > > current_user_ns_initial() is used to restrict operations, > which are allowed in a ve initial userns, but aren't allowed > in sub-user-namespaces. But now this function doesn't take > into account init_user_ns.

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Stanislav Kinsburskiy
24 июля 2017 г. 7:12 PM пользователь Kirill Gorkunov написал: On Mon, Jul 24, 2017 at 07:09:39PM +0300, Stanislav Kinsburskiy wrote: > >Well, no. I don't like this defines. >And I don't think that pid has to be explicitly provided. At least for >ve0. >But frankly, I don't want t

Re: [Devel] [PATCH] ve: allow to do anything from init_user_ns

2017-07-24 Thread Stanislav Kinsburskiy
I like it. Acked-by: Stanislav Kinsburskiy 24.07.2017 23:55, Andrei Vagin пишет: > From: Andrei Vagin > > current_user_ns_initial() is used to restrict operations, > which are allowed in a ve initial userns, but aren't allowed > in sub-user-namespaces. But now this function doesn't take > int

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Andrey Vagin
On Mon, Jul 24, 2017 at 11:37:52PM -0700, Stanislav Kinsburskiy wrote: > > > 24 июля 2017 г. 7:12 PM пользователь Kirill Gorkunov > написал: > > On Mon, Jul 24, 2017 at 07:09:39PM +0300, Stanislav Kinsburskiy wrote: > > > >Well, no. I don't like this defines. > >And I do

Re: [Devel] [PATCH 3/3] net: do iptables restore in ve0

2017-07-24 Thread Stanislav Kinsburskiy
25.07.2017 09:48, Andrey Vagin пишет: > On Mon, Jul 24, 2017 at 11:37:52PM -0700, Stanislav Kinsburskiy wrote: >> >> >> 24 июля 2017 г. 7:12 PM пользователь Kirill Gorkunov >> написал: >> >> On Mon, Jul 24, 2017 at 07:09:39PM +0300, Stanislav Kinsburskiy wrote: >> > >> >Well, no.