From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 499F01A2541; Wed, 8 Jan 2025 17:48:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736358508; cv=none; b=C/wBwwsdGYOr5wqNnxn+RXCOogmJ93c9gGtCvptiUVEQscEApUyk+6o6phQIzuX9dWWSckPFVbTHG48yHBVKpGvt40JUjletHksM784eHC1WcwVN+knGPID357hu0lzw2oB3DDmvdFu6fNLQFx24H1iyGLejmy/crm26m71qow4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736358508; c=relaxed/simple; bh=Qp9UIWKIy5koe8nkX1NdonTrggqdbpcRjAjaCrfdOx0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kqu0PWEbMd5D5eRI5zmOdbzrUykGPgY3CalAIog4qgn9Syt4jmXwgNhLW3xKL1zOSUtasTDDRI2l8UHhDfKf0ALI61lhJP9+ujIA1tY+gSGc7Mv/ZdA726udxsGPPGjZFTozHCP75JwkyFsr7ZMofaX9Uaz0bsog5DOjIfG39ZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=RB5qUauy; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="RB5qUauy" Received: from [10.137.184.60] (unknown [131.107.160.188]) by linux.microsoft.com (Postfix) with ESMTPSA id C25F6203E3A4; Wed, 8 Jan 2025 09:48:25 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C25F6203E3A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736358505; bh=fYpyFI68WQyn06fu9E5BAylOrhjoCh38QkrogCmGF98=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=RB5qUauycchQ4hTIfdKIIBR/8Qa3v7jMg/ZqLcqxKwmYVtetglcyIs9pssLlJYyUl st7yoKYyQuL+LoqpzS8kP3LpSOev07Zo6g5xLjyyhVYzZhfu49p/i+cBu7H/l8gdxp 29RXSUBxc/b28708X3V0ZRgHhYTV2UorHL0e2r4k= Message-ID: <2234bf95-237c-4d73-a549-93877e0b6fb2@linux.microsoft.com> Date: Wed, 8 Jan 2025 09:48:25 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 1/5] hyperv: Define struct hv_output_get_vp_registers To: Wei Liu Cc: Michael Kelley , "hpa@zytor.com" , "kys@microsoft.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "decui@microsoft.com" , "eahariha@linux.microsoft.com" , "haiyangz@microsoft.com" , "mingo@redhat.com" , "nunodasneves@linux.microsoft.com" , "tglx@linutronix.de" , "tiala@microsoft.com" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "apais@microsoft.com" , "benhill@microsoft.com" , "ssengar@microsoft.com" , "sunilmut@microsoft.com" , "vdso@hexbites.dev" References: <20241230180941.244418-1-romank@linux.microsoft.com> <20241230180941.244418-2-romank@linux.microsoft.com> Content-Language: en-US From: Roman Kisel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/7/2025 11:34 PM, Wei Liu wrote: > On Mon, Jan 06, 2025 at 12:24:32PM -0800, Roman Kisel wrote: >> >> >> On 1/6/2025 9:37 AM, Michael Kelley wrote: >>> From: Roman Kisel Sent: Monday, December 30, 2024 10:10 AM >> [...] >>> >>> These bit field definitions don't look right. We want to "fill up" >>> the field size, so that we're explicit about each bit, and not leave >>> it to the compiler to add padding (which __packed tells the >>> compiler not to do). So in aggregate, the "u64" bit fields should >>> account for all 64 bits, but here you account for only 32 bits. >>> There are two ways to fix this: >>> >>> u32 interruption_pending : 1; >>> u32 interruption_type: 1; >>> u32 reserved : 30; >>> u32 error_code; >>> Or >>> u64 interruption_pending : 1; >>> u64 interruption_type: 1; >>> u64 reserved : 30; >>> u64 error_code : 32; >>> >>> >>> Nuno -- your thoughts? >> >> Quite a blunder on my side! Thank you very much for your help :) >> GDB is my witness: >> >> (gdb) ptype /o union hv_arm64_pending_synthetic_exception_event >> /* offset | size */ type = union >> hv_arm64_pending_synthetic_exception_event { >> /* 16 */ u64 as_uint64[2]; >> /* 13 */ struct { >> /* 0: 0 | 4 */ u32 event_pending : 1; >> /* 0: 1 | 4 */ u32 event_type : 3; >> /* 0: 4 | 4 */ u32 reserved : 4; >> /* 1 | 4 */ u32 exception_type; >> /* 5 | 8 */ u64 context; >> >> /* total size (bytes): 13 */ >> }; >> >> /* total size (bytes): 16 */ >> } >> >> which looks messed up to me to put it mildly. Will fix next time. > > We are pretty close to the next merge window (~2 weeks). Can you please > resend a version this week or early next week? Understood, will do! > > Nuno, if you have any comments on this series, now it is the time to > share them. > > Thanks, > Wei. -- Thank you, Roman