[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v3] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <JBeulich@xxxxxxxx>
- Date: Tue, 16 Jul 2019 16:33:59 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VhE7Dzbxb71gdKgewMKD4wFCvHfmQjsXhiNBzEaO1vk=; b=GJ+sR0tVb+++lWKbJwgBAmdK94Ksyx37/lpl2vckNXws4qoyFx0hOEBS5MoN7j5plGQqzF/lk7+WBoLfWKdEHADK1qcrYAaxMuf6uAD+sNYlBhQW4ewmcXFc+BhUH9AkQbMsKwdlgIIEPTNlGJ6AqosB35NKAwfF2iy5wKgelTj8hr8BKVjfRW7nr7n9v66JwN7S9iYXrJYRq2VqHXFXoGoP2qc3Tkqeum6WAjGV/ku7BZge+qGpcrdBRmzFXakE9k+2mQld+YMQjyAJ0jUyKQjiw9ZE1ppUzXfKRgJVBoZ78991RDeUgvVtcFlUWTaRqV1XAdnKO3dYsakr/9UcxQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RWzb4fxa+x/38Vym0yxgFkrp1+H2Mjyc1U7l/sEzcyNWV9o+LMzehNvPBs9ZJhfIXGFVsHfY00ra40sDu8z2WdwbdCNhlb1hmDh6yyibRR19bSAfjXiTW0QbRpGsXXVWXB0Qy0GtQGf00gJrIMX3HU+qoQpiXx8DDIXBzFUXNClYR4y7PWKkS7cItLkOK5ST13VbQYJyxQ68bef8tTfHyH0WXOcLMqZTB92Ag030BmaSRd4xymfQI4dknVxxv5Bic7JicD0ok6blWO5e0G1CGMPPYXKJnIwsvHOiReWcYLKYtKMvY5vWCVJLccr+GP/bxeyPqT9TjaDLwAc5PIqeTA==
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
- Delivery-date: Tue, 16 Jul 2019 16:37:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHVO/L1K7bAkJ+VBki7BnAFJZRIEqbNcJ6A
- Thread-topic: [PATCH v3] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()
On 16.07.2019 18:23, Andrew Cooper wrote:
> DMA-ing to the stack is considered bad practice. In this case, if a
> timeout occurs because of a sluggish device which is processing the
> request, the completion notification will corrupt the stack of a
> subsequent deeper call tree.
>
> Place the poll_slot in a percpu area and DMA to that instead.
>
> Fix the declaration of saddr in struct qinval_entry, to avoid a shift by
> two. The requirement here is that the DMA address is dword aligned,
> which is covered by poll_slot's type.
>
> This change does not address other issues. Correlating completions
> after a timeout with their request is a more complicated change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <JBeulich@xxxxxxxx>
Must have been quite some time since v2 ...
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|