Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5285034pxj; Tue, 22 Jun 2021 20:32:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcCKOnEyoKCtTH8ltqjhqZM4h9k8Gh8zaLuOYeoJfwe8pt10zu1RN/F9GOyKUAii7Lq3iJ X-Received: by 2002:a05:6402:49a:: with SMTP id k26mr9327052edv.279.1624419164720; Tue, 22 Jun 2021 20:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624419164; cv=none; d=google.com; s=arc-20160816; b=xuS4sirbRCFyXQnQtAQgR2+XKWkxQNlUwKTcNM58JAjKvvwLtyk2mrVBnGC84Bh5Kc WYL2sEwEWWR2k+3H0VjggyzXbVO4km96dzNQ11N+mtogO0wUWi4cG8a2fRsxMAz/ReM0 nrFebyYp0Q6BQx1GQZXJZGcUxyQLGayiiZP9b3PhsvKkjPQBhU6hb20G61BNOlLhiYKH UhnaHFMhZXFELPAJ4bUuytL1yCgcNua226c/ILQRVj1jFZd9SGFUUJO6panutHF+p5+q +qA6MhPPTVrpcXyru41KsV4mkPCMq/sXcUKgJ4SzXiSMSSBuCh8aGLUlQYa7FUN+Ozpg hzPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=VZSgP5xqL55dngZG3CanjqGD23m6Wc1RN7v32XWp3kc=; b=iqREWfBySaGk9Vzx/cbtLYfN5W4A9E5fCtULApilFNbO90UkjDkKSmoUsK+8UC1sMK Ukx8mlSQlMZafmMpiga5p70l1UanEh6fN3ed88kk5uYV93odbPc2Do4jaBOB3V68rDbG YzF4TQdw+k+/G/HVQ4SafYId+cV/aouW6Egum00SIQbfMkw6xQcIbrI+aaEgBBHYCtyj V+BI4Rp6a9suKdDZ3MXIAsdhC/rllOcY/+tZxpjiN9ATaS60L8BLjlk8TBXZxp5THGg7 HdOgy4WSwnkr9yQxaG8MryoMqjOn4Q8U16kEnZ0KMk43ZxHTpf2t/1tSh4F/MKMFkkkm yNcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D0rT+9lK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si7719577edo.120.2021.06.22.20.32.22; Tue, 22 Jun 2021 20:32:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D0rT+9lK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbhFWDd1 (ORCPT + 99 others); Tue, 22 Jun 2021 23:33:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52654 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230234AbhFWDdZ (ORCPT ); Tue, 22 Jun 2021 23:33:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624419068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VZSgP5xqL55dngZG3CanjqGD23m6Wc1RN7v32XWp3kc=; b=D0rT+9lKGIV1w9C2Ioin8KLW5yFWmlewxYNLvASOFoxe06tyKATEMZ58Of6am4GfmT5ACq SsIryGYe5f7eEAL03BvIlqvfnbkLyMjsVAA9Ocjmdr1Xd1eq8SHx0eBFbVNZeX9L5IL+AH 22XoJ1041TB3jOG5QupfYXb76lPItiU= Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-569-r1Uwdi9WN4y1g1nacndhLw-1; Tue, 22 Jun 2021 23:31:06 -0400 X-MC-Unique: r1Uwdi9WN4y1g1nacndhLw-1 Received: by mail-pl1-f200.google.com with SMTP id 4-20020a170902c204b0290121d3ad80ecso321733pll.6 for ; Tue, 22 Jun 2021 20:31:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=VZSgP5xqL55dngZG3CanjqGD23m6Wc1RN7v32XWp3kc=; b=W4LMxRdPiCue94noSGWHV22FQNvvM856+jUJBoJaEkKd9Wpno4HvAqAd2XSrrgzB9H LLvyo/ybX5b+IMOnahAjSjdG5dfOeAxrusc51Nsy5KYbFp8UgZSAKlnhFrfJN48+FvFn 1S0siKwio3WpK8jLykOt3YtbTKgDCdn+5p5DxcT9RUEaeF7kQM86Dw95prQiW4s8KWET 5A5Nf25P6REsURhiGc6HuWQfrZ/J+RcVj7ZbPpc0x/ZGkuJEiCAI0DF+XKx+AXtfON9W LD5uzXu9TJfnIESjwes76EVrl/KFI5FWLkFJ/l+CqogHniI0nt7o5dhqKjYjTc7rEQYk KYMg== X-Gm-Message-State: AOAM533qoH2NvF3OxXpQQZPh8SQ8KMhWFy7p0VaHtuU1S+fXuIfOQ9hQ ViWNqkaKXOk23Vy7nM7gQKgVBreJi9UMhDwezeO0twW24rUojg+GhN5oClIuXWOPu3xsuQpf/bH tiynWdDE0iviTjzo9y/33kiZag/E/OahCBW9qjjm1nwZeh9PZ7UMirGdGrNDVEBNHjrl3+Lh8YF 7x X-Received: by 2002:a17:90b:a4d:: with SMTP id gw13mr7324905pjb.104.1624419065722; Tue, 22 Jun 2021 20:31:05 -0700 (PDT) X-Received: by 2002:a17:90b:a4d:: with SMTP id gw13mr7324867pjb.104.1624419065413; Tue, 22 Jun 2021 20:31:05 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id g4sm658859pfu.134.2021.06.22.20.30.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jun 2021 20:31:04 -0700 (PDT) Subject: Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace To: Yongji Xie Cc: "Michael S. Tsirkin" , Stefan Hajnoczi , Stefano Garzarella , Parav Pandit , Christoph Hellwig , Christian Brauner , Randy Dunlap , Matthew Wilcox , Al Viro , Jens Axboe , bcrl@kvack.org, Jonathan Corbet , =?UTF-8?Q?Mika_Penttil=c3=a4?= , Dan Carpenter , joro@8bytes.org, Greg KH , songmuchun@bytedance.com, virtualization , netdev@vger.kernel.org, kvm , linux-fsdevel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel References: <20210615141331.407-1-xieyongji@bytedance.com> <20210615141331.407-10-xieyongji@bytedance.com> <1bba439f-ffc8-c20e-e8a4-ac73e890c592@redhat.com> <0aeb7cb7-58e5-1a95-d830-68edd7e8ec2e@redhat.com> From: Jason Wang Message-ID: Date: Wed, 23 Jun 2021 11:30:52 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/6/22 下午4:14, Yongji Xie 写道: > On Tue, Jun 22, 2021 at 3:50 PM Jason Wang wrote: >> >> 在 2021/6/22 下午3:22, Yongji Xie 写道: >>>> We need fix a way to propagate the error to the userspace. >>>> >>>> E.g if we want to stop the deivce, we will delay the status reset until >>>> we get respose from the userspace? >>>> >>> I didn't get how to delay the status reset. And should it be a DoS >>> that we want to fix if the userspace doesn't give a response forever? >> >> You're right. So let's make set_status() can fail first, then propagate >> its failure via VHOST_VDPA_SET_STATUS. >> > OK. So we only need to propagate the failure in the vhost-vdpa case, right? I think not, we need to deal with the reset for virtio as well: E.g in register_virtio_devices(), we have:         /* We always start by resetting the device, in case a previous          * driver messed it up.  This also tests that code path a little. */       dev->config->reset(dev); We probably need to make reset can fail and then fail the register_virtio_device() as well. Thanks > > Thanks, > Yongji >