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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1C02CC25B0E for ; Fri, 19 Aug 2022 05:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kGtgejTlgDI6gCnXQD0gUWUmJIbL5nwOEVahIGtGfsY=; b=K2haMb615r9C7n lU8bWrHEUpEXP6p3l/aoTc8TRT07WOMLfzFzn4BrMZV7eFNcVrSWw9nGe/VGwCw0GNA3OLSndL2JC U5W33x6RHffthkw0NvIdimgfcm8XBXbh40Hpr1DAdaVyXCkC7RSMUZvfFb12zc2n9Sm5SmwSH6U/R s/wNfewxjJm9oCcDpROLiDPiVcMp7JHuN57QUw9hTTmAVQ2xrtt9K5syFgPkdG/5o1HOUjmMy7O4W u46qAOsF8amab8q+ggCztVCwPn59pBpu8IdIJkUDa6+hmT7677vhZ6Ta4Y1mxuZBk5BnNAm3YkfUp fLtq4VmF88tqttlJDpNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOuYL-001S8J-QV; Fri, 19 Aug 2022 05:28:17 +0000 Received: from out0.migadu.com ([94.23.1.103]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOuYH-001Rqw-RM for linux-arm-kernel@lists.infradead.org; Fri, 19 Aug 2022 05:28:15 +0000 Date: Fri, 19 Aug 2022 07:28:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1660886888; 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=EVozTVP3R6alT//Ll18ulj/6MH8/qR/TwWtAnvBrzdU=; b=PMVRFKEZeKyE8EKMtXnLtfOneiT2O4Md6EbjoDnjs8TZwCMnre2cYE8B5wXoyUp7+VZUDi rkPY43Q9UBf2HkEAX370IebDwbZrbovf2i8dqr69md/ZWSGw8MNtVegMBEMuMBZcYbryyw X9xABLnKrnUYYniQPyUqfhwsay43Jlk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Jones To: Gavin Shan Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, peterx@redhat.com, pbonzini@redhat.com, corbet@lwn.net, maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, shuah@kernel.org, seanjc@google.com, drjones@redhat.com, dmatlack@google.com, bgardon@google.com, ricarkol@google.com, zhenyzha@redhat.com, shan.gavin@gmail.com Subject: Re: [PATCH v1 3/5] KVM: selftests: Dirty host pages in dirty_log_test Message-ID: <20220819052805.qnhw2d3arxixzvhl@kamzik> References: <20220819005601.198436-1-gshan@redhat.com> <20220819005601.198436-4-gshan@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220819005601.198436-4-gshan@redhat.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220818_222814_344267_89EDD71D X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 19, 2022 at 08:55:59AM +0800, Gavin Shan wrote: > It's assumed that 1024 host pages, instead of guest pages, are dirtied > in each iteration in guest_code(). The current implementation misses > the case of mismatched page sizes in host and guest. For example, > ARM64 could have 64KB page size in guest, but 4KB page size in host. > (TEST_PAGES_PER_LOOP / 16), instead of TEST_PAGES_PER_LOOP, host pages > are dirtied in every iteration. > > Fix the issue by touching all sub-pages when we have mismatched > page sizes in host and guest. I'll let the dirty-log test authors decide what's best to do for this test, but I'd think we should let the guest continue dirtying its pages without knowledge of the host pages. Then, adjust the host test code to assert all sub-pages, other than the ones it expects the guest to have written, remain untouched. Thanks, drew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel