All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Kulke <magnuskulke@linux.microsoft.com>
To: Aastha Rawat <aastharawat@linux.microsoft.com>
Cc: qemu-devel@nongnu.org, "Wei Liu" <wei.liu@kernel.org>,
	"Doru Blânzeanu" <dblanzeanu@linux.microsoft.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Anirudh Rayabharam" <anirudh@anirudhrb.com>,
	qemu-arm@nongnu.org, "Alexander Graf" <agraf@csgraf.de>,
	"Pedro Barbuda" <pbarbuda@microsoft.com>,
	"Mohamed Mediouni" <mohamed@unpredictable.fr>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: Re: [PATCH v6 12/14] include/hw/hyperv: adjust hv_interrupt_control structure for arm64
Date: Fri, 20 Nov 2026 16:41:33 +0100	[thread overview]
Message-ID: <awBqLXipVEZTlj4g@example.com> (raw)
In-Reply-To: <20261001-mshv_accel_arm64_supp-v6-12-aefe5e76a0e3@linux.microsoft.com>

On Thu, Oct 01, 2026 at 10:52:57AM +0000, Aastha Rawat wrote:
> From: "Anirudh Rayabharam (Microsoft)" <anirudh@anirudhrb.com>
> 
> Add the arm64 specific fields to the hv_interrupt_control struct and
> adjust the existing usage accordingly. mshv_request_interrupt is only
> needed only for x86 so compile it out entirely for arm64.
> 
> Signed-off-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
> ---
>  accel/mshv/irq.c               |  2 ++
>  include/hw/hyperv/hvgdk_mini.h | 24 ++++++++++++++++++++++++
>  include/system/mshv.h          |  2 ++
>  3 files changed, 28 insertions(+)
> 
> diff --git a/accel/mshv/irq.c b/accel/mshv/irq.c
> index 4828ac51ac..f18e6a0f66 100644
> --- a/accel/mshv/irq.c
> +++ b/accel/mshv/irq.c
> @@ -259,6 +259,7 @@ int mshv_irqchip_update_msi_route(int virq, MSIMessage msg, PCIDevice *dev)
>      return 0;
>  }
>  
> +#if defined(__x86_64__)

if it's arch-specific then we probably want to move this to
target/i386/mshv

>  int mshv_request_interrupt(MshvState *mshv_state, uint32_t interrupt_type, uint32_t vector,
>                             uint32_t vp_index, bool logical_dest_mode,
>                             bool level_triggered)
> @@ -295,6 +296,7 @@ int mshv_request_interrupt(MshvState *mshv_state, uint32_t interrupt_type, uint3
>      }
>      return 0;
>  }
> +#endif
>  
>  void mshv_irqchip_commit_routes(MshvState *s)
>  {
> diff --git a/include/hw/hyperv/hvgdk_mini.h b/include/hw/hyperv/hvgdk_mini.h
> index 53dc58813e..d81c9816e7 100644
> --- a/include/hw/hyperv/hvgdk_mini.h
> +++ b/include/hw/hyperv/hvgdk_mini.h
> @@ -543,14 +543,38 @@ typedef struct hv_input_set_vp_registers {
>  } QEMU_PACKED hv_input_set_vp_registers;
>  
>  #define MSHV_VP_MAX_REGISTERS   128
> +enum hv_interrupt_type {

maybe we don't need those defines, since the values are prefixed with
the arch name?

> +#if defined(__x86_64__)
> +    HV_X64_INTERRUPT_TYPE_FIXED             = 0x0000,
> +    HV_X64_INTERRUPT_TYPE_LOWESTPRIORITY    = 0x0001,
> +    HV_X64_INTERRUPT_TYPE_SMI               = 0x0002,
> +    HV_X64_INTERRUPT_TYPE_REMOTEREAD        = 0x0003,
> +    HV_X64_INTERRUPT_TYPE_NMI               = 0x0004,
> +    HV_X64_INTERRUPT_TYPE_INIT              = 0x0005,
> +    HV_X64_INTERRUPT_TYPE_SIPI              = 0x0006,
> +    HV_X64_INTERRUPT_TYPE_EXTINT            = 0x0007,
> +    HV_X64_INTERRUPT_TYPE_LOCALINT0         = 0x0008,
> +    HV_X64_INTERRUPT_TYPE_LOCALINT1         = 0x0009,
> +    HV_X64_INTERRUPT_TYPE_MAXIMUM           = 0x000A,
> +#elif defined(__aarch64__)
> +    HV_ARM64_INTERRUPT_TYPE_FIXED           = 0x0000,
> +    HV_ARM64_INTERRUPT_TYPE_MAXIMUM         = 0x0008,
> +#endif
> +};
>  
>  union hv_interrupt_control {
>      uint64_t as_uint64;
>      struct {
>          uint32_t interrupt_type; /* enum hv_interrupt type */
> +#if defined(__x86_64__)
>          uint32_t level_triggered:1;
>          uint32_t logical_dest_mode:1;
>          uint32_t rsvd:30;
> +#elif defined(__aarch64__)
> +        uint32_t rsvd1:2;
> +        uint32_t asserted:1;
> +        uint32_t rsvd2:29;
> +#endif
>      };
>  };
>  
> diff --git a/include/system/mshv.h b/include/system/mshv.h
> index 114f065db5..80b6712af9 100644
> --- a/include/system/mshv.h
> +++ b/include/system/mshv.h
> @@ -60,10 +60,12 @@ extern MshvState *mshv_state;
>  /* clock (partition reference time) */
>  void mshv_arch_clock_init(void);
>  
> +#if defined(__x86_64__)
>  /* interrupt */
>  int mshv_request_interrupt(MshvState *mshv_state, uint32_t interrupt_type, uint32_t vector,
>                             uint32_t vp_index, bool logical_destination_mode,
>                             bool level_triggered);
> +#endif
>  
>  int mshv_irqchip_add_msi_route(AccelRouteChange *c, int vector, PCIDevice *dev);
>  int mshv_irqchip_update_msi_route(int virq, MSIMessage msg, PCIDevice *dev);
> 
> -- 
> 2.45.4


  reply	other threads:[~2026-11-20 15:42 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 10:52 [PATCH v6 00/14] Add ARM64 support for MSHV accelerator Aastha Rawat
2026-10-01 10:52 ` [PATCH v6 01/14] accel/mshv: extract common CPU register helpers Aastha Rawat
2026-11-19 13:41   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 02/14] accel/mshv: add arch-specific accelerator init hook Aastha Rawat
2026-11-19 14:57   ` Magnus Kulke
2026-11-19 15:06   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 03/14] accel/mshv: make MSHV migration initialization arch-specific Aastha Rawat
2026-11-13 11:37   ` Doru Blânzeanu
2026-11-19 15:21   ` Magnus Kulke
2026-11-19 15:24   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 04/14] meson, target/arm/mshv: Enable arm64 build & add initial MSHV support Aastha Rawat
2026-10-13 16:48   ` Peter Maydell
2026-11-13 12:23   ` Doru Blânzeanu
2026-11-13 12:56   ` Doru Blânzeanu
2026-11-19 15:40   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 05/14] target/arm/mshv: implement vcpu state operations for ARM64 Aastha Rawat
2026-11-13 15:05   ` Doru Blânzeanu
2026-11-19 16:15   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 06/14] target/arm: convert host CPU feature ifdef ladder to runtime checks Aastha Rawat
2026-10-13 16:46   ` Peter Maydell
2026-10-23 14:37     ` Aastha Rawat
2026-11-19 16:26   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 07/14] target/arm/mshv: implement -cpu host for MSHV Aastha Rawat
2026-11-20 13:20   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 08/14] accel/mshv: Add access_vp_regs synthetic proc features Aastha Rawat
2026-11-20 13:35   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 09/14] target/arm: cpu: Mark MSHV supporting PSCI 1.3 Aastha Rawat
2026-11-20 13:48   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 10/14] target/arm: extract MMIO emulation logic for HVF & WHPX Aastha Rawat
2026-10-13 16:40   ` Peter Maydell
2026-10-22 10:27     ` Aastha Rawat
2026-11-20 14:13   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 11/14] target/arm/mshv: add vCPU run loop Aastha Rawat
2026-10-13 16:50   ` Peter Maydell
2026-10-16  9:56     ` Anirudh Rayabharam
2026-11-20 15:37   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 12/14] include/hw/hyperv: adjust hv_interrupt_control structure for arm64 Aastha Rawat
2026-11-20 15:41   ` Magnus Kulke [this message]
2026-10-01 10:52 ` [PATCH v6 13/14] hw/intc,target/arm/mshv: add MSHV vGICv3 implementation Aastha Rawat
2026-11-20 16:25   ` Magnus Kulke
2026-10-01 10:52 ` [PATCH v6 14/14] MAINTAINERS: updates for MSHV arm64 code Aastha Rawat
2026-11-20 16:27   ` Magnus Kulke

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=awBqLXipVEZTlj4g@example.com \
    --to=magnuskulke@linux.microsoft.com \
    --cc=aastharawat@linux.microsoft.com \
    --cc=agraf@csgraf.de \
    --cc=anirudh@anirudhrb.com \
    --cc=berrange@redhat.com \
    --cc=dblanzeanu@linux.microsoft.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mohamed@unpredictable.fr \
    --cc=mst@redhat.com \
    --cc=pbarbuda@microsoft.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@oss.qualcomm.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=wei.liu@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 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.