From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE376178397; Fri, 12 Jul 2024 17:02:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720803754; cv=none; b=n2Y3msqR5CQhbCszjLoWEpUgWrD3DwAjNvebo0NMLfP3toPQkZdbREEu1ineYZhZIGQ815Y2DbB25jh7PfLKu4nT/rhwjyLX94lEamGAbbZR1Ds9U1YPiy5ZzHzpxS9HP4rdlmBfsjUGVYCwKLs/Es53Ko3Q6f8v1lNXyqrXAtU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720803754; c=relaxed/simple; bh=I4z80uf9z3521cknQ18uC8LRTHagv6p8IMSR1R8y37E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SX1iuhrEgjX51GZMBCs4xg+HjkoGWAs2QrwifLoXE51XCrLxwvtQww+LJQTj7XLgPAEeOJpNmTOKDrisZLvO9iaLR2Rniuff/haKARmc4LUPS976XHpTt0gh4vRmDWwYDmmKtr32JGoStMbga6a1oBBMnpEsxY/6vEDGwqOQ/qY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 707E8C32782; Fri, 12 Jul 2024 17:02:30 +0000 (UTC) Date: Fri, 12 Jul 2024 13:02:28 -0400 From: Steven Rostedt To: Sean Christopherson Cc: Mathieu Desnoyers , Joel Fernandes , Vineeth Remanan Pillai , Ben Segall , Borislav Petkov , Daniel Bristot de Oliveira , Dave Hansen , Dietmar Eggemann , "H . Peter Anvin" , Ingo Molnar , Juri Lelli , Mel Gorman , Paolo Bonzini , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Vitaly Kuznetsov , Wanpeng Li , Suleiman Souhlal , Masami Hiramatsu , himadrics@inria.fr, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, graf@amazon.com, drjunior.org@gmail.com Subject: Re: [RFC PATCH v2 0/5] Paravirt Scheduling (Dynamic vcpu priority management) Message-ID: <20240712130228.72de0a7d@rorschach.local.home> In-Reply-To: References: <20240403140116.3002809-1-vineeth@bitbyteword.org> <66912820.050a0220.15d64.10f5@mx.google.com> <19ecf8c8-d5ac-4cfb-a650-cf072ced81ce@efficios.com> <01c3e7de-0c1a-45e0-aed6-c11e9fa763df@efficios.com> <20240712123019.7e18c67a@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 12 Jul 2024 09:39:52 -0700 Sean Christopherson wrote: > > > > One other issue we need to worry about is that IIUC rseq memory is > > allocated by the guest/user, not the host kernel. This means it can be > > swapped out. The code that handles this needs to be able to handle user > > page faults. > > This is a non-issue, it will Just Work, same as any other memory that is exposed > to the guest and can be reclaimed/swapped/migrated.. > > If the host swaps out the rseq page, mmu_notifiers will call into KVM and KVM will > unmap the page from the guest. If/when the page is accessed by the guest, KVM > will fault the page back into the host's primary MMU, and then map the new pfn > into the guest. My comment is that in the host kernel, the access to this memory needs to be user page fault safe. You can't call it in atomic context. -- Steve