[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a6addc25-29af-3690-8392-efa5e8381e98@redhat.com>
Date: Thu, 28 May 2020 16:14:52 +1000
From: Gavin Shan <gshan@...hat.com>
To: Paolo Bonzini <pbonzini@...hat.com>, kvmarm@...ts.cs.columbia.edu
Cc: maz@...nel.org, linux-kernel@...r.kernel.org, shan.gavin@...il.com,
catalin.marinas@....com, will@...nel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH RFCv2 9/9] arm64: Support async page fault
Hi Paolo,
On 5/27/20 4:48 PM, Paolo Bonzini wrote:
> I definitely appreciate the work, but this is repeating most of the
> mistakes done in the x86 implementation. In particular:
>
> - the page ready signal can be done as an interrupt, rather than an
> exception. This is because "page ready" can be handled asynchronously,
> in contrast to "page not present" which must be done on the same
> instruction that triggers it. You can refer to the recent series from
> Vitaly Kuznetsov that switched "page ready" to an interrupt.
>
Yeah, page ready can be handled asynchronously. I think it would be
nice for x86/arm64 to share same design. x86 has 256 vectors and it
seems 0xec is picked for the purpose. However, arm64 doesn't have so
many (interrupt/exception) vectors and PPI might be appropriate for
the purpose if I'm correct, because it has same INTD for all CPUs.
From this point, it's similar to x86's vector. There are 16 PPIs, which
are in range of 16 to 31, and we might reserve one for this. According
to GICv3/v4 spec, 22 - 30 have been assigned.
> - the page not present is reusing the memory abort exception, and
> there's really no reason to do so. I think it would be best if ARM
> could reserve one ESR exception code for the hypervisor. Mark, any
> ideas how to proceed here?
>
Well, a subclass of ESR exception code, whose DFSC (Data Fault Status
Code) is 0x34, was taken for the purpose in RFCv1. The code is IMPDEF
one and Mark suggested not to do so. I agree the page not present needs a
separately subclass of exception. With that, there will be less conflicts
and complexity. However, the question is which subclass or DFSC code I should
used for the purpose.
> - for x86 we're also thinking of initiating the page fault from the
> exception handler, rather than doing so from the hypervisor before
> injecting the exception. If ARM leads the way here, we would do our
> best to share code when x86 does the same.
>
Sorry, Paolo, I don't follow your idea here. Could you please provide
more details?
> - do not bother with using KVM_ASYNC_PF_SEND_ALWAYS, it's a fringe case
> that adds a lot of complexity.
>
Yeah, I don't consider it so far.
> Also, please include me on further iterations of the series.
>
Sure.
Thanks,
Gavin
[...]
Powered by blists - more mailing lists