Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6320642rwi; Tue, 18 Oct 2022 10:48:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7XHatMa7ppX9TcLKezdiia9Qgqqs7QnwSIi7lZVavI6LTsPJdX6A6cpt1C9B7f8hU6oYfR X-Received: by 2002:a17:907:948f:b0:78d:e99f:63e3 with SMTP id dm15-20020a170907948f00b0078de99f63e3mr3390851ejc.361.1666115299370; Tue, 18 Oct 2022 10:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666115299; cv=none; d=google.com; s=arc-20160816; b=nouHJcx6u/1PhgElKoRd5TdhzOShj2H6kxUnw7c4TYuIX3kIEUqBXmizON8ltR+jcs JBo3AEfDAMFudLDGQuSU66AakhKmsZaa81Qdy9eNNkWvLaZdKRMUxBcmlH2lFfoorvf7 XyJN2ePdgtdufQcezE37Dvyk7i/Bj7gRFlAxnzzenp8G6jD0MCjT5JqqwXYu4Vvzs/qB pD+qyyqxiTd0mSp5MdcmbdzmMi8NC/50pfkTZTLwTmniNg8gtMaosHFzD21KtBqNGGu+ oUFy31tHEjecZTGXeQlOAMDEaMkvck7z5jP7OBvQDbd4Iii2oOhw50HE3CrqVBWZlBRJ HcMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6Y+Fo3p/xxotQ/CF0EbvnD4ZW7ILoDB1SHNyzK93wBg=; b=mR+zJlQ9E81CE+J7EAEDhWVKK6goSOMgsqB7lXUNAjsL2HGDe1QL/eIhGl9GWriVUB YPrrowuCRWvVD5CJEI2WcuEaeh7lvFFbLqjI+1nOW0XW+yTi1j4aiuVZl0hGl2IHyDAk S/EYdBs2CccjuB/ljegkMbM7ypOCc3TmgR11Uop+SlH5Lhb47paMzvVHUQz9MDLSB7RD XE6REQ6SOxp54KaomhHuDKp4bxWEP8vsByxG/WiDXVEjqNgVzUCL1KdWhoEZeEbAIb+T EXrXBov6TXsepiKyxjmDRJ6zq7W3fX6P9vf5hKNrJ2DhXym0qmLZW1IuMc5jqSFkEMew nWWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aZuV7q3W; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a17090699c300b0078e254ae43fsi12753107ejn.787.2022.10.18.10.47.53; Tue, 18 Oct 2022 10:48:19 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=aZuV7q3W; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbiJRRa7 (ORCPT + 99 others); Tue, 18 Oct 2022 13:30:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbiJRRa4 (ORCPT ); Tue, 18 Oct 2022 13:30:56 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEECA915C4; Tue, 18 Oct 2022 10:30:54 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id b2so34049241eja.6; Tue, 18 Oct 2022 10:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6Y+Fo3p/xxotQ/CF0EbvnD4ZW7ILoDB1SHNyzK93wBg=; b=aZuV7q3WRMFcN0walr7Cu4KS/1nM5dD4lc593RWSCv9gSbvnAABsvK4igZWq91o1bz dcWtyD2e0d9B4rKBMTFrukgnel3XZWB54aWCE2gf2J7vL2+jvAcpfWhe84/QJvHuKgbb Oy4yA0bJlf2r6TQ2EjJALQI815CjUPkqv5ucZnAUNLMlF6d/RW40v8DTtdJjplAiHbNO GqyhfvD8ELsfRJMg4QA58cw3qu68XZHw1XndTyGOJ6mJ/yiXf0LREGH2Hduc0BXOklXG fM4tFxOGaA+ICXktFCDxruVpY/lVzcB/RA5/kMkBWaleVw7eHx4Kd8bOqCyH5pd2gqlY AJ1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6Y+Fo3p/xxotQ/CF0EbvnD4ZW7ILoDB1SHNyzK93wBg=; b=EfuQG+x7xaVvgdLCFuG+ODfFhp0ADiG4V0LfNucBNZEaKf40j0K48sV/SwaYEVLcrG PZuemgbPUgAFk0Dp4yIdHxKmGcNElRKlvtT2YQD8shEvVybDKBajpDUvu+1/XD1Wa3yX UH0Ug+UhbHw1bmN9Hct54WjMtVzmIKOKfTjHHtSXSMtpD0DH6D/wV8qoVN6gjWzEECQe bDWsDchfyXQ+dJfLH42Y5vcv1+NfH5KQHbAQ/PvZ9JXhl1GKw9lyKiB3AS7fcd4xUzwC jVDQ4jhUQwcHLz7of9UgWuGeevz5Pb6R6QwPW1HaNlQNWVU/eAL5vcwbMrOPBmO83zIs 7s9A== X-Gm-Message-State: ACrzQf0POwrGsp7nDW1svzqQQwWxFs2Xr4PhJNtvRrnSgXo4IRAbPXyQ V/PvgLJOeaqTXWSZP/iIDiLUZohfCpOUHA== X-Received: by 2002:a17:907:9713:b0:78d:8e23:892c with SMTP id jg19-20020a170907971300b0078d8e23892cmr3298345ejc.449.1666114253359; Tue, 18 Oct 2022 10:30:53 -0700 (PDT) Received: from NB-100745.open-synergy.com ([2a02:8109:9cc0:1f6c:99ac:492:d524:d338]) by smtp.gmail.com with ESMTPSA id q5-20020aa7d445000000b0044bfdbd8a33sm9157683edr.88.2022.10.18.10.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 10:30:52 -0700 (PDT) From: Igor Skalkin X-Google-Original-From: Igor Skalkin To: virtualization@lists.linux-foundation.org, luiz.dentz@gmail.com, mst@redhat.com Cc: marcel@holtmann.org, johan.hedberg@gmail.com, jasowang@redhat.com, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Igor Skalkin Subject: [PATCH v2 0/1] virtio_bt: Fix alignment in configuration struct Date: Tue, 18 Oct 2022 19:30:49 +0200 Message-Id: <20221018173050.581812-1-Igor.Skalkin@opensynergy.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 According to specification [1], "For the device-specific configuration space, the driver MUST use 8 bit wide accesses for 8 bit wide fields, 16 bit wide and aligned accesses for 16 bit wide fields and 32 bit wide and aligned accesses for 32 and 64 bit wide fields.". Current version of the configuration structure has non-aligned 16bit fields. This patch adds a second, aligned version of the configuration structure and a new feature bit indicating that this version is being used. [1] https://docs.oasis-open.org/virtio/virtio/v1.1/virtio-v1.1.pdf Changes in v2: The first version of this patch just changed the configuration structure in uapi/linux/virtio_bt.h This can not be done, because it will break the userspace, so the second version offers a less radical approach - it introduces a new feature bit and a new configuration structure that both the device and the driver will use if this bit is negotiated. Igor Skalkin (1): virtio_bt: Fix alignment in configuration struct drivers/bluetooth/virtio_bt.c | 16 +++++++++++++--- include/uapi/linux/virtio_bt.h | 8 ++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) -- 2.37.2