Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5144108rdb; Tue, 12 Dec 2023 23:13:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdhmBbsTwygDXl3+UqZwnp6pNE0daBgI5hbCpkX+kE6p4w/Lw7W3Su/5NnTjJbvkXrqqDC X-Received: by 2002:a05:6358:7e0e:b0:170:82a3:f6e8 with SMTP id o14-20020a0563587e0e00b0017082a3f6e8mr10816723rwm.62.1702451609858; Tue, 12 Dec 2023 23:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702451609; cv=none; d=google.com; s=arc-20160816; b=yFcNQOCZ0mHeqOzW8WNrPJja51JX4Y0ldldSZBd5jykwfcqfT4QancCIqA/A184JD7 OlRFBehJ7chyE4/910L63AS/Mon6lh86M4pHqFYplJUJ1IWVGVptnz7qYzVhpqPFdXeg hVJsxfDam5tmrc2W1AAXeq8s9R4SiJCzJwFVGedpAfLfR7GmqDhJimbvs5alWRwJdjBA s/bW3TeO4lWzmtvDubwPbAHOfXLlmWBxB0QoBw9fIIQzF6auiPqsGl3DF9gqmHmOTyDK lXJ7k06hoyhwIeZWMJylTvhkPt3oXS2qr4KdxX45FUsO5NZmyv6Wa8w28+l2sxGzyUxl 2bqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Avz2gWQWhROKpUyLjjFWYRDmeB6VQHJmYJLW9WRzDic=; fh=0/ExNHxdEV0fLmSPuojjKTsHFOGKXn6GlK7HVSyZh/Y=; b=wADaKB3VFSYRnMhYM51ka/+XZi9Jt/w6GHbuPigFkcGX3LyiB2vPRCkdRdeMMAhQQi edZW9EobGFZL5sidd82I8ylxc48OFjB+ZiU1jeyojAlNhZF1OeuNMapWcWTPRxLa6WrU 0q1AUwkSRXDdCV0rQLHEuGztBC1SpOLe/mYjnxfqPHdkFhaf3ou7SUxD9oWxFyAqOiaZ FNk7WxbQbOp3wlmoEZIv/EdYonQlkPjwpN1EUhnEN8LXaeKnipsmnOk9HEZmZXAq2QmO QrEFJ0AM/jCwqof1F5p06qlPDRnKIrfNUWSqkVW7BFmqwFOerqSL9mlVZVZfxRFniSzb 9lEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j11-20020a056a00234b00b006cbf67abff9si9255761pfj.269.2023.12.12.23.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 23:13:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 3BB4980FCDA8; Tue, 12 Dec 2023 23:13:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233291AbjLMHNG (ORCPT + 99 others); Wed, 13 Dec 2023 02:13:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233254AbjLMHNF (ORCPT ); Wed, 13 Dec 2023 02:13:05 -0500 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A83D8E4; Tue, 12 Dec 2023 23:13:10 -0800 (PST) Received: from loongson.cn (unknown [10.20.42.183]) by gateway (Coremail) with SMTP id _____8CxRPCFWXllbZgAAA--.3567S3; Wed, 13 Dec 2023 15:13:09 +0800 (CST) Received: from [10.20.42.183] (unknown [10.20.42.183]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxPeGBWXllsv0BAA--.13577S3; Wed, 13 Dec 2023 15:13:08 +0800 (CST) Subject: Re: Re: [PATCH v5 1/4] KVM: selftests: Add KVM selftests header files for LoongArch To: Sean Christopherson Cc: Shuah Khan , Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Vishal Annapurve , Huacai Chen , WANG Xuerui , loongarch@lists.linux.dev, Peter Xu , Vipin Sharma , maobibo@loongson.cn References: <20231130111804.2227570-1-zhaotianrui@loongson.cn> <20231130111804.2227570-2-zhaotianrui@loongson.cn> From: zhaotianrui Message-ID: <023b6f8f-301b-a6d0-448b-09a602ba1141@loongson.cn> Date: Wed, 13 Dec 2023 15:15:28 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8AxPeGBWXllsv0BAA--.13577S3 X-CM-SenderInfo: p2kd03xldq233l6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj93XoW7WF1fXr4kWr1kCFyrCryrZrc_yoW8Jw4UpF yI9F1aka1kGFW7tws5Jw1UuF43KFs3uF18CrWDGw4Du3Z8Jwnrtr4jkw4rKa4vyr47J3W2 v3W2q34vqa9093gCm3ZEXasCq-sJn29KB7ZKAUJUUUUr529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUPIb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU XVWUAwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI4 8JMxk0xIA0c2IEe2xFo4CEbIxvr21lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vI r41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_Jrv_JF1lx2IqxVAqx4xG67 AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIY rxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14 v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8 JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07jOa93UUU UU= X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Tue, 12 Dec 2023 23:13:27 -0800 (PST) 在 2023/12/13 上午1:18, Sean Christopherson 写道: > On Tue, Dec 12, 2023, zhaotianrui wrote: >> Hi, Sean: >> >> I want to change the definition of  DEFAULT_GUEST_TEST_MEM in the common >> file "memstress.h", like this: >> >> /* Default guest test virtual memory offset */ >> +#ifndef DEFAULT_GUEST_TEST_MEM >> #define DEFAULT_GUEST_TEST_MEM 0xc0000000 >> +#endif >> >> As this address should be re-defined in LoongArch headers. > > Why? E.g. is 0xc0000000 unconditionally reserved, not guaranteed to be valid, > something else? > >> So, do you have any suggesstion? > > Hmm, I think ideally kvm_util_base.h would define a range of memory that can be > used by tests for arbitrary data. Multiple tests use 0xc0000000, which is not > entirely arbitrary, i.e. it doesn't _need_ to be 0xc0000000, but 0xc0000000 is > convenient because it's 32-bit addressable and doesn't overlap reserved areas in > other architectures. > Thanks for your explanation, and LoongArch want to define DEFAULT_GUEST_TEST_MEM to 0x130000000. As default base address for application loading is 0x120000000, DEFAULT_GUEST_TEST_MEM should be larger than app loading address, so that PER_VCPU_MEM_SIZE can be large enough, and kvm selftests app size is smaller than 256M in generic. Thanks Tianrui Zhao