Message ID | 1538127963-15645-15-git-send-email-paulus@ozlabs.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5087915A6 for <patchwork-kvm@patchwork.kernel.org>; Fri, 28 Sep 2018 09:46:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 439E72AB2B for <patchwork-kvm@patchwork.kernel.org>; Fri, 28 Sep 2018 09:46:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 381342ACE2; Fri, 28 Sep 2018 09:46:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C81912AB2B for <patchwork-kvm@patchwork.kernel.org>; Fri, 28 Sep 2018 09:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729333AbeI1QJU (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Fri, 28 Sep 2018 12:09:20 -0400 Received: from ozlabs.org ([203.11.71.1]:32849 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729158AbeI1QJT (ORCPT <rfc822;kvm@vger.kernel.org>); Fri, 28 Sep 2018 12:09:19 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42M6JF5Ygjz9sjD; Fri, 28 Sep 2018 19:46:21 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1538127981; bh=VO5KFNeHVbXIcs6X5rY3qfAsY7zEtJGU/nppBeKAghs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WWk7w2p1Su04lXxzvmfz6q1/54+Hxcmf6wmJuVVmzPX9+fnQreotFByAY92JW1h1J Kksl6kJa80aqgMlywy8tpcIkCTv4QThsdQTZoZq5HA8rXGOVQ81n9nTRo7NE8OVn3j JB5pwgF3wnSnxX1BRc56PRXnRdcweFiMbDGmL8FVVtlsZdXV38eJpAlG7O2emECKq/ 0CaV8xzOtiR/qeexywN05wwa3+MidRjx+sHOAM8XQZ7DCMlPAZp4O8wMToIEWSVOLW /Hgt5Ab7qjAp8eqcruNDGDkA9exFNrrsvCgek4GLvEbjvNpAsU52Mg0r+CVbtMdcJ5 wyM6LRvmwx9Xw== From: Paul Mackerras <paulus@ozlabs.org> To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: linuxppc-dev@ozlabs.org, David Gibson <david@gibson.dropbear.id.au> Subject: [PATCH v2 14/33] KVM: PPC: Book3S HV: Clear partition table entry on vm teardown Date: Fri, 28 Sep 2018 19:45:44 +1000 Message-Id: <1538127963-15645-15-git-send-email-paulus@ozlabs.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538127963-15645-1-git-send-email-paulus@ozlabs.org> References: <1538127963-15645-1-git-send-email-paulus@ozlabs.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
KVM: PPC: Book3S HV: Nested HV virtualization
|
expand
|
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 0ad5541..b8703be 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -4501,13 +4501,19 @@ static void kvmppc_core_destroy_vm_hv(struct kvm *kvm) kvmppc_free_vcores(kvm); - kvmppc_free_lpid(kvm->arch.lpid); if (kvm_is_radix(kvm)) kvmppc_free_radix(kvm); else kvmppc_free_hpt(&kvm->arch.hpt); + /* Perform global invalidation and return lpid to the pool */ + if (cpu_has_feature(CPU_FTR_ARCH_300)) { + kvm->arch.process_table = 0; + kvmppc_setup_partition_table(kvm); + } + kvmppc_free_lpid(kvm->arch.lpid); + kvmppc_free_pimap(kvm); }