All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Sean Christopherson <seanjc@google.com>,
	Marc Zyngier <maz@kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Tianrui Zhao <zhaotianrui@loongson.cn>,
	Bibo Mao <maobibo@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>,
	Anup Patel <anup@brainfault.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@kernel.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Uladzislau Rezki <urezki@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	kvm@vger.kernel.org, loongarch@lists.linux.dev,
	kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,
	linux-hyperv@vger.kernel.org, rcu@vger.kernel.org,
	Nuno Das Neves <nunodasneves@linux.microsoft.com>,
	Mukesh R <mrathor@linux.microsoft.com>
Subject: Re: [PATCH v2 4/7] entry/kvm: KVM: Move KVM details related to signal/-EINTR into KVM proper
Date: Tue, 02 Sep 2025 17:41:37 +0200	[thread overview]
Message-ID: <87wm6gzwsu.ffs@tglx> (raw)
In-Reply-To: <20250828000156.23389-5-seanjc@google.com>

On Wed, Aug 27 2025 at 17:01, Sean Christopherson wrote:
> Move KVM's morphing of pending signals into userspace exits into KVM
> proper, and drop the @vcpu param from xfer_to_guest_mode_handle_work().
> How KVM responds to -EINTR is a detail that really belongs in KVM itself,
> and invoking kvm_handle_signal_exit() from kernel code creates an inverted
> module dependency.  E.g. attempting to move kvm_handle_signal_exit() into
> kvm_main.c would generate an linker error when building kvm.ko as a module.
>
> Dropping KVM details will also converting the KVM "entry" code into a more
> generic virtualization framework so that it can be used when running as a
> Hyper-V root partition.
>
> Lastly, eliminating usage of "struct kvm_vcpu" outside of KVM is also nice
> to have for KVM x86 developers, as keeping the details of kvm_vcpu purely
> within KVM allows changing the layout of the structure without having to
> boot into a new kernel, e.g. allows rebuilding and reloading kvm.ko with a
> modified kvm_vcpu structure as part of debug/development.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

-- 
kvm-riscv mailing list
kvm-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Sean Christopherson <seanjc@google.com>,
	Marc Zyngier <maz@kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Tianrui Zhao <zhaotianrui@loongson.cn>,
	Bibo Mao <maobibo@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>,
	Anup Patel <anup@brainfault.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@kernel.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Uladzislau Rezki <urezki@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	kvm@vger.kernel.org, loongarch@lists.linux.dev,
	kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,
	linux-hyperv@vger.kernel.org, rcu@vger.kernel.org,
	Nuno Das Neves <nunodasneves@linux.microsoft.com>,
	Mukesh R <mrathor@linux.microsoft.com>
Subject: Re: [PATCH v2 4/7] entry/kvm: KVM: Move KVM details related to signal/-EINTR into KVM proper
Date: Tue, 02 Sep 2025 17:41:37 +0200	[thread overview]
Message-ID: <87wm6gzwsu.ffs@tglx> (raw)
In-Reply-To: <20250828000156.23389-5-seanjc@google.com>

On Wed, Aug 27 2025 at 17:01, Sean Christopherson wrote:
> Move KVM's morphing of pending signals into userspace exits into KVM
> proper, and drop the @vcpu param from xfer_to_guest_mode_handle_work().
> How KVM responds to -EINTR is a detail that really belongs in KVM itself,
> and invoking kvm_handle_signal_exit() from kernel code creates an inverted
> module dependency.  E.g. attempting to move kvm_handle_signal_exit() into
> kvm_main.c would generate an linker error when building kvm.ko as a module.
>
> Dropping KVM details will also converting the KVM "entry" code into a more
> generic virtualization framework so that it can be used when running as a
> Hyper-V root partition.
>
> Lastly, eliminating usage of "struct kvm_vcpu" outside of KVM is also nice
> to have for KVM x86 developers, as keeping the details of kvm_vcpu purely
> within KVM allows changing the layout of the structure without having to
> boot into a new kernel, e.g. allows rebuilding and reloading kvm.ko with a
> modified kvm_vcpu structure as part of debug/development.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Sean Christopherson <seanjc@google.com>,
	Marc Zyngier <maz@kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Tianrui Zhao <zhaotianrui@loongson.cn>,
	Bibo Mao <maobibo@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>,
	Anup Patel <anup@brainfault.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@kernel.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Uladzislau Rezki <urezki@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	kvm@vger.kernel.org, loongarch@lists.linux.dev,
	kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,
	linux-hyperv@vger.kernel.org, rcu@vger.kernel.org,
	Nuno Das Neves <nunodasneves@linux.microsoft.com>,
	Mukesh R <mrathor@linux.microsoft.com>
Subject: Re: [PATCH v2 4/7] entry/kvm: KVM: Move KVM details related to signal/-EINTR into KVM proper
Date: Tue, 02 Sep 2025 17:41:37 +0200	[thread overview]
Message-ID: <87wm6gzwsu.ffs@tglx> (raw)
In-Reply-To: <20250828000156.23389-5-seanjc@google.com>

On Wed, Aug 27 2025 at 17:01, Sean Christopherson wrote:
> Move KVM's morphing of pending signals into userspace exits into KVM
> proper, and drop the @vcpu param from xfer_to_guest_mode_handle_work().
> How KVM responds to -EINTR is a detail that really belongs in KVM itself,
> and invoking kvm_handle_signal_exit() from kernel code creates an inverted
> module dependency.  E.g. attempting to move kvm_handle_signal_exit() into
> kvm_main.c would generate an linker error when building kvm.ko as a module.
>
> Dropping KVM details will also converting the KVM "entry" code into a more
> generic virtualization framework so that it can be used when running as a
> Hyper-V root partition.
>
> Lastly, eliminating usage of "struct kvm_vcpu" outside of KVM is also nice
> to have for KVM x86 developers, as keeping the details of kvm_vcpu purely
> within KVM allows changing the layout of the structure without having to
> boot into a new kernel, e.g. allows rebuilding and reloading kvm.ko with a
> modified kvm_vcpu structure as part of debug/development.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2025-09-02 21:43 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28  0:01 [PATCH v2 0/7] Drivers: hv: Fix NEED_RESCHED_LAZY and use common APIs Sean Christopherson
2025-08-28  0:01 ` Sean Christopherson
2025-08-28  0:01 ` Sean Christopherson
2025-08-28  0:01 ` [PATCH v2 1/7] Drivers: hv: Handle NEED_RESCHED_LAZY before transferring to guest Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28 23:56   ` Nuno Das Neves
2025-08-28 23:56     ` Nuno Das Neves
2025-08-28 23:56     ` Nuno Das Neves
2025-08-28  0:01 ` [PATCH v2 2/7] Drivers: hv: Disentangle VTL return cancellation from SIGPENDING Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-29 18:38   ` Wei Liu
2025-08-29 18:38     ` Wei Liu
2025-08-29 18:38     ` Wei Liu
2025-08-28  0:01 ` [PATCH v2 3/7] Drivers: hv: Disable IRQs only after handling pending work before VTL return Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28  0:01 ` [PATCH v2 4/7] entry/kvm: KVM: Move KVM details related to signal/-EINTR into KVM proper Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-09-02 15:41   ` Thomas Gleixner [this message]
2025-09-02 15:41     ` Thomas Gleixner
2025-09-02 15:41     ` Thomas Gleixner
2025-08-28  0:01 ` [PATCH v2 5/7] entry: Rename "kvm" entry code assets to "virt" to genericize APIs Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-09-02 15:41   ` Thomas Gleixner
2025-09-02 15:41     ` Thomas Gleixner
2025-09-02 15:41     ` Thomas Gleixner
2025-09-10 14:45   ` Joel Fernandes
2025-09-10 14:45     ` Joel Fernandes
2025-09-10 14:45     ` Joel Fernandes
2025-08-28  0:01 ` [PATCH v2 6/7] Drivers: hv: Use common "entry virt" APIs to do work in root before running guest Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-29  0:03   ` Nuno Das Neves
2025-08-29  0:03     ` Nuno Das Neves
2025-08-29  0:03     ` Nuno Das Neves
2025-08-28  0:01 ` [PATCH v2 7/7] Drivers: hv: Use "entry virt" APIs to do work before returning to lower VTL Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-08-28  0:01   ` Sean Christopherson
2025-09-04 23:41 ` [PATCH v2 0/7] Drivers: hv: Fix NEED_RESCHED_LAZY and use common APIs Wei Liu
2025-09-04 23:41   ` Wei Liu
2025-09-04 23:41   ` Wei Liu
2025-09-05  5:39   ` Sean Christopherson
2025-09-05  5:39     ` Sean Christopherson
2025-09-05  5:39     ` Sean Christopherson
2025-09-09 17:20     ` Wei Liu
2025-09-09 17:20       ` Wei Liu
2025-09-09 17:20       ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wm6gzwsu.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=frederic@kernel.org \
    --cc=haiyangz@microsoft.com \
    --cc=joelagnelf@nvidia.com \
    --cc=josh@joshtriplett.org \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=kys@microsoft.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=loongarch@lists.linux.dev \
    --cc=luto@kernel.org \
    --cc=maobibo@loongson.cn \
    --cc=maz@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mrathor@linux.microsoft.com \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=nunodasneves@linux.microsoft.com \
    --cc=oliver.upton@linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rcu@vger.kernel.org \
    --cc=seanjc@google.com \
    --cc=urezki@gmail.com \
    --cc=wei.liu@kernel.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=zhaotianrui@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.