qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Anup Patel <apatel@ventanamicro.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Alistair Francis <Alistair.Francis@wdc.com>,
	Sagar Karandikar <sagark@eecs.berkeley.edu>,
	 Atish Patra <atishp@atishpatra.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	 Anup Patel <anup@brainfault.org>,
	qemu-riscv@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 2/5] target/riscv: Update VS timer whenever htimedelta changes
Date: Thu, 8 Dec 2022 13:29:59 +1000	[thread overview]
Message-ID: <CAKmqyKP+hc4N6Z2AqkQpCmF=oyTE_rf-XfSsTHChwcUWRE5gsg@mail.gmail.com> (raw)
In-Reply-To: <20221108125703.1463577-3-apatel@ventanamicro.com>

On Tue, Nov 8, 2022 at 11:07 PM Anup Patel <apatel@ventanamicro.com> wrote:
>
> The htimedelta[h] CSR has impact on the VS timer comparison so we
> should call riscv_timer_write_timecmp() whenever htimedelta changes.
>
> Fixes: 3ec0fe18a31f ("target/riscv: Add vstimecmp suppor")
> Signed-off-by: Anup Patel <apatel@ventanamicro.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

This patch breaks my Xvisor test. When running OpenSBI and Xvisor like this:

qemu-system-riscv64 -machine virt \
    -m 1G -serial mon:stdio -serial null -nographic \
    -append 'vmm.console=uart@10000000 vmm.bootcmd="vfs mount initrd
/;vfs run /boot.xscript;vfs cat /system/banner.txt; guest kick guest0;
vserial bind guest0/uart0"' \
    -smp 4 -d guest_errors \
    -bios none \
    -device loader,file=./images/qemuriscv64/vmm.bin,addr=0x80200000 \
    -kernel ./images/qemuriscv64/fw_jump.elf \
    -initrd ./images/qemuriscv64/vmm-disk-linux.img -cpu rv64,h=true

Running:

Xvisor v0.3.0-129-gbc33f339 (Jan  1 1970 00:00:00)

I see this failure:

INIT: bootcmd:  guest kick guest0

guest0: Kicked

INIT: bootcmd:  vserial bind guest0/uart0

[guest0/uart0] cpu_vcpu_stage2_map: guest_phys=0x000000003B9AC000
size=0x4096 map failed

do_error: CPU3: VCPU=guest0/vcpu0 page fault failed (error -1)

       zero=0x0000000000000000          ra=0x0000000080001B4E

         sp=0x000000008001CF80          gp=0x0000000000000000

         tp=0x0000000000000000          s0=0x000000008001CFB0

         s1=0x0000000000000000          a0=0x0000000010001048

         a1=0x0000000000000000          a2=0x0000000000989680

         a3=0x000000003B9ACA00          a4=0x0000000000000048

         a5=0x0000000000000000          a6=0x0000000000019000

         a7=0x0000000000000000          s2=0x0000000000000000

         s3=0x0000000000000000          s4=0x0000000000000000

         s5=0x0000000000000000          s6=0x0000000000000000

         s7=0x0000000000000000          s8=0x0000000000000000

         s9=0x0000000000000000         s10=0x0000000000000000

        s11=0x0000000000000000          t0=0x0000000000004000

         t1=0x0000000000000100          t2=0x0000000000000000

         t3=0x0000000000000000          t4=0x0000000000000000

         t5=0x0000000000000000          t6=0x0000000000000000

       sepc=0x0000000080001918     sstatus=0x0000000200004120

    hstatus=0x00000002002001C0     sp_exec=0x0000000010A64000

     scause=0x0000000000000017       stval=0x000000003B9ACAF8

      htval=0x000000000EE6B2BE      htinst=0x0000000000D03021

I have tried updating to a newer Xvisor release, but with that I don't
get any serial output.

Can you help get the Xvisor tests back up and running?

Alistair


  reply	other threads:[~2022-12-08  3:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 12:56 [PATCH v2 0/5] Nested virtualization fixes for QEMU Anup Patel
2022-11-08 12:56 ` [PATCH v2 1/5] target/riscv: Typo fix in sstc() predicate Anup Patel
2022-11-08 12:57 ` [PATCH v2 2/5] target/riscv: Update VS timer whenever htimedelta changes Anup Patel
2022-12-08  3:29   ` Alistair Francis [this message]
2022-12-08  8:41     ` Anup Patel
2022-12-12  5:53       ` Alistair Francis
2022-12-12 11:12         ` Anup Patel
2022-12-15  3:25           ` Alistair Francis
2022-12-23 13:14             ` Anup Patel
2022-12-28  5:38               ` Alistair Francis
2023-01-03 16:13                 ` Anup Patel
2023-01-16  5:20                   ` Anup Patel
2023-01-19  2:05                     ` Alistair Francis
2022-11-08 12:57 ` [PATCH v2 3/5] target/riscv: Don't clear mask in riscv_cpu_update_mip() for VSTIP Anup Patel
2022-11-08 12:57 ` [PATCH v2 4/5] target/riscv: No need to re-start QEMU timer when timecmp == UINT64_MAX Anup Patel
2022-11-08 12:57 ` [PATCH v2 5/5] target/riscv: Ensure opcode is saved for all relevant instructions Anup Patel
2022-11-21  7:23   ` Alistair Francis
2022-11-21  3:01 ` [PATCH v2 0/5] Nested virtualization fixes for QEMU Anup Patel
2022-11-22  1:03 ` Alistair Francis

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='CAKmqyKP+hc4N6Z2AqkQpCmF=oyTE_rf-XfSsTHChwcUWRE5gsg@mail.gmail.com' \
    --to=alistair23@gmail.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=anup@brainfault.org \
    --cc=apatel@ventanamicro.com \
    --cc=atishp@atishpatra.org \
    --cc=palmer@dabbelt.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sagark@eecs.berkeley.edu \
    /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;
as well as URLs for NNTP newsgroup(s).