[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <771780a3-39a7-f87e-4b5b-45cf95b3896a@redhat.com>
Date: Thu, 20 Jan 2022 12:18:04 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Mark Rutland <mark.rutland@....com>, linux-kernel@...r.kernel.org
Cc: aleksandar.qemu.devel@...il.com, alexandru.elisei@....com,
anup.patel@....com, aou@...s.berkeley.edu, atish.patra@....com,
borntraeger@...ux.ibm.com, bp@...en8.de, catalin.marinas@....com,
chenhuacai@...nel.org, dave.hansen@...ux.intel.com,
frankja@...ux.ibm.com, frederic@...nel.org, gor@...ux.ibm.com,
hca@...ux.ibm.com, james.morse@....com, jmattson@...gle.com,
joro@...tes.org, luto@...nel.org, maz@...nel.org, mingo@...hat.com,
mpe@...erman.id.au, nsaenzju@...hat.com, palmer@...belt.com,
paulmck@...nel.org, paul.walmsley@...ive.com, peterz@...radead.org,
seanjc@...gle.com, suzuki.poulose@....com, svens@...ux.ibm.com,
tglx@...utronix.de, tsbogend@...ha.franken.de, vkuznets@...hat.com,
wanpengli@...cent.com, will@...nel.org
Subject: Re: [PATCH v2 5/7] kvm/riscv: rework guest entry logic
On 1/19/22 11:58, Mark Rutland wrote:
> + * There's no barrier which ensures that pending interrupts are
> + * recognised, so we just hope that the CPU takes any pending
> + * interrupts between the enable and disable.
> */
> local_irq_enable();
> + local_irq_disable();
>
This should be the required architectural behavior: "a CSR access is
performed after the execution of any prior instructions in program order
whose behavior modifies or is modified by the CSR state and before the
execution of any subsequent instructions in program order whose behavior
modifies or is modified by the CSR state" (Zicsr spec, paragraph "CSR
Access Ordering", available at
https://www.five-embeddev.com/riscv-isa-manual/latest/csr.html#csrinsts).
Paolo
Powered by blists - more mailing lists