hi  ,

>I assume it's the BIOS's driver and it's choosing a range in low memory,
>but still I'm not sure why its DMA is racing against the PAM update
>(which is done very early).  Felix, do you know the answer?


This bug is triggered by make_bios_readonly() in seabios. Make_bios_readonly() 
will write pam register.

And ehci_setup() is executed before make_bios_readonly(). After initializing 
EHCI in seabios, it will

continuously send dma cycles. So when write pam register, this bug appeared.


In addition, before write pam registers, flatview_simplify() has merged a very 
large range.For example,

this large range is 0xc0000-0xbfffffff. So even if EHCI is configured to not 
allocate buffers in low memory,

this bug will still occur.Thanks.


Best regards

Felixcui-oc

________________________________
发件人: Paolo Bonzini <pbonz...@redhat.com>
发送时间: 2020年10月22日 3:50:15
收件人: Alex Williamson
抄送: FelixCui-oc; Richard Henderson; Eduardo Habkost; qemu-devel@nongnu.org; 
RockCui-oc; Tony W Wang-oc; CobeChen-oc
主题: Re: [PATCH 1/1] Skip flatview_simplify() for cpu vendor zhaoxin

On 21/10/20 20:49, Alex Williamson wrote:
> I can understand the general benefit of flatview_simplify(), but I
> wonder if the best short term solution is to skip operating on the x86
> PAM range, which I understand to be a small number of memory chunks
> below 1MB.

I'd rather remove flatview_simplify altogether, it probably triggers
relatively rarely.  Possibly do not let it operate on RAM/ROM regions,
only on I/O regions.

> I might also wonder why the EHCI controller on this
> platform is choosing that range for DMA.

I assume it's the BIOS's driver and it's choosing a range in low memory,
but still I'm not sure why its DMA is racing against the PAM update
(which is done very early).  Felix, do you know the answer?

Paolo

Reply via email to