From: Oliver Upton <oupton@google.com>
To: kvm-riscv@lists.infradead.org
Subject: [PATCH v4 08/15] KVM: arm64: Return a value from check_vcpu_requests()
Date: Tue, 22 Mar 2022 06:51:20 +0000 [thread overview]
Message-ID: <Yjlx6JKTRbzwAE7o@google.com> (raw)
In-Reply-To: <CAAeT=FwmU1Ej8zc4wB15TRRH6dH9xK7621gO12ib2QjHW11=NA@mail.gmail.com>
On Mon, Mar 21, 2022 at 11:21:15PM -0700, Reiji Watanabe wrote:
> Hi Oliver,
>
> On Fri, Mar 11, 2022 at 9:41 AM Oliver Upton <oupton@google.com> wrote:
> >
> > A subsequent change to KVM will introduce a vCPU request that could
> > result in an exit to userspace. Change check_vcpu_requests() to return a
> > value and document the function. Unconditionally return 1 for now.
> >
> > Signed-off-by: Oliver Upton <oupton@google.com>
> > ---
> > arch/arm64/kvm/arm.c | 16 ++++++++++++++--
> > 1 file changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> > index 7c297ddc8177..8eed0556ccaa 100644
> > --- a/arch/arm64/kvm/arm.c
> > +++ b/arch/arm64/kvm/arm.c
> > @@ -648,7 +648,16 @@ void kvm_vcpu_wfi(struct kvm_vcpu *vcpu)
> > preempt_enable();
> > }
> >
> > -static void check_vcpu_requests(struct kvm_vcpu *vcpu)
> > +/**
> > + * check_vcpu_requests - check and handle pending vCPU requests
> > + * @vcpu: the VCPU pointer
> > + *
> > + * Return: 1 if we should enter the guest
> > + * 0 if we should exit to userspace
> > + * <= 0 if we should exit to userspace, where the return value indicates
> > + * an error
>
> Nit: Shouldn't "<= 0" be "< 0" ?
It definitely should. I'll fold this in to the next spin.
--
Thanks,
Oliver
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oupton@google.com>
To: Reiji Watanabe <reijiw@google.com>
Cc: Marc Zyngier <maz@kernel.org>, Wanpeng Li <wanpengli@tencent.com>,
kvm@vger.kernel.org, Joerg Roedel <joro@8bytes.org>,
Peter Shier <pshier@google.com>,
kvm-riscv@lists.infradead.org,
Atish Patra <atishp@atishpatra.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
kvmarm@lists.cs.columbia.edu, Jim Mattson <jmattson@google.com>
Subject: Re: [PATCH v4 08/15] KVM: arm64: Return a value from check_vcpu_requests()
Date: Tue, 22 Mar 2022 06:51:20 +0000 [thread overview]
Message-ID: <Yjlx6JKTRbzwAE7o@google.com> (raw)
In-Reply-To: <CAAeT=FwmU1Ej8zc4wB15TRRH6dH9xK7621gO12ib2QjHW11=NA@mail.gmail.com>
On Mon, Mar 21, 2022 at 11:21:15PM -0700, Reiji Watanabe wrote:
> Hi Oliver,
>
> On Fri, Mar 11, 2022 at 9:41 AM Oliver Upton <oupton@google.com> wrote:
> >
> > A subsequent change to KVM will introduce a vCPU request that could
> > result in an exit to userspace. Change check_vcpu_requests() to return a
> > value and document the function. Unconditionally return 1 for now.
> >
> > Signed-off-by: Oliver Upton <oupton@google.com>
> > ---
> > arch/arm64/kvm/arm.c | 16 ++++++++++++++--
> > 1 file changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> > index 7c297ddc8177..8eed0556ccaa 100644
> > --- a/arch/arm64/kvm/arm.c
> > +++ b/arch/arm64/kvm/arm.c
> > @@ -648,7 +648,16 @@ void kvm_vcpu_wfi(struct kvm_vcpu *vcpu)
> > preempt_enable();
> > }
> >
> > -static void check_vcpu_requests(struct kvm_vcpu *vcpu)
> > +/**
> > + * check_vcpu_requests - check and handle pending vCPU requests
> > + * @vcpu: the VCPU pointer
> > + *
> > + * Return: 1 if we should enter the guest
> > + * 0 if we should exit to userspace
> > + * <= 0 if we should exit to userspace, where the return value indicates
> > + * an error
>
> Nit: Shouldn't "<= 0" be "< 0" ?
It definitely should. I'll fold this in to the next spin.
--
Thanks,
Oliver
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oupton@google.com>
To: Reiji Watanabe <reijiw@google.com>
Cc: kvmarm@lists.cs.columbia.edu,
Alexandru Elisei <alexandru.elisei@arm.com>,
Anup Patel <anup@brainfault.org>,
Atish Patra <atishp@atishpatra.org>,
James Morse <james.morse@arm.com>,
Jing Zhang <jingzhangos@google.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
kvm-riscv@lists.infradead.org, kvm@vger.kernel.org,
Marc Zyngier <maz@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Shier <pshier@google.com>,
Raghavendra Rao Ananta <rananta@google.com>,
Ricardo Koller <ricarkol@google.com>,
Sean Christopherson <seanjc@google.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>
Subject: Re: [PATCH v4 08/15] KVM: arm64: Return a value from check_vcpu_requests()
Date: Tue, 22 Mar 2022 06:51:20 +0000 [thread overview]
Message-ID: <Yjlx6JKTRbzwAE7o@google.com> (raw)
In-Reply-To: <CAAeT=FwmU1Ej8zc4wB15TRRH6dH9xK7621gO12ib2QjHW11=NA@mail.gmail.com>
On Mon, Mar 21, 2022 at 11:21:15PM -0700, Reiji Watanabe wrote:
> Hi Oliver,
>
> On Fri, Mar 11, 2022 at 9:41 AM Oliver Upton <oupton@google.com> wrote:
> >
> > A subsequent change to KVM will introduce a vCPU request that could
> > result in an exit to userspace. Change check_vcpu_requests() to return a
> > value and document the function. Unconditionally return 1 for now.
> >
> > Signed-off-by: Oliver Upton <oupton@google.com>
> > ---
> > arch/arm64/kvm/arm.c | 16 ++++++++++++++--
> > 1 file changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> > index 7c297ddc8177..8eed0556ccaa 100644
> > --- a/arch/arm64/kvm/arm.c
> > +++ b/arch/arm64/kvm/arm.c
> > @@ -648,7 +648,16 @@ void kvm_vcpu_wfi(struct kvm_vcpu *vcpu)
> > preempt_enable();
> > }
> >
> > -static void check_vcpu_requests(struct kvm_vcpu *vcpu)
> > +/**
> > + * check_vcpu_requests - check and handle pending vCPU requests
> > + * @vcpu: the VCPU pointer
> > + *
> > + * Return: 1 if we should enter the guest
> > + * 0 if we should exit to userspace
> > + * <= 0 if we should exit to userspace, where the return value indicates
> > + * an error
>
> Nit: Shouldn't "<= 0" be "< 0" ?
It definitely should. I'll fold this in to the next spin.
--
Thanks,
Oliver
next prev parent reply other threads:[~2022-03-22 6:51 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 17:39 [PATCH v4 00/15] KVM: arm64: PSCI SYSTEM_SUSPEND + SYSTEM_RESET2 bugfix Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 01/15] KVM: arm64: Generalise VM features into a set of flags Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 02/15] KVM: arm64: Generally disallow SMC64 for AArch32 guests Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 03/15] KVM: arm64: Don't depend on fallthrough to hide SYSTEM_RESET2 Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 04/15] KVM: arm64: Dedupe vCPU power off helpers Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 05/15] KVM: arm64: Track vCPU power state using MP state values Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 06/15] KVM: arm64: Rename the KVM_REQ_SLEEP handler Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 07/15] KVM: Create helper for setting a system event exit Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-19 7:28 ` Anup Patel
2022-03-19 7:28 ` Anup Patel
2022-03-19 7:28 ` Anup Patel
2022-03-22 6:52 ` Oliver Upton
2022-03-22 6:52 ` Oliver Upton
2022-03-22 6:52 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 08/15] KVM: arm64: Return a value from check_vcpu_requests() Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-22 6:21 ` Reiji Watanabe
2022-03-22 6:21 ` Reiji Watanabe
2022-03-22 6:21 ` Reiji Watanabe
2022-03-22 6:51 ` Oliver Upton [this message]
2022-03-22 6:51 ` Oliver Upton
2022-03-22 6:51 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 09/15] KVM: arm64: Add support for userspace to suspend a vCPU Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-22 6:19 ` Reiji Watanabe
2022-03-22 6:19 ` Reiji Watanabe
2022-03-22 6:19 ` Reiji Watanabe
2022-03-22 6:49 ` Oliver Upton
2022-03-22 6:49 ` Oliver Upton
2022-03-22 6:49 ` Oliver Upton
2022-03-24 6:44 ` Reiji Watanabe
2022-03-24 6:44 ` Reiji Watanabe
2022-03-24 6:44 ` Reiji Watanabe
2022-03-11 17:39 ` [PATCH v4 10/15] KVM: arm64: Implement PSCI SYSTEM_SUSPEND Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 11/15] selftests: KVM: Rename psci_cpu_on_test to psci_test Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 12/15] selftests: KVM: Create helper for making SMCCC calls Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` [PATCH v4 13/15] selftests: KVM: Use KVM_SET_MP_STATE to power off vCPU in psci_test Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:39 ` Oliver Upton
2022-03-11 17:40 ` [PATCH v4 14/15] selftests: KVM: Refactor psci_test to make it amenable to new tests Oliver Upton
2022-03-11 17:40 ` Oliver Upton
2022-03-11 17:40 ` Oliver Upton
2022-03-11 17:40 ` [PATCH v4 15/15] selftests: KVM: Test SYSTEM_SUSPEND PSCI call Oliver Upton
2022-03-11 17:40 ` Oliver Upton
2022-03-11 17:40 ` Oliver Upton
2022-03-11 17:57 ` [RFC PATCH kvmtool 0/5] ARM: Implement PSCI SYSTEM_SUSPEND Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` [RFC PATCH kvmtool 1/5] TESTONLY: Sync KVM headers with pending changes Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` [RFC PATCH kvmtool 2/5] Allow architectures to hook KVM_EXIT_SYSTEM_EVENT Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` [RFC PATCH kvmtool 3/5] ARM: Stash vcpu_init in the vCPU structure Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` [RFC PATCH kvmtool 4/5] ARM: Add a helper to re-init a vCPU Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` [RFC PATCH kvmtool 5/5] ARM: Implement PSCI SYSTEM_SUSPEND Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-03-11 17:57 ` Oliver Upton
2022-05-06 13:01 ` [RFC PATCH kvmtool 0/5] " Will Deacon
2022-05-06 13:01 ` Will Deacon
2022-05-06 13:01 ` Will Deacon
2022-05-06 19:18 ` Oliver Upton
2022-05-06 19:18 ` Oliver Upton
2022-05-06 19:18 ` Oliver Upton
2022-03-18 14:07 ` (subset) [PATCH v4 00/15] KVM: arm64: PSCI SYSTEM_SUSPEND + SYSTEM_RESET2 bugfix Marc Zyngier
2022-03-18 14:07 ` Marc Zyngier
2022-03-18 14:07 ` Marc Zyngier
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=Yjlx6JKTRbzwAE7o@google.com \
--to=oupton@google.com \
--cc=kvm-riscv@lists.infradead.org \
/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.