Re: [PATCH v2 8/8] virtio/s390: make airq summary indicators DMA

Cornelia Huck
2019-05-27T12:00:18Z

On Thu, 23 May 2019 18:22:09 +0200
Michael Mueller <mimu@linux.ibm.com> wrote:

> From: Halil Pasic <pasic@linux.ibm.com>
>
> Hypervisor needs to interact with the summary indicators, so these
> need to be DMA memory as well (at least for protected virtualization
> guests).
>
> Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
> ---
> drivers/s390/virtio/virtio_ccw.c | 22 +++++++++++++++-------
> 1 file changed, 15 insertions(+), 7 deletions(-)

(...)

> @@ -1501,6 +1508,7 @@ static int __init virtio_ccw_init(void)
> {
> /* parse no_auto string before we do anything further */
> no_auto_parse();
> + summary_indicators = cio_dma_zalloc(MAX_AIRQ_AREAS);

What happens if this fails?

> return ccw_driver_register(&virtio_ccw_driver);
> }
> device_initcall(virtio_ccw_init);