Add a pointer hv_synic_eventring_tail to track the tail pointer for the
SynIC event ring buffer for each SINT.
This will be used by the mshv driver, but must be tracked independently
since the driver module could be removed and re-inserted.
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
---
drivers/hv/hv_common.c | 34 ++++++++++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index 252fd66ad4db..2763cb6d3678 100644
--- a/drivers/hv/hv_common.c
+++ b/drivers/hv/hv_common.c
@@ -68,6 +68,16 @@ static void hv_kmsg_dump_unregister(void);
static struct ctl_table_header *hv_ctl_table_hdr;
+/*
+ * Per-cpu array holding the tail pointer for the SynIC event ring buffer
+ * for each SINT.
+ *
+ * We cannot maintain this in mshv driver because the tail pointer should
+ * persist even if the mshv driver is unloaded.
+ */
+u8 __percpu **hv_synic_eventring_tail;
+EXPORT_SYMBOL_GPL(hv_synic_eventring_tail);
+
/*
* Hyper-V specific initialization and shutdown code that is
* common across all architectures. Called from architecture
@@ -90,6 +100,9 @@ void __init hv_common_free(void)
free_percpu(hyperv_pcpu_input_arg);
hyperv_pcpu_input_arg = NULL;
+
+ free_percpu(hv_synic_eventring_tail);
+ hv_synic_eventring_tail = NULL;
}
/*
@@ -372,6 +385,11 @@ int __init hv_common_init(void)
BUG_ON(!hyperv_pcpu_output_arg);
}
+ if (hv_root_partition()) {
+ hv_synic_eventring_tail = alloc_percpu(u8 *);
+ BUG_ON(hv_synic_eventring_tail == NULL);
+ }
+
hv_vp_index = kmalloc_array(nr_cpu_ids, sizeof(*hv_vp_index),
GFP_KERNEL);
if (!hv_vp_index) {
@@ -460,6 +478,7 @@ void __init ms_hyperv_late_init(void)
int hv_common_cpu_init(unsigned int cpu)
{
void **inputarg, **outputarg;
+ u8 **synic_eventring_tail;
u64 msr_vp_index;
gfp_t flags;
const int pgcount = hv_output_page_exists() ? 2 : 1;
@@ -472,8 +491,8 @@ int hv_common_cpu_init(unsigned int cpu)
inputarg = (void **)this_cpu_ptr(hyperv_pcpu_input_arg);
/*
- * hyperv_pcpu_input_arg and hyperv_pcpu_output_arg memory is already
- * allocated if this CPU was previously online and then taken offline
+ * The per-cpu memory is already allocated if this CPU was previously
+ * online and then taken offline
*/
if (!*inputarg) {
mem = kmalloc(pgcount * HV_HYP_PAGE_SIZE, flags);
@@ -485,6 +504,17 @@ int hv_common_cpu_init(unsigned int cpu)
*outputarg = (char *)mem + HV_HYP_PAGE_SIZE;
}
+ if (hv_root_partition()) {
+ synic_eventring_tail = (u8 **)this_cpu_ptr(hv_synic_eventring_tail);
+ *synic_eventring_tail = kcalloc(HV_SYNIC_SINT_COUNT,
+ sizeof(u8), flags);
+
+ if (unlikely(!*synic_eventring_tail)) {
+ kfree(mem);
+ return -ENOMEM;
+ }
+ }
+
if (!ms_hyperv.paravisor_present &&
(hv_isolation_type_snp() || hv_isolation_type_tdx())) {
ret = set_memory_decrypted((unsigned long)mem, pgcount);
--
2.34.1
On Thu, Feb 27, 2025 at 7:09 AM Nuno Das Neves
<nunodasneves@linux.microsoft.com> wrote:
>
> Add a pointer hv_synic_eventring_tail to track the tail pointer for the
> SynIC event ring buffer for each SINT.
>
> This will be used by the mshv driver, but must be tracked independently
> since the driver module could be removed and re-inserted.
>
> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
> Reviewed-by: Wei Liu <wei.liu@kernel.org>
It's better to expose a function to check the tail instead of exposing
hv_synic_eventring_tail directly.
BTW, how does mshv driver use hv_synic_eventring_tail? Which patch
uses it in this series?
Thanks.
> ---
> drivers/hv/hv_common.c | 34 ++++++++++++++++++++++++++++++++--
> 1 file changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
> index 252fd66ad4db..2763cb6d3678 100644
> --- a/drivers/hv/hv_common.c
> +++ b/drivers/hv/hv_common.c
> @@ -68,6 +68,16 @@ static void hv_kmsg_dump_unregister(void);
>
> static struct ctl_table_header *hv_ctl_table_hdr;
>
> +/*
> + * Per-cpu array holding the tail pointer for the SynIC event ring buffer
> + * for each SINT.
> + *
> + * We cannot maintain this in mshv driver because the tail pointer should
> + * persist even if the mshv driver is unloaded.
> + */
> +u8 __percpu **hv_synic_eventring_tail;
> +EXPORT_SYMBOL_GPL(hv_synic_eventring_tail);
> +
> /*
> * Hyper-V specific initialization and shutdown code that is
> * common across all architectures. Called from architecture
> @@ -90,6 +100,9 @@ void __init hv_common_free(void)
>
> free_percpu(hyperv_pcpu_input_arg);
> hyperv_pcpu_input_arg = NULL;
> +
> + free_percpu(hv_synic_eventring_tail);
> + hv_synic_eventring_tail = NULL;
> }
>
> /*
> @@ -372,6 +385,11 @@ int __init hv_common_init(void)
> BUG_ON(!hyperv_pcpu_output_arg);
> }
>
> + if (hv_root_partition()) {
> + hv_synic_eventring_tail = alloc_percpu(u8 *);
> + BUG_ON(hv_synic_eventring_tail == NULL);
> + }
> +
> hv_vp_index = kmalloc_array(nr_cpu_ids, sizeof(*hv_vp_index),
> GFP_KERNEL);
> if (!hv_vp_index) {
> @@ -460,6 +478,7 @@ void __init ms_hyperv_late_init(void)
> int hv_common_cpu_init(unsigned int cpu)
> {
> void **inputarg, **outputarg;
> + u8 **synic_eventring_tail;
> u64 msr_vp_index;
> gfp_t flags;
> const int pgcount = hv_output_page_exists() ? 2 : 1;
> @@ -472,8 +491,8 @@ int hv_common_cpu_init(unsigned int cpu)
> inputarg = (void **)this_cpu_ptr(hyperv_pcpu_input_arg);
>
> /*
> - * hyperv_pcpu_input_arg and hyperv_pcpu_output_arg memory is already
> - * allocated if this CPU was previously online and then taken offline
> + * The per-cpu memory is already allocated if this CPU was previously
> + * online and then taken offline
> */
> if (!*inputarg) {
> mem = kmalloc(pgcount * HV_HYP_PAGE_SIZE, flags);
> @@ -485,6 +504,17 @@ int hv_common_cpu_init(unsigned int cpu)
> *outputarg = (char *)mem + HV_HYP_PAGE_SIZE;
> }
>
> + if (hv_root_partition()) {
> + synic_eventring_tail = (u8 **)this_cpu_ptr(hv_synic_eventring_tail);
> + *synic_eventring_tail = kcalloc(HV_SYNIC_SINT_COUNT,
> + sizeof(u8), flags);
> +
> + if (unlikely(!*synic_eventring_tail)) {
> + kfree(mem);
> + return -ENOMEM;
> + }
> + }
> +
> if (!ms_hyperv.paravisor_present &&
> (hv_isolation_type_snp() || hv_isolation_type_tdx())) {
> ret = set_memory_decrypted((unsigned long)mem, pgcount);
> --
> 2.34.1
>
>
--
Thanks
Tianyu Lan
On 3/10/2025 6:01 AM, Tianyu Lan wrote:
> On Thu, Feb 27, 2025 at 7:09 AM Nuno Das Neves
> <nunodasneves@linux.microsoft.com> wrote:
>>
>> Add a pointer hv_synic_eventring_tail to track the tail pointer for the
>> SynIC event ring buffer for each SINT.
>>
>> This will be used by the mshv driver, but must be tracked independently
>> since the driver module could be removed and re-inserted.
>>
>> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
>> Reviewed-by: Wei Liu <wei.liu@kernel.org>
>
> It's better to expose a function to check the tail instead of exposing
> hv_synic_eventring_tail directly.
>
What is the advantage of using a function for this? We need to both set
and get the tail.
> BTW, how does mshv driver use hv_synic_eventring_tail? Which patch
> uses it in this series?
>
This variable stores indices into the synic eventring page (one for each
SINT, and per-cpu). Each SINT has a ringbuffer of u32 messages. The tail
index points to the latest one.
This is only used for doorbell messages today. The message in this case is
a port number which is used to lookup and invoke a callback, which signals
ioeventfd(s), to notify the VMM of a guest MMIO write.
It is used in patch 10.
Thanks
Nuno
> Thanks.
>
>
>> ---
>> drivers/hv/hv_common.c | 34 ++++++++++++++++++++++++++++++++--
>> 1 file changed, 32 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
>> index 252fd66ad4db..2763cb6d3678 100644
>> --- a/drivers/hv/hv_common.c
>> +++ b/drivers/hv/hv_common.c
>> @@ -68,6 +68,16 @@ static void hv_kmsg_dump_unregister(void);
>>
>> static struct ctl_table_header *hv_ctl_table_hdr;
>>
>> +/*
>> + * Per-cpu array holding the tail pointer for the SynIC event ring buffer
>> + * for each SINT.
>> + *
>> + * We cannot maintain this in mshv driver because the tail pointer should
>> + * persist even if the mshv driver is unloaded.
>> + */
>> +u8 __percpu **hv_synic_eventring_tail;
>> +EXPORT_SYMBOL_GPL(hv_synic_eventring_tail);
>> +
>> /*
>> * Hyper-V specific initialization and shutdown code that is
>> * common across all architectures. Called from architecture
>> @@ -90,6 +100,9 @@ void __init hv_common_free(void)
>>
>> free_percpu(hyperv_pcpu_input_arg);
>> hyperv_pcpu_input_arg = NULL;
>> +
>> + free_percpu(hv_synic_eventring_tail);
>> + hv_synic_eventring_tail = NULL;
>> }
>>
>> /*
>> @@ -372,6 +385,11 @@ int __init hv_common_init(void)
>> BUG_ON(!hyperv_pcpu_output_arg);
>> }
>>
>> + if (hv_root_partition()) {
>> + hv_synic_eventring_tail = alloc_percpu(u8 *);
>> + BUG_ON(hv_synic_eventring_tail == NULL);
>> + }
>> +
>> hv_vp_index = kmalloc_array(nr_cpu_ids, sizeof(*hv_vp_index),
>> GFP_KERNEL);
>> if (!hv_vp_index) {
>> @@ -460,6 +478,7 @@ void __init ms_hyperv_late_init(void)
>> int hv_common_cpu_init(unsigned int cpu)
>> {
>> void **inputarg, **outputarg;
>> + u8 **synic_eventring_tail;
>> u64 msr_vp_index;
>> gfp_t flags;
>> const int pgcount = hv_output_page_exists() ? 2 : 1;
>> @@ -472,8 +491,8 @@ int hv_common_cpu_init(unsigned int cpu)
>> inputarg = (void **)this_cpu_ptr(hyperv_pcpu_input_arg);
>>
>> /*
>> - * hyperv_pcpu_input_arg and hyperv_pcpu_output_arg memory is already
>> - * allocated if this CPU was previously online and then taken offline
>> + * The per-cpu memory is already allocated if this CPU was previously
>> + * online and then taken offline
>> */
>> if (!*inputarg) {
>> mem = kmalloc(pgcount * HV_HYP_PAGE_SIZE, flags);
>> @@ -485,6 +504,17 @@ int hv_common_cpu_init(unsigned int cpu)
>> *outputarg = (char *)mem + HV_HYP_PAGE_SIZE;
>> }
>>
>> + if (hv_root_partition()) {
>> + synic_eventring_tail = (u8 **)this_cpu_ptr(hv_synic_eventring_tail);
>> + *synic_eventring_tail = kcalloc(HV_SYNIC_SINT_COUNT,
>> + sizeof(u8), flags);
>> +
>> + if (unlikely(!*synic_eventring_tail)) {
>> + kfree(mem);
>> + return -ENOMEM;
>> + }
>> + }
>> +
>> if (!ms_hyperv.paravisor_present &&
>> (hv_isolation_type_snp() || hv_isolation_type_tdx())) {
>> ret = set_memory_decrypted((unsigned long)mem, pgcount);
>> --
>> 2.34.1
>>
>>
>
>
On Thu, Mar 13, 2025 at 3:45 AM Nuno Das Neves <nunodasneves@linux.microsoft.com> wrote: > > On 3/10/2025 6:01 AM, Tianyu Lan wrote: > > On Thu, Feb 27, 2025 at 7:09 AM Nuno Das Neves > > <nunodasneves@linux.microsoft.com> wrote: > >> > >> Add a pointer hv_synic_eventring_tail to track the tail pointer for the > >> SynIC event ring buffer for each SINT. > >> > >> This will be used by the mshv driver, but must be tracked independently > >> since the driver module could be removed and re-inserted. > >> > >> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> > >> Reviewed-by: Wei Liu <wei.liu@kernel.org> > > > > It's better to expose a function to check the tail instead of exposing > > hv_synic_eventring_tail directly. > > > What is the advantage of using a function for this? We need to both set > and get the tail. We may add lock or check to avoid race conditions and this depends on the user case. This is why I want to see how mshv driver uses it. > > > BTW, how does mshv driver use hv_synic_eventring_tail? Which patch > > uses it in this series? > > > This variable stores indices into the synic eventring page (one for each > SINT, and per-cpu). Each SINT has a ringbuffer of u32 messages. The tail > index points to the latest one. > > This is only used for doorbell messages today. The message in this case is > a port number which is used to lookup and invoke a callback, which signals > ioeventfd(s), to notify the VMM of a guest MMIO write. > > It is used in patch 10. I found "extern u8 __percpu **hv_synic_eventring_tail;" in the drivers/hv/mshv_root.h of patch 10. I seem to miss the code to use it. +int hv_call_unmap_stat_page(enum hv_stats_object_type type, + const union hv_stats_object_identity *identity); +int hv_call_modify_spa_host_access(u64 partition_id, struct page **pages, + u64 page_struct_count, u32 host_access, + u32 flags, u8 acquire); + +extern struct mshv_root mshv_root; +extern enum hv_scheduler_type hv_scheduler_type; +extern u8 __percpu **hv_synic_eventring_tail; + +#endif /* _MSHV_ROOT_H_ */ -- Thanks Tianyu Lan
On 3/13/2025 12:34 AM, Tianyu Lan wrote:
> On Thu, Mar 13, 2025 at 3:45 AM Nuno Das Neves
> <nunodasneves@linux.microsoft.com> wrote:
>>
>> On 3/10/2025 6:01 AM, Tianyu Lan wrote:
>>> On Thu, Feb 27, 2025 at 7:09 AM Nuno Das Neves
>>> <nunodasneves@linux.microsoft.com> wrote:
>>>>
>>>> Add a pointer hv_synic_eventring_tail to track the tail pointer for the
>>>> SynIC event ring buffer for each SINT.
>>>>
>>>> This will be used by the mshv driver, but must be tracked independently
>>>> since the driver module could be removed and re-inserted.
>>>>
>>>> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
>>>> Reviewed-by: Wei Liu <wei.liu@kernel.org>
>>>
>>> It's better to expose a function to check the tail instead of exposing
>>> hv_synic_eventring_tail directly.
>>>
>> What is the advantage of using a function for this? We need to both set
>> and get the tail.
>
> We may add lock or check to avoid race conditions and this depends on the
> user case. This is why I want to see how mshv driver uses it.
>
>>
>>> BTW, how does mshv driver use hv_synic_eventring_tail? Which patch
>>> uses it in this series?
>>>
>> This variable stores indices into the synic eventring page (one for each
>> SINT, and per-cpu). Each SINT has a ringbuffer of u32 messages. The tail
>> index points to the latest one.
>>
>> This is only used for doorbell messages today. The message in this case is
>> a port number which is used to lookup and invoke a callback, which signals
>> ioeventfd(s), to notify the VMM of a guest MMIO write.
>>
>> It is used in patch 10.
>
> I found "extern u8 __percpu **hv_synic_eventring_tail;" in the
> drivers/hv/mshv_root.h of patch 10.
> I seem to miss the code to use it.
>
> +int hv_call_unmap_stat_page(enum hv_stats_object_type type,
> + const union hv_stats_object_identity *identity);
> +int hv_call_modify_spa_host_access(u64 partition_id, struct page **pages,
> + u64 page_struct_count, u32 host_access,
> + u32 flags, u8 acquire);
> +
> +extern struct mshv_root mshv_root;
> +extern enum hv_scheduler_type hv_scheduler_type;
> +extern u8 __percpu **hv_synic_eventring_tail;
> +
> +#endif /* _MSHV_ROOT_H_ */
>
It is used in mshv_synic.c in synic_event_ring_get_queued_port():
diff --git a/drivers/hv/mshv_synic.c b/drivers/hv/mshv_synic.c
new file mode 100644
index 000000000000..e7782f92e339
--- /dev/null
+++ b/drivers/hv/mshv_synic.c
@@ -0,0 +1,665 @@
<snip>
+static u32 synic_event_ring_get_queued_port(u32 sint_index)
+{
+ struct hv_synic_event_ring_page **event_ring_page;
+ volatile struct hv_synic_event_ring *ring;
+ struct hv_synic_pages *spages;
+ u8 **synic_eventring_tail;
+ u32 message;
+ u8 tail;
+
+ spages = this_cpu_ptr(mshv_root.synic_pages);
+ event_ring_page = &spages->synic_event_ring_page;
+ synic_eventring_tail = (u8 **)this_cpu_ptr(hv_synic_eventring_tail);
+ tail = (*synic_eventring_tail)[sint_index];
On Thu, Mar 13, 2025 at 11:56 PM Nuno Das Neves
<nunodasneves@linux.microsoft.com> wrote:
>
> On 3/13/2025 12:34 AM, Tianyu Lan wrote:
> > On Thu, Mar 13, 2025 at 3:45 AM Nuno Das Neves
> > <nunodasneves@linux.microsoft.com> wrote:
> >>
> >> On 3/10/2025 6:01 AM, Tianyu Lan wrote:
> >>> On Thu, Feb 27, 2025 at 7:09 AM Nuno Das Neves
> >>> <nunodasneves@linux.microsoft.com> wrote:
> >>>>
> >>>> Add a pointer hv_synic_eventring_tail to track the tail pointer for the
> >>>> SynIC event ring buffer for each SINT.
> >>>>
> >>>> This will be used by the mshv driver, but must be tracked independently
> >>>> since the driver module could be removed and re-inserted.
> >>>>
> >>>> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
> >>>> Reviewed-by: Wei Liu <wei.liu@kernel.org>
> >>>
> >>> It's better to expose a function to check the tail instead of exposing
> >>> hv_synic_eventring_tail directly.
> >>>
> >> What is the advantage of using a function for this? We need to both set
> >> and get the tail.
> >
> > We may add lock or check to avoid race conditions and this depends on the
> > user case. This is why I want to see how mshv driver uses it.
> >
> >>
> >>> BTW, how does mshv driver use hv_synic_eventring_tail? Which patch
> >>> uses it in this series?
> >>>
> >> This variable stores indices into the synic eventring page (one for each
> >> SINT, and per-cpu). Each SINT has a ringbuffer of u32 messages. The tail
> >> index points to the latest one.
> >>
> >> This is only used for doorbell messages today. The message in this case is
> >> a port number which is used to lookup and invoke a callback, which signals
> >> ioeventfd(s), to notify the VMM of a guest MMIO write.
> >>
> >> It is used in patch 10.
> >
> > I found "extern u8 __percpu **hv_synic_eventring_tail;" in the
> > drivers/hv/mshv_root.h of patch 10.
> > I seem to miss the code to use it.
> >
> > +int hv_call_unmap_stat_page(enum hv_stats_object_type type,
> > + const union hv_stats_object_identity *identity);
> > +int hv_call_modify_spa_host_access(u64 partition_id, struct page **pages,
> > + u64 page_struct_count, u32 host_access,
> > + u32 flags, u8 acquire);
> > +
> > +extern struct mshv_root mshv_root;
> > +extern enum hv_scheduler_type hv_scheduler_type;
> > +extern u8 __percpu **hv_synic_eventring_tail;
> > +
> > +#endif /* _MSHV_ROOT_H_ */
> >
>
> It is used in mshv_synic.c in synic_event_ring_get_queued_port():
>
> diff --git a/drivers/hv/mshv_synic.c b/drivers/hv/mshv_synic.c
> new file mode 100644
> index 000000000000..e7782f92e339
> --- /dev/null
> +++ b/drivers/hv/mshv_synic.c
> @@ -0,0 +1,665 @@
> <snip>
> +static u32 synic_event_ring_get_queued_port(u32 sint_index)
> +{
> + struct hv_synic_event_ring_page **event_ring_page;
> + volatile struct hv_synic_event_ring *ring;
> + struct hv_synic_pages *spages;
> + u8 **synic_eventring_tail;
> + u32 message;
> + u8 tail;
> +
> + spages = this_cpu_ptr(mshv_root.synic_pages);
> + event_ring_page = &spages->synic_event_ring_page;
> + synic_eventring_tail = (u8 **)this_cpu_ptr(hv_synic_eventring_tail);
> + tail = (*synic_eventring_tail)[sint_index];
OK. I got it. Thanks.
--
Thanks
Tianyu Lan
On Wed, Feb 26, 2025 at 03:08:01PM -0800, Nuno Das Neves wrote:
> Add a pointer hv_synic_eventring_tail to track the tail pointer for the
> SynIC event ring buffer for each SINT.
>
> This will be used by the mshv driver, but must be tracked independently
> since the driver module could be removed and re-inserted.
>
> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
> Reviewed-by: Wei Liu <wei.liu@kernel.org>
> ---
> drivers/hv/hv_common.c | 34 ++++++++++++++++++++++++++++++++--
> 1 file changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
> index 252fd66ad4db..2763cb6d3678 100644
> --- a/drivers/hv/hv_common.c
> +++ b/drivers/hv/hv_common.c
> @@ -460,6 +478,7 @@ void __init ms_hyperv_late_init(void)
> int hv_common_cpu_init(unsigned int cpu)
> {
> void **inputarg, **outputarg;
> + u8 **synic_eventring_tail;
> u64 msr_vp_index;
> gfp_t flags;
> const int pgcount = hv_output_page_exists() ? 2 : 1;
> @@ -472,8 +491,8 @@ int hv_common_cpu_init(unsigned int cpu)
> inputarg = (void **)this_cpu_ptr(hyperv_pcpu_input_arg);
>
> /*
> - * hyperv_pcpu_input_arg and hyperv_pcpu_output_arg memory is already
> - * allocated if this CPU was previously online and then taken offline
> + * The per-cpu memory is already allocated if this CPU was previously
> + * online and then taken offline
> */
> if (!*inputarg) {
> mem = kmalloc(pgcount * HV_HYP_PAGE_SIZE, flags);
> @@ -485,6 +504,17 @@ int hv_common_cpu_init(unsigned int cpu)
> *outputarg = (char *)mem + HV_HYP_PAGE_SIZE;
> }
>
> + if (hv_root_partition()) {
> + synic_eventring_tail = (u8 **)this_cpu_ptr(hv_synic_eventring_tail);
> + *synic_eventring_tail = kcalloc(HV_SYNIC_SINT_COUNT,
> + sizeof(u8), flags);
> +
Redundant empty line ^^^
> + if (unlikely(!*synic_eventring_tail)) {
> + kfree(mem);
> + return -ENOMEM;
> + }
> + }
> +
> if (!ms_hyperv.paravisor_present &&
> (hv_isolation_type_snp() || hv_isolation_type_tdx())) {
> ret = set_memory_decrypted((unsigned long)mem, pgcount);
Reviewed-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
> --
> 2.34.1
>
© 2016 - 2026 Red Hat, Inc.