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 08/14] accel/mshv: Add access_vp_regs synthetic proc features
Date: Fri, 20 Nov 2026 14:35:35 +0100	[thread overview]
Message-ID: <awBMp+6l6DWP2EpA@example.com> (raw)
In-Reply-To: <20261001-mshv_accel_arm64_supp-v6-8-aefe5e76a0e3@linux.microsoft.com>

On Thu, Oct 01, 2026 at 10:52:53AM +0000, Aastha Rawat wrote:
> Enable access_vp_regs feature for regs. In arm64, this feature bit
> allows the guest to set VP registers using hypercall. This wasn't
> required for x86 because such registers are set using wrmsr instead of
> hypercall.
> 
> Signed-off-by: Aastha Rawat <aastharawat@linux.microsoft.com>
> ---
>  accel/mshv/mshv-all.c     |  1 +
>  include/hw/hyperv/hvhdk.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 91 insertions(+), 1 deletion(-)
> 
> diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c
> index f3f1825b0b..9603f0360e 100644
> --- a/accel/mshv/mshv-all.c
> +++ b/accel/mshv/mshv-all.c
> @@ -235,6 +235,7 @@ static int set_synthetic_proc_features(int vm_fd)
>      features.tb_flush_hypercalls = 1;
>      features.synthetic_cluster_ipi = 1;
>      features.direct_synthetic_timers = 1;
> +    features.access_vp_regs = 1;

is this safe to use on x86_64? if not/unsure we can use the
mshv_arch_amend_proc_features to only set this bit on arm64

>  
>      mshv_arch_amend_proc_features(&features);
>  
> diff --git a/include/hw/hyperv/hvhdk.h b/include/hw/hyperv/hvhdk.h
> index 9e6dcb22f6..d0adbea0c7 100644
> --- a/include/hw/hyperv/hvhdk.h
> +++ b/include/hw/hyperv/hvhdk.h
> @@ -94,11 +94,16 @@ union hv_partition_synthetic_processor_features {
>           */
>          uint64_t access_partition_reference_tsc:1;
>  
> +#if defined(__x86_64__)

Maybe we can use the `HOST_x86_64/AARCH64` qemu equivalent here.

> +
>          /*
>           * Partition has access to the guest idle reg. Corresponds to
>           * access_guest_idle_reg privilege.
>           */
>          uint64_t access_guest_idle_reg:1;
> +#else
> +        uint64_t reserved_z10:1;
> +#endif
>  
>          /*
>           * Partition has access to frequency regs. corresponds to
> @@ -110,11 +115,16 @@ union hv_partition_synthetic_processor_features {
>          uint64_t reserved_z13:1; /* Reserved for access_root_scheduler_reg */
>          uint64_t reserved_z14:1; /* Reserved for access_tsc_invariant_controls */
>  
> +#if defined(__x86_64__)
> +
>          /*
>           * Extended GVA ranges for HvCallFlushVirtualAddressList hypercall.
>           * Corresponds to privilege.
>           */
>          uint64_t enable_extended_gva_ranges_for_flush_virtual_address_list:1;
> +#else
> +        uint64_t reserved_z15:1;
> +#endif
>  
>          uint64_t reserved_z16:1; /* Reserved for access_vsm. */
>          uint64_t reserved_z17:1; /* Reserved for access_vp_registers. */
> @@ -161,13 +171,92 @@ union hv_partition_synthetic_processor_features {
>          /* HvCallRetargetDeviceInterrupt is supported. */
>          uint64_t retarget_device_interrupt:1;
>  
> +#if defined(__x86_64__)
>          /* HvCallRestorePartitionTime is supported. */
>          uint64_t restore_time:1;
>  
>          /* EnlightenedVmcs nested enlightenment is supported. */
>          uint64_t enlightened_vmcs:1;
>  
> -        uint64_t reserved:30;
> +        uint64_t nested_debug_ctl:1;
> +        uint64_t synthetic_time_unhalted_timer:1;
> +        uint64_t idle_spec_ctrl:1;
> +
> +#else
> +        uint64_t reserved_z31:1;
> +        uint64_t reserved_z32:1;
> +        uint64_t reserved_z33:1;
> +        uint64_t reserved_z34:1;
> +        uint64_t reserved_z35:1;
> +#endif
> +
> +#if defined(__aarch64__)
> +        /*
> +         * Register intercepts supported in V1. As more registers are supported
> +         * in future releases, new bits will be added here to prevent migration
> +         * between incompatible hosts.
> +         *
> +         * List of registers supported in V1:
> +         * 1. TPIDRRO_EL0
> +         * 2. TPIDR_EL1
> +         * 3. SCTLR_EL1 - Supports write intercept mask.
> +         * 4. VBAR_EL1
> +         * 5. TCR_EL1 - Supports write intercept mask.
> +         * 6. MAIR_EL1 - Supports write intercept mask.
> +         * 7. CPACR_EL1 - Supports write intercept mask.
> +         * 8. CONTEXTIDR_EL1
> +         * 9. PAuth keys (total 10 registers)
> +         * 10. HvArm64RegisterSyntheticException
> +         */
> +        uint64_t register_intercepts_v1:1;
> +#else
> +        uint64_t reserved_z36:1;
> +#endif
> +
> +        /* HvCallWakeVps is supported */
> +        uint64_t wake_vps:1;
> +
> +        /*
> +         * HvCallGet/SetVpRegisters is supported.
> +         * Corresponds to AccessVpRegisters privilege.
> +         * This feature only affects exo partitions.
> +         */
> +        uint64_t access_vp_regs:1;
> +
> +#if defined(__aarch64__)
> +        /* HvCallSyncContext/Ex is supported. */
> +        uint64_t sync_context:1;
> +#else
> +        uint64_t reserved_z39:1;
> +#endif /* __aarch64__ */
> +
> +        /*
> +         * Management VTL synic support is allowed.
> +         * Corresponds to the ManagementVtlSynicSupport privilege.
> +         */
> +        uint64_t management_vtl_synic_support:1;
> +
> +#if defined(__x86_64__)
> +        /*
> +         * Hypervisor supports guest mechanism to signal pending interrupts to
> +         * paravisor.
> +         */
> +        uint64_t proxy_interrupt_doorbell_support:1;
> +#else
> +        uint64_t reserved_z41:1;
> +#endif
> +
> +#if defined(__aarch64__)
> +        /* InterceptSystemResetAvailable is exposed. */
> +        uint64_t intercept_system_reset:1;
> +#else
> +        uint64_t reserved_z42:1;
> +#endif
> +
> +        /* Hypercalls for host MMIO operations are available. */
> +        uint64_t mmio_hypercalls:1;
> +
> +        uint64_t reserved:20;
>      };
>  };
>  
> 
> -- 
> 2.45.4


  reply	other threads:[~2026-11-20 13:36 UTC|newest]

Thread overview: 36+ 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 [this message]
2026-10-01 10:52 ` [PATCH v6 09/14] target/arm: cpu: Mark MSHV supporting PSCI 1.3 Aastha Rawat
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-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-10-01 10:52 ` [PATCH v6 12/14] include/hw/hyperv: adjust hv_interrupt_control structure for arm64 Aastha Rawat
2026-10-01 10:52 ` [PATCH v6 13/14] hw/intc,target/arm/mshv: add MSHV vGICv3 implementation Aastha Rawat
2026-10-01 10:52 ` [PATCH v6 14/14] MAINTAINERS: updates for MSHV arm64 code Aastha Rawat

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=awBMp+6l6DWP2EpA@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.