From: Bharata B Rao <bharata@linux.ibm.com>
To: kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: kvm@vger.kernel.org, aneesh.kumar@linux.ibm.com,
bharata.rao@gmail.com, Bharata B Rao <bharata@linux.ibm.com>
Subject: [RFC PATCH v0 1/5] powerpc: Define Expropriation interrupt bit to VPA byte offset 0xB9
Date: Thu, 5 Aug 2021 12:54:35 +0530 [thread overview]
Message-ID: <20210805072439.501481-2-bharata@linux.ibm.com> (raw)
In-Reply-To: <20210805072439.501481-1-bharata@linux.ibm.com>
VPA byte offset 0xB9 was named as donate_dedicated_cpu as that
was the only used bit. The Expropriation/Subvention support defines
a bit in byte offset 0xB9. Define this bit and rename the field
in VPA to a generic name.
Signed-off-by: Bharata B Rao <bharata@linux.ibm.com>
---
arch/powerpc/include/asm/lppaca.h | 8 +++++++-
drivers/cpuidle/cpuidle-pseries.c | 4 ++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h
index c390ec377bae..57e432766f3e 100644
--- a/arch/powerpc/include/asm/lppaca.h
+++ b/arch/powerpc/include/asm/lppaca.h
@@ -80,7 +80,7 @@ struct lppaca {
u8 ebb_regs_in_use;
u8 reserved7[6];
u8 dtl_enable_mask; /* Dispatch Trace Log mask */
- u8 donate_dedicated_cpu; /* Donate dedicated CPU cycles */
+ u8 byte_b9; /* Donate dedicated CPU cycles & Expropriation int */
u8 fpregs_in_use;
u8 pmcregs_in_use;
u8 reserved8[28];
@@ -116,6 +116,12 @@ struct lppaca {
#define lppaca_of(cpu) (*paca_ptrs[cpu]->lppaca_ptr)
+/*
+ * Flags for Byte offset 0xB9
+ */
+#define LPPACA_DONATE_DED_CPU_CYCLES 0x1
+#define LPPACA_EXP_INT_ENABLED 0x2
+
/*
* We are using a non architected field to determine if a partition is
* shared or dedicated. This currently works on both KVM and PHYP, but
diff --git a/drivers/cpuidle/cpuidle-pseries.c b/drivers/cpuidle/cpuidle-pseries.c
index a2b5c6f60cf0..b9d0f41c3f19 100644
--- a/drivers/cpuidle/cpuidle-pseries.c
+++ b/drivers/cpuidle/cpuidle-pseries.c
@@ -221,7 +221,7 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
u8 old_latency_hint;
pseries_idle_prolog();
- get_lppaca()->donate_dedicated_cpu = 1;
+ get_lppaca()->byte_b9 |= LPPACA_DONATE_DED_CPU_CYCLES;
old_latency_hint = get_lppaca()->cede_latency_hint;
get_lppaca()->cede_latency_hint = cede_latency_hint[index];
@@ -229,7 +229,7 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
check_and_cede_processor();
local_irq_disable();
- get_lppaca()->donate_dedicated_cpu = 0;
+ get_lppaca()->byte_b9 &= ~LPPACA_DONATE_DED_CPU_CYCLES;
get_lppaca()->cede_latency_hint = old_latency_hint;
pseries_idle_epilog();
--
2.31.1
next prev parent reply other threads:[~2021-08-05 7:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 7:24 [RFC PATCH v0 0/5] PPC: KVM: pseries: Asynchronous page fault Bharata B Rao
2021-08-05 7:24 ` Bharata B Rao [this message]
2021-08-05 7:24 ` [RFC PATCH v0 2/5] KVM: PPC: Add support for KVM_REQ_ESN_EXIT Bharata B Rao
2021-08-05 7:24 ` [RFC PATCH v0 3/5] KVM: PPC: Book3S: Enable setting SRR1 flags for DSI Bharata B Rao
2021-08-05 7:24 ` [RFC PATCH v0 4/5] KVM: PPC: BOOK3S HV: Async PF support Bharata B Rao
2021-08-05 7:24 ` [RFC PATCH v0 5/5] pseries: Asynchronous page fault support Bharata B Rao
2021-08-13 4:06 ` Nicholas Piggin
2021-08-13 4:54 ` Bharata B Rao
2021-08-05 7:35 ` [RFC PATCH v0 0/5] PPC: KVM: pseries: Asynchronous page fault Bharata B Rao
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=20210805072439.501481-2-bharata@linux.ibm.com \
--to=bharata@linux.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=bharata.rao@gmail.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).