Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-02 Thread Richard Henderson
On 11/2/21 7:15 AM, Richard Henderson wrote: On 11/2/21 6:42 AM, Peter Maydell wrote: On Tue, 2 Nov 2021 at 10:01, Richard Henderson wrote: On 11/1/21 3:35 PM, Peter Maydell wrote: On Mon, 1 Nov 2021 at 19:28, Richard Henderson wrote: On 10/26/21 3:12 AM, Alexander Graf wrote: Apple's Hy

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-02 Thread Richard Henderson
On 11/2/21 6:42 AM, Peter Maydell wrote: On Tue, 2 Nov 2021 at 10:01, Richard Henderson wrote: On 11/1/21 3:35 PM, Peter Maydell wrote: On Mon, 1 Nov 2021 at 19:28, Richard Henderson wrote: On 10/26/21 3:12 AM, Alexander Graf wrote: Apple's Hypervisor.Framework forwards cache operations a

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-02 Thread Peter Maydell
On Tue, 2 Nov 2021 at 10:01, Richard Henderson wrote: > > On 11/1/21 3:35 PM, Peter Maydell wrote: > > On Mon, 1 Nov 2021 at 19:28, Richard Henderson > > wrote: > >> > >> On 10/26/21 3:12 AM, Alexander Graf wrote: > >>> Apple's Hypervisor.Framework forwards cache operations as MMIO traps > >>> in

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-02 Thread Richard Henderson
On 11/1/21 3:35 PM, Peter Maydell wrote: On Mon, 1 Nov 2021 at 19:28, Richard Henderson wrote: On 10/26/21 3:12 AM, Alexander Graf wrote: Apple's Hypervisor.Framework forwards cache operations as MMIO traps into user space. For MMIO however, these have no meaning: There is no cache attached t

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Peter Maydell
On Tue, 26 Oct 2021 at 09:09, Alexander Graf wrote: > > Apple's Hypervisor.Framework forwards cache operations as MMIO traps > into user space. For MMIO however, these have no meaning: There is no > cache attached to them. > > So let's just treat cache data exits as nops. > > This fixes OpenBSD bo

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Peter Maydell
On Mon, 1 Nov 2021 at 19:28, Richard Henderson wrote: > > On 10/26/21 3:12 AM, Alexander Graf wrote: > > Apple's Hypervisor.Framework forwards cache operations as MMIO traps > > into user space. For MMIO however, these have no meaning: There is no > > cache attached to them. > > > > So let's just

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Richard Henderson
On 11/1/21 1:55 PM, Peter Maydell wrote: On Tue, 26 Oct 2021 at 17:22, Richard Henderson wrote: On 10/26/21 12:12 AM, Alexander Graf wrote: +if (cm) { +/* We don't cache MMIO regions */ +advance_pc = true; +break; +} + assert(isv)

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Richard Henderson
On 10/26/21 3:12 AM, Alexander Graf wrote: Apple's Hypervisor.Framework forwards cache operations as MMIO traps into user space. For MMIO however, these have no meaning: There is no cache attached to them. So let's just treat cache data exits as nops. This fixes OpenBSD booting as guest. Signe

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Peter Maydell
On Tue, 26 Oct 2021 at 17:22, Richard Henderson wrote: > > On 10/26/21 12:12 AM, Alexander Graf wrote: > > +if (cm) { > > +/* We don't cache MMIO regions */ > > +advance_pc = true; > > +break; > > +} > > + > > assert(isv); > > The asser

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Peter Maydell
On Tue, 26 Oct 2021 at 18:46, Richard Henderson wrote: > Ah hah. From 0487G.a, page D13-3191: > > # For other faults reported in ESR_EL2, ISV is 0 except > # for the following stage 2 aborts... > > (which incidentally sounds like documenting around a historic chip bug, since > both EL1 and > EL3

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-10-26 Thread Richard Henderson
On 10/26/21 9:38 AM, Alexander Graf wrote: On 10/26/21 12:12 AM, Alexander Graf wrote: +if (cm) { +/* We don't cache MMIO regions */ +advance_pc = true; +break; +} + assert(isv); The assert should come first. If the "iss valid" bi

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-10-26 Thread Alexander Graf
> Am 26.10.2021 um 18:10 schrieb Richard Henderson > : > > On 10/26/21 12:12 AM, Alexander Graf wrote: >> +if (cm) { >> +/* We don't cache MMIO regions */ >> +advance_pc = true; >> +break; >> +} >> + >> assert(isv); > > The assert

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-10-26 Thread Richard Henderson
On 10/26/21 12:12 AM, Alexander Graf wrote: +if (cm) { +/* We don't cache MMIO regions */ +advance_pc = true; +break; +} + assert(isv); The assert should come first. If the "iss valid" bit is not set, then nothing else in the word

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-10-26 Thread Mark Kettenis
> From: Alexander Graf > Date: Tue, 26 Oct 2021 09:12:41 +0200 > > Apple's Hypervisor.Framework forwards cache operations as MMIO traps > into user space. For MMIO however, these have no meaning: There is no > cache attached to them. > > So let's just treat cache data exits as nops. > > This fi

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-10-26 Thread Philippe Mathieu-Daudé
On 10/26/21 09:12, Alexander Graf wrote: > Apple's Hypervisor.Framework forwards cache operations as MMIO traps > into user space. For MMIO however, these have no meaning: There is no > cache attached to them. > > So let's just treat cache data exits as nops. > > This fixes OpenBSD booting as gue

[PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-10-26 Thread Alexander Graf
Apple's Hypervisor.Framework forwards cache operations as MMIO traps into user space. For MMIO however, these have no meaning: There is no cache attached to them. So let's just treat cache data exits as nops. This fixes OpenBSD booting as guest. Signed-off-by: Alexander Graf Reported-by: AJ Bar