From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83B8ACAC580 for ; Fri, 5 Sep 2025 14:33:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uuXUm-0004MZ-GG; Fri, 05 Sep 2025 10:32:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uuXUl-0004Lf-4F for qemu-riscv@nongnu.org; Fri, 05 Sep 2025 10:32:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uuXUc-0003I6-Px for qemu-riscv@nongnu.org; Fri, 05 Sep 2025 10:32:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1757082761; 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=AJYsQ0k41dYEtEm+qEtpIcG16VDv3rXSXQjY6KH6CC8=; b=SbN27ZXSN7kWZgZQiH6Q3umAKvh6BoA+ctWFRc0qZh5DP6Pc0MXMvbGH1LMgH8EhFx4QhZ O7tDgeb7ZzuD8/yCL+/ZNj5GRgHgiBMVvQF2oHTzBA8ukCRZYRi+v5OsoFCQuNY5vTNAhW oJvHIgVItRUwgEOtHOdfh7jBSnvS37U= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-uhoqR3ruNfad5kSA9-idJw-1; Fri, 05 Sep 2025 10:32:40 -0400 X-MC-Unique: uhoqR3ruNfad5kSA9-idJw-1 X-Mimecast-MFC-AGG-ID: uhoqR3ruNfad5kSA9-idJw_1757082760 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-4b5e9b60ce6so23522071cf.2 for ; Fri, 05 Sep 2025 07:32:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757082760; x=1757687560; 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=AJYsQ0k41dYEtEm+qEtpIcG16VDv3rXSXQjY6KH6CC8=; b=jCi8Lc64NKdOsK9tdG353wIROkocwVPUVCx8mqnVfRVR1rHYXUX9Hg3BI++KcuXAyw KXYF+pFODjUs90T7SBO9YGJBZ804EbY6xmDeJLkTvfg4uXTio7dsYLECU6wthOYHnd0y nwvpQ3pEeZj+bG5WTpWHzi8igS8zPeTwywwnbE1/ADLr8OOK5PtGDAn3ZEcxN5tGb+wq ItqIvnpZNCInfUJOaWFa+ENrKSNux9T2dkCDRQwGlucONG96Ajq14uMq0DmoSCG3Gses kFPKmAoFuzKu97e1H7AEV0kRKU5u1PiFyQ4Dtv9w8gQiMDhjcn7rM4K0wx9Gmevok9Il ROvg== X-Forwarded-Encrypted: i=1; AJvYcCU+h2G5apVVZ4Nu9iahfNaPpRwboP06efe6ZJMm8dIF8TBiK7HFrX5VOPa6mI2oVloda6afHwCRjFJ+@nongnu.org X-Gm-Message-State: AOJu0YyF8xl16Wr73m+eSo7GVeuBmueSfCg+2GoWNRgpF9w0mJrhFO6D imwQmcGv7RumTPBNFSkaBt52rhgqne++sCd+/xlAnbyn0kZbHd4cV3mP4d2p8uWVvlzASw7kEEd xcPykH/3QVVgezJIOTuD/J0wyGp+EYRCNr6+1/HU7QJeC0RXo7QnwQawK X-Gm-Gg: ASbGnctK4se+msLt8pjBr9AOBPxplDuBGQOmx3RomvP/k7vSPur3ezl7RwB9GmzhPZ6 ec5hc9nUcLNqzN2X/kE3Q392Q/Mj52XWfxbdMI2g4uT/zfyfGk3FUa/EHvImIMKk784Szx+JccC +cxsB5DsT+EavofcK3Xw0tYWmebUZWxlskN3m35i/aLDnyuapNfQcbnv4s0ZAZUWpKiRoTONeFN D6thH0+s19CH41iF01WLljlvJ9vhC1xbJHNZ78lwbk8+jaLepw922hytzgyhx4R+ZiwsDgICK5N quKRuXM1BJ0hAXYm18djjOg+QTicABUd X-Received: by 2002:a05:622a:10c:b0:4b0:69d6:85a2 with SMTP id d75a77b69052e-4b31d86175amr301290611cf.31.1757082759490; Fri, 05 Sep 2025 07:32:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGW45Sakcic0/au626zXwdL13HxP0OyaIYT2HgE/EM8+kHYAiCyErP6T4Qce2avfFhoAv8oA== X-Received: by 2002:a05:622a:10c:b0:4b0:69d6:85a2 with SMTP id d75a77b69052e-4b31d86175amr301289721cf.31.1757082758538; Fri, 05 Sep 2025 07:32:38 -0700 (PDT) Received: from x1.local ([174.89.135.121]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4b48f673fecsm45984731cf.21.2025.09.05.07.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Sep 2025 07:32:37 -0700 (PDT) Date: Fri, 5 Sep 2025 10:32:25 -0400 From: Peter Xu To: Peter Maydell Cc: chen CJ , qemu-devel@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , Keith Busch , Klaus Jensen , Jesper Devantier , Palmer Dabbelt , Alistair Francis , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Tyrone Ting , Hao Wu , Max Filippov , David Hildenbrand , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Fabiano Rosas , Laurent Vivier , Tomoyuki Hirose Subject: Re: [Withdrawn] [RFC PATCH v2 0/9] support unaligned access to xHCI Capability Message-ID: References: <20250822092410.25833-1-cjchen@igel.co.jp> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: FXeeDXCaS1XdGJ_TCsD8WzS7GoODBeecFVj9v17-b0U_1757082760 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org On Wed, Sep 03, 2025 at 10:47:17AM +0100, Peter Maydell wrote: > On Wed, 3 Sept 2025 at 06:03, chen CJ wrote: > > > > I would like to withdraw this patch series. > > > > Sorry for the inconvenience, and thank you for your understanding. > > That's unfortunate; I think it's an issue we really do need to fix, > but I entirely understand if you don't have the time to work > on it further. > > I might pick it up if I have the time to do so. I worked on this problem a bit more in the past few days while almost everyone will be at the forum. It's almost because I saw similar issues that I have commented before on old versions, but they still existed in the core patch 5. Then I found more issues. Keep commenting on that might be awkward because there will be quite a few dependency changes. One example is, I kept thinking we should not worry about MMIO out-of-bound over mr->size when reaching as deep as access_with_adjusted_size(). There are still quite a few places in patch 5 of this series that does the calculation and it's not obvious what happens if mr->size violated. Peter, if you want to pick it up, please consider reading the replies I left in this series, alone with this version below as comparison reading material. The hope is the reworked patchset below _might_ be easier to read (at least I did add rich comments, because the unaligned changes are tricky and not easy to follow): https://gitlab.com/peterx/qemu/-/commits/mem-unaligned-fix-v0.1?ref_type=tags Especially this patch: https://gitlab.com/peterx/qemu/-/commit/8a8f0f5728a7adc6ecb2cf4358366d2d663a5ed9 However that won't pass the test cases. I still doubt the test case is wrong but I didn't go further modifying the test cases yet (or any better way to test this as you suggested in the other reply). I think that can be the 1st thing we figure out, not the best way to test, but the correctness of the current test case, because IIUC it shouldn't be relevant to impl of unaligned access. To me, if we can reach a consensus on what is the correct (test) behavior on all kinds of unaligned access emulations, fixing the impl should be relatively easy. Thanks, -- Peter Xu