* [PATCH] accel/amdxdna: Block running under a hypervisor
@ 2025-12-13 5:44 Mario Limonciello (AMD)
2025-12-13 19:45 ` Lizhi Hou
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello (AMD) @ 2025-12-13 5:44 UTC (permalink / raw)
To: mario.limonciello, mamin506, lizhi.hou, ogabbay
Cc: Mario Limonciello (AMD), dri-devel
SVA support is required, which isn't configured by hypervisor
solutions.
Closes: https://github.com/QubesOS/qubes-issues/issues/10275
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4656
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
drivers/accel/amdxdna/aie2_pci.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
index ceef1c502e9e2..d892b412e4c0e 100644
--- a/drivers/accel/amdxdna/aie2_pci.c
+++ b/drivers/accel/amdxdna/aie2_pci.c
@@ -17,6 +17,7 @@
#include <linux/iopoll.h>
#include <linux/pci.h>
#include <linux/xarray.h>
+#include <asm/hypervisor.h>
#include "aie2_msg_priv.h"
#include "aie2_pci.h"
@@ -508,6 +509,11 @@ static int aie2_init(struct amdxdna_dev *xdna)
unsigned long bars = 0;
int i, nvec, ret;
+ if (!hypervisor_is_type(X86_HYPER_NATIVE)) {
+ XDNA_ERR(xdna, "Running under hypervisor not supported");
+ return -EINVAL;
+ }
+
ndev = drmm_kzalloc(&xdna->ddev, sizeof(*ndev), GFP_KERNEL);
if (!ndev)
return -ENOMEM;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] accel/amdxdna: Block running under a hypervisor
2025-12-13 5:44 [PATCH] accel/amdxdna: Block running under a hypervisor Mario Limonciello (AMD)
@ 2025-12-13 19:45 ` Lizhi Hou
2025-12-15 19:38 ` Mario Limonciello
0 siblings, 1 reply; 3+ messages in thread
From: Lizhi Hou @ 2025-12-13 19:45 UTC (permalink / raw)
To: Mario Limonciello (AMD), mario.limonciello, mamin506, ogabbay; +Cc: dri-devel
On 12/12/25 21:44, Mario Limonciello (AMD) wrote:
> SVA support is required, which isn't configured by hypervisor
> solutions.
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
I think it is because aie2 can not load firmware in hypervisor solutions.
Lizhi
>
> Closes: https://github.com/QubesOS/qubes-issues/issues/10275
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4656
> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
> ---
> drivers/accel/amdxdna/aie2_pci.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
> index ceef1c502e9e2..d892b412e4c0e 100644
> --- a/drivers/accel/amdxdna/aie2_pci.c
> +++ b/drivers/accel/amdxdna/aie2_pci.c
> @@ -17,6 +17,7 @@
> #include <linux/iopoll.h>
> #include <linux/pci.h>
> #include <linux/xarray.h>
> +#include <asm/hypervisor.h>
>
> #include "aie2_msg_priv.h"
> #include "aie2_pci.h"
> @@ -508,6 +509,11 @@ static int aie2_init(struct amdxdna_dev *xdna)
> unsigned long bars = 0;
> int i, nvec, ret;
>
> + if (!hypervisor_is_type(X86_HYPER_NATIVE)) {
> + XDNA_ERR(xdna, "Running under hypervisor not supported");
> + return -EINVAL;
> + }
> +
> ndev = drmm_kzalloc(&xdna->ddev, sizeof(*ndev), GFP_KERNEL);
> if (!ndev)
> return -ENOMEM;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] accel/amdxdna: Block running under a hypervisor
2025-12-13 19:45 ` Lizhi Hou
@ 2025-12-15 19:38 ` Mario Limonciello
0 siblings, 0 replies; 3+ messages in thread
From: Mario Limonciello @ 2025-12-15 19:38 UTC (permalink / raw)
To: Lizhi Hou, mario.limonciello, mamin506, ogabbay; +Cc: dri-devel
On 12/13/25 1:45 PM, Lizhi Hou wrote:
> On 12/12/25 21:44, Mario Limonciello (AMD) wrote:
>> SVA support is required, which isn't configured by hypervisor
>> solutions.
>
> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
>
> I think it is because aie2 can not load firmware in hypervisor solutions.
>
Thanks. Pushed to drm-misc-fixes.
7bbf6d15e935a accel/amdxdna: Block running under a hypervisor
>
> Lizhi
>
>>
>> Closes: https://github.com/QubesOS/qubes-issues/issues/10275
>> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4656
>> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
>> ---
>> drivers/accel/amdxdna/aie2_pci.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/
>> aie2_pci.c
>> index ceef1c502e9e2..d892b412e4c0e 100644
>> --- a/drivers/accel/amdxdna/aie2_pci.c
>> +++ b/drivers/accel/amdxdna/aie2_pci.c
>> @@ -17,6 +17,7 @@
>> #include <linux/iopoll.h>
>> #include <linux/pci.h>
>> #include <linux/xarray.h>
>> +#include <asm/hypervisor.h>
>> #include "aie2_msg_priv.h"
>> #include "aie2_pci.h"
>> @@ -508,6 +509,11 @@ static int aie2_init(struct amdxdna_dev *xdna)
>> unsigned long bars = 0;
>> int i, nvec, ret;
>> + if (!hypervisor_is_type(X86_HYPER_NATIVE)) {
>> + XDNA_ERR(xdna, "Running under hypervisor not supported");
>> + return -EINVAL;
>> + }
>> +
>> ndev = drmm_kzalloc(&xdna->ddev, sizeof(*ndev), GFP_KERNEL);
>> if (!ndev)
>> return -ENOMEM;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-15 19:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-13 5:44 [PATCH] accel/amdxdna: Block running under a hypervisor Mario Limonciello (AMD)
2025-12-13 19:45 ` Lizhi Hou
2025-12-15 19:38 ` Mario Limonciello
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.