From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v5] KVM: nVMX: Fully support of nested VMX preemption timer Date: Thu, 26 Sep 2013 22:44:45 +0200 Message-ID: <52449CBD.4010603@redhat.com> References: <1379319104-10266-1-git-send-email-yzt356@gmail.com> <52444CF6.1020102@redhat.com> <52446C8D.8030000@web.de> <52447335.9090601@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , Arthur Chunqi Li , kvm@vger.kernel.org, gleb@redhat.com, "Zhang, Yang Z" To: unlisted-recipients:; (no To-header on input) Return-path: Received: from mail-qc0-f178.google.com ([209.85.216.178]:32841 "EHLO mail-qc0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951Ab3IZUoa (ORCPT ); Thu, 26 Sep 2013 16:44:30 -0400 Received: by mail-qc0-f178.google.com with SMTP id r5so1140850qcx.37 for ; Thu, 26 Sep 2013 13:44:29 -0700 (PDT) In-Reply-To: <52447335.9090601@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 26/09/2013 19:47, Paolo Bonzini ha scritto: > > If I only apply this hunk, which disables the preemption timer while > in L1: > > @@ -8396,6 +8375,8 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu) > > load_vmcs12_host_state(vcpu, vmcs12); > > + vmcs_write32(PIN_BASED_VM_EXEC_CONTROL, vmx_pin_based_exec_ctrl(vmx)); > + > /* Update TSC_OFFSET if TSC was changed while L2 ran */ > vmcs_write64(TSC_OFFSET, vmx->nested.vmcs01_tsc_offset); > > then the testcase works for somewhat larger values of the preemption timer > (up to ~1500000 TSC cycles), but then fails. I mean if I apply it on top of current kvm/next, without Arthur's patch. If I apply the hunk on top of Arthur's patch nothing changes and the timer testcase starts breaking around ~65000 TSC cycles. It is a bit problematic that adding printks changes something, so that the test starts passing. I haven't tried tracepoints yet. Jan, which L1 is using the preemption timer? Any reason why you added it? I wonder if it isn't better to revert it, since it is quite broken. Paolo