From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Subject: Re: [PATCH 05/19] KVM: PPC: Book3S HV: add a new KVM device for the XIVE native exploitation mode Date: Wed, 30 Jan 2019 15:29:19 +1100 Message-ID: <20190130042919.GA27109@blackberry> References: <20190107184331.8429-1-clg@kaod.org> <20190107184331.8429-6-clg@kaod.org> <20190122050520.GC15124@blackberry> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Gibson To: =?iso-8859-1?Q?C=E9dric?= Le Goater Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: kvm.vger.kernel.org On Mon, Jan 28, 2019 at 06:35:34PM +0100, Cédric Le Goater wrote: > On 1/22/19 6:05 AM, Paul Mackerras wrote: > > On Mon, Jan 07, 2019 at 07:43:17PM +0100, Cédric Le Goater wrote: > >> This is the basic framework for the new KVM device supporting the XIVE > >> native exploitation mode. The user interface exposes a new capability > >> and a new KVM device to be used by QEMU. > > > > [snip] > >> @@ -1039,7 +1039,10 @@ static int kvmppc_book3s_init(void) > >> #ifdef CONFIG_KVM_XIVE > >> if (xive_enabled()) { > >> kvmppc_xive_init_module(); > >> + kvmppc_xive_native_init_module(); > >> kvm_register_device_ops(&kvm_xive_ops, KVM_DEV_TYPE_XICS); > >> + kvm_register_device_ops(&kvm_xive_native_ops, > >> + KVM_DEV_TYPE_XIVE); > > > > I think we want tighter conditions on initializing the xive_native > > stuff and creating the xive device class. We could have > > xive_enabled() returning true in a guest, and this code will get > > called both by PR KVM and HV KVM (and HV KVM no longer implies that we > > are running bare metal). > > So yes, I gave nested a try with kernel_irqchip=on and the nested hypervisor > (L1) obviously crashes trying to call OPAL. I have tighten the test with : > > if (xive_enabled() && !kvmhv_on_pseries()) { > > for now. > > As this is a problem today in 5.0.x, I will send a patch for it if you think How do you mean this is a problem today in 5.0? I just tried 5.0-rc1 with kernel_irqchip=on in a nested guest and it works just fine. What exactly did you test? > it is correct. I don't think we should bother taking care of the PR case > on P9. Should we ? We do need to take care of PR KVM on P9, since it is the only form of nested KVM that works inside a host in HPT mode. Paul.