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.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 09540C48BC3 for ; Wed, 21 Feb 2024 07:23:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.683850.1063481 (Exim 4.92) (envelope-from ) id 1rcgww-0005tC-Cs; Wed, 21 Feb 2024 07:23:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 683850.1063481; Wed, 21 Feb 2024 07:23:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rcgww-0005t5-A8; Wed, 21 Feb 2024 07:23:26 +0000 Received: by outflank-mailman (input) for mailman id 683850; Wed, 21 Feb 2024 07:23:25 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rcgwv-0005sx-7R for xen-devel@lists.xenproject.org; Wed, 21 Feb 2024 07:23:25 +0000 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [2a00:1450:4864:20::636]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 19142fc8-d08a-11ee-8a53-1f161083a0e0; Wed, 21 Feb 2024 08:23:24 +0100 (CET) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a3e8be8a7ddso369668766b.2 for ; Tue, 20 Feb 2024 23:23:24 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id h11-20020a17090634cb00b00a3d7bcfb9a1sm4685554ejb.128.2024.02.20.23.23.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Feb 2024 23:23:23 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 19142fc8-d08a-11ee-8a53-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1708500203; x=1709105003; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=xhERbpoE4VXwROCKxrt3FxWiUBFTqvpBx+V/ORx+9Ys=; b=Pd82sxdVc6MHqAdk06Nl24YtqbMsx9BNwbca3O+/QcQxV9Dtm5ftjJYTkcja0ZSFYx g5Mi4FN4cevHj/MI8FmaO0onhADsD28YLXnWwtyGZpV++Tq5kn6NlPKtI3kpuqPNFXhK yk52mWe1NHwF9RQ2xfKCVVVbFseXrhXwY6HtkVTZn9XeGQa7nLY9CpmTC7uCHHG5GeZJ rTXkL/rnrzKadt+rPyLrdGsD1IMKFWjAZazm4nrnSHl4n72PREJOsImsUmSmnmq2DW0P ADc0ATvg98ISaUfp1aXNXUJ2WXKNbUMKJk0+brChAjrZmMh3Fx+iCowW+Z/XHltPa2Nf ghJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708500203; x=1709105003; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xhERbpoE4VXwROCKxrt3FxWiUBFTqvpBx+V/ORx+9Ys=; b=E5LCRkrw5r3K/hpm2h+CKchrVdj2L8f5fn7EwzURw4MdJJ1RMn52VLulgfo98IBZm/ dc4H+8e4ovU+PWEpZLeiJQ12kwHVWem/Io2REBX0/3vUp1wqrlroXu+i2X+K6rNPMsuX nXvC+wfwFS2tdNyNsr/1pt+/84F6cliU9Y1wlqiwk/0NGefJqSlmg4g1CzCckX02olKv YBVCIm9SpVabpQN7tWDLIQJmIPZ65wLTYr+RixCMlvAsmSNqd+/r9wwQKfJg6zkT07Oc tHK9oh/+Ug42N8xnFshAciY6hDSDooe7MWwMuKoYcORdVxaPYmK92qYInjTUh/u+S9yI eBdw== X-Forwarded-Encrypted: i=1; AJvYcCWFdJIWmZ1Hpw5qv20rKWqdKHnq3ijSsDcHdoj2RkaotDJcjzxPDhIZjWA96NgEsTmcZrbW4m9Tl4u55jEf0o6vcA6s0JqZ0kObA1OB3fo= X-Gm-Message-State: AOJu0YyfpOliJEnvO0deRplnJVvN0iIvrOD6Kf6Y9qWRdINneszkfYhU +B49MdosMMYpDaycnWfgsrcs22WsjN6xGQqzrgL65RlSbHsQ8XrLnk+WEN8F1w== X-Google-Smtp-Source: AGHT+IHa7NVEZplEZ3l18DhGyDV51nw+mgUNhbkMoTobZvdJOC76JwEjs0du3eMCGQuvan/wb5F/ag== X-Received: by 2002:a17:906:d043:b0:a3d:a63f:2db0 with SMTP id bo3-20020a170906d04300b00a3da63f2db0mr11037432ejb.28.1708500203681; Tue, 20 Feb 2024 23:23:23 -0800 (PST) Message-ID: <088414f7-c5f3-4776-80a2-c9c3da618c22@suse.com> Date: Wed, 21 Feb 2024 08:23:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] xen/hvm: Convert hap_capabilities into a bitfield Content-Language: en-US To: George Dunlap Cc: Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Jun Nakajima , Kevin Tian , xen-devel@lists.xenproject.org References: <20240206012051.3564035-1-george.dunlap@cloud.com> <20240206012051.3564035-2-george.dunlap@cloud.com> <66962dfc-db89-40bc-8411-9b92f9458b16@suse.com> From: Jan Beulich Autocrypt: addr=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lonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 21.02.2024 08:02, George Dunlap wrote: > On Mon, Feb 19, 2024 at 9:36 PM Jan Beulich wrote: >> On 06.02.2024 02:20, George Dunlap wrote: >>> --- a/xen/arch/x86/hvm/vmx/vmcs.c >>> +++ b/xen/arch/x86/hvm/vmx/vmcs.c >>> @@ -113,8 +113,8 @@ static int cf_check parse_ept_param_runtime(const char *s) >>> int val; >>> >>> if ( !cpu_has_vmx_ept || !hvm_funcs.hap_supported || >>> - !(hvm_funcs.hap_capabilities & >>> - (HVM_HAP_SUPERPAGE_2MB | HVM_HAP_SUPERPAGE_1GB)) ) >>> + !(hvm_funcs.caps.hap_superpage_2mb || >>> + hvm_funcs.caps.hap_superpage_1gb) ) >>> { >>> printk("VMX: EPT not available, or not in use - ignoring\n"); >> >> Just to mention it: The conditional and the log message don't really >> fit together. (I was first wondering what the 2mb/1gb checks had to >> do here at all, but that's immediately clear when seeing that the >> only sub-option here is "exec-sp".) > > So you mean basically that the checks & error message are poorly > factored, because there's only a single sub-option? (i.e., if there > were options which didn't rely on superpages, the check would be > incorrect?) Right. > Let me know if there's something concrete you'd like me to do here. Nothing. I meant to express this by starting with "Just to mention it". If you were eager, you might deal with this right away, but there's no expectation to this effect. If and when it becomes a problem, it'll then need sorting. And the message being potentially misleading is, well, just an annoyance - as with many other things, finding it confusing will likely lead to looking up where it's issued, then realizing that what it says isn't what it means. Jan