diff mbox

kvm: always define KVM_CAP_READONLY_MEM

Message ID 1367386680-30806-1-git-send-email-jordan.l.justen@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jordan Justen May 1, 2013, 5:38 a.m. UTC
Don't use #ifdef __KVM_HAVE_READONLY_MEM when defining
KVM_CAP_READONLY_MEM.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
---
 include/uapi/linux/kvm.h |    2 --
 1 file changed, 2 deletions(-)

Comments

Xiao Guangrong May 3, 2013, 6:19 a.m. UTC | #1
On 05/01/2013 01:38 PM, Jordan Justen wrote:
> Don't use #ifdef __KVM_HAVE_READONLY_MEM when defining
> KVM_CAP_READONLY_MEM.
> 
> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
> Cc: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  include/uapi/linux/kvm.h |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 3c56ba3..26a04e5 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -655,9 +655,7 @@ struct kvm_ppc_smmu_info {
>  #define KVM_CAP_PPC_GET_SMMU_INFO 78
>  #define KVM_CAP_S390_COW 79
>  #define KVM_CAP_PPC_ALLOC_HTAB 80
> -#ifdef __KVM_HAVE_READONLY_MEM
>  #define KVM_CAP_READONLY_MEM 81
> -#endif

This is not enough since only X86 supports this feature.

I had a similar patch to change it:
https://patchwork.kernel.org/patch/1642491/

Is it good to you?

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Kiszka May 3, 2013, 6:26 a.m. UTC | #2
On 2013-05-03 08:19, Xiao Guangrong wrote:
> On 05/01/2013 01:38 PM, Jordan Justen wrote:
>> Don't use #ifdef __KVM_HAVE_READONLY_MEM when defining
>> KVM_CAP_READONLY_MEM.
>>
>> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
>> Cc: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  include/uapi/linux/kvm.h |    2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>> index 3c56ba3..26a04e5 100644
>> --- a/include/uapi/linux/kvm.h
>> +++ b/include/uapi/linux/kvm.h
>> @@ -655,9 +655,7 @@ struct kvm_ppc_smmu_info {
>>  #define KVM_CAP_PPC_GET_SMMU_INFO 78
>>  #define KVM_CAP_S390_COW 79
>>  #define KVM_CAP_PPC_ALLOC_HTAB 80
>> -#ifdef __KVM_HAVE_READONLY_MEM
>>  #define KVM_CAP_READONLY_MEM 81
>> -#endif
> 
> This is not enough since only X86 supports this feature.
> 
> I had a similar patch to change it:
> https://patchwork.kernel.org/patch/1642491/
> 
> Is it good to you?

The first hunk of that patch is unneeded (x86 always has
__KVM_HAVE_READONLY_MEM set), but the third one is actually missing here.

Jan
Xiao Guangrong May 3, 2013, 10:33 a.m. UTC | #3
On 05/03/2013 02:26 PM, Jan Kiszka wrote:
> On 2013-05-03 08:19, Xiao Guangrong wrote:
>> On 05/01/2013 01:38 PM, Jordan Justen wrote:
>>> Don't use #ifdef __KVM_HAVE_READONLY_MEM when defining
>>> KVM_CAP_READONLY_MEM.
>>>
>>> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
>>> Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
>>> Cc: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>>  include/uapi/linux/kvm.h |    2 --
>>>  1 file changed, 2 deletions(-)
>>>
>>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>>> index 3c56ba3..26a04e5 100644
>>> --- a/include/uapi/linux/kvm.h
>>> +++ b/include/uapi/linux/kvm.h
>>> @@ -655,9 +655,7 @@ struct kvm_ppc_smmu_info {
>>>  #define KVM_CAP_PPC_GET_SMMU_INFO 78
>>>  #define KVM_CAP_S390_COW 79
>>>  #define KVM_CAP_PPC_ALLOC_HTAB 80
>>> -#ifdef __KVM_HAVE_READONLY_MEM
>>>  #define KVM_CAP_READONLY_MEM 81
>>> -#endif
>>
>> This is not enough since only X86 supports this feature.
>>
>> I had a similar patch to change it:
>> https://patchwork.kernel.org/patch/1642491/
>>
>> Is it good to you?
> 
> The first hunk of that patch is unneeded (x86 always has
> __KVM_HAVE_READONLY_MEM set), but the third one is actually missing here.

Yes. it is.


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

Patch

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 3c56ba3..26a04e5 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -655,9 +655,7 @@  struct kvm_ppc_smmu_info {
 #define KVM_CAP_PPC_GET_SMMU_INFO 78
 #define KVM_CAP_S390_COW 79
 #define KVM_CAP_PPC_ALLOC_HTAB 80
-#ifdef __KVM_HAVE_READONLY_MEM
 #define KVM_CAP_READONLY_MEM 81
-#endif
 #define KVM_CAP_IRQFD_RESAMPLE 82
 #define KVM_CAP_PPC_BOOKE_WATCHDOG 83
 #define KVM_CAP_PPC_HTAB_FD 84