From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 0/8] kvm: nVMX: Checkpoint/restore support for VMX state Date: Wed, 15 Feb 2017 23:05:12 +0100 Message-ID: <9b20b8f3-6351-a172-c712-385e33daa3a9@redhat.com> References: <1480536229-11754-1-git-send-email-jmattson@google.com> <203030e9-5f2e-9383-933f-6088f794ea93@redhat.com> <0b04249f-f7fc-6164-49f1-c80de0e65d5d@redhat.com> <08cfbee1-4d5b-d094-2f90-9f2b6e335f72@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: David Hildenbrand , kvm@vger.kernel.org To: Jim Mattson Return-path: Received: from mail-wr0-f196.google.com ([209.85.128.196]:35991 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751383AbdBOWFM (ORCPT ); Wed, 15 Feb 2017 17:05:12 -0500 Received: by mail-wr0-f196.google.com with SMTP id k90so32678131wrc.3 for ; Wed, 15 Feb 2017 14:05:11 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 15/02/2017 23:00, Jim Mattson wrote: > Yes, I see that this works for the in-kernel instruction emulator. My > question was regarding a hypothetical user-space instruction emulator. I > can see how a #PF resulting from KVM_TRANSLATE could be injected with > KVM_SET_VCPU_EVENTS (if KVM_TRANSLATE was forthcoming with the error code, > anyway). However, what if the KVM_TRANSLATE ioctl were to fail because of > an EPT violation? I don't see an ioctl that would allow userspace to inject > a VM-exit event (complete with exit reason, exit qualification, and all of > the other VM-exit information fields that might be relevant.) Or are you > saying that simply encountering the EPT violation while > trying to answer a KVM_TRANSLATE request would induce the VM-exit? I think it should, yes. There are other limitations of KVM_TRANSLATE (it always assumes CPL=0 for example) but the same logic would apply to KVM_TRANSLATE and to the in-kernel emulator. Paolo >> One thing where we're lacking a bit is that translate_nested_gpa should >> have an argument for "translating translated guest address" vs. >> "translating guest page structure address", in order to set EXITINFO or >> exit qualification correctly. This is incorrect right now. >> >> Paolo >