Joerg Roedel a3ca23
From: David Woodhouse <dwmw@amazon.co.uk>
Joerg Roedel a3ca23
Date: Mon, 19 Oct 2020 15:55:56 +0100
Joerg Roedel a3ca23
Subject: x86/kvm: Reserve KVM_FEATURE_MSI_EXT_DEST_ID
Joerg Roedel a3ca23
Git-commit: 5a169bf04cd2bfdbac967d12eb5b70915b29d7ee
Joerg Roedel a3ca23
Patch-mainline: v5.10-rc2
Joerg Roedel a3ca23
References: bsc#1181001, jsc#ECO-3191
Joerg Roedel a3ca23
Joerg Roedel a3ca23
No functional change; just reserve the feature bit for now so that VMMs
Joerg Roedel a3ca23
can start to implement it.
Joerg Roedel a3ca23
Joerg Roedel a3ca23
This will allow the host to indicate that MSI emulation supports 15-bit
Joerg Roedel a3ca23
destination IDs, allowing up to 32768 CPUs without interrupt remapping.
Joerg Roedel a3ca23
Joerg Roedel a3ca23
cf. https://patchwork.kernel.org/patch/11816693/ for qemu
Joerg Roedel a3ca23
Joerg Roedel a3ca23
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Joerg Roedel a3ca23
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Joerg Roedel a3ca23
Message-Id: <4cd59bed05f4b7410d3d1ffd1e997ab53683874d.camel@infradead.org>
Joerg Roedel a3ca23
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Joerg Roedel a3ca23
Acked-by: Joerg Roedel <jroedel@suse.de>
Joerg Roedel a3ca23
---
Joerg Roedel a3ca23
 Documentation/virtual/kvm/cpuid.txt  |    4 ++++
Joerg Roedel a3ca23
 arch/x86/include/uapi/asm/kvm_para.h |    1 +
Joerg Roedel a3ca23
 2 files changed, 5 insertions(+)
Joerg Roedel a3ca23
Joerg Roedel a3ca23
--- a/Documentation/virtual/kvm/cpuid.txt
Joerg Roedel a3ca23
+++ b/Documentation/virtual/kvm/cpuid.txt
Joerg Roedel a3ca23
@@ -58,6 +58,10 @@ KVM_FEATURE_ASYNC_PF_VMEXIT        ||
Joerg Roedel a3ca23
                                    ||       || can be enabled by setting bit 2
Joerg Roedel a3ca23
                                    ||       || when writing to msr 0x4b564d02
Joerg Roedel a3ca23
 ------------------------------------------------------------------------------
Joerg Roedel a3ca23
+KVM_FEATURE_MSI_EXT_DEST_ID        ||    15 || guest checks this feature bit
Joerg Roedel a3ca23
+                                   ||       || before using extended destination
Joerg Roedel a3ca23
+                                   ||       || ID bits in MSI address bits 11-5.
Joerg Roedel a3ca23
+------------------------------------------------------------------------------
Joerg Roedel a3ca23
 KVM_FEATURE_CLOCKSOURCE_STABLE_BIT ||    24 || host will warn if no guest-side
Joerg Roedel a3ca23
                                    ||       || per-cpu warps are expected in
Joerg Roedel a3ca23
                                    ||       || kvmclock.
Joerg Roedel a3ca23
--- a/arch/x86/include/uapi/asm/kvm_para.h
Joerg Roedel a3ca23
+++ b/arch/x86/include/uapi/asm/kvm_para.h
Joerg Roedel a3ca23
@@ -24,6 +24,7 @@
Joerg Roedel a3ca23
 #define KVM_FEATURE_PV_EOI		6
Joerg Roedel a3ca23
 #define KVM_FEATURE_PV_UNHALT		7
Joerg Roedel a3ca23
 #define KVM_FEATURE_ASYNC_PF_VMEXIT	10
Joerg Roedel a3ca23
+#define KVM_FEATURE_MSI_EXT_DEST_ID	15
Joerg Roedel a3ca23
 
Joerg Roedel a3ca23
 /* The last 8 bits are used to indicate how to interpret the flags field
Joerg Roedel a3ca23
  * in pvclock structure. If no bits are set, all flags are ignored.