From: <dan.j.williams@intel.com>
To: Roman Kisel <romank@linux.microsoft.com>,
<alok.a.tiwari@oracle.com>, <arnd@arndb.de>, <bp@alien8.de>,
<corbet@lwn.net>, <dave.hansen@linux.intel.com>,
<decui@microsoft.com>, <haiyangz@microsoft.com>, <hpa@zytor.com>,
<kys@microsoft.com>, <mhklinux@outlook.com>, <mingo@redhat.com>,
<rdunlap@infradead.org>, <tglx@linutronix.de>,
<Tianyu.Lan@microsoft.com>, <wei.liu@kernel.org>,
<linux-arch@vger.kernel.org>, <linux-coco@lists.linux.dev>,
<linux-doc@vger.kernel.org>, <linux-hyperv@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <x86@kernel.org>
Cc: <apais@microsoft.com>, <benhill@microsoft.com>,
<bperkins@microsoft.com>, <sunilmut@microsoft.com>
Subject: Re: [PATCH hyperv-next v4 15/16] Drivers: hv: Support establishing the confidential VMBus connection
Date: Tue, 19 Aug 2025 13:26:39 -0700 [thread overview]
Message-ID: <68a4ddff258de_2709100ba@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20250714221545.5615-16-romank@linux.microsoft.com>
Roman Kisel wrote:
> To establish the confidential VMBus connection the CoCo VM guest
> first attempts to connect to the VMBus server run by the paravisor.
> If that fails, the guest falls back to the non-confidential VMBus.
>
> Implement that in the VMBus driver initialization.
>
> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
> ---
> drivers/hv/vmbus_drv.c | 189 ++++++++++++++++++++++++++++-------------
> 1 file changed, 130 insertions(+), 59 deletions(-)
>
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
[..]
> @@ -1401,41 +1474,42 @@ static int vmbus_bus_init(void)
> }
> }
>
> - ret = hv_synic_alloc();
> - if (ret)
> - goto err_alloc;
> -
> - works = alloc_percpu(struct work_struct);
> - if (!works) {
> - ret = -ENOMEM;
> - goto err_alloc;
> - }
> -
> /*
> - * Initialize the per-cpu interrupt state and stimer state.
> - * Then connect to the host.
> + * Attempt to establish the confidential VMBus connection first if this VM is
> + * a hardware confidential VM, and the paravisor is present.
> + *
> + * All scenarios here are:
> + * 1. No paravisor,
> + * 2. Paravisor without VMBus relay, no hardware isolation,
> + * 3. Paravisor without VMBus relay, with hardware isolation,
> + * 4. Paravisor with VMBus relay, no hardware isolation,
> + * 5. Paravisor with VMBus relay, with hardware isolation.
> + *
> + * In the cloud, scenarios 1, 4, 5 are most common, and outside the cloud,
> + * scenario 1 should be the most common at the moment. Detecting of the Confidential
> + * VMBus support below takes that into account running `vmbus_alloc_synic_and_connect()`
> + * only once (barring any faults not related to VMBus) in these cases. That is true
> + * for the scenario 2, too, albeit it might be not as feature-rich as 1, 4, 5.
> + *
> + * However, the code will be doing much more work in scenario 3 where it will have to
> + * first initialize lots of structures for every CPU only to likely tear them down later
> + * and start again, now without attempting to use Confidential VMBus, thus taking a
> + * performance hit. Such systems are rather uncomoon today, don't support more than
> + * ~300 CPUs, and are rarely used with many dozens of CPUs. As the time goes on, that
> + * will be even less common. Hence, the preference is to not specialize the code for
> + * that scenario.
I read this blurb looking for answers to my question below, no luck, and
left further wondering what is the comment trying to convey to future
maintenance?
> */
> - cpus_read_lock();
> - for_each_online_cpu(cpu) {
> - struct work_struct *work = per_cpu_ptr(works, cpu);
> + ret = -ENODEV;
> + if (ms_hyperv.paravisor_present && (hv_isolation_type_tdx() || hv_isolation_type_snp())) {
> + is_confidential = true;
In comparison to PCIe TDISP where there is an explicit validation step
of cryptographic evidence that the platform is what it claims to be, I
am missing the same for this.
I would expect something like a paravisor signed golden measurement with
a certificate that can be built-in to the kernel to validate that "yes,
in addition to the platform claims that can be emulated, this bus
enumeration is signed by an authority this kernel image trusts."
My motivation for commenting here is for alignment purposes with the
PCIe TDISP enabling and wider concerns about accepting other devices for
private operation. Specifically, I want to align on a shared
representation in the device-core (struct device) to communicate that a
device is either on a bus that has been accepted for private operation
(confidential-vmbus today, potentially signed-ACPI-devices tomorrow), or
is a device that has been individually accepted for private operation
(PCIe TDISP). In both cases there needs to be either a golden
measurement mechanism built-in, or a userspace acceptance dependency in
the flow.
Otherwise what mitigates a guest conveying secrets to a device that is
merely emulating a trusted bus/device?
next prev parent reply other threads:[~2025-08-19 20:26 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 22:15 [PATCH hyperv-next v4 00/16] Confidential VMBus Roman Kisel
2025-07-14 22:15 ` [PATCH hyperv-next v4 01/16] Documentation: hyperv: " Roman Kisel
2025-07-22 17:43 ` Michael Kelley
2025-07-14 22:15 ` [PATCH hyperv-next v4 02/16] drivers: hv: VMBus protocol version 6.0 Roman Kisel
2025-07-22 17:43 ` Michael Kelley
2025-07-14 22:15 ` [PATCH hyperv-next v4 03/16] arch: hyperv: Get/set SynIC synth.registers via paravisor Roman Kisel
2025-07-15 12:46 ` kernel test robot
2025-07-22 17:43 ` Michael Kelley
2025-07-14 22:15 ` [PATCH hyperv-next v4 04/16] arch/x86: mshyperv: Trap on access for some synthetic MSRs Roman Kisel
2025-07-15 17:58 ` kernel test robot
2025-07-22 17:43 ` Michael Kelley
2025-07-25 8:04 ` Tianyu Lan
2025-07-14 22:15 ` [PATCH hyperv-next v4 05/16] Drivers: hv: Rename fields for SynIC message and event pages Roman Kisel
2025-07-15 21:46 ` kernel test robot
2025-07-22 17:44 ` Michael Kelley
2025-07-25 8:18 ` Tianyu Lan
2025-07-14 22:15 ` [PATCH hyperv-next v4 06/16] Drivers: hv: Allocate the paravisor SynIC pages when required Roman Kisel
2025-07-22 17:44 ` Michael Kelley
2025-07-25 8:23 ` Tianyu Lan
2025-07-14 22:15 ` [PATCH hyperv-next v4 07/16] Drivers: hv: Post messages through the confidential VMBus if available Roman Kisel
2025-07-22 17:44 ` Michael Kelley
2025-07-25 11:07 ` Tianyu Lan
2025-07-14 22:15 ` [PATCH hyperv-next v4 08/16] Drivers: hv: remove stale comment Roman Kisel
2025-07-22 17:44 ` Michael Kelley
2025-07-25 11:08 ` Tianyu Lan
2025-07-14 22:15 ` [PATCH hyperv-next v4 09/16] Drivers: hv: Check message and event pages for non-NULL before iounmap() Roman Kisel
2025-07-22 17:44 ` Michael Kelley
2025-07-25 11:14 ` Tianyu Lan
2025-07-14 22:15 ` [PATCH hyperv-next v4 10/16] Drivers: hv: Rename the SynIC enable and disable routines Roman Kisel
2025-07-22 17:44 ` Michael Kelley
2025-07-25 11:21 ` Tianyu Lan
2025-07-14 22:15 ` [PATCH hyperv-next v4 11/16] Drivers: hv: Functions for setting up and tearing down the paravisor SynIC Roman Kisel
2025-07-22 17:44 ` Michael Kelley
2025-07-14 22:15 ` [PATCH hyperv-next v4 12/16] Drivers: hv: Allocate encrypted buffers when requested Roman Kisel
2025-07-22 17:44 ` Michael Kelley
2025-07-25 14:40 ` Tianyu Lan
2025-07-14 22:15 ` [PATCH hyperv-next v4 13/16] Drivers: hv: Free msginfo when the buffer fails to decrypt Roman Kisel
2025-07-22 17:45 ` Michael Kelley
2025-07-14 22:15 ` [PATCH hyperv-next v4 14/16] Drivers: hv: Support confidential VMBus channels Roman Kisel
2025-07-22 17:45 ` Michael Kelley
2025-07-14 22:15 ` [PATCH hyperv-next v4 15/16] Drivers: hv: Support establishing the confidential VMBus connection Roman Kisel
2025-07-22 17:45 ` Michael Kelley
2025-08-19 20:26 ` dan.j.williams [this message]
2025-08-25 22:21 ` Roman Kisel
2025-08-25 23:00 ` dan.j.williams
2025-08-25 23:34 ` Roman Kisel
2025-08-25 23:57 ` dan.j.williams
2025-08-25 22:41 ` Roman Kisel
2025-07-14 22:15 ` [PATCH hyperv-next v4 16/16] Drivers: hv: Set the default VMBus version to 6.0 Roman Kisel
2025-07-22 17:45 ` Michael Kelley
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=68a4ddff258de_2709100ba@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=Tianyu.Lan@microsoft.com \
--cc=alok.a.tiwari@oracle.com \
--cc=apais@microsoft.com \
--cc=arnd@arndb.de \
--cc=benhill@microsoft.com \
--cc=bp@alien8.de \
--cc=bperkins@microsoft.com \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kys@microsoft.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhklinux@outlook.com \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=romank@linux.microsoft.com \
--cc=sunilmut@microsoft.com \
--cc=tglx@linutronix.de \
--cc=wei.liu@kernel.org \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).