Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp226761rwb; Wed, 9 Nov 2022 23:17:38 -0800 (PST) X-Google-Smtp-Source: AMsMyM4n9pECbuUvPR8STXDBtwB97tZUDLHyUHkJRxzuU1/TbqvCfFFAz2LKsR6csih4wJ2dAyKg X-Received: by 2002:a17:902:be13:b0:188:5c4d:589d with SMTP id r19-20020a170902be1300b001885c4d589dmr35758146pls.114.1668064658097; Wed, 09 Nov 2022 23:17:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668064658; cv=none; d=google.com; s=arc-20160816; b=g7L2/3XgsPBY2lebQ0PHOg0b/qeleqzQ2VdtIuCWAZWXQe6YvLe+Jdv3kfUF89iY2S xNoJAQF2egTsb8kJy0l/vRJZw5Mdn2NrvUqgDDfJPdAJ6xHsvZI36X9Y8H33SNCcNQNf djj16+zasadQLipESD2GAHMyTP8atlhDckz7KRiA9hn0KOdfUMWsZ0QC0RZ+vpFQRNpa XVoI6pUVUY1cRqWx6yegtMxCh616crHBfaFWj3JbPqxfIoBUM/rMKGc5+G3A9CnanvXT VuZJ4t2pRDZ1455y3Wi4OakuYS1D8CmdbtYH3EAzON1yF44q1Ll+miRQBvjpbCqEJuaL pUUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JPT2SlSbYl+8u2DBxIMbsp2kZiM/fVVnMLVLMjyKspc=; b=QlGa9SQSuRR+8GI5udEIypouXy5jstkJslLByfQj8EB05hRRGj73ZkCQbUc1Bdgi2u jYKCHzso7M/WWPdlrfLqhTVz3KsCg/CZVlQDhwxmtxo2OnzA9khIYuNnMKECMnwoJ2HV DZm9uyvp6+Qje06IPbEVBRwDSCwjelArkjBIaW1gUNr+/xLcAka4NXXnD9IR89McJf4P RMk4tXGygKGZ0GSu5flyN+AgjXOL8kdYroknPFmgiYCwtglJsbYpGOLDwctyLASML8GG 4YYpKaSaS23CAe1sdz923HvWuWx/4ZRqZUL+6+pMk0Q8HC+xwvYdLeLTF6mTZ3v6KIBN /2Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GGcSFG0A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h20-20020a056a00219400b00550ec562c79si20174828pfi.369.2022.11.09.23.17.25; Wed, 09 Nov 2022 23:17:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GGcSFG0A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232412AbiKJG21 (ORCPT + 92 others); Thu, 10 Nov 2022 01:28:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiKJG2Z (ORCPT ); Thu, 10 Nov 2022 01:28:25 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B1F42EF63 for ; Wed, 9 Nov 2022 22:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668061647; 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: in-reply-to:in-reply-to:references:references; bh=JPT2SlSbYl+8u2DBxIMbsp2kZiM/fVVnMLVLMjyKspc=; b=GGcSFG0AeeFOcwZjN8zvzfrH/Wn2KFlZUx+276OZyl+ooXumUH+zAXVDIKUE+c22cJ9K6s P05b9s+71QkrJKN4clFzgSXPIOOauII45Y1OcKqKdIgRF2yMZkVXoJhzaDRI+GRi1mnXPB szBxm3arNCw2Djrwx3SF2elHyetZqkw= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-288-aT3WlBuiMSOkkDwj6OR1SA-1; Thu, 10 Nov 2022 01:27:26 -0500 X-MC-Unique: aT3WlBuiMSOkkDwj6OR1SA-1 Received: by mail-wm1-f70.google.com with SMTP id l42-20020a05600c1d2a00b003cf8e70c1ecso2166345wms.4 for ; Wed, 09 Nov 2022 22:27:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JPT2SlSbYl+8u2DBxIMbsp2kZiM/fVVnMLVLMjyKspc=; b=xEGNd/LcmjomsVlsPTYE/HUgxmJ5g8E0ecbyDvGQ//4KJewSCC2Wq/6RkrbrA35IKe /xTANHvX+mGnhHg95ByLMBS9qU5d8CGoDS8QkjY2dYPHUYlZRN5m5NDP0u2SXM8tfFh6 Jngn4BV0nVAJ1qO321zw6JpgkEnz9BIv+Xv3CIS2ZDVd+mrgiUPtUUqKCAeAEAv+lhss JwEv18gscnbBJ1RBUu/angKQDNqAqKiWCuxWjlbHyd44MLNJc9RPiG8TjQfS7xywy8Jo FvXzI6VJQgGdqvxkxGxpaXXH5TKSj3XWPhKrBhBNTZeC11uIv8hWo0ZpsRT1P7sWDNFs kAfw== X-Gm-Message-State: ANoB5plH/UwGPA8U8nJjUDr74pHSrJzz18OYVswLGB3vzHH9c9BkGiQt 8G7YjIz/u2ijIqUNgBtQHb9O6oFd/TAx83Q/qcAGTuT8Kb4a+HPEJVtj+CEEOJPmFyeYkCGl+iQ muRMs0IPS/uCp8c4ypmh5Xrkh X-Received: by 2002:a05:600c:4fd3:b0:3cf:a464:e881 with SMTP id o19-20020a05600c4fd300b003cfa464e881mr15090842wmq.54.1668061644653; Wed, 09 Nov 2022 22:27:24 -0800 (PST) X-Received: by 2002:a05:600c:4fd3:b0:3cf:a464:e881 with SMTP id o19-20020a05600c4fd300b003cfa464e881mr15090833wmq.54.1668061644392; Wed, 09 Nov 2022 22:27:24 -0800 (PST) Received: from redhat.com ([2.52.23.68]) by smtp.gmail.com with ESMTPSA id g12-20020adffc8c000000b0022cd96b3ba6sm17304181wrr.90.2022.11.09.22.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 22:27:23 -0800 (PST) Date: Thu, 10 Nov 2022 01:27:21 -0500 From: "Michael S. Tsirkin" To: Xianting Tian Cc: jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] virtio_pci: use PAGE_SIZE for pci vring align Message-ID: <20221110012603-mutt-send-email-mst@kernel.org> References: <20221110061111.383076-1-xianting.tian@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221110061111.383076-1-xianting.tian@linux.alibaba.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 10, 2022 at 02:11:11PM +0800, Xianting Tian wrote: > As the comments of VIRTIO_PCI_VRING_ALIGN shows, we should use > PAGE_SZIE not the hard code 4096. > > Signed-off-by: Xianting Tian where does it show this? what is the problem you are trying to solve? PAGE_SIZE is generally not valid in uapi > --- > include/uapi/linux/virtio_pci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h > index f703afc7ad31..ed5f678c682b 100644 > --- a/include/uapi/linux/virtio_pci.h > +++ b/include/uapi/linux/virtio_pci.h > @@ -90,7 +90,7 @@ > > /* The alignment to use between consumer and producer parts of vring. > * x86 pagesize again. */ > -#define VIRTIO_PCI_VRING_ALIGN 4096 > +#define VIRTIO_PCI_VRING_ALIGN PAGE_SIZE > > #endif /* VIRTIO_PCI_NO_LEGACY */ > > -- > 2.17.1