Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp3101436rdb; Fri, 22 Sep 2023 19:46:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH29o4vD4m7Q9LV6139jqpK3i0Jwbcfk9tTg2v1rP37TpQ/PNbT9U7i5jdOilqIuvlABjs/ X-Received: by 2002:a05:6e02:2166:b0:351:20f3:aa81 with SMTP id s6-20020a056e02216600b0035120f3aa81mr1732767ilv.4.1695437218588; Fri, 22 Sep 2023 19:46:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695437218; cv=none; d=google.com; s=arc-20160816; b=yCAO1bjvbgXEMSCbjF2OawjuFNwNfTe8QNrAVHUWQyv6Dv34lJskQIy5qHz94mQl11 1OSLnReGVo+/hbBbOcWCJvRpyTgKSa2ewqPA+SsypVa/md1KbWgWmaSK4yLViz5G4Xug U60AtepZRGeHvvH/mks8kcqF0xuTSfSyL0E39FVAhEpLEwpqcmkvbjl3zjlhnb1XRuVJ ADoXaW54OomBdM7XQ3eG4kMcqO9K3lJQ54vSJuSuC1WR5B1eYcKDi+MbtHrmgjH4RMqm Y1mwp611IOya4qB4bqaTD1eTvI1m13GBENr6eoYBNejVNfpXvgOoA2iI0uCz82g42JE1 vBUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=CSRAsOXqUG0ER0BOAKiobqvlHfjAj6fkRHJ850CANRE=; fh=cDdndZ7hXZEjCV3AqhwUmc4fdg9rxDe3lS3675O1Ahk=; b=IB5coF9vN37OG9qzJiPSTr1bsP4qnaSI+MzU3+ryUmHeCizAkTNX8L4s6U6Utofbed u6mQaSM5R2oxuh3YMXUY4betXNXTRGtWp6fSrWqelMeQtyypqQOqcdiE4Rw0LBLmttia lGyQKf7e1IAl5sBWhvuou1pw9m3hI73bYGxm6sMG64wlBQIVsN/kVOZqAxlHfKcvziO1 EqjK7APYQNBqOhZhOmpRQ1yIuITt7LYGyMfmuUqHrB1yg6n5KSqhU0CwclggakibeizB McP8mZ59Ux1CD9ySop/8yVGtjWAHWnVFH1OkD1yXf48pchjzW9/oiChlcMYDLLUnTper CE4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="J/d+/vpX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id r27-20020a63441b000000b00578db6172fdsi4806795pga.325.2023.09.22.19.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 19:46:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="J/d+/vpX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 901828293DE3; Fri, 22 Sep 2023 13:33:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229561AbjIVUc4 (ORCPT + 99 others); Fri, 22 Sep 2023 16:32:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjIVUcz (ORCPT ); Fri, 22 Sep 2023 16:32:55 -0400 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AAABCE for ; Fri, 22 Sep 2023 13:32:49 -0700 (PDT) Received: by mail-pg1-x54a.google.com with SMTP id 41be03b00d2f7-5789f2f13fcso2384933a12.3 for ; Fri, 22 Sep 2023 13:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695414769; x=1696019569; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=CSRAsOXqUG0ER0BOAKiobqvlHfjAj6fkRHJ850CANRE=; b=J/d+/vpX73JDiS99x6J8yXz7eWnsuKr3ZRSkH0+dqbPsGiMgSErvjDyDcSnOPlbMbX c92kmf7d3vLm0akowOAMssskLjzBOu6WHwoGv7i+IoY06CYHmPC7JDiPfqkHYxszWR+S 5ALElTT4Dv1JF8uPcP68fRvGglAwHATag0DQGrNRNPW4wSZrnKRnKpzrgqO0n1+1d1dY +X2wp9tSrebkCJ9H4JGlNWqL8B2+o37pasTalFdkwE6WnFCb9YFGn/Wax2+1025Cq9rt OQBZ8+S1T5Qw6kjzff8+UJwUqTg1JHPuKvgiWgHNXujhBHB1Wsbq+6htrBM4ToYywZWS /H5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695414769; x=1696019569; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CSRAsOXqUG0ER0BOAKiobqvlHfjAj6fkRHJ850CANRE=; b=I4xqCr66kgn8B5+a4jrRqm3OUPydsCYlVaH2v/CDO8+bZ01QgOe4tqsbya0c958Ybe 31yBmU5x6Ch6elEPmDdpv1qg24z0TLLgf2s/B6rbKsy3NuyjJPPQbzGpZdAUJwM78SJI XFWA4e9t7PU1MAw6SxtHyt+5PDEI9jqr399oxU39/c25nwzdAsAzAQdX1XG5nLyEi1hB 10ZhkY98WsKa8I2cBLYAIK6Lfjttpu8F5wXg9Yl+iQDGFAWFWgzEuIc3ydeey+fZ+bg5 fuP4m2cVYsJEImRIro2HB0crAtES2bLJm6gBRJjqVn2UHalI2D39OmzCcAnH9OTsqQVZ X8DA== X-Gm-Message-State: AOJu0Yw85S8AHG233H6nSVbXRtASCdn6mKF9Z1M0Tf3X+k8K7EXjWDiv WGZrrVoOJKtv+cbhYgqa8whsxqmRBCE= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:fa8d:b0:1b9:df8f:888c with SMTP id lc13-20020a170902fa8d00b001b9df8f888cmr4603plb.8.1695414768675; Fri, 22 Sep 2023 13:32:48 -0700 (PDT) Date: Fri, 22 Sep 2023 13:32:47 -0700 In-Reply-To: <20230922194029.GA1206715@ls.amr.corp.intel.com> Mime-Version: 1.0 References: <20230922194029.GA1206715@ls.amr.corp.intel.com> Message-ID: Subject: Re: [RFC PATCH v2 0/6] KVM: gmem: Implement test cases for error_remove_page From: Sean Christopherson To: Isaku Yamahata Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Michael Roth , Paolo Bonzini , erdemaktas@google.com, Sagi Shahar , David Matlack , Kai Huang , Zhi Wang , chen.bo@intel.com, linux-coco@lists.linux.dev, Chao Peng , Ackerley Tng , Vishal Annapurve , Yuan Yao , Jarkko Sakkinen , Xu Yilun , Quentin Perret , wei.w.wang@intel.com, Fuad Tabba Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 22 Sep 2023 13:33:10 -0700 (PDT) On Fri, Sep 22, 2023, Isaku Yamahata wrote: > On Thu, Sep 21, 2023 at 01:29:59PM -0700, > Sean Christopherson wrote: > > > On Thu, Sep 21, 2023, isaku.yamahata@intel.com wrote: > > > From: Isaku Yamahata > > > > > > This patch series is to implement test cases for the KVM gmem error_remove_page > > > method. > > > - Update punch hole method to truncate pages > > > - Add a new ioctl KVM_GUEST_MEMORY_FAILURE to inject memory failure on > > > offset of gmem > > > > Doh. Please try to communicate what you're working on. I was just about to hit > > SEND on a series to fix the truncation bug, and to add a similar test. I would > > have happily punted that in your direction, but I had no idea that you were aware > > of the bug[*], let alone working on a fix. I could have explicitly stated that > > I was going to fix the bug, but I thought that it was implied that I needed to > > clean up my own mess. > > Oops sorry. Now I'm considering about machine check injection. > i.e. somehow trigger kvm_machine_check() and its own test cases. Unless we can't extend fadvise() for some reason, I think we should pursue FADV_HWPOISION. The enabling should be downright trivial, e.g. just implement file_operations.fadvise() for guest_memfd, have it handle FADV_HWPOISON, and pass everything else to generic_fadvise(). It'll basically be your ioctl() just without a dedicated ioctl(). At the very least, we should run the idea past the fs maintainers.