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 00F172D8784; Tue, 22 Jul 2025 09:16:50 +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=1753175812; cv=none; b=G+oNA9g71Qhmt8ihfReF3riWdOdJbzjgqoVxMaxJIUkUAafB0LrUExciz54q75WAmWr6qdLdN9DF7r238lRlfNtsfJw90JPR/tetvfqfanbHhDZ8YKM83dem4AYL8Kd1koglgKTFPLjlpaIY/zwD1oqtH2QC/fJnxOablDmgo2Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753175812; c=relaxed/simple; bh=AKKR2nhGT74/5KBJ8HpjjiMYY/nLAehDtHvNEsmzrXw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RsHrltFDvS+ZPMFczPiFcRrSoaI3OzQ5bighb/wWL/jHIS/gjfuIXpX2I4hOfvl2TVgCem788x09OUr3YT2eK3/Xr4IoL1lz1+bGEsrqLzBsErsPjjkFvBBQphI0rdph966ouNbAjEi3dmfBINo1jcCXqV3PqX4wWZNBmUbl1KE= 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=Lxwv97uz; 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="Lxwv97uz" Received: from [10.95.67.184] (unknown [167.220.238.152]) by linux.microsoft.com (Postfix) with ESMTPSA id 9F74F2117659; Tue, 22 Jul 2025 02:16:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9F74F2117659 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1753175810; bh=rb1j+cJyXgExNMxi6vnnslq4paR3vV0/fOhrrbzDsu8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Lxwv97uz04ZKlOoHFuWnO4Wf+ovpZRC1Gat/SiKEs0A0ed/JHm1Ox3oicvY/8y5r0 +5muPfC2+D5vk0ztXM9YLZDj1aLT8fzKxgRh9zEfe6JV7J3mNUfFQRsMuVZTI3o7LA ENFnwOBAYI+fWZCHrl2osfLQNTGBmtjV4HsCW/CM= Message-ID: Date: Tue, 22 Jul 2025 14:46:43 +0530 Precedence: bulk X-Mailing-List: linux-hyperv@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/2] Drivers: hv: Introduce mshv_vtl driver To: Markus Elfring , Roman Kisel , Saurabh Sengar , linux-hyperv@vger.kernel.org, Dexuan Cui , Haiyang Zhang , "K. Y. Srinivasan" , Wei Liu Cc: LKML , Alok Tiwari , Anirudh Rayabharam , Nuno Das Neves , Stanislav Kinsburskii References: <20250611072704.83199-3-namjain@linux.microsoft.com> <68120ea5-d3ba-4077-a605-50a0b5188761@web.de> Content-Language: en-US From: Naman Jain In-Reply-To: <68120ea5-d3ba-4077-a605-50a0b5188761@web.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/20/2025 12:00 AM, Markus Elfring wrote: > … >> +++ b/drivers/hv/mshv_vtl_main.c >> @@ -0,0 +1,1783 @@ > … >> +static int mshv_vtl_sint_ioctl_set_eventfd(struct mshv_vtl_set_eventfd __user *arg) >> +{ > … >> + mutex_lock(&flag_lock); >> + old_eventfd = flag_eventfds[set_eventfd.flag]; >> + WRITE_ONCE(flag_eventfds[set_eventfd.flag], eventfd); >> + mutex_unlock(&flag_lock); > … > > Under which circumstances would you become interested to apply a statement > like “guard(mutex)(&flag_lock);”? > https://elixir.bootlin.com/linux/v6.16-rc6/source/include/linux/mutex.h#L225 > > Regards, > Markus I didn't know about it, TBH. I will use it in this driver in all places. I have tested the same in my setup. Thanks. Regards, Naman