Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Avi Kivity
On 08/16/2012 06:57 PM, Marcelo Tosatti wrote: >> >> Correct. But the chipset is also able to to write-protect some ranges >> in the 0xc-0x10 area via the PAM. It is able to write-protect >> both RAM and PCI memory (usually mapped to flash). > > You are convinced that adding read-write

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 01:49:11PM +0800, Xiao Guangrong wrote: > On 08/14/2012 11:25 PM, Marcelo Tosatti wrote: > > On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: > >> On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: > >>> On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 12:03:01PM +0300, Avi Kivity wrote: > On 08/15/2012 08:53 PM, Marcelo Tosatti wrote: > > On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: > >> On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: > >> >> > >> >> Userspace may want to modify the ROM (for example, when

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Avi Kivity
On 08/15/2012 08:53 PM, Marcelo Tosatti wrote: > On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: >> On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: >> >> >> >> Userspace may want to modify the ROM (for example, when programming a >> >> flash device). It is also possible to map an hva

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Avi Kivity
On 08/15/2012 08:53 PM, Marcelo Tosatti wrote: On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: Userspace may want to modify the ROM (for example, when programming a flash device). It is also possible to map an hva range rw

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 12:03:01PM +0300, Avi Kivity wrote: On 08/15/2012 08:53 PM, Marcelo Tosatti wrote: On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: Userspace may want to modify the ROM (for example, when programming a

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 01:49:11PM +0800, Xiao Guangrong wrote: On 08/14/2012 11:25 PM, Marcelo Tosatti wrote: On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Avi Kivity
On 08/16/2012 06:57 PM, Marcelo Tosatti wrote: Correct. But the chipset is also able to to write-protect some ranges in the 0xc-0x10 area via the PAM. It is able to write-protect both RAM and PCI memory (usually mapped to flash). You are convinced that adding read-write

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-15 Thread Xiao Guangrong
On 08/14/2012 11:25 PM, Marcelo Tosatti wrote: > On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: >> On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: >>> On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: > On Tue,

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-15 Thread Marcelo Tosatti
On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: > On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: > >> > >> Userspace may want to modify the ROM (for example, when programming a > >> flash device). It is also possible to map an hva range rw through one > >> slot and ro through

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-15 Thread Avi Kivity
On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: >> >> Userspace may want to modify the ROM (for example, when programming a >> flash device). It is also possible to map an hva range rw through one >> slot and ro through another. > > Right, can do that with multiple userspace maps to the same

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-15 Thread Avi Kivity
On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: Userspace may want to modify the ROM (for example, when programming a flash device). It is also possible to map an hva range rw through one slot and ro through another. Right, can do that with multiple userspace maps to the same anonymous

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-15 Thread Marcelo Tosatti
On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: Userspace may want to modify the ROM (for example, when programming a flash device). It is also possible to map an hva range rw through one slot and ro through another. Right,

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-15 Thread Xiao Guangrong
On 08/14/2012 11:25 PM, Marcelo Tosatti wrote: On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 05:00:33PM +0300, Avi Kivity wrote: > On 08/10/2012 09:14 PM, Marcelo Tosatti wrote: > > On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: > >> Changelog: > >> - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page > >> - introduce KVM_HVA_ERR_BAD and optimize

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: > On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: > > On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: > >> On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: > >>> On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Avi Kivity
On 08/10/2012 09:14 PM, Marcelo Tosatti wrote: > On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: >> Changelog: >> - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page >> - introduce KVM_HVA_ERR_BAD and optimize error hva indicators >> >> The test case can be found at: >>

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Avi Kivity
On 08/10/2012 09:14 PM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva indicators The test case can be found at:

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote:

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 05:00:33PM +0300, Avi Kivity wrote: On 08/10/2012 09:14 PM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-13 Thread Xiao Guangrong
On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: > On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: >> On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: >>> On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-13 Thread Marcelo Tosatti
On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: > On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: > > On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: > >> Changelog: > >> - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page > >> - introduce KVM_HVA_ERR_BAD and

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-13 Thread Marcelo Tosatti
On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-13 Thread Xiao Guangrong
On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page -

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-10 Thread Xiao Guangrong
On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: > On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: >> Changelog: >> - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page >> - introduce KVM_HVA_ERR_BAD and optimize error hva indicators >> >> The test case can be found at: >>

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-10 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: > Changelog: > - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page > - introduce KVM_HVA_ERR_BAD and optimize error hva indicators > > The test case can be found at: >

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-10 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva indicators The test case can be found at:

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-10 Thread Xiao Guangrong
On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva indicators The test case can be found at:

[PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-07 Thread Xiao Guangrong
Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva indicators The test case can be found at: http://lkml.indiana.edu/hypermail/linux/kernel/1207.2/00819/migrate-perf.tar.bz2 In current code, if we map a readonly memory space from

[PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-07 Thread Xiao Guangrong
Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva indicators The test case can be found at: http://lkml.indiana.edu/hypermail/linux/kernel/1207.2/00819/migrate-perf.tar.bz2 In current code, if we map a readonly memory space from