All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sairaj Kodilkar <sarunkod@amd.com>
To: Vasant Hegde <vasant.hegde@amd.com>, <qemu-devel@nongnu.org>
Cc: <sarunkod@amd.com>, <alejandro.j.jimenez@oracle.com>,
	<pbonzini@redhat.com>, <richard.henderson@linaro.org>,
	<eduardo@habkost.net>,  <mst@redhat.com>,
	<marcel.apfelbaum@gmail.com>, <clement.mathieu--drif@eviden.com>
Subject: Re: [PATCH v3 3/3] amd_iommu: Generate XT interrupts when xt support is enabled
Date: Tue, 3 Mar 2026 15:25:17 +0530	[thread overview]
Message-ID: <6bb7196c-3f0e-4164-ae3b-fd780c40c933@amd.com> (raw)
In-Reply-To: <2c022a3c-f0e0-42be-a946-760a6e938de5@amd.com>



On 3/3/2026 3:17 PM, Vasant Hegde wrote:
>
> On 3/2/2026 5:21 PM, Sairaj Kodilkar wrote:
>> When MMIO 0x18[IntCapXTEn]=1, interrupts originating from the IOMMU itself are
>> sent based on the programming in XT IOMMU Interrupt Control Registers in MMIO
>> 0x170-0x180 instead of the programming in the IOMMU's MSI capability registers.
>> The guest programs these registers with appropriate vector and destination
>> ID instead of writing to PCI MSI capability.
>>
>> Current AMD vIOMMU is capable of generating interrupts only through PCI
>> MSI capability and does not care about xt mode. Because of this AMD
>> vIOMMU cannot generate event log interrupts when the guest has enabled
>> xt mode.
>>
>> Introduce a new flag "intcapxten" which is set when guest writes control
>> register [IntCapXTEn] (bit 51) and use vector and destination field in
>> the XT MMIO register (0x170) to support XT mode.
>>
>> Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
>> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
>> Reviewed-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
>> ---
>>   hw/i386/amd_iommu.c  | 47 ++++++++++++++++++++++++++++++++++++++------
>>   hw/i386/amd_iommu.h  | 17 ++++++++++++++++
>>   hw/i386/trace-events |  1 +
>>   3 files changed, 59 insertions(+), 6 deletions(-)
>>
> .../...
>
>>   
>>       /* update the flags depending on the control register */
>>       if (s->cmdbuf_enabled) {
>> @@ -1732,6 +1762,9 @@ static void amdvi_mmio_write(void *opaque, hwaddr addr, uint64_t val,
>>       case AMDVI_MMIO_STATUS:
>>           amdvi_mmio_reg_write(s, size, val, addr);
>>           break;
>> +    case AMDVI_MMIO_XT_GEN_INTR:
>> +        amdvi_mmio_reg_write(s, size, val, addr);
>> +        break;
>>       }
>>   }
>>   
>> @@ -2382,6 +2415,7 @@ static void amdvi_init(AMDVIState *s)
>>       s->enabled = false;
>>       s->cmdbuf_enabled = false;
>>       s->xten = false;
>> +    s->intcapxten = false;
>>   
>>       /* reset MMIO */
>>       memset(s->mmior, 0, AMDVI_MMIO_SIZE);
>> @@ -2452,6 +2486,7 @@ static const VMStateDescription vmstate_xt = {
>>          .minimum_version_id = 1,
>>          .fields = (VMStateField[]) {
>>              VMSTATE_BOOL(xten, AMDVIState),
>> +           VMSTATE_BOOL(intcapxten, AMDVIState),
> Do we need to increase the version no?

No, because we have introduced a separate subsection, the older and newer
qemu are compatible.

Thanks
Sairaj


  reply	other threads:[~2026-03-03 10:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 11:51 [PATCH v3 0/3] amd_iommu: Support Generation of IOMMU XT interrupts Sairaj Kodilkar
2026-03-02 11:51 ` [PATCH v3 1/3] amd_iommu: Use switch case to determine mmio register name Sairaj Kodilkar
2026-03-12 21:59   ` Alejandro Jimenez
2026-03-13  0:36     ` Alejandro Jimenez
2026-03-13  4:49     ` Sairaj Kodilkar
2026-03-02 11:51 ` [PATCH v3 2/3] amd_iommu: Turn on XT support only when guest has enabled it Sairaj Kodilkar
2026-03-03  9:39   ` Vasant Hegde
2026-03-03 10:20     ` Sairaj Kodilkar
2026-03-02 11:51 ` [PATCH v3 3/3] amd_iommu: Generate XT interrupts when xt support is enabled Sairaj Kodilkar
2026-03-03  9:47   ` Vasant Hegde
2026-03-03  9:55     ` Sairaj Kodilkar [this message]
2026-03-13  0:16       ` Alejandro Jimenez
2026-03-13  5:20         ` Sairaj Kodilkar
2026-03-13 16:17           ` Alejandro Jimenez
2026-03-16  7:04             ` Sairaj Kodilkar
2026-03-17  1:10 ` [PATCH v3 0/3] amd_iommu: Support Generation of IOMMU XT interrupts Alejandro Jimenez

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=6bb7196c-3f0e-4164-ae3b-fd780c40c933@amd.com \
    --to=sarunkod@amd.com \
    --cc=alejandro.j.jimenez@oracle.com \
    --cc=clement.mathieu--drif@eviden.com \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=vasant.hegde@amd.com \
    /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 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.