All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Documentation: Fix typo `BFD`
@ 2024-06-23 16:45 Changyuan Lyu
  2024-06-23 16:45 ` [PATCH 2/3] Documentation: Enumerate allowed value macros of `irq_type` Changyuan Lyu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Changyuan Lyu @ 2024-06-23 16:45 UTC (permalink / raw)
  To: Oliver Upton, Jonathan Corbet; +Cc: kvm, linux-doc, Changyuan Lyu

BDF is the acronym for Bus, Device, Function.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
---
 Documentation/virt/kvm/api.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index a71d91978d9ef..e623f072e9aca 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -1921,7 +1921,7 @@ flags:
 
 If KVM_MSI_VALID_DEVID is set, devid contains a unique device identifier
 for the device that wrote the MSI message.  For PCI, this is usually a
-BFD identifier in the lower 16 bits.
+BDF identifier in the lower 16 bits.
 
 On x86, address_hi is ignored unless the KVM_X2APIC_API_USE_32BIT_IDS
 feature of KVM_CAP_X2APIC_API capability is enabled.  If it is enabled,
@@ -2986,7 +2986,7 @@ flags:
 
 If KVM_MSI_VALID_DEVID is set, devid contains a unique device identifier
 for the device that wrote the MSI message.  For PCI, this is usually a
-BFD identifier in the lower 16 bits.
+BDF identifier in the lower 16 bits.
 
 On x86, address_hi is ignored unless the KVM_X2APIC_API_USE_32BIT_IDS
 feature of KVM_CAP_X2APIC_API capability is enabled.  If it is enabled,
-- 
2.45.2.741.gdbec12cfda-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] Documentation: Enumerate allowed value macros of `irq_type`
  2024-06-23 16:45 [PATCH 1/3] Documentation: Fix typo `BFD` Changyuan Lyu
@ 2024-06-23 16:45 ` Changyuan Lyu
  2024-06-23 16:45 ` [PATCH 3/3] Documentation: Correct the VGIC V2 CPU interface addr space size Changyuan Lyu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Changyuan Lyu @ 2024-06-23 16:45 UTC (permalink / raw)
  To: Oliver Upton, Jonathan Corbet; +Cc: kvm, linux-doc, Changyuan Lyu

The expression `irq_type[n]` may confuse readers to interpret `n`
as the bit position and think of CPU = 1 << 0, SPI = 1 << 1, and
PPI = 1 << 2.

Since arch/arm64/include/uapi/asm/kvm.h already has macro definitions
for the allowed values, this commit uses these symbols to clear up
the ambiguity.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
---
 Documentation/virt/kvm/api.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index e623f072e9aca..5f45f3e584fdb 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -891,12 +891,12 @@ like this::
 
 The irq_type field has the following values:
 
-- irq_type[0]:
+- KVM_ARM_IRQ_TYPE_CPU:
 	       out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQ
-- irq_type[1]:
+- KVM_ARM_IRQ_TYPE_SPI:
 	       in-kernel GIC: SPI, irq_id between 32 and 1019 (incl.)
                (the vcpu_index field is ignored)
-- irq_type[2]:
+- KVM_ARM_IRQ_TYPE_PPI:
 	       in-kernel GIC: PPI, irq_id between 16 and 31 (incl.)
 
 (The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs)
-- 
2.45.2.741.gdbec12cfda-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] Documentation: Correct the VGIC V2 CPU interface addr space size
  2024-06-23 16:45 [PATCH 1/3] Documentation: Fix typo `BFD` Changyuan Lyu
  2024-06-23 16:45 ` [PATCH 2/3] Documentation: Enumerate allowed value macros of `irq_type` Changyuan Lyu
@ 2024-06-23 16:45 ` Changyuan Lyu
  2024-06-28 21:57 ` [PATCH 1/3] Documentation: Fix typo `BFD` Oliver Upton
  2024-06-28 22:11 ` Oliver Upton
  3 siblings, 0 replies; 5+ messages in thread
From: Changyuan Lyu @ 2024-06-23 16:45 UTC (permalink / raw)
  To: Oliver Upton, Jonathan Corbet; +Cc: kvm, linux-doc, Changyuan Lyu

In arch/arm64/include/uapi/asm/kvm.h, we have

  #define KVM_VGIC_V2_CPU_SIZE		0x2000

So the CPU interface address space should cover 8 KByte not 4 KByte.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
---
 Documentation/virt/kvm/devices/arm-vgic.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/virt/kvm/devices/arm-vgic.rst b/Documentation/virt/kvm/devices/arm-vgic.rst
index 40bdeea1d86e7..19f0c6756891f 100644
--- a/Documentation/virt/kvm/devices/arm-vgic.rst
+++ b/Documentation/virt/kvm/devices/arm-vgic.rst
@@ -31,7 +31,7 @@ Groups:
     KVM_VGIC_V2_ADDR_TYPE_CPU (rw, 64-bit)
       Base address in the guest physical address space of the GIC virtual cpu
       interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2.
-      This address needs to be 4K aligned and the region covers 4 KByte.
+      This address needs to be 4K aligned and the region covers 8 KByte.
 
   Errors:
 
-- 
2.45.2.741.gdbec12cfda-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] Documentation: Fix typo `BFD`
  2024-06-23 16:45 [PATCH 1/3] Documentation: Fix typo `BFD` Changyuan Lyu
  2024-06-23 16:45 ` [PATCH 2/3] Documentation: Enumerate allowed value macros of `irq_type` Changyuan Lyu
  2024-06-23 16:45 ` [PATCH 3/3] Documentation: Correct the VGIC V2 CPU interface addr space size Changyuan Lyu
@ 2024-06-28 21:57 ` Oliver Upton
  2024-06-28 22:11 ` Oliver Upton
  3 siblings, 0 replies; 5+ messages in thread
From: Oliver Upton @ 2024-06-28 21:57 UTC (permalink / raw)
  To: Changyuan Lyu; +Cc: Jonathan Corbet, kvm, linux-doc

Hi Changyuan,

Thanks for the fixes. LGTM, but next time you have a multi-patch series
please include a cover letter. Helps with organizing the patch series
on the receiving end :)

On Sun, Jun 23, 2024 at 09:45:39AM -0700, Changyuan Lyu wrote:
> BDF is the acronym for Bus, Device, Function.
> 
> Signed-off-by: Changyuan Lyu <changyuanl@google.com>
> ---
>  Documentation/virt/kvm/api.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index a71d91978d9ef..e623f072e9aca 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -1921,7 +1921,7 @@ flags:
>  
>  If KVM_MSI_VALID_DEVID is set, devid contains a unique device identifier
>  for the device that wrote the MSI message.  For PCI, this is usually a
> -BFD identifier in the lower 16 bits.
> +BDF identifier in the lower 16 bits.
>  
>  On x86, address_hi is ignored unless the KVM_X2APIC_API_USE_32BIT_IDS
>  feature of KVM_CAP_X2APIC_API capability is enabled.  If it is enabled,
> @@ -2986,7 +2986,7 @@ flags:
>  
>  If KVM_MSI_VALID_DEVID is set, devid contains a unique device identifier
>  for the device that wrote the MSI message.  For PCI, this is usually a
> -BFD identifier in the lower 16 bits.
> +BDF identifier in the lower 16 bits.
>  
>  On x86, address_hi is ignored unless the KVM_X2APIC_API_USE_32BIT_IDS
>  feature of KVM_CAP_X2APIC_API capability is enabled.  If it is enabled,
> -- 
> 2.45.2.741.gdbec12cfda-goog
> 

-- 
Thanks,
Oliver

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] Documentation: Fix typo `BFD`
  2024-06-23 16:45 [PATCH 1/3] Documentation: Fix typo `BFD` Changyuan Lyu
                   ` (2 preceding siblings ...)
  2024-06-28 21:57 ` [PATCH 1/3] Documentation: Fix typo `BFD` Oliver Upton
@ 2024-06-28 22:11 ` Oliver Upton
  3 siblings, 0 replies; 5+ messages in thread
From: Oliver Upton @ 2024-06-28 22:11 UTC (permalink / raw)
  To: Changyuan Lyu, Jonathan Corbet; +Cc: Oliver Upton, linux-doc, kvm

On Sun, 23 Jun 2024 09:45:39 -0700, Changyuan Lyu wrote:
> BDF is the acronym for Bus, Device, Function.
> 
> 

Applied to kvmarm/next, thanks!

[1/3] Documentation: Fix typo `BFD`
      https://git.kernel.org/kvmarm/kvmarm/c/dc1d234cdd4a
[2/3] Documentation: Enumerate allowed value macros of `irq_type`
      https://git.kernel.org/kvmarm/kvmarm/c/03bd36a387b8
[3/3] Documentation: Correct the VGIC V2 CPU interface addr space size
      https://git.kernel.org/kvmarm/kvmarm/c/810ecbefdd54

--
Best,
Oliver

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-28 22:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-23 16:45 [PATCH 1/3] Documentation: Fix typo `BFD` Changyuan Lyu
2024-06-23 16:45 ` [PATCH 2/3] Documentation: Enumerate allowed value macros of `irq_type` Changyuan Lyu
2024-06-23 16:45 ` [PATCH 3/3] Documentation: Correct the VGIC V2 CPU interface addr space size Changyuan Lyu
2024-06-28 21:57 ` [PATCH 1/3] Documentation: Fix typo `BFD` Oliver Upton
2024-06-28 22:11 ` Oliver Upton

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.