First RISC-V Patch Set for the 3.1 Soft Freeze
Subsystems (2)
The following changes since commit 09558375a634e17cea6cfbfec883ac2376d2dc7f:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 17:42:56 +0100)
are available in the Git repository at:
git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-sf0
for you to fetch changes up to 7c28f4da20e5585dce7d575691dac5392b7c6f78:
RISC-V: Don't add NULL bootargs to device-tree (2018-10-17 13:02:30 -0700)
----------------------------------------------------------------
First RISC-V Patch Set for the 3.1 Soft Freeze
This pull request contains a handful of patches that have been floating around various trees for a while but haven't made it upstream. These patches all appear quite safe. They're all somewhat independent from each other:
* One refactors our IRQ management function to allow multiple interrupts to be raised an once. This patch has no functional difference.
* Cleaning up the op_helper/cpu_helper split. This patch has no functional difference.
* Updates to various constants to keep them in sync with the latest ISA specification and to remove some non-standard bits that snuck in.
* A fix for a memory leak in the PLIC driver.
* A fix to our device tree handling to avoid provinging a NULL string.
I've given this my standard test: building the port, booting a Fedora root filesytem on the latest Linux tag, and then shutting down that image. Essentially I'm just following the QEMU RISC-V wiki page's instructions. Everything looks fine here.
We have a lot more outstanding patches so I'll definately be submitting another PR for the soft freeze.
----------------------------------------------------------------
Michael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops from op_helper to cpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free for plic_hart_config
RISC-V: Don't add NULL bootargs to device-tree
hw/riscv/sifive_clint.c | 8 +-
hw/riscv/sifive_plic.c | 4 +-
hw/riscv/sifive_u.c | 4 +-
hw/riscv/spike.c | 6 +-
hw/riscv/virt.c | 6 +-
target/riscv/Makefile.objs | 2 +-
target/riscv/cpu.c | 6 +-
target/riscv/cpu.h | 22 +-
target/riscv/cpu_bits.h | 683 +++++++++++++++++---------------
target/riscv/{helper.c => cpu_helper.c} | 35 +-
target/riscv/op_helper.c | 34 +-
11 files changed, 438 insertions(+), 372 deletions(-)
rename target/riscv/{helper.c => cpu_helper.c} (95%)[Qemu-devel] [PULL 1/5] RISC-V: Allow setting and clearing multiple irqs
From: Michael Clark <[email protected]>
Change the API of riscv_set_local_interrupt to take a write mask and value to allow setting and clearing of multiple local interrupts atomically in a single call. Rename the new function to riscv_cpu_update_mip.
--- hw/riscv/sifive_clint.c | 8 ++++---- hw/riscv/sifive_plic.c | 4 ++-- target/riscv/cpu.h | 22 +++++++++++++--------- target/riscv/op_helper.c | 24 +++++++++++++++--------- 4 files changed, 34 insertions(+), 24 deletions(-)
hw/riscv/sifive_clint.c +4 -4
@@ -47,12 +47,12 @@ static void sifive_clint_write_timecmp(RISCVCPU *cpu, uint64_t value)if (cpu->env.timecmp <= rtc_r) {/* if we're setting an MTIMECMP value in the "past", immediately raise the timer interrupt */ -riscv_set_local_interrupt (cpu,MIP_MTIP ,1 ); +riscv_cpu_update_mip (cpu,MIP_MTIP ,BOOL_TO_MASK (1 ));return ; }/* otherwise, set up the future timer interrupt */ -riscv_set_local_interrupt (cpu,MIP_MTIP ,0 ); +riscv_cpu_update_mip (cpu,MIP_MTIP ,BOOL_TO_MASK (0 )); diff = cpu->env.timecmp - rtc_r;/* back to ns (note args switched in muldiv64) */ next = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) +
@@ -67,7 +67,7 @@ static void sifive_clint_write_timecmp(RISCVCPU *cpu, uint64_t value)static void sifive_clint_timer_cb (void *opaque) {RISCVCPU *cpu = opaque; -riscv_set_local_interrupt (cpu,MIP_MTIP ,1 ); +riscv_cpu_update_mip (cpu,MIP_MTIP ,BOOL_TO_MASK (1 )); }/* CPU wants to read rtc or timecmp register */
@@ -132,7 +132,7 @@ static void sifive_clint_write(void *opaque, hwaddr addr, uint64_t value,if (!env) {error_report ("clint: invalid timecmp hartid: %zu" , hartid); }else if ((addr &0x3 ) ==0 ) { -riscv_set_local_interrupt (RISCV_CPU (cpu),MIP_MSIP , value !=0 ); +riscv_cpu_update_mip (RISCV_CPU (cpu),MIP_MSIP ,BOOL_TO_MASK (value)); }else {error_report ("clint: invalid sip write: %08x" , (uint32_t )addr); }
hw/riscv/sifive_plic.c +2 -2
@@ -142,10 +142,10 @@ static void sifive_plic_update(SiFivePLICState *plic)int level =sifive_plic_irqs_pending (plic, addrid);switch (mode) {case PLICMode_M: -riscv_set_local_interrupt (RISCV_CPU (cpu),MIP_MEIP , level); +riscv_cpu_update_mip (RISCV_CPU (cpu),MIP_MEIP ,BOOL_TO_MASK (level));break ;case PLICMode_S: -riscv_set_local_interrupt (RISCV_CPU (cpu),MIP_SEIP , level); +riscv_cpu_update_mip (RISCV_CPU (cpu),MIP_SEIP ,BOOL_TO_MASK (level));break ;default :break ;
target/riscv/cpu.h +13 -9
@@ -126,13 +126,18 @@ struct CPURISCVState {target_ulong mhartid;target_ulong mstatus; +/* * CAUTION! Unlike the rest of this struct, mip is accessed asynchonously -* by I/O threads and other vCPUs, so hold the iothread mutex before -* operating on it. CPU_INTERRUPT_HARD should be in effect iff this is -* non-zero. Use riscv_cpu_set_local_interrupt. +* by I/O threads. It should be read with atomic_read. It should be updated +* using riscv_cpu_update_mip with the iothread mutex held. The iothread +* mutex must be held because mip must be consistent with the CPU inturrept +* state. riscv_cpu_update_mip calls cpu_interrupt or cpu_reset_interrupt +* wuth the invariant that CPU_INTERRUPT_HARD is set iff mip is non-zero. +* mip is 32-bits to allow atomic_read on 32-bit hosts. */ -uint32_t mip;/* allow atomic_read for >= 32-bit hosts */ +uint32_t mip; +target_ulong mie;target_ulong mideleg;
@@ -247,7 +252,6 @@ void riscv_cpu_do_unaligned_access(CPUState *cs, vaddr addr, uintptr_t retaddr);int riscv_cpu_handle_mmu_fault (CPUState *cpu,vaddr address,int size,int rw,int mmu_idx); -char *riscv_isa_string (RISCVCPU *cpu);void riscv_cpu_list (FILE *f,fprintf_function cpu_fprintf);
@@ -255,6 +259,10 @@ void riscv_cpu_list(FILE *f, fprintf_function cpu_fprintf);#define cpu_list riscv_cpu_list#define cpu_mmu_index riscv_cpu_mmu_index +#ifndef CONFIG_USER_ONLY +uint32_t riscv_cpu_update_mip (RISCVCPU *cpu,uint32_t mask,uint32_t value); +#define BOOL_TO_MASK (x) (-!!(x))/* helper for riscv_cpu_update_mip value */ +#endif void riscv_set_mode (CPURISCVState *env,target_ulong newpriv);void riscv_translate_init (void );
@@ -285,10 +293,6 @@ void csr_write_helper(CPURISCVState *env, target_ulong val_to_write, target_ulong csrno);target_ulong csr_read_helper (CPURISCVState *env,target_ulong csrno); -#ifndef CONFIG_USER_ONLY -void riscv_set_local_interrupt (RISCVCPU *cpu,target_ulong mask,int value); -#endif -#include "exec/cpu-all.h" #endif /* RISCV_CPU_H */
target/riscv/op_helper.c +15 -9
@@ -171,10 +171,8 @@ void csr_write_helper(CPURISCVState *env, target_ulong val_to_write,*/ qemu_mutex_lock_iothread ();RISCVCPU *cpu =riscv_env_get_cpu (env); -riscv_set_local_interrupt (cpu,MIP_SSIP , - (val_to_write &MIP_SSIP ) !=0 ); -riscv_set_local_interrupt (cpu,MIP_STIP , - (val_to_write &MIP_STIP ) !=0 ); +riscv_cpu_update_mip (cpu,MIP_SSIP |MIP_STIP , + (val_to_write & (MIP_SSIP |MIP_STIP )));/* * csrs, csrc on mip.SEIP is not decomposable into separate read and * write steps, so a different implementation is needed
@@ -657,16 +655,24 @@ target_ulong helper_csrrc(CPURISCVState *env, target_ulong src,#ifndef CONFIG_USER_ONLY /* iothread_mutex must be held */ -void riscv_set_local_interrupt (RISCVCPU *cpu,target_ulong mask,int value) +uint32_t riscv_cpu_update_mip (RISCVCPU *cpu,uint32_t mask,uint32_t value) { -target_ulong old_mip = cpu->env.mip; - cpu->env.mip = (old_mip & ~mask) | (value ? mask :0 ); +CPURISCVState *env = &cpu->env; +uint32_t old, new, cmp =atomic_read (&env->mip); -if (cpu->env.mip && !old_mip) { +do { + old = cmp; + new = (old & ~mask) | (value & mask); + cmp =atomic_cmpxchg (&env->mip, old, new); + }while (old != cmp); + +if (new && !old) {cpu_interrupt (CPU (cpu),CPU_INTERRUPT_HARD ); - }else if (!cpu->env.mip && old_mip) { + }else if (!new && old) {cpu_reset_interrupt (CPU (cpu),CPU_INTERRUPT_HARD ); } + +return old; }void riscv_set_mode (CPURISCVState *env,target_ulong newpriv)
Signature · 1 line
2.18.1
[Qemu-devel] [PULL 2/5] RISC-V: Move non-ops from op_helper to cpu_helper
In reply to Palmer DabbeltFrom: Michael Clark <[email protected]>
This patch makes op_helper.c contain only instruction operation helpers used by translate.c and moves any unrelated cpu helpers into cpu_helper.c. No logic is changed by this patch.
---
target/riscv/Makefile.objs | 2 +-
target/riscv/{helper.c => cpu_helper.c} | 35 ++++++++++++++++++++++++-
target/riscv/op_helper.c | 34 ------------------------
3 files changed, 35 insertions(+), 36 deletions(-)
rename target/riscv/{helper.c => cpu_helper.c} (95%)target/riscv/Makefile.objs +1 -1
@@ -1 +1 @@ -obj-y += translate.o op_helper.o helper.o cpu.o fpu_helper.o gdbstub.o pmp.o +obj-y += translate.o op_helper.o cpu_helper.o cpu.o fpu_helper.o gdbstub.o pmp.o
target/riscv/cpu_helper.c renamed from target/riscv/helper.c +34 -1
@@ -1,5 +1,5 @@/* -* RISC-V emulation helpers for qemu. +* RISC-V CPU helpers for qemu. * * Copyright (c) 2016-2017 Sagar Karandikar, [email protected] * Copyright (c) 2017-2018 SiFive, Inc.
@@ -72,6 +72,39 @@ bool riscv_cpu_exec_interrupt(CPUState *cs, int interrupt_request)#if !defined(CONFIG_USER_ONLY ) +/* iothread_mutex must be held */ +uint32_t riscv_cpu_update_mip (RISCVCPU *cpu,uint32_t mask,uint32_t value) +{ +CPURISCVState *env = &cpu->env; +uint32_t old, new, cmp =atomic_read (&env->mip); + +do { + old = cmp; + new = (old & ~mask) | (value & mask); + cmp =atomic_cmpxchg (&env->mip, old, new); + }while (old != cmp); + +if (new && !old) { +cpu_interrupt (CPU (cpu),CPU_INTERRUPT_HARD ); + }else if (!new && old) { +cpu_reset_interrupt (CPU (cpu),CPU_INTERRUPT_HARD ); + } + +return old; +} + +void riscv_set_mode (CPURISCVState *env,target_ulong newpriv) +{ +if (newpriv >PRV_M ) { +g_assert_not_reached (); + } +if (newpriv ==PRV_H ) { + newpriv =PRV_U ; + } +/* tlb_flush is unnecessary as mode is contained in mmu_idx */ + env->priv = newpriv; +} +/* get_physical_address - get the physical address for this virtual address * * Do a page table walk to obtain the physical address corresponding to a
target/riscv/op_helper.c +0 -34
@@ -654,39 +654,6 @@ target_ulong helper_csrrc(CPURISCVState *env, target_ulong src,#ifndef CONFIG_USER_ONLY -/* iothread_mutex must be held */ -uint32_t riscv_cpu_update_mip (RISCVCPU *cpu,uint32_t mask,uint32_t value) -{ -CPURISCVState *env = &cpu->env; -uint32_t old, new, cmp =atomic_read (&env->mip); - -do { - old = cmp; - new = (old & ~mask) | (value & mask); - cmp =atomic_cmpxchg (&env->mip, old, new); - }while (old != cmp); - -if (new && !old) { -cpu_interrupt (CPU (cpu),CPU_INTERRUPT_HARD ); - }else if (!new && old) { -cpu_reset_interrupt (CPU (cpu),CPU_INTERRUPT_HARD ); - } - -return old; -} - -void riscv_set_mode (CPURISCVState *env,target_ulong newpriv) -{ -if (newpriv >PRV_M ) { -g_assert_not_reached (); - } -if (newpriv ==PRV_H ) { - newpriv =PRV_U ; - } -/* tlb_flush is unnecessary as mode is contained in mmu_idx */ - env->priv = newpriv; -} -target_ulong helper_sret (CPURISCVState *env,target_ulong cpu_pc_deb) {if (!(env->priv >=PRV_S )) {
@@ -737,7 +704,6 @@ target_ulong helper_mret(CPURISCVState *env, target_ulong cpu_pc_deb)return retpc; } -void helper_wfi (CPURISCVState *env) {CPUState *cs =CPU (riscv_env_get_cpu (env));
Signature · 1 line
2.18.1
[Qemu-devel] [PULL 4/5] RISC-V: Add missing free for plic_hart_config
In reply to Palmer DabbeltFrom: Michael Clark <[email protected]>
--- hw/riscv/virt.c | 2 ++ 1 file changed, 2 insertions(+)
hw/riscv/virt.c +2 -0
@@ -385,6 +385,8 @@ static void riscv_virt_board_init(MachineState *machine)serial_mm_init (system_memory, memmap[VIRT_UART0 ].base,0 ,qdev_get_gpio_in (DEVICE (s->plic),UART0_IRQ ),399193 ,serial_hd (0 ),DEVICE_LITTLE_ENDIAN ); + +g_free (plic_hart_config); }static void riscv_virt_board_machine_init (MachineClass *mc)
Signature · 1 line
2.18.1
[Qemu-devel] [PULL 5/5] RISC-V: Don't add NULL bootargs to device-tree
In reply to Palmer DabbeltFrom: Michael Clark <[email protected]>
--- hw/riscv/sifive_u.c | 4 +++- hw/riscv/spike.c | 6 ++++-- hw/riscv/virt.c | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-)
hw/riscv/sifive_u.c +3 -1
@@ -230,7 +230,9 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap,qemu_fdt_add_subnode (fdt,"/chosen" );qemu_fdt_setprop_string (fdt,"/chosen" ,"stdout-path" , nodename); -qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); +if (cmdline) { +qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); + }g_free (nodename); }
hw/riscv/spike.c +4 -2
@@ -156,8 +156,10 @@ static void create_fdt(SpikeState *s, const struct MemmapEntry *memmap,g_free (cells);g_free (nodename); -qemu_fdt_add_subnode (fdt,"/chosen" ); -qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); +if (cmdline) { +qemu_fdt_add_subnode (fdt,"/chosen" ); +qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); + } }static void spike_v1_10_0_board_init (MachineState *machine)
hw/riscv/virt.c +3 -1
@@ -254,7 +254,9 @@ static void *create_fdt(RISCVVirtState *s, const struct MemmapEntry *memmap,qemu_fdt_add_subnode (fdt,"/chosen" );qemu_fdt_setprop_string (fdt,"/chosen" ,"stdout-path" , nodename); -qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); +if (cmdline) { +qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); + }g_free (nodename);return fdt;
Signature · 1 line
2.18.1
[Qemu-devel] [PULL 3/5] RISC-V: Update CSR and interrupt definitions
In reply to Palmer DabbeltFrom: Michael Clark <[email protected]>
* Add user-mode CSR defininitions.
* Reorder CSR definitions to match the specification.
* Change H mode interrupt comment to 'reserved'.
* Remove unused X_COP interrupt.
* Add user-mode interrupts.
* Remove erroneous until comments on machine mode interrupts.
* Move together paging mode and page table bit definitions.
* Move together interrupt and exception cause definitions.
--- target/riscv/cpu.c | 6 +- target/riscv/cpu_bits.h | 683 +++++++++++++++++++++------------------ target/riscv/op_helper.c | 2 +- 3 files changed, 370 insertions(+), 321 deletions(-)
target/riscv/cpu.c +4 -2
@@ -74,8 +74,10 @@ const char * const riscv_intr_names[] = {"s_external" ,"h_external" ,"m_external" , -"coprocessor" , -"host" +"reserved" , +"reserved" , +"reserved" , +"reserved" }; typedef struct RISCVCPUInfo {
target/riscv/cpu_bits.h +365 -318
721 lines not on this page · raw message
target/riscv/op_helper.c +1 -1
@@ -90,7 +90,7 @@ void csr_write_helper(CPURISCVState *env, target_ulong val_to_write, target_ulong csrno) {#ifndef CONFIG_USER_ONLY -uint64_t delegable_ints =MIP_SSIP |MIP_STIP |MIP_SEIP | (1 <<IRQ_X_COP ); +uint64_t delegable_ints =MIP_SSIP |MIP_STIP |MIP_SEIP ;uint64_t all_ints = delegable_ints |MIP_MSIP |MIP_MTIP ;#endif
Signature · 1 line
2.18.1
Quoted 16 lines · Palmer Dabbelt
The following changes since commit
09558375a634e17cea6cfbfec883ac2376d2dc7f:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 17:42:56 +0100)are available in the Git repository at:
git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-sf0for you to fetch changes up to
7c28f4da20e5585dce7d575691dac5392b7c6f78:RISC-V: Don't add NULL bootargs to device-tree (2018-10-17 13:02:30 -0700)----------------------------------------------------------------
First RISC-V Patch Set for the 3.1 Soft Freeze
Quoted 8 lines
----------------------------------------------------------------
Michael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops fromop_helpertocpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free forplic_hart_config
RISC-V: Don't add NULL bootargs to device-tree
Isn't this just a subset of Alistair's pull request?
https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02342.html
which included:
Quoted 14 lines
----------------------------------------------------------------
Alistair Francis (5):
hw/riscv/virt: Increase the number of interrupts hw/riscv/virt: Connect the gpex PCIe
riscv: Enable VGA andPCIE_VGAhw/riscv/sifive_u: Connect the Xilinx PCIe hw/riscv/virt: Connect a VirtIO net PCIe deviceMichael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops fromop_helpertocpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free forplic_hart_config
RISC-V: Don't add NULL bootargs to device-tree
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 26 lines · On Wed, 17 Oct 2018 16:32:10 PDT (-0700), [email protected] wrote:
Quoted 16 lines · Palmer Dabbelt
The following changes since commit
09558375a634e17cea6cfbfec883ac2376d2dc7f:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 17:42:56 +0100)are available in the Git repository at:
git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-sf0for you to fetch changes up to
7c28f4da20e5585dce7d575691dac5392b7c6f78:RISC-V: Don't add NULL bootargs to device-tree (2018-10-17 13:02:30 -0700)----------------------------------------------------------------
First RISC-V Patch Set for the 3.1 Soft FreezeQuoted 8 lines
----------------------------------------------------------------
Michael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops fromop_helpertocpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free forplic_hart_config
RISC-V: Don't add NULL bootargs to device-tree
Quoted 2 lines
Isn't this just a subset of Alistair's pull request?
https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02342.html
Yes, but there's still on-going discussion about the PCIe patches so they're not really fully reviewed. I think part of the trouble here is that there wasn't someone submitting regular QEMU pull requests so there was always a rush to get things in. I've volunteered to wrangle the branches and submit weekly pull requests (just like I do for Linux), so now there won't be any more big cliffs.
We've got a lot of patches to filter through because things have been backed up for a bit, so I thought it'd be best to just go with something simple for this first week. Assuming everything gets sorted out for the PCIe patches they'll just go up next week -- I'm super excited for them as well :)
Quoted 15 lines
which included:
Quoted 14 lines
----------------------------------------------------------------
Alistair Francis (5):
hw/riscv/virt: Increase the number of interrupts hw/riscv/virt: Connect the gpex PCIe
riscv: Enable VGA andPCIE_VGAhw/riscv/sifive_u: Connect the Xilinx PCIe hw/riscv/virt: Connect a VirtIO net PCIe deviceMichael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops fromop_helpertocpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free forplic_hart_config
RISC-V: Don't add NULL bootargs to device-tree
Any patches intended for the RISC-V port should go through the maintainer tree. I have been pretty clear that I would like to run regression tests. I do not wish to pull surprises in via master. I also do not agree with this random patch approach. It's all well and good for inactive maintainers to pop up now, but we were not getting our patches reviewed. The riscv-qemu tree is actively managed and we rebase and test at release time. I don't like the idea of busted stuff getting into the tree with patch churn correcting it. In any case we disagree regards process. Please don't break any of the branches in the riscv-qemu repository. I have scripts to tag our stable branches there (we got positive feedback from Karsten on the "series"). You are adding risk to the process. Fine. You are in charge. Don't break stuff.
Quoted 69 lines · Palmer Dabbelt
Quoted 2 lines · On Wed, 17 Oct 2018 16:32:10 PDT (-0700), [email protected] wrote:
Quoted 1 line · Palmer Dabbelt
The following changes since commit
09558375a634e17cea6cfbfec883ac2376d2dc7f:Quoted 2 lines
Quoted 2 lines
Merge remote-tracking branch
'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 17:42:56 +0100)
Quoted 8 lines
Quoted 8 lines
are available in the Git repository at:
git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-sf0for you to fetch changes up to
7c28f4da20e5585dce7d575691dac5392b7c6f78:RISC-V: Don't add NULL bootargs to device-tree (2018-10-17 13:02:30-0700)
Quoted 14 lines
Quoted 5 lines
----------------------------------------------------------------
First RISC-V Patch Set for the 3.1 Soft FreezeQuoted 8 lines
----------------------------------------------------------------
Michael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops fromop_helpertocpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free forplic_hart_config
RISC-V: Don't add NULL bootargs to device-treeQuoted 2 lines
Isn't this just a subset of Alistair's pull request?
https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02342.htmlYes, but there's still on-going discussion about the PCIe patches so they're
not really fully reviewed. I think part of the trouble here is that there wasn't someone submitting regular QEMU pull requests so there was always a rush
to get things in. I've volunteered to wrangle the branches and submit weekly
pull requests (just like I do for Linux), so now there won't be any more big
cliffs.We've got a lot of patches to filter through because things have been backed up
for a bit, so I thought it'd be best to just go with something simple for this
first week. Assuming everything gets sorted out for the PCIe patches they'll
just go up next week -- I'm super excited for them as well :)Quoted 15 lines
which included:
Quoted 14 lines
----------------------------------------------------------------
Alistair Francis (5):
hw/riscv/virt: Increase the number of interrupts hw/riscv/virt: Connect the gpex PCIe
riscv: Enable VGA andPCIE_VGAhw/riscv/sifive_u: Connect the Xilinx PCIe hw/riscv/virt: Connect a VirtIO net PCIe deviceMichael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops fromop_helpertocpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free forplic_hart_config
RISC-V: Don't add NULL bootargs to device-tree
Quoted 4 lines · Michael Clark
Any patches intended for the RISC-V port should go through the maintainer tree. I have been pretty clear that I would like to run regression tests. I do not wish to pull surprises in via master. I also do not agree with this random patch approach. It's all well and good for inactive maintainers to
Quoted 8 lines
pop up now, but we were not getting our patches reviewed. The riscv-qemu tree is actively managed and we rebase and test at release time. I don't like the idea of busted stuff getting into the tree with patch churn correcting it. In any case we disagree regards process. Please don't break any of the branches in the riscv-qemu repository. I have scripts to tag our stable branches there (we got positive feedback from Karsten on the "series"). You are adding risk to the process. Fine. You are in charge. Don't break stuff.
Sorry Michael, I thought we talked about this last week in on the call and decided that you were happy to let someone else take over the process of getting the current RISC-V patch queue upstream. While I agree there's a risk to submitting patches, right now we're in the position where there are known bugs in the upstream QEMU port.
The real intent here is to provide a process by which we can get the RISC-V QEMU port flowing smoothly. You haven't submitted a PR since May, and as a result it's very hard for a community to develop around the RISC-V port -- distros have to go track down out-of-tree patches, releases have known bugs, developers don't know where to start, etc. I know it's easy to get overwhelmed (that happened to me with both binutils and Linux), and I thought we agreed that you'd be happy to have someone else help out with shepherding patches from the RISC-V patch queue into master. I know it's hard to get the ball rolling, but the longer we wait the harder it'll be.
I purposefully created a new "for-master" branch on the RISC-V QEMU github repo to avoid touching any of the branches you've been maintaining, and my intent was for all these patches to have come off of "for-upstream" (which IIUC is the RISC-V patch queue). If I screwed anything up then let me know.
Maybe we can talk about what we're going to do here this afternoon? I certainly don't want to step on your toes here, but I really would like to get patches to start flowing upstream.
Sorry for the confusion, everyone!
Quoted 71 lines · Palmer Dabbelt
Quoted 70 lines · On Wed, 17 Oct 2018 16:32:10 PDT (-0700), [email protected] wrote:
Quoted 2 lines · Palmer Dabbelt
Quoted 1 line
The following changes since commit
09558375a634e17cea6cfbfec883ac2376d2dc7f:Quoted 2 lines
Quoted 2 lines
Merge remote-tracking branch
'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 17:42:56 +0100)
Quoted 8 lines
Quoted 8 lines
are available in the Git repository at:
git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-sf0for you to fetch changes up to
7c28f4da20e5585dce7d575691dac5392b7c6f78:RISC-V: Don't add NULL bootargs to device-tree (2018-10-17 13:02:30-0700)
Quoted 14 lines
Quoted 5 lines
----------------------------------------------------------------
First RISC-V Patch Set for the 3.1 Soft FreezeQuoted 8 lines
----------------------------------------------------------------
Michael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops fromop_helpertocpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free forplic_hart_config
RISC-V: Don't add NULL bootargs to device-treeQuoted 2 lines
Isn't this just a subset of Alistair's pull request?
https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02342.htmlYes, but there's still on-going discussion about the PCIe patches so they're
not really fully reviewed. I think part of the trouble here is that there wasn't someone submitting regular QEMU pull requests so there was always a rush
to get things in. I've volunteered to wrangle the branches and submit weekly
pull requests (just like I do for Linux), so now there won't be any more big
cliffs.We've got a lot of patches to filter through because things have been backed up
for a bit, so I thought it'd be best to just go with something simple for this
first week. Assuming everything gets sorted out for the PCIe patches they'll
just go up next week -- I'm super excited for them as well :)Quoted 15 lines
which included:
Quoted 14 lines
----------------------------------------------------------------
Alistair Francis (5):
hw/riscv/virt: Increase the number of interrupts hw/riscv/virt: Connect the gpex PCIe
riscv: Enable VGA andPCIE_VGAhw/riscv/sifive_u: Connect the Xilinx PCIe hw/riscv/virt: Connect a VirtIO net PCIe deviceMichael Clark (5):
RISC-V: Allow setting and clearing multiple irqs
RISC-V: Move non-ops fromop_helpertocpu_helper
RISC-V: Update CSR and interrupt definitions
RISC-V: Add missing free forplic_hart_config
RISC-V: Don't add NULL bootargs to device-tree
Peter Maydell
AppliedQuoted 34 lines · Palmer Dabbelt
The following changes since commit
09558375a634e17cea6cfbfec883ac2376d2dc7f:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 17:42:56 +0100)
are available in the Git repository at:
git://github.com/riscv/riscv-qemu.gittags/riscv-for-master-3.1-sf0for you to fetch changes up to
7c28f4da20e5585dce7d575691dac5392b7c6f78:RISC-V: Don't add NULL bootargs to device-tree (2018-10-17 13:02:30 -0700)
----------------------------------------------------------------
First RISC-V Patch Set for the 3.1 Soft FreezeThis pull request contains a handful of patches that have been floating around various trees for a while but haven't made it upstream. These patches all appear quite safe. They're all somewhat independent from each other:
* One refactors our IRQ management function to allow multiple interrupts to be raised an once. This patch has no functional difference.
* Cleaning up the op_helper/cpu_helper split. This patch has no functional difference.
* Updates to various constants to keep them in sync with the latest ISA specification and to remove some non-standard bits that snuck in.
* A fix for a memory leak in the PLIC driver.
* A fix to our device tree handling to avoid provinging a NULL string.I've given this my standard test: building the port, booting a Fedora root filesytem on the latest Linux tag, and then shutting down that image. Essentially I'm just following the QEMU RISC-V wiki page's instructions. Everything looks fine here.
Quoted 4 lines
We have a lot more outstanding patches so I'll definately be submitting another PR for the soft freeze.
----------------------------------------------------------------
Applied to master, thanks (following some off-list discussions of what we are doing wrt who is submitting riscv upstream pullreqs).
-- PMM