Re: [PATCH v5 5/5] KVM: PPC: e500: MMU API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08.07.2011, at 01:41, Scott Wood wrote:

> This implements a shared-memory API for giving host userspace access to
> the guest's TLB.
> 
> Signed-off-by: Scott Wood <scottwood@xxxxxxxxxxxxx>
> ---
> v5:
> - respin on top of fixes
> - remove unused kvm_dump_tlbs() now that there's another way to get the
>   data
> - clarify in the documentation that even though hardware ignores tsize
>   on a fixed-size array, KVM wants it to be set properly in the shared
>   array.
> 
> Documentation/virtual/kvm/api.txt   |   86 ++++++++-
> arch/powerpc/include/asm/kvm.h      |   35 ++++
> arch/powerpc/include/asm/kvm_e500.h |   24 ++--
> arch/powerpc/include/asm/kvm_ppc.h  |    7 +
> arch/powerpc/kvm/e500.c             |    5 +-
> arch/powerpc/kvm/e500_emulate.c     |   12 +-
> arch/powerpc/kvm/e500_tlb.c         |  372 ++++++++++++++++++++++++----------
> arch/powerpc/kvm/e500_tlb.h         |   38 ++--
> arch/powerpc/kvm/powerpc.c          |   28 +++
> include/linux/kvm.h                 |   19 ++
> 10 files changed, 473 insertions(+), 153 deletions(-)
> 
> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
> index b251136..31df5b0 100644
> --- a/Documentation/virtual/kvm/api.txt
> +++ b/Documentation/virtual/kvm/api.txt
> @@ -1265,7 +1265,7 @@ struct kvm_assigned_msix_entry {
> 	__u16 padding[3];
> };
> 
> -4.54 KVM_SET_TSC_KHZ
> +4.55 KVM_SET_TSC_KHZ
> 
> Capability: KVM_CAP_TSC_CONTROL
> Architectures: x86
> @@ -1276,7 +1276,7 @@ Returns: 0 on success, -1 on error
> Specifies the tsc frequency for the virtual machine. The unit of the
> frequency is KHz.
> 
> -4.55 KVM_GET_TSC_KHZ
> +4.56 KVM_GET_TSC_KHZ
> 
> Capability: KVM_CAP_GET_TSC_KHZ
> Architectures: x86
> @@ -1288,7 +1288,7 @@ Returns the tsc frequency of the guest. The unit of the return value is
> KHz. If the host has unstable tsc this ioctl returns -EIO instead as an
> error.
> 
> -4.56 KVM_GET_LAPIC
> +4.57 KVM_GET_LAPIC
> 
> Capability: KVM_CAP_IRQCHIP
> Architectures: x86
> @@ -1304,7 +1304,7 @@ struct kvm_lapic_state {
> Reads the Local APIC registers and copies them into the input argument.  The
> data format and layout are the same as documented in the architecture manual.
> 
> -4.57 KVM_SET_LAPIC
> +4.58 KVM_SET_LAPIC
> 
> Capability: KVM_CAP_IRQCHIP
> Architectures: x86
> @@ -1320,7 +1320,7 @@ struct kvm_lapic_state {
> Copies the input argument into the the Local APIC registers.  The data format
> and layout are the same as documented in the architecture manual.
> 
> -4.58 KVM_IOEVENTFD
> +4.59 KVM_IOEVENTFD
> 
> Capability: KVM_CAP_IOEVENTFD
> Architectures: all
> @@ -1350,6 +1350,82 @@ The following flags are defined:
> If datamatch flag is set, the event will be signaled only if the written value
> to the registered address is equal to datamatch in struct kvm_ioeventfd.
> 
> +4.60 KVM_CONFIG_TLB
> +
> +Capability: KVM_CAP_SW_TLB
> +Architectures: ppc
> +Type: vcpu ioctl
> +Parameters: struct kvm_config_tlb (in)
> +Returns: 0 on success, -1 on error
> +
> +struct kvm_config_tlb {
> +	__u64 params;
> +	__u64 array;
> +	__u32 mmu_type;
> +	__u32 array_len;
> +};

There's no real need to do this through its own ioctl. You could just use ENABLE_CAP and pass the config as arguments :).


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux