public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Anup Patel <anup@brainfault.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Qiu Wenbo <qiuwenbo@kylinos.com.cn>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] RISC-V Fixes for 5.9-rc2
Date: Fri, 4 Sep 2020 17:03:35 +0100	[thread overview]
Message-ID: <20200904160335.GA23669@infradead.org> (raw)
In-Reply-To: <CAAhSdy2N8L015z0-RirjXLjdzt+OrCtzzKzivsMeQXoH9Nc8Cw@mail.gmail.com>

On Fri, Sep 04, 2020 at 07:26:41PM +0530, Anup Patel wrote:
> On Fri, Sep 4, 2020 at 6:30 PM Christoph Hellwig <hch@infradead.org> wrote:
> >
> > On Fri, Sep 04, 2020 at 08:58:25PM +0800, Qiu Wenbo wrote:
> > > I can confirm this patch also breaks K210 support. It seems that
> > > csr_read(CSR_TIME) will trigger an illegal instruction exception on K210.
> >
> > CSR_TIME is trapped by just about every implementation I know (which is
> > explicitly allowed by the spec).  That is why we should never use it
> > from common M-mode code.
> 
> Finally, I was able to replicate this issue by manually hacking QEMU to
> not emulatie TIME CSR for virt machine.
> 
> It seems this issue is only seen on older QEMU and Kendrtye K210.

You'd also see it when running nommu on Sifivie or just about any
hardware.  Whoever implement the TIME CSR for qemu made a mistake IMHO
as it doesn't match how most real hardware behaves.

  reply	other threads:[~2020-09-04 16:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 18:26 [GIT PULL] RISC-V Fixes for 5.9-rc2 Palmer Dabbelt
2020-08-21 19:35 ` Linus Torvalds
2020-09-04  8:31   ` Christoph Hellwig
2020-09-04  9:42     ` Anup Patel
2020-09-04  9:46       ` Christoph Hellwig
2020-09-04 10:04         ` Anup Patel
     [not found]           ` <f1be6ee1-0802-82ca-ffdb-4c294925cd9a@kylinos.com.cn>
2020-09-04 13:00             ` Christoph Hellwig
2020-09-04 13:56               ` Anup Patel
2020-09-04 16:03                 ` Christoph Hellwig [this message]
2020-09-04 16:14                   ` Anup Patel
2020-08-21 22:05 ` pr-tracker-bot

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=20200904160335.GA23669@infradead.org \
    --to=hch@infradead.org \
    --cc=anup@brainfault.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=qiuwenbo@kylinos.com.cn \
    --cc=torvalds@linux-foundation.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