[Devel] [PATCH vz7.62] kvm:x86:lapic: undo RH's breaking hyperv synic auto_eoi

2018-07-09 Thread Roman Kagan
st of supported ones.) For details see (RHEL subscription required) https://access.redhat.com/labs/psb/versions/kernel-3.10.0-862.el7/patches/x86-kvm-lapic-do-not-scan-IRR-when-delivering-an-interrupt?raw=true Undo this breakage. VZ-Bug: #PSBM-86431 Signed-off-by: Roman Kagan --- arch/x86/kvm/la

[Devel] [PATCH vz7.70] kvm: x86: vmx: fix vpid leak

2018-08-13 Thread Roman Kagan
eeing. Fixes: 5c614b3583e7b6dab0c86356fa36c2bcbb8322a0 Cc: sta...@vger.kernel.org Signed-off-by: Roman Kagan Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 020a90f653dd02dbbae389da91f510d5f33984dc) Signed-off-by: Roman Kagan --- arch/x86/kvm/vmx.

Re: [Devel] [PATCH vz7.70] kvm: x86: vmx: fix vpid leak

2018-08-13 Thread Roman Kagan
On Mon, Aug 13, 2018 at 12:57:17PM +0300, Roman Kagan wrote: > commit 63aff65573d73eb8dda4732ad4ef222dd35e4862 upstream. > > VPID for the nested vcpu is allocated at vmx_create_vcpu whenever nested > vmx is turned on with the module parameter. > > However, it's only fr

[Devel] [PATCH vz7.73] KVM: x86: Don't re-execute instruction when not passing CR2 value

2018-11-08 Thread Roman Kagan
onrad Rzeszutek Wilk Reviewed-by: Wanpeng Li Signed-off-by: Radim Krčmář (cherry picked from commit 9b8ae63798cb97e785a667ff27e43fa6220cb734) Signed-off-by: Roman Kagan VZ-Bug: #PSBM-89859 --- arch/x86/include/asm/kvm_host.h | 3 ++- arch/x86/kvm/vmx.c | 2 +- 2 files changed, 3 i

[Devel] [PATCH vz7.73] KVM: x86: Update cpuid properly when CR4.OSXAVE or CR4.PKE is changed

2019-03-25 Thread Roman Kagan
rg Signed-off-by: Radim Krčmář (cherry picked from commit c4d2188206bafa177ea58e9a25b952baa0bf7712) VZ-Bug: #PSBM-93016 Signed-off-by: Roman Kagan --- arch/x86/kvm/x86.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 957280a6eb

Re: [Devel] [PATCH] KVM: x86: add a stub for MSR_PLATFORM_INFO

2019-06-06 Thread Roman Kagan
On Thu, Jun 06, 2019 at 11:36:45AM +0300, Denis Plotnikov wrote: > This is done to prevent windows guest crashing while running > PassMark benchmark which calls rdmsr(0xce) - MSR_PLATFORM_INFO > from PassMark driver. > > The reason why the test driver does so is unclear, since > MSR_PLATFORM_INFO

Re: [Devel] [PATCH] KVM: x86: add a stub for MSR_PLATFORM_INFO

2019-06-06 Thread Roman Kagan
On Thu, Jun 06, 2019 at 03:11:10PM +0300, Denis Plotnikov wrote: > > > On 06.06.2019 14:31, Roman Kagan wrote: > > On Thu, Jun 06, 2019 at 11:36:45AM +0300, Denis Plotnikov wrote: > >> This is done to prevent windows guest crashing while running > >> PassMark

[Devel] [PATCH vz7.16 1/2] KVM: x86: DR0-DR3 are not clear on reset

2016-08-02 Thread Roman Kagan
Message-Id: <1427933438-12782-4-git-send-email-na...@cs.technion.ac.il> Signed-off-by: Paolo Bonzini (cherry picked from commit ae561edeb421fbc24f97df7af8607c14009c16b2) Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 14 ++

[Devel] [PATCH vz7.16 0/2] kvm: fixes for debug register updates

2016-08-02 Thread Roman Kagan
A couple of mainstream backports to fix debug register updates on vcpu transitions to/from guest. Supposed to fix, in particular, occasional misses of hardware breakpoints (https://jira.sw.ru/browse/PSBM-50488). Nadav Amit (1): KVM: x86: DR0-DR3 are not clear on reset Paolo Bonzini (1): KVM:

[Devel] [PATCH vz7.16 2/2] KVM: x86: fix root cause for missed hardware breakpoints

2016-08-02 Thread Roman Kagan
. Cc: sta...@vger.kernel.org # 4.1+ Fixes: 172b2386ed16a9143d9a456aae5ec87275c61489 Reviewed-by: Xiao Guangrong Signed-off-by: Paolo Bonzini (cherry picked from commit 70e4da7a8ff62f2775337b705f45c804bb450454) Signed-off-by: Roman Kagan --- arch/x86/kvm/x86.c | 8 1 file changed, 4 insertions(+), 4

Re: [Devel] [PATCH]net: Restore default sock_alloc_send_pskb() changed by initial cumulative patch

2016-10-18 Thread Roman Kagan
cation of continuous > big skbs fails there. > > Restore the default behaviour to fix the problem. > > https://jira.sw.ru/browse/PSBM-52390 > > Reported-by: Roman Kagan > Signed-off-by: Kirill Tkhai Reviewed-by: Roman Kagan _

[Devel] [PATCH vz7.19 1/2] KVM:x86: remnants of get_kvmclock_ns port

2016-10-31 Thread Roman Kagan
The commit 108b249c453dd7132599ab6dc7e435a7036c193f introducing get_kvmclock_ns was ported with a few omissions; this patch completes the process. Signed-off-by: Roman Kagan --- arch/x86/kvm/x86.c | 4 ++-- arch/x86/kvm/x86.h | 9 - 2 files changed, 2 insertions(+), 11 deletions

[Devel] [PATCH vz7.19 0/2] KVM:x86: fixes for get_kvmclock_ns

2016-10-31 Thread Roman Kagan
These two patches address #PSBM-54338, by making VMCS access only from vCPU context. Roman Kagan (2): KVM:x86: remnants of get_kvmclock_ns port KVM:x86: avoid VMCS access from non-vCPU context --- NOTE: the bug is present in the mainline kernel. The patch has been posted; please don&#

[Devel] [PATCH vz7.19 2/2] KVM:x86: avoid VMCS access from non-vCPU context

2016-10-31 Thread Roman Kagan
a7036c193f Cc: Paolo Bonzini Upstream-Message-ID: <1477933936-3681-1-git-send-email-rka...@virtuozzo.com> Signed-off-by: Roman Kagan --- arch/x86/kvm/hyperv.c | 16 +++- arch/x86/kvm/x86.c| 21 - arch/x86/kvm/x86.h| 2 +- 3 files changed, 16 i

[Devel] [PATCH 05/16] KVM: x86: Replace call-back set_tsc_khz() with a common function

2016-11-11 Thread Roman Kagan
381d585c80e34988269bd7901ad910981e900be1) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/svm.c | 36 arch/x86/kvm/vmx.c | 17 --- arch/x86/kvm/x86.c | 46

[Devel] [PATCH 01/16] KVM: x86: declare a few variables as __read_mostly

2016-11-11 Thread Roman Kagan
From: Paolo Bonzini These include module parameters and variables that are set by kvm_x86_ops->hardware_setup. Signed-off-by: Paolo Bonzini (cherry-picked from commit 893590c73426585dfd9f33358b19f18d9395fb2f) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/

[Devel] [PATCH 08/16] KVM: x86: Move TSC scaling logic out of call-back read_l1_tsc()

2016-11-11 Thread Roman Kagan
commit 4ba76538dd52dd9b18b464e509cb8f3ed4ed993f) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/lapic.c| 4 ++-- arch/x86/kvm/svm.c | 3 +-- arch/x86/kvm/x86.c | 11 --- 4 files changed

[Devel] [PATCH 02/16] KVM: x86: Collect information for setting TSC scaling ratio

2016-11-11 Thread Roman Kagan
. Signed-off-by: Haozhong Zhang Signed-off-by: Paolo Bonzini (cherry-picked from commit bc9b961b357ea8129d75613b7af4fdf57ced9b9f) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 4 arch/x86/kvm/svm.c | 3 +++ arch/x86/kvm/x86.c

[Devel] [PATCH 06/16] KVM: x86: Replace call-back compute_tsc_offset() with a common function

2016-11-11 Thread Roman Kagan
07c1419a32bbba08cf1efb6d1ecaf24f174fa4c3) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/svm.c | 10 -- arch/x86/kvm/vmx.c | 6 -- arch/x86/kvm/x86.c | 15 --- 4 files

[Devel] [PATCH 10/16] KVM: VMX: Enable and initialize VMX TSC scaling

2016-11-11 Thread Roman Kagan
-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/vmx.h | 4 +++- arch/x86/kvm/vmx.c | 17 - 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index 8530b93..ebe7cf9d 100644 --- a

[Devel] [PATCH 09/16] KVM: x86: Use the correct vcpu's TSC rate to compute time scale

2016-11-11 Thread Roman Kagan
d52e1) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/kvm/x86.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3913a62..7fcb155 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1780,7 +1

[Devel] [PATCH 13/16] KVM: VMX: Dump TSC multiplier in dump_vmcs()

2016-11-11 Thread Roman Kagan
From: Haozhong Zhang This patch enhances dump_vmcs() to dump the value of TSC multiplier field in VMCS. Signed-off-by: Haozhong Zhang Signed-off-by: Paolo Bonzini (cherry-picked from commit 8cfe9866960581303f244780945c5d12ecc4e5bc) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan

[Devel] [PATCH 11/16] KVM: VMX: Setup TSC scaling ratio when a vcpu is loaded

2016-11-11 Thread Roman Kagan
commit ff2c3a1803775cc72dc6f624b59554956396b0ee) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/kvm/vmx.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ab8a678..265bc0e 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86

[Devel] [PATCH 12/16] KVM: VMX: Use a scaled host TSC for guest readings of MSR_IA32_TSC

2016-11-11 Thread Roman Kagan
Plotnikov Signed-off-by: Roman Kagan --- arch/x86/kvm/vmx.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 265bc0e..9f3c26a 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2176,15 +2176,16 @@ static void

[Devel] [PATCH 07/16] KVM: x86: Move TSC scaling logic out of call-back adjust_tsc_offset()

2016-11-11 Thread Roman Kagan
adjust_tsc_offset_guest(). Signed-off-by: Haozhong Zhang Signed-off-by: Paolo Bonzini (cherry-picked from commit 58ea6767874e791a6c4f5c96c7d9155de4b1af28) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 13 + arch/x86/kvm/svm.c

[Devel] [PATCH 03/16] KVM: x86: Add a common TSC scaling ratio field in kvm_vcpu_arch

2016-11-11 Thread Roman Kagan
Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 27 +-- arch/x86/kvm/x86.c | 18 -- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/arch/x86/include/asm

[Devel] [PATCH 15/16] kvm: x86: drop read_tsc_offset()

2016-11-11 Thread Roman Kagan
From: Luiz Capitulino The TSC offset can now be read directly from struct kvm_arch_vcpu. Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini (cherry-picked from commit 3e3f50262eb441d0fd1de4dce06739e9c0fe7c61) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86

[Devel] [PATCH 16/16] KVM: x86: drop TSC offsetting kvm_x86_ops to fix KVM_GET/SET_CLOCK

2016-11-11 Thread Roman Kagan
OCK which, after commit 108b249c453d ("KVM: x86: introduce get_kvmclock_ns", 2016-09-01) called read_l1_tsc while the VMCS was not loaded. It thus returned bogus values on Intel CPUs. Fixes: 108b249c453dd7132599ab6dc7e435a7036c193f Reported-by: Roman Kagan Reviewed-by: Radim Krčmář Si

[Devel] [PATCH 14/16] kvm: x86: add tsc_offset field to struct kvm_vcpu_arch

2016-11-11 Thread Roman Kagan
ff-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 10 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 830d1cd..1166dc5 100644

[Devel] [PATCH 04/16] KVM: x86: Add a common TSC scaling function

2016-11-11 Thread Roman Kagan
Bonzini (cherry-picked from commit 35181e86df97e4223f4a28fb33e2bcf3b73de141) Signed-off-by: Denis Plotnikov Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/svm.c | 48 - arch/x86/kvm/x86.c | 40

[Devel] [PATCH 00/16] add tsc_scale and fix VM pause/resume

2016-11-11 Thread Roman Kagan
From: Denis Plotnikov The set of patches: 1. adds tsc_scaling functionality for VMX 2. generalizes a number of functions responsible for tsc writing and reading 3. fix VM pause/resume issue #PSBM-54338 by switching to using of cached tsc_offset Haozhong Zhang (12): KVM: x86: Collect info

[Devel] [PATCH] kvm/x86: skip async_pf when in guest mode

2016-12-02 Thread Roman Kagan
d-off-by: Roman Kagan Signed-off-by: Radim Krčmář (cherry picked from commit 80e2a7bb8d7050d2ea6d8961c526a65d30d5eb08) Fixes: PSBM-54491 Signed-off-by: Roman Kagan --- The patch has been merged into kvm/queue but not yet pull-requested to Linus arch/x86/kvm/mmu.c | 2 +- arch/x86/kvm/x86.c | 3 +

Re: [Devel] [PATCH RH7] vfs: add warning in guard_bio_eod() if truncated_bytes > bvec->bv_len

2016-12-04 Thread Roman Kagan
On Sat, Dec 03, 2016 at 11:22:26AM +0300, Dmitry Monakhov wrote: > > Pavel Tikhomirov writes: > > > https://jira.sw.ru/browse/PSBM-55105 > > > > In bug we crashed in zero_fill_bio when trying to zero memset bio_vec: > > > > struct bio_vec { > > bv_page = 0xea0004437500, > > bv_len = 4294

Re: [Devel] [PATCH v1] KVM: x86: add a hv_stimer pending to the list of vcpu's awaking events

2017-01-19 Thread Roman Kagan
t; > Fixes https://jira.sw.ru/browse/PSBM-58415 > > Signed-off-by: Denis Plotnikov Reviewed-by: Roman Kagan ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH vzkernel-29] kvm: fix RH rebase fallouts

2017-03-17 Thread Roman Kagan
n the SynIC message page and went to sleep, to never be woken up again. Signed-off-by: Roman Kagan --- arch/x86/kvm/irq_comm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c index c2d61d8..2bfb9a6 100644 --- a/arc

[Devel] [PATCH] kvm: x86: hyperv: avoid livelock in oneshot SynIC timers

2017-07-19 Thread Roman Kagan
e processing is resumed so the timer will be started then. Signed-off-by: Roman Kagan --- arch/x86/kvm/hyperv.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index c8efdce3e702..ab9501c2f32c 100644 --- a/arch/x86/kvm/hype

Re: [Devel] [PATCH] kvm: x86: hyperv: avoid livelock in oneshot SynIC timers

2017-07-20 Thread Roman Kagan
have the master commit id once (if) it's merged. Roman. > > -- > Best regards, > > Konstantin Khorenko, > Virtuozzo Linux Kernel Team > > On 07/19/2017 08:31 PM, Roman Kagan wrote: > > If the SynIC timer message delivery fails due to SINT message slot being &g

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

2017-07-24 Thread Roman Kagan
he slot is busy, the processing will be restarted upon notification from the guest that the slot is released. Signed-off-by: Roman Kagan Signed-off-by: Radim Krčmář (cherry picked from commit f1ff89ec4447c4e39d275a1ca3de43eed2a92745) --- v1 -> v2: - actual cherry-pick from mainline ker

Re: [Devel] [TRD] optimization for zero-filled pages written by VMs

2017-09-08 Thread Roman Kagan
On Thu, Sep 07, 2017 at 04:41:11PM +0300, Konstantin Khorenko wrote: > 1. Feature > > Optimization for zero-filled pages written by VMs > https://jira.sw.ru/browse/PSBM-64658 > > 2. Description > > Any page before being written to the physical swap is checked if it is filled > by zeroes and mapp

Re: [Devel] [PATCH 0/6] backporting async_pf injection functionality

2017-09-20 Thread Roman Kagan
nsertions(+), 59 deletions(-) Briefly skimmed through the series, and it looks OK to me. Reviewed-by: Roman Kagan ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

Re: [Devel] double faults in Virtuozzo KVM

2017-09-28 Thread Roman Kagan
On Thu, Sep 28, 2017 at 05:55:51PM +0300, Denis Kirjanov wrote: > Hi, we're seeing double faults in async_page_fault. async_page_fault is the #PF handler in KVM guests. It filters out specially crafted #PF's from the host; the rest fall through to the regular #PF handler. So most likely you're s

Re: [Devel] double faults in Virtuozzo KVM

2017-09-29 Thread Roman Kagan
On Fri, Sep 29, 2017 at 12:02:37AM +0300, Denis Kirjanov wrote: > On Thursday, September 28, 2017, Roman Kagan wrote: > > On Thu, Sep 28, 2017 at 05:55:51PM +0300, Denis Kirjanov wrote: > > > Hi, we're seeing double faults in async_page_fault. > > > > async_p

Re: [Devel] double faults in Virtuozzo KVM

2017-09-29 Thread Roman Kagan
On Fri, Sep 29, 2017 at 11:25:20AM +0300, Denis Kirjanov wrote: > >> > > _Some_ of them related to the fact that during the faults RSP points > >> > > to userspace and it leads to double-fault scenario. > >> > > >> > The postmortem you quote doesn't support that. > >> > >> > >> I'll post a relevant

[Devel] [PATCH 0/2] kvm: hyperv: backport latest stuff from mainstream

2017-10-03 Thread Roman Kagan
ld just be dropped, and this series be reworked as a pure backport. Let me know if you want it this way. The series is against branch 37. Roman Kagan (2): kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2 kvm: x86: hyperv: make VP_INDEX managed by userspace Documentation/virtual/kvm/ap

[Devel] [PATCH 2/2] kvm: x86: hyperv: make VP_INDEX managed by userspace

2017-10-03 Thread Roman Kagan
ere unsupported, to avoid spamming error logs. Signed-off-by: Roman Kagan Signed-off-by: Radim Krčmář (cherry picked from commit d3457c877b14aaee8c52923eedf05a3b78af0476) --- Documentation/virtual/kvm/api.txt | 9 +++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/hyperv.h

[Devel] [PATCH 1/2] kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2

2017-10-03 Thread Roman Kagan
is fully managed by QEMU, so zeroing them is undesirable even when writing the MSRs from the guest side. To support this new scheme, introduce a new capability, KVM_CAP_HYPERV_SYNIC2, which, when enabled, makes sure that the synic pages aren't zeroed out in KVM. Signed-off-by: Roman Kagan S

[Devel] [PATCH v2 2/4] KVM: x86: fix NULL deref in vcpu_scan_ioapic

2017-10-10 Thread Roman Kagan
-by: Wanpeng Li Signed-off-by: Paolo Bonzini (cherry picked from commit 546d87e5c903a7f3ee7b9f998949a94729fbc65b) Signed-off-by: Roman Kagan --- arch/x86/kvm/x86.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 478faf18d1cb..16a8aa071a48 100644

[Devel] [PATCH v2 0/4] kvm: hyperv: backport latest stuff from mainstream

2017-10-10 Thread Roman Kagan
an intermediate upstream patch to minimize conflicts Roman Kagan (3): Revert "kvm/x86: clear hyperv synic pages only when guest modifies MSRs" kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2 kvm: x86: hyperv: make VP_INDEX managed by userspace Wanpeng Li (1): KVM: x86: fix

[Devel] [PATCH v2 4/4] kvm: x86: hyperv: make VP_INDEX managed by userspace

2017-10-10 Thread Roman Kagan
ere unsupported, to avoid spamming error logs. Signed-off-by: Roman Kagan Signed-off-by: Radim Krčmář (cherry picked from commit d3457c877b14aaee8c52923eedf05a3b78af0476) --- Documentation/virtual/kvm/api.txt | 9 +++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/hyperv.h

[Devel] [PATCH v2 3/4] kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2

2017-10-10 Thread Roman Kagan
is fully managed by QEMU, so zeroing them is undesirable even when writing the MSRs from the guest side. To support this new scheme, introduce a new capability, KVM_CAP_HYPERV_SYNIC2, which, when enabled, makes sure that the synic pages aren't zeroed out in KVM. Signed-off-by: Roman Kagan S

[Devel] [PATCH v2 1/4] Revert "kvm/x86: clear hyperv synic pages only when guest modifies MSRs"

2017-10-10 Thread Roman Kagan
This reverts commit d385b9f5e7a4c225b1463655484daeebb1ca79dd. It will be replaced by a backported mainstream commit with different behavior. Signed-off-by: Roman Kagan --- arch/x86/kvm/hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/hyperv.c b/arch

Re: [Devel] [PATCH v2 0/4] kvm: hyperv: backport latest stuff from mainstream

2017-10-12 Thread Roman Kagan
On Thu, Oct 12, 2017 at 12:30:18PM +0300, Konstantin Khorenko wrote: > arch/x86/kvm/hyperv.c: In function 'kvm_hv_vcpu_postcreate': > arch/x86/kvm/hyperv.c:708:2: error: implicit declaration of function > 'kvm_vcpu_get_idx' [-Werror=implicit-function-declaration] > hv_vcpu->vp_index = kvm_vcpu_g

[Devel] [PATCH v3 6/6] kvm: x86: hyperv: make VP_INDEX managed by userspace

2017-10-12 Thread Roman Kagan
ere unsupported, to avoid spamming error logs. Signed-off-by: Roman Kagan Signed-off-by: Radim Krčmář (cherry picked from commit d3457c877b14aaee8c52923eedf05a3b78af0476) Signed-off-by: Roman Kagan --- Documentation/virtual/kvm/api.txt | 9 +++ arch/x86/include/asm/kvm_host.h | 1

[Devel] [PATCH v3 1/6] Revert "kvm/x86: clear hyperv synic pages only when guest modifies MSRs"

2017-10-12 Thread Roman Kagan
This reverts commit d385b9f5e7a4c225b1463655484daeebb1ca79dd. It will be replaced by a backported mainstream commit with different behavior. Signed-off-by: Roman Kagan --- arch/x86/kvm/hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/hyperv.c b/arch

[Devel] [PATCH v3 0/6] kvm: hyperv: backport latest stuff from mainstream

2017-10-12 Thread Roman Kagan
gt; v2: - replace incremental patch with a revert and a fresh backport - pull in an intermediate upstream patch to minimize conflicts Christoffer Dall (1): KVM: Add kvm_vcpu_get_idx to get vcpu index in kvm->vcpus David Hildenbrand (1): KVM: Provide function for VCPU lookup by id Roman

[Devel] [PATCH v3 3/6] KVM: Provide function for VCPU lookup by id

2017-10-12 Thread Roman Kagan
ommit db27a7a37aa0b1f8b373f8b0fb72a2ccaafb85b7) Signed-off-by: Roman Kagan --- include/linux/kvm_host.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ccc33ac4eccc..de3cc6d91e2f 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_h

[Devel] [PATCH v3 4/6] KVM: Add kvm_vcpu_get_idx to get vcpu index in kvm->vcpus

2017-10-12 Thread Roman Kagan
r each vcpu. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger (cherry picked from commit 497d72d80a789501501cccabdad6b145f9e31371) Signed-off-by: Roman Kagan --- include/linux/kvm_host.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/kvm_host.h b/include

[Devel] [PATCH v3 2/6] KVM: x86: fix NULL deref in vcpu_scan_ioapic

2017-10-12 Thread Roman Kagan
. v1 -> v2: - replace incremental patch with a revert and a fresh backport - pull in an intermediate upstream patch to minimize conflicts Roman Kagan (3): Revert "kvm/x86: clear hyperv synic pages only when guest modifies MSRs" kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2 kvm

[Devel] [PATCH v3 5/6] kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2

2017-10-12 Thread Roman Kagan
is fully managed by QEMU, so zeroing them is undesirable even when writing the MSRs from the guest side. To support this new scheme, introduce a new capability, KVM_CAP_HYPERV_SYNIC2, which, when enabled, makes sure that the synic pages aren't zeroed out in KVM. Signed-off-by: Roman Kagan S

[Devel] [PATCH] KVM: nVMX: do not fill vm_exit_intr_error_code in prepare_vmcs12

2017-11-15 Thread Roman Kagan
d from commit 7313c698050387a11c21afb0c6b4c61f21f7c042) [rkagan: This is a missing part of the backport of async pagefault machinery from mainstream; hopefully it fixes #PSBM-77171] Signed-off-by: Roman Kagan --- arch/x86/kvm/vmx.c | 52 ++-- 1 file changed, 34 inse

[Devel] [PATCH vz7.39] scsi: virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-12-19 Thread Roman Kagan
icked from commit 44ed8089e991a60d614abe0ee4b9057a28b364e4) Signed-off-by: Roman Kagan VZ-Bug: PSBM-79523 --- drivers/virtio/virtio_ring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index d77a91f39d55..59

[Devel] [vz7.7 PATCH] x86/kvm/vmx: do not use vm-exit instruction length for fast MMIO when running nested

2018-02-13 Thread Roman Kagan
SBM-81462 Signed-off-by: Roman Kagan --- arch/x86/kvm/vmx.c | 18 -- arch/x86/kvm/x86.c | 3 ++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d94946a07de6..8ab2b3d42adc 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x

Re: [Devel] [PATCH rh7] configs.OpenVZ: add minimal kernel config for a KVM VM

2018-02-13 Thread Roman Kagan
On Tue, Feb 13, 2018 at 05:02:33PM +0300, Konstantin Khorenko wrote: > Add a minimal kernel config: > - localmodconfig done on a KVM VM > - all options are set to "=y" where possible What is it going to be use{d,ful} for? Roman. ___ Devel mailing list D

Re: [Devel] [PATCH RHEL7 COMMIT] ms/x86/kvm/vmx: do not use vm-exit instruction length for fast MMIO when running nested

2018-02-14 Thread Roman Kagan
On Wed, Feb 14, 2018 at 01:47:42PM +0300, Konstantin Khorenko wrote: > Makes sense to release it as a ReadyKernel patch? I don't see any point in it: this only helps VZ nested in ESXi or Hyper-V, which is probably used only in evaluation or demo scenarios. I'm pretty confident we have zero existin

[Devel] [PATCH vz7.46 2/7] KVM: x86: cleanup the page tracking SRCU instance

2018-04-10 Thread Roman Kagan
Signed-off-by: Paolo Bonzini (cherry picked from commit 2beb6dad2e8f95d710159d5befb390e4f62ab5cf) Signed-off-by: Roman Kagan --- arch/x86/include/asm/kvm_page_track.h | 1 + arch/x86/kvm/page_track.c | 8 arch/x86/kvm/x86.c| 1 + 3 files changed, 10

[Devel] [PATCH vz7.46 0/7] assorted hyperv-related backports

2018-04-10 Thread Roman Kagan
: hyperv: fix locking of struct kvm_hv fields KVM: x86: cleanup the page tracking SRCU instance Roman Kagan (2): kvm: x86: factor out kvm.arch.hyperv (de)init kvm: x86: hyperv: guest->host event signaling via eventfd Vitaly Kuznetsov (2): x86/kvm/hyper-v: remove stale entries from vec_bit

[Devel] [PATCH vz7.46 4/7] kvm: x86: hyperv: guest->host event signaling via eventfd

2018-04-10 Thread Roman Kagan
ted) IDR. Signed-off-by: Roman Kagan Reviewed-by: David Hildenbrand [asm/hyperv.h changes approved by KY Srinivasan. - Radim] Signed-off-by: Radim Krčmář (cherry picked from commit faeb7833eee0d6afe0ecb6bdfa6042556c2c352e) [rkagan: adjusted for vzkernel] --- Documentation/virtual/kvm/api.txt |

[Devel] [PATCH vz7.46 6/7] x86/kvm/hyper-v: inject #GP only when invalid SINTx vector is unmasked

2018-04-10 Thread Roman Kagan
, I checked and genuine Hyper-V doesn't #GP when we write 0x1 to SINTx. I checked with Microsoft and they confirmed that if either the Masked bit (bit 16) or the Polling bit (bit 18) is set to 1, then they ignore the value of Vector. Make KVM act accordingly. Signed-off-by: Vitaly Kuznetsov Revi

[Devel] [PATCH vz7.46 1/7] KVM: hyperv: fix locking of struct kvm_hv fields

2018-04-10 Thread Roman Kagan
From: Paolo Bonzini Introduce a new mutex to avoid an AB-BA deadlock between kvm->lock and vcpu->mutex. Protect accesses in kvm_hv_setup_tsc_page too, as suggested by Roman. Reported-by: Dmitry Vyukov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini (cherry picked from

[Devel] [PATCH vz7.46 7/7] kvm: x86: hyperv: delete dead code in kvm_hv_hypercall()

2018-04-10 Thread Roman Kagan
-off-by: Paolo Bonzini (cherry picked from commit d32ef547fdbbeb9c4351f9d3bc84dec998a3be8c) Signed-off-by: Roman Kagan --- arch/x86/kvm/hyperv.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index c6d95a97c44c..d31d37c8765a 100

[Devel] [PATCH vz7.46 5/7] x86/kvm/hyper-v: remove stale entries from vec_bitmap/auto_eoi_bitmap on vector change

2018-04-10 Thread Roman Kagan
From: Vitaly Kuznetsov When a new vector is written to SINx we update vec_bitmap/auto_eoi_bitmap but we forget to remove old vector from these masks (in case it is not present in some other SINTx). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Radim Krčmář (cherry

[Devel] [PATCH vz7.46 3/7] kvm: x86: factor out kvm.arch.hyperv (de)init

2018-04-10 Thread Roman Kagan
Move kvm.arch.hyperv initialization and cleanup to separate functions. For now only a mutex is inited in the former, and the latter is empty; more stuff will go in there in a followup patch. Signed-off-by: Roman Kagan Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář (cherry picked

[Devel] [PATCH vz7.8] KVM: hyperv: idr_find needs RCU protection

2018-06-09 Thread Roman Kagan
kvm->srcu. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini (cherry picked from commit 452a68d0ef341c4d544757e02154788227b2a08b) Signed-off-by: Roman Kagan --- arch/x86/kvm/hyperv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/hyperv.c b/arch/x

Re: [Devel] [PATCH rh7 v1 00/36] Hyper-V SynIC support

2016-02-11 Thread Roman Kagan
rivers/hv/hyperv_vmbus.h | 92 + > include/linux/hyperv.h | 1 + > include/linux/kvm_host.h | 29 ++ > include/uapi/linux/kvm.h | 24 ++ > kernel/sched/cputime.c | 2 + > virt/kvm/eventfd.c | 42 +- >

Re: [Devel] [svt-core] [PATCH rh7 v1] KVM: x86: set TMR when the interrupt is accepted

2016-02-18 Thread Roman Kagan
zini > Signed-off-by: Pavel Butsykin Reviewed-by: Roman Kagan ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

Re: [Devel] [PATCH rh7 v1 0/5] KVM: Hyper-V VMBus hypercalls

2016-02-19 Thread Roman Kagan
> arch/x86/include/uapi/asm/hyperv.h | 4 ++- > arch/x86/kvm/hyperv.c | 50 > +++--- > arch/x86/kvm/svm.c | 3 +-- > arch/x86/kvm/vmx.c | 2 +- > drivers/hv/hyperv_vmbus.h | 6 - > include/u

Re: [Devel] Catching the console

2007-12-13 Thread Roman Kagan
On Wed, Dec 12, 2007 at 12:27:01PM +0100, Enrico Weigelt wrote: > No I'd like to request an feature for catching the console. > IMHO, it's enough to have an option to vzctl start, which tells > it to not to detach and bring the VE's console to the current tty. Unfortunately this is much trickier t