From: Alexander Graf <agraf@suse.de>
To: Michael Neuling <mikey@neuling.org>
Cc: Paul Mackerras <paulus@samba.org>,
"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
benh <benh@kernel.crashing.org>
Subject: Re: powerpc/pseries: Use new defines when calling h_set_mode
Date: Thu, 29 May 2014 21:27:23 +0000 [thread overview]
Message-ID: <5387A63B.4000503@suse.de> (raw)
In-Reply-To: <1401349547.4116.19.camel@ale.ozlabs.ibm.com>
On 29.05.14 09:45, Michael Neuling wrote:
>>> +/* Values for 2nd argument to H_SET_MODE */
>>> +#define H_SET_MODE_RESOURCE_SET_CIABR 1
>>> +#define H_SET_MODE_RESOURCE_SET_DAWR 2
>>> +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE 3
>>> +#define H_SET_MODE_RESOURCE_LE 4
>>
>> Much better, but I think you want to make use of these in non-kvm code too,
>> no? At least the LE one is definitely already implemented as call :)
> Sure but that's a different patch.... below.
Ben, how would you like to handle these 2 patches? If you give me an ack
I can just put this patch into my kvm queue. Alternatively we could both
carry a patch that adds the H_SET_MODE header bits only and whoever hits
Linus' tree first wins ;).
Alex
>
> Mikey
>
>
> powerpc/pseries: Use new defines when calling h_set_mode
>
> Now that we define these in the KVM code, use these defines when we call
> h_set_mode. No functional change.
>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> --
> This depends on the KVM h_set_mode patches.
>
> diff --git a/arch/powerpc/include/asm/plpar_wrappers.h b/arch/powerpc/include/asm/plpar_wrappers.h
> index 12c32c5..67859ed 100644
> --- a/arch/powerpc/include/asm/plpar_wrappers.h
> +++ b/arch/powerpc/include/asm/plpar_wrappers.h
> @@ -273,7 +273,7 @@ static inline long plpar_set_mode(unsigned long mflags, unsigned long resource,
> static inline long enable_reloc_on_exceptions(void)
> {
> /* mflags = 3: Exceptions at 0xC000000000004000 */
> - return plpar_set_mode(3, 3, 0, 0);
> + return plpar_set_mode(3, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
> }
>
> /*
> @@ -284,7 +284,7 @@ static inline long enable_reloc_on_exceptions(void)
> * returns H_SUCCESS.
> */
> static inline long disable_reloc_on_exceptions(void) {
> - return plpar_set_mode(0, 3, 0, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
> }
>
> /*
> @@ -297,7 +297,7 @@ static inline long disable_reloc_on_exceptions(void) {
> static inline long enable_big_endian_exceptions(void)
> {
> /* mflags = 0: big endian exceptions */
> - return plpar_set_mode(0, 4, 0, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_LE, 0, 0);
> }
>
> /*
> @@ -310,17 +310,17 @@ static inline long enable_big_endian_exceptions(void)
> static inline long enable_little_endian_exceptions(void)
> {
> /* mflags = 1: little endian exceptions */
> - return plpar_set_mode(1, 4, 0, 0);
> + return plpar_set_mode(1, H_SET_MODE_RESOURCE_LE, 0, 0);
> }
>
> static inline long plapr_set_ciabr(unsigned long ciabr)
> {
> - return plpar_set_mode(0, 1, ciabr, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_CIABR, ciabr, 0);
> }
>
> static inline long plapr_set_watchpoint0(unsigned long dawr0, unsigned long dawrx0)
> {
> - return plpar_set_mode(0, 2, dawr0, dawrx0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_DAWR, dawr0, dawrx0);
> }
>
> #endif /* _ASM_POWERPC_PLPAR_WRAPPERS_H */
>
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Michael Neuling <mikey@neuling.org>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Paul Mackerras <paulus@samba.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>
Subject: Re: powerpc/pseries: Use new defines when calling h_set_mode
Date: Thu, 29 May 2014 23:27:23 +0200 [thread overview]
Message-ID: <5387A63B.4000503@suse.de> (raw)
In-Reply-To: <1401349547.4116.19.camel@ale.ozlabs.ibm.com>
On 29.05.14 09:45, Michael Neuling wrote:
>>> +/* Values for 2nd argument to H_SET_MODE */
>>> +#define H_SET_MODE_RESOURCE_SET_CIABR 1
>>> +#define H_SET_MODE_RESOURCE_SET_DAWR 2
>>> +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE 3
>>> +#define H_SET_MODE_RESOURCE_LE 4
>>
>> Much better, but I think you want to make use of these in non-kvm code too,
>> no? At least the LE one is definitely already implemented as call :)
> Sure but that's a different patch.... below.
Ben, how would you like to handle these 2 patches? If you give me an ack
I can just put this patch into my kvm queue. Alternatively we could both
carry a patch that adds the H_SET_MODE header bits only and whoever hits
Linus' tree first wins ;).
Alex
>
> Mikey
>
>
> powerpc/pseries: Use new defines when calling h_set_mode
>
> Now that we define these in the KVM code, use these defines when we call
> h_set_mode. No functional change.
>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> --
> This depends on the KVM h_set_mode patches.
>
> diff --git a/arch/powerpc/include/asm/plpar_wrappers.h b/arch/powerpc/include/asm/plpar_wrappers.h
> index 12c32c5..67859ed 100644
> --- a/arch/powerpc/include/asm/plpar_wrappers.h
> +++ b/arch/powerpc/include/asm/plpar_wrappers.h
> @@ -273,7 +273,7 @@ static inline long plpar_set_mode(unsigned long mflags, unsigned long resource,
> static inline long enable_reloc_on_exceptions(void)
> {
> /* mflags = 3: Exceptions at 0xC000000000004000 */
> - return plpar_set_mode(3, 3, 0, 0);
> + return plpar_set_mode(3, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
> }
>
> /*
> @@ -284,7 +284,7 @@ static inline long enable_reloc_on_exceptions(void)
> * returns H_SUCCESS.
> */
> static inline long disable_reloc_on_exceptions(void) {
> - return plpar_set_mode(0, 3, 0, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
> }
>
> /*
> @@ -297,7 +297,7 @@ static inline long disable_reloc_on_exceptions(void) {
> static inline long enable_big_endian_exceptions(void)
> {
> /* mflags = 0: big endian exceptions */
> - return plpar_set_mode(0, 4, 0, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_LE, 0, 0);
> }
>
> /*
> @@ -310,17 +310,17 @@ static inline long enable_big_endian_exceptions(void)
> static inline long enable_little_endian_exceptions(void)
> {
> /* mflags = 1: little endian exceptions */
> - return plpar_set_mode(1, 4, 0, 0);
> + return plpar_set_mode(1, H_SET_MODE_RESOURCE_LE, 0, 0);
> }
>
> static inline long plapr_set_ciabr(unsigned long ciabr)
> {
> - return plpar_set_mode(0, 1, ciabr, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_CIABR, ciabr, 0);
> }
>
> static inline long plapr_set_watchpoint0(unsigned long dawr0, unsigned long dawrx0)
> {
> - return plpar_set_mode(0, 2, dawr0, dawrx0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_DAWR, dawr0, dawrx0);
> }
>
> #endif /* _ASM_POWERPC_PLPAR_WRAPPERS_H */
>
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Michael Neuling <mikey@neuling.org>
Cc: Paul Mackerras <paulus@samba.org>,
"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
benh <benh@kernel.crashing.org>
Subject: Re: powerpc/pseries: Use new defines when calling h_set_mode
Date: Thu, 29 May 2014 23:27:23 +0200 [thread overview]
Message-ID: <5387A63B.4000503@suse.de> (raw)
In-Reply-To: <1401349547.4116.19.camel@ale.ozlabs.ibm.com>
On 29.05.14 09:45, Michael Neuling wrote:
>>> +/* Values for 2nd argument to H_SET_MODE */
>>> +#define H_SET_MODE_RESOURCE_SET_CIABR 1
>>> +#define H_SET_MODE_RESOURCE_SET_DAWR 2
>>> +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE 3
>>> +#define H_SET_MODE_RESOURCE_LE 4
>>
>> Much better, but I think you want to make use of these in non-kvm code too,
>> no? At least the LE one is definitely already implemented as call :)
> Sure but that's a different patch.... below.
Ben, how would you like to handle these 2 patches? If you give me an ack
I can just put this patch into my kvm queue. Alternatively we could both
carry a patch that adds the H_SET_MODE header bits only and whoever hits
Linus' tree first wins ;).
Alex
>
> Mikey
>
>
> powerpc/pseries: Use new defines when calling h_set_mode
>
> Now that we define these in the KVM code, use these defines when we call
> h_set_mode. No functional change.
>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> --
> This depends on the KVM h_set_mode patches.
>
> diff --git a/arch/powerpc/include/asm/plpar_wrappers.h b/arch/powerpc/include/asm/plpar_wrappers.h
> index 12c32c5..67859ed 100644
> --- a/arch/powerpc/include/asm/plpar_wrappers.h
> +++ b/arch/powerpc/include/asm/plpar_wrappers.h
> @@ -273,7 +273,7 @@ static inline long plpar_set_mode(unsigned long mflags, unsigned long resource,
> static inline long enable_reloc_on_exceptions(void)
> {
> /* mflags = 3: Exceptions at 0xC000000000004000 */
> - return plpar_set_mode(3, 3, 0, 0);
> + return plpar_set_mode(3, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
> }
>
> /*
> @@ -284,7 +284,7 @@ static inline long enable_reloc_on_exceptions(void)
> * returns H_SUCCESS.
> */
> static inline long disable_reloc_on_exceptions(void) {
> - return plpar_set_mode(0, 3, 0, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
> }
>
> /*
> @@ -297,7 +297,7 @@ static inline long disable_reloc_on_exceptions(void) {
> static inline long enable_big_endian_exceptions(void)
> {
> /* mflags = 0: big endian exceptions */
> - return plpar_set_mode(0, 4, 0, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_LE, 0, 0);
> }
>
> /*
> @@ -310,17 +310,17 @@ static inline long enable_big_endian_exceptions(void)
> static inline long enable_little_endian_exceptions(void)
> {
> /* mflags = 1: little endian exceptions */
> - return plpar_set_mode(1, 4, 0, 0);
> + return plpar_set_mode(1, H_SET_MODE_RESOURCE_LE, 0, 0);
> }
>
> static inline long plapr_set_ciabr(unsigned long ciabr)
> {
> - return plpar_set_mode(0, 1, ciabr, 0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_CIABR, ciabr, 0);
> }
>
> static inline long plapr_set_watchpoint0(unsigned long dawr0, unsigned long dawrx0)
> {
> - return plpar_set_mode(0, 2, dawr0, dawrx0);
> + return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_DAWR, dawr0, dawrx0);
> }
>
> #endif /* _ASM_POWERPC_PLPAR_WRAPPERS_H */
>
next prev parent reply other threads:[~2014-05-29 21:27 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 12:17 [PATCH 0/3] New PAPR hypercall plus individual hypercall enables Paul Mackerras
2014-05-26 12:17 ` Paul Mackerras
2014-05-26 12:17 ` [PATCH 1/3] KVM: PPC: Book3S: Controls for in-kernel PAPR hypercall handling Paul Mackerras
2014-05-26 12:17 ` Paul Mackerras
2014-05-28 13:27 ` Alexander Graf
2014-05-28 13:27 ` Alexander Graf
2014-05-29 5:27 ` Paul Mackerras
2014-05-29 5:27 ` Paul Mackerras
2014-05-29 6:35 ` Alexander Graf
2014-05-29 6:35 ` Alexander Graf
2014-05-26 12:17 ` [PATCH 2/3] KVM: PPC: Book3S: Allow only implemented hcalls to be enabled or disabled Paul Mackerras
2014-05-26 12:17 ` Paul Mackerras
2014-05-28 13:30 ` Alexander Graf
2014-05-28 13:30 ` Alexander Graf
2014-05-26 12:17 ` [PATCH 3/3] KVM: PPC: Book3S HV: Add H_SET_MODE hcall handling Paul Mackerras
2014-05-26 12:17 ` Paul Mackerras
2014-05-28 13:35 ` Alexander Graf
2014-05-28 13:35 ` Alexander Graf
2014-05-29 5:47 ` Michael Neuling
2014-05-29 5:47 ` Michael Neuling
2014-05-29 6:22 ` [PATCH v2 " Michael Neuling
2014-05-29 6:22 ` Michael Neuling
2014-05-29 7:18 ` Alexander Graf
2014-05-29 7:18 ` Alexander Graf
2014-05-29 7:45 ` powerpc/pseries: Use new defines when calling h_set_mode Michael Neuling
2014-05-29 7:45 ` Michael Neuling
2014-05-29 7:45 ` Michael Neuling
2014-05-29 21:27 ` Alexander Graf [this message]
2014-05-29 21:27 ` Alexander Graf
2014-05-29 21:27 ` Alexander Graf
2014-05-29 21:52 ` Benjamin Herrenschmidt
2014-05-29 21:52 ` Benjamin Herrenschmidt
2014-05-29 21:52 ` Benjamin Herrenschmidt
2014-05-30 7:44 ` Alexander Graf
2014-05-30 7:44 ` Alexander Graf
2014-05-30 7:44 ` Alexander Graf
2014-05-30 8:56 ` Michael Ellerman
2014-05-30 8:56 ` Michael Ellerman
2014-05-30 8:56 ` Michael Ellerman
2014-05-30 9:10 ` Michael Neuling
2014-05-30 9:10 ` Michael Neuling
2014-05-30 9:10 ` Michael Neuling
2014-05-30 9:13 ` Alexander Graf
2014-05-30 9:13 ` Alexander Graf
2014-05-30 9:13 ` Alexander Graf
2014-05-30 9:44 ` Michael Neuling
2014-05-30 9:44 ` Michael Neuling
2014-05-30 9:44 ` Alexander Graf
2014-05-30 9:44 ` Alexander Graf
2014-05-30 9:44 ` Alexander Graf
2014-05-31 7:21 ` [PATCH 0/3] New PAPR hypercall plus individual hypercall enables, v2 Paul Mackerras
2014-05-31 7:21 ` Paul Mackerras
2014-05-31 7:21 ` [PATCH 1/3] KVM: PPC: Book3S: Controls for in-kernel PAPR hypercall handling Paul Mackerras
2014-05-31 7:21 ` Paul Mackerras
2014-06-01 9:55 ` Alexander Graf
2014-06-01 9:55 ` Alexander Graf
2014-05-31 7:21 ` [PATCH 2/3] KVM: PPC: Book3S: Allow only implemented hcalls to be enabled or disabled Paul Mackerras
2014-05-31 7:21 ` Paul Mackerras
2014-05-31 7:21 ` [PATCH 3/3] KVM: PPC: Book3S HV: Add H_SET_MODE hcall handling Paul Mackerras
2014-05-31 7:21 ` Paul Mackerras
2014-06-01 10:01 ` [PATCH 0/3] New PAPR hypercall plus individual hypercall enables, v2 Alexander Graf
2014-06-01 10:01 ` Alexander Graf
2014-06-02 1:02 ` [PATCH 0/3] New PAPR hypercall plus individual hypercall enables, v3 Paul Mackerras
2014-06-02 1:02 ` Paul Mackerras
2014-06-02 1:02 ` [PATCH 1/3] KVM: PPC: Book3S: Controls for in-kernel sPAPR hypercall handling Paul Mackerras
2014-06-02 1:02 ` Paul Mackerras
2014-06-02 1:03 ` [PATCH 2/3] KVM: PPC: Book3S: Allow only implemented hcalls to be enabled or disabled Paul Mackerras
2014-06-02 1:03 ` Paul Mackerras
2014-06-02 1:03 ` [PATCH 3/3] KVM: PPC: Book3S HV: Add H_SET_MODE hcall handling Paul Mackerras
2014-06-02 1:03 ` Paul Mackerras
2014-06-25 21:46 ` [PATCH 0/3] New PAPR hypercall plus individual hypercall enables, v3 Alexander Graf
2014-06-25 21:46 ` Alexander Graf
2014-06-25 23:08 ` Paul Mackerras
2014-06-25 23:08 ` Paul Mackerras
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=5387A63B.4000503@suse.de \
--to=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=paulus@samba.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.