* [Qemu-devel] [PR RFC] RISC-V Patches for the 3.1 Soft Freeze, Part 2
@ 2018-10-30 21:22 Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 1/3] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64 Palmer Dabbelt
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Palmer Dabbelt @ 2018-10-30 21:22 UTC (permalink / raw)
To: qemu-riscv; +Cc: qemu-devel
Since this is the first time I've actually done this for QEMU, I thought
I'd write up a bit of a header describing how I intend to handle RISC-V
pull requests. This is modeled after how I've been doing things in
Linux, where it seems to work out fairly well.
My flow is to:
* Collect reviews over the course of the week.
* Tag what I intend to submit on Tuesday
* Push the tag up and send an RFC PR
* Assuming there's no major issues, actually send out the full pull
request on Thursday
I've been doing this for a while (on Monday/Wednesday) and have found it
works well. So far we've never had an issue where I had to pull back a
proposed PR, but I do like having the extra few days just so everyone
can stay on the same page as to what is going in.
---
The following changes since commit a2e002ff7913ce93aa0f7dbedd2123dce5f1a9cd:
Merge remote-tracking branch 'remotes/vivier2/tags/qemu-trivial-for-3.1-pull-request' into staging (2018-10-30 15:49:55 +0000)
are available in the Git repository at:
git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-sf1
for you to fetch changes up to a094b3544f2855c0489f5df3c938b14b9a5899e5:
Add qemu-riscv@nongnu.org as the RISC-V list (2018-10-30 11:04:29 -0700)
----------------------------------------------------------------
RISC-V Patches for the 3.1 Soft Freeze, Part 2
This tag contains a few simple patches that I'd like to target for the
QEMU soft freeze. There's only one code change: a fix to our PMP
implementation that avoids an internal truncation while computing a
partial PMP read.
I also have two updates to the MAINTAINERS file: one to add Alistair as
a RISC-V maintainer, and one to add our newly created mailing list.
----------------------------------------------------------------
Dayeol Lee (1):
target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64
Palmer Dabbelt (2):
Add Alistair as a RISC-V Maintainer
Add qemu-riscv@nongnu.org as the RISC-V list
MAINTAINERS | 2 ++
target/riscv/pmp.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 1/3] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64
2018-10-30 21:22 [Qemu-devel] [PR RFC] RISC-V Patches for the 3.1 Soft Freeze, Part 2 Palmer Dabbelt
@ 2018-10-30 21:22 ` Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 2/3] Add Alistair as a RISC-V Maintainer Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 3/3] Add qemu-riscv@nongnu.org as the RISC-V list Palmer Dabbelt
2 siblings, 0 replies; 7+ messages in thread
From: Palmer Dabbelt @ 2018-10-30 21:22 UTC (permalink / raw)
To: qemu-riscv; +Cc: qemu-devel, Dayeol Lee, Palmer Dabbelt
From: Dayeol Lee <dayeol@berkeley.edu>
pmp_read_cfg() returns 8-bit value, which is combined together to form a single pmpcfg CSR.
The default promotion rules will result in an integer here ("i*8" is integer, which
flows through) resulting in a 32-bit signed value on most hosts.
That's bogus on RV64I, with the high bits of the CSR being wrong.
Signed-off-by: Dayeol Lee <dayeol@berkeley.edu>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
target/riscv/pmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c
index f432f3b7594b..03abd8fe5eb7 100644
--- a/target/riscv/pmp.c
+++ b/target/riscv/pmp.c
@@ -325,7 +325,7 @@ target_ulong pmpcfg_csr_read(CPURISCVState *env, uint32_t reg_index)
{
int i;
target_ulong cfg_val = 0;
- uint8_t val = 0;
+ target_ulong val = 0;
for (i = 0; i < sizeof(target_ulong); i++) {
val = pmp_read_cfg(env, (reg_index * sizeof(target_ulong)) + i);
--
2.18.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 2/3] Add Alistair as a RISC-V Maintainer
2018-10-30 21:22 [Qemu-devel] [PR RFC] RISC-V Patches for the 3.1 Soft Freeze, Part 2 Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 1/3] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64 Palmer Dabbelt
@ 2018-10-30 21:22 ` Palmer Dabbelt
2018-10-30 21:33 ` Alistair Francis
2018-10-30 21:22 ` [Qemu-devel] [PULL 3/3] Add qemu-riscv@nongnu.org as the RISC-V list Palmer Dabbelt
2 siblings, 1 reply; 7+ messages in thread
From: Palmer Dabbelt @ 2018-10-30 21:22 UTC (permalink / raw)
To: qemu-riscv; +Cc: qemu-devel, Palmer Dabbelt
Alistair has been contributing to the RISC-V QEMU port for a while now
so I'd like him to be officially listed as a maintainer. I've checked
with the other RISC-V maintainers and there are no objections, and I've
also checked with Alistair so he knows I'm volunteering him.
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index d794bd7a66fe..d550fd8b809c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -241,6 +241,7 @@ F: disas/ppc.c
RISC-V
M: Michael Clark <mjc@sifive.com>
M: Palmer Dabbelt <palmer@sifive.com>
+M: Alistair Francis <Alistair.Francis@wdc.com>
M: Sagar Karandikar <sagark@eecs.berkeley.edu>
M: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
S: Maintained
--
2.18.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PULL 2/3] Add Alistair as a RISC-V Maintainer
2018-10-30 21:22 ` [Qemu-devel] [PULL 2/3] Add Alistair as a RISC-V Maintainer Palmer Dabbelt
@ 2018-10-30 21:33 ` Alistair Francis
2018-10-31 15:48 ` Palmer Dabbelt
0 siblings, 1 reply; 7+ messages in thread
From: Alistair Francis @ 2018-10-30 21:33 UTC (permalink / raw)
To: Palmer Dabbelt; +Cc: qemu-riscv, qemu-devel@nongnu.org Developers
On Tue, Oct 30, 2018 at 2:23 PM Palmer Dabbelt <palmer@sifive.com> wrote:
>
> Alistair has been contributing to the RISC-V QEMU port for a while now
> so I'd like him to be officially listed as a maintainer. I've checked
> with the other RISC-V maintainers and there are no objections, and I've
> also checked with Alistair so he knows I'm volunteering him.
>
> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Hey Palmer,
It looks like you dropped a Reviewed by here. It's not super important
in this case but for future patches it could be an issue.
If you use QEMU's patches it should apply the tags for you:
https://github.com/stefanha/patches
Alistair
> ---
> MAINTAINERS | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d794bd7a66fe..d550fd8b809c 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -241,6 +241,7 @@ F: disas/ppc.c
> RISC-V
> M: Michael Clark <mjc@sifive.com>
> M: Palmer Dabbelt <palmer@sifive.com>
> +M: Alistair Francis <Alistair.Francis@wdc.com>
> M: Sagar Karandikar <sagark@eecs.berkeley.edu>
> M: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> S: Maintained
> --
> 2.18.1
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PULL 2/3] Add Alistair as a RISC-V Maintainer
2018-10-30 21:33 ` Alistair Francis
@ 2018-10-31 15:48 ` Palmer Dabbelt
0 siblings, 0 replies; 7+ messages in thread
From: Palmer Dabbelt @ 2018-10-31 15:48 UTC (permalink / raw)
To: alistair23; +Cc: qemu-riscv, qemu-devel
On Tue, 30 Oct 2018 14:33:23 PDT (-0700), alistair23@gmail.com wrote:
> On Tue, Oct 30, 2018 at 2:23 PM Palmer Dabbelt <palmer@sifive.com> wrote:
>>
>> Alistair has been contributing to the RISC-V QEMU port for a while now
>> so I'd like him to be officially listed as a maintainer. I've checked
>> with the other RISC-V maintainers and there are no objections, and I've
>> also checked with Alistair so he knows I'm volunteering him.
>>
>> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
>
> Hey Palmer,
>
> It looks like you dropped a Reviewed by here. It's not super important
> in this case but for future patches it could be an issue.
>
> If you use QEMU's patches it should apply the tags for you:
> https://github.com/stefanha/patches
Sorry about that. I'll take a look at patches.
>
> Alistair
>
>> ---
>> MAINTAINERS | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index d794bd7a66fe..d550fd8b809c 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -241,6 +241,7 @@ F: disas/ppc.c
>> RISC-V
>> M: Michael Clark <mjc@sifive.com>
>> M: Palmer Dabbelt <palmer@sifive.com>
>> +M: Alistair Francis <Alistair.Francis@wdc.com>
>> M: Sagar Karandikar <sagark@eecs.berkeley.edu>
>> M: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
>> S: Maintained
>> --
>> 2.18.1
>>
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 3/3] Add qemu-riscv@nongnu.org as the RISC-V list
2018-10-30 21:22 [Qemu-devel] [PR RFC] RISC-V Patches for the 3.1 Soft Freeze, Part 2 Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 1/3] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64 Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 2/3] Add Alistair as a RISC-V Maintainer Palmer Dabbelt
@ 2018-10-30 21:22 ` Palmer Dabbelt
2 siblings, 0 replies; 7+ messages in thread
From: Palmer Dabbelt @ 2018-10-30 21:22 UTC (permalink / raw)
To: qemu-riscv; +Cc: qemu-devel, Palmer Dabbelt
We now have a RISC-V specific QEMU development list.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index d550fd8b809c..10983bd52d64 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -244,6 +244,7 @@ M: Palmer Dabbelt <palmer@sifive.com>
M: Alistair Francis <Alistair.Francis@wdc.com>
M: Sagar Karandikar <sagark@eecs.berkeley.edu>
M: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
+L: qemu-riscv@nongnu.org
S: Maintained
F: target/riscv/
F: hw/riscv/
--
2.18.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL] RISC-V Patches for the 3.1 Soft Freeze, Part 2
@ 2018-11-01 23:55 Palmer Dabbelt
2018-11-01 23:55 ` [Qemu-devel] [PULL 1/3] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64 Palmer Dabbelt
0 siblings, 1 reply; 7+ messages in thread
From: Palmer Dabbelt @ 2018-11-01 23:55 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-riscv, qemu-devel
The following changes since commit a2e002ff7913ce93aa0f7dbedd2123dce5f1a9cd:
Merge remote-tracking branch 'remotes/vivier2/tags/qemu-trivial-for-3.1-pull-request' into staging (2018-10-30 15:49:55 +0000)
are available in the Git repository at:
git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-sf1
for you to fetch changes up to a094b3544f2855c0489f5df3c938b14b9a5899e5:
Add qemu-riscv@nongnu.org as the RISC-V list (2018-10-30 11:04:29 -0700)
----------------------------------------------------------------
RISC-V Patches for the 3.1 Soft Freeze, Part 2
This tag contains a few simple patches that I'd like to target for the
QEMU soft freeze. There's only one code change: a fix to our PMP
implementation that avoids an internal truncation while computing a
partial PMP read.
I also have two updates to the MAINTAINERS file: one to add Alistair as
a RISC-V maintainer, and one to add our newly created mailing list.
----------------------------------------------------------------
Dayeol Lee (1):
target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64
Palmer Dabbelt (2):
Add Alistair as a RISC-V Maintainer
Add qemu-riscv@nongnu.org as the RISC-V list
MAINTAINERS | 2 ++
target/riscv/pmp.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 1/3] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64
2018-11-01 23:55 [Qemu-devel] [PULL] RISC-V Patches for the 3.1 Soft Freeze, Part 2 Palmer Dabbelt
@ 2018-11-01 23:55 ` Palmer Dabbelt
0 siblings, 0 replies; 7+ messages in thread
From: Palmer Dabbelt @ 2018-11-01 23:55 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-riscv, qemu-devel, Dayeol Lee, Palmer Dabbelt
From: Dayeol Lee <dayeol@berkeley.edu>
pmp_read_cfg() returns 8-bit value, which is combined together to form a single pmpcfg CSR.
The default promotion rules will result in an integer here ("i*8" is integer, which
flows through) resulting in a 32-bit signed value on most hosts.
That's bogus on RV64I, with the high bits of the CSR being wrong.
Signed-off-by: Dayeol Lee <dayeol@berkeley.edu>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
target/riscv/pmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c
index f432f3b7594b..03abd8fe5eb7 100644
--- a/target/riscv/pmp.c
+++ b/target/riscv/pmp.c
@@ -325,7 +325,7 @@ target_ulong pmpcfg_csr_read(CPURISCVState *env, uint32_t reg_index)
{
int i;
target_ulong cfg_val = 0;
- uint8_t val = 0;
+ target_ulong val = 0;
for (i = 0; i < sizeof(target_ulong); i++) {
val = pmp_read_cfg(env, (reg_index * sizeof(target_ulong)) + i);
--
2.18.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-11-01 23:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-30 21:22 [Qemu-devel] [PR RFC] RISC-V Patches for the 3.1 Soft Freeze, Part 2 Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 1/3] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64 Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 2/3] Add Alistair as a RISC-V Maintainer Palmer Dabbelt
2018-10-30 21:33 ` Alistair Francis
2018-10-31 15:48 ` Palmer Dabbelt
2018-10-30 21:22 ` [Qemu-devel] [PULL 3/3] Add qemu-riscv@nongnu.org as the RISC-V list Palmer Dabbelt
-- strict thread matches above, loose matches on Subject: below --
2018-11-01 23:55 [Qemu-devel] [PULL] RISC-V Patches for the 3.1 Soft Freeze, Part 2 Palmer Dabbelt
2018-11-01 23:55 ` [Qemu-devel] [PULL 1/3] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64 Palmer Dabbelt
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).