From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: nVMX: Disable preemption while reading from shadow VMCS Date: Wed, 08 Oct 2014 22:21:00 +0200 Message-ID: <54359CAC.6040602@redhat.com> References: <543560D3.2030205@siemens.com> <54358E30.1070201@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: kvm , Wanpeng Li , Jailhouse To: Jan Kiszka , Bandan Das Return-path: Sender: jailhouse-dev@googlegroups.com In-Reply-To: <54358E30.1070201@siemens.com> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , List-Id: kvm.vger.kernel.org Il 08/10/2014 21:19, Jan Kiszka ha scritto: > > Ouch! I apologize if I missed this in the previous discussion but why do > > we never get into this condition while running a Linux guest ? > > Well, you need high load on the host, preemption at the "wrong" time, > and some relevant difference between the still to-be-copied shadow vmcs > fields between the proper vmcs and the real one that was used by KVM at > that point. I don't think it is a Jailhouse-only issue, but other > hypervisors may be less sensitive. Indeed; in the particular case of the virtual interrupt pending bit it's easy to see why it is not a problem for Linux guests: handle_interrupt_window hardly does anything, you will just have a useless KVM_REQ_EVENT request. Running many different L2 guests (with an overcommitted host) should expose it. Note that the memory map and selectors are relatively similar among similar guests, and the most scary fields (RIP and RSP), are copied first when preemption is less likely. It's possible that moving them last would increase the chance of breakage. Paolo -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.