qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: "aliguori@us.ibm.com" <aliguori@us.ibm.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"mtosatti@redhat.com" <mtosatti@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"avi@redhat.com" <avi@redhat.com>,
	Liu Sheng <liusheng@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] update kvm related the head file from kernel
Date: Fri, 07 Sep 2012 12:17:09 +0200	[thread overview]
Message-ID: <5049C9A5.2060909@siemens.com> (raw)
In-Reply-To: <5049C0C8.3060106@linux.vnet.ibm.com>

On 2012-09-07 11:39, Xiao Guangrong wrote:
> Hi Jan,
> 
> Thanks for your review.
> 
> On 09/07/2012 04:49 PM, Jan Kiszka wrote:
> 
>>> +#ifdef __KVM_HAVE_READONLY_MEM
>>> +			__u8 write_readonly_mem;
>>> +#endif
>>>  		} mmio;
>>>  		/* KVM_EXIT_HYPERCALL */
>>>  		struct {
>>> @@ -618,6 +625,9 @@ 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
>>
>> Sorry for commenting on the wrong patch, this must be fixed in the
>> kernel: no more conditional CAPs, please. 
> 
> There are some common code depend on KVM_CAP_READONLY_MEM, such as,

Let is depend on KVM_HAVE or some CONFIG_xxx, not on something that is
going to be exported as userspace API.

Jan

> check_memory_region_flags() and write_readonly_mem field in mmio-exit-info.
> 
> Yes, we can use #ifdef CONFIG_X86 to enable it only on x86, but it
> is hard to expand this feather to other arches in the further.
> 
> So, i used __KVM_HAVE_READONLY_MEM and only defined it on x86. :)
> 

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2012-09-07 10:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07  8:26 [Qemu-devel] [PATCH 0/3] support kvm readonly memory slot in qemu Liu Sheng
2012-09-07  8:26 ` [Qemu-devel] [PATCH 1/3] set the readonly property of rom memory region in pc Liu Sheng
2012-09-07  8:26 ` [Qemu-devel] [PATCH 2/3] update kvm related the head file from kernel Liu Sheng
2012-09-07  8:49   ` Jan Kiszka
2012-09-07  9:39     ` Xiao Guangrong
2012-09-07 10:17       ` Jan Kiszka [this message]
2012-09-07  8:26 ` [Qemu-devel] [PATCH 3/3] support readonly memory feature in qemu Liu Sheng
2012-09-07  8:50   ` Jan Kiszka
2012-09-09 15:45     ` Avi Kivity
2012-09-10  9:25       ` Jan Kiszka
2012-09-11  3:02         ` Kevin O'Connor
2012-09-11 15:31           ` Jan Kiszka
2012-09-11 16:15             ` Anthony Liguori
2012-09-11 16:33               ` Jan Kiszka
2012-09-12  0:01               ` Kevin O'Connor
2012-09-09 15:42   ` Avi Kivity

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=5049C9A5.2060909@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liusheng@linux.vnet.ibm.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiaoguangrong@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).