mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Liju-clr Chen <liju-clr.chen@mediatek.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Yingshiuan Pan <Yingshiuan.Pan@mediatek.com>,
	Ze-yu Wang <Ze-yu.Wang@mediatek.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-trace-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	Shawn Hsiao <shawn.hsiao@mediatek.com>,
	PeiLun Suei <PeiLun.Suei@mediatek.com>,
	Chi-shen Yeh <Chi-shen.Yeh@mediatek.com>,
	Kevenny Hsieh <Kevenny.Hsieh@mediatek.com>
Subject: Re: [PATCH v13 04/25] virt: geniezone: Add GenieZone hypervisor driver
Date: Wed, 11 Dec 2024 09:44:13 +0100	[thread overview]
Message-ID: <7b79d4b5-ba91-41a0-90d1-c64bcab53cec@kernel.org> (raw)
In-Reply-To: <20241114100802.4116-5-liju-clr.chen@mediatek.com>

On 14/11/2024 11:07, Liju-clr Chen wrote:
> +
> +static int gzvm_dev_open(struct inode *inode, struct file *file)
> +{
> +	/*
> +	 * Reference count to prevent this module is unload without destroying
> +	 * VM

So you re-implemented suppress-bind attrs... no, drop.

> +	 */
> +	try_module_get(THIS_MODULE);
> +	return 0;
> +}
> +
> +static int gzvm_dev_release(struct inode *inode, struct file *file)
> +{
> +	module_put(THIS_MODULE);
> +	return 0;
> +}
> +
> +static const struct file_operations gzvm_chardev_ops = {
> +	.llseek		= noop_llseek,
> +	.open		= gzvm_dev_open,
> +	.release	= gzvm_dev_release,
> +};
> +
> +static struct miscdevice gzvm_dev = {
> +	.minor = MISC_DYNAMIC_MINOR,
> +	.name = KBUILD_MODNAME,
> +	.fops = &gzvm_chardev_ops,
> +};
> +
> +static int gzvm_drv_probe(struct platform_device *pdev)
> +{
> +	if (gzvm_arch_probe(gzvm_drv.drv_version, &gzvm_drv.hyp_version) != 0) {
> +		dev_err(&pdev->dev, "Not found available conduit\n");

So you can autodetect your hypervisor? Why your soc info drivers cannot
instantiate this device thus removing any need for fake DT node (fake
because no resources and used only to satisfy Linux driver instantiation)?


> +		return -ENODEV;
> +	}
> +
> +	pr_debug("Found GenieZone hypervisor version %u.%u.%llu\n",
> +		 gzvm_drv.hyp_version.major, gzvm_drv.hyp_version.minor,
> +		 gzvm_drv.hyp_version.sub);
> +
> +	return misc_register(&gzvm_dev);
> +}
> +
> +static void gzvm_drv_remove(struct platform_device *pdev)
> +{
> +	misc_deregister(&gzvm_dev);
> +}
> +
> +static const struct of_device_id gzvm_of_match[] = {
> +	{ .compatible = "mediatek,geniezone" },
> +	{/* sentinel */},
> +};
> +
> +static struct platform_driver gzvm_driver = {
> +	.probe = gzvm_drv_probe,
> +	.remove = gzvm_drv_remove,
> +	.driver = {
> +		.name = KBUILD_MODNAME,
> +		.of_match_table = gzvm_of_match,
> +	},
> +};
> +
> +module_platform_driver(gzvm_driver);
> +
> +MODULE_DEVICE_TABLE(of, gzvm_of_match);

This is immediately after next to ID table. Never in different place, so
I wonder from which obscure code did you copy it and what other issues
like that we can find...

> +MODULE_AUTHOR("MediaTek");
> +MODULE_DESCRIPTION("GenieZone interface for VMM");
> +MODULE_LICENSE("GPL");
Best regards,
Krzysztof

  reply	other threads:[~2024-12-11  8:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 10:07 [PATCH v13 00/25] GenieZone hypervisor drivers Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 01/25] virt: geniezone: enable gzvm-ko in defconfig Liju-clr Chen
2024-12-11  8:38   ` Krzysztof Kozlowski
2024-12-13  5:57     ` Liju-clr Chen (陳麗如)
2024-11-14 10:07 ` [PATCH v13 02/25] docs: geniezone: Introduce GenieZone hypervisor Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 03/25] dt-bindings: hypervisor: Add MediaTek " Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 04/25] virt: geniezone: Add GenieZone hypervisor driver Liju-clr Chen
2024-12-11  8:44   ` Krzysztof Kozlowski [this message]
2025-08-12  7:04     ` Liju-clr Chen (陳麗如)
2025-08-12  7:23       ` Krzysztof Kozlowski
2025-08-12  8:39         ` Liju-clr Chen (陳麗如)
2025-08-12  7:32       ` Krzysztof Kozlowski
2025-08-14  3:27         ` Liju-clr Chen (陳麗如)
2024-11-14 10:07 ` [PATCH v13 05/25] virt: geniezone: Add vm support Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 06/25] virt: geniezone: Add set_user_memory_region for vm Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 07/25] virt: geniezone: Add vm capability check Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 08/25] virt: geniezone: Add vcpu support Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 09/25] virt: geniezone: Add irqchip support for virtual interrupt injection Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 10/25] virt: geniezone: Add irqfd support Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 11/25] virt: geniezone: Add ioeventfd support Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 12/25] virt: geniezone: Add memory region purpose for hypervisor Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 13/25] virt: geniezone: Add dtb config support Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 14/25] virt: geniezone: Optimize performance of protected VM memory Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 15/25] virt: geniezone: Add memory pin/unpin support Liju-clr Chen
2024-12-17 10:58   ` Hillf Danton
2024-11-14 10:07 ` [PATCH v13 16/25] virt: geniezone: Add demand paging support Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 17/25] virt: geniezone: Add block-based " Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 18/25] virt: geniezone: Add memory relinquish support Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 19/25] virt: geniezone: Provide individual VM memory statistics within debugfs Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 20/25] virt: geniezone: Add tracing support for hyp call and vcpu exit_reason Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 21/25] virt: geniezone: Enable PTP for synchronizing time between host and guest VMs Liju-clr Chen
2024-11-14 10:07 ` [PATCH v13 22/25] virt: geniezone: Add support for virtual timer migration Liju-clr Chen
2024-11-14 10:08 ` [PATCH v13 23/25] virt: geniezone: Add support for guest VM CPU idle Liju-clr Chen
2024-12-17 10:45   ` Hillf Danton
2024-11-14 10:08 ` [PATCH v13 24/25] virt: geniezone: Emulate IPI for guest VM Liju-clr Chen
2024-11-14 10:08 ` [PATCH v13 25/25] virt: geniezone: Reduce blocked duration in hypervisor when destroying a VM Liju-clr Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b79d4b5-ba91-41a0-90d1-c64bcab53cec@kernel.org \
    --to=krzk@kernel.org \
    --cc=Chi-shen.Yeh@mediatek.com \
    --cc=Kevenny.Hsieh@mediatek.com \
    --cc=PeiLun.Suei@mediatek.com \
    --cc=Yingshiuan.Pan@mediatek.com \
    --cc=Ze-yu.Wang@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=liju-clr.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mhiramat@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=shawn.hsiao@mediatek.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®