RE: [PATCH v4 05/12] target/riscv: Implement kvm_arch_put_registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Alistair Francis [mailto:alistair23@xxxxxxxxx]
> Sent: Tuesday, January 11, 2022 7:07 AM
> To: Jiangyifei <jiangyifei@xxxxxxxxxx>
> Cc: qemu-devel@xxxxxxxxxx Developers <qemu-devel@xxxxxxxxxx>; open
> list:RISC-V <qemu-riscv@xxxxxxxxxx>; kvm-riscv@xxxxxxxxxxxxxxxxxxx; open
> list:Overall <kvm@xxxxxxxxxxxxxxx>; libvir-list@xxxxxxxxxx; Anup Patel
> <anup@xxxxxxxxxxxxxx>; Palmer Dabbelt <palmer@xxxxxxxxxxx>; Alistair
> Francis <Alistair.Francis@xxxxxxx>; Bin Meng <bin.meng@xxxxxxxxxxxxx>;
> Fanliang (EulerOS) <fanliang@xxxxxxxxxx>; Wubin (H)
> <wu.wubin@xxxxxxxxxx>; Wanghaibin (D) <wanghaibin.wang@xxxxxxxxxx>;
> wanbo (G) <wanbo13@xxxxxxxxxx>; limingwang (A)
> <limingwang@xxxxxxxxxx>; Anup Patel <anup.patel@xxxxxxx>
> Subject: Re: [PATCH v4 05/12] target/riscv: Implement kvm_arch_put_registers
> 
> On Mon, Jan 10, 2022 at 11:57 AM Yifei Jiang via <qemu-devel@xxxxxxxxxx>
> wrote:
> >
> > Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl
> >
> > Signed-off-by: Yifei Jiang <jiangyifei@xxxxxxxxxx>
> > Signed-off-by: Mingwang Li <limingwang@xxxxxxxxxx>
> > Reviewed-by: Alistair Francis <alistair.francis@xxxxxxx>
> > Reviewed-by: Anup Patel <anup.patel@xxxxxxx>
> > ---
> >  target/riscv/kvm.c | 104
> > ++++++++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 103 insertions(+), 1 deletion(-)
> >
> > diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c index
> > 6d4df0ef6d..e695b91dc7 100644
> > --- a/target/riscv/kvm.c
> > +++ b/target/riscv/kvm.c
> > @@ -73,6 +73,14 @@ static uint64_t kvm_riscv_reg_id(CPURISCVState *env,
> uint64_t type, uint64_t idx
> >          } \
> >      } while(0)
> >
> > +#define KVM_RISCV_SET_CSR(cs, env, csr, reg) \
> > +    do { \
> > +        int ret = kvm_set_one_reg(cs, RISCV_CSR_REG(env, csr), &reg); \
> > +        if (ret) { \
> > +            return ret; \
> > +        } \
> > +    } while(0)
> 
> This fails checkpatch. I know there is lots of QEMU code like this, but it probably
> should be `while (0)` to keep checkpatch happy.
> 
> Please run checkpatch on all the patches.
> 
> Alistair

OK, it will be modified in the next series.

Yifei




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux