Re: [PATCH 3/6] nvdimm acpi: introduce patched dsm memory

2016-01-06 Thread Xiao Guangrong
On 01/06/2016 11:23 PM, Igor Mammedov wrote: On Tue, 5 Jan 2016 02:52:05 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided b

Re: How to reserve guest physical region for ACPI

2016-01-05 Thread Xiao Guangrong
On 01/06/2016 12:43 AM, Michael S. Tsirkin wrote: Yes - if address is static, you need to put it outside the table. Can come right before or right after this. Also if OperationRegion() is used, then one has to patch DefOpRegion directly as RegionOffset must be Integer, using variable names

[PATCH 3/6] nvdimm acpi: introduce patched dsm memory

2016-01-04 Thread Xiao Guangrong
The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int64 object returned by "MEMA" method Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- hw/

[PATCH 6/6] nvdimm acpi: emulate dsm method

2016-01-04 Thread Xiao Guangrong
Emulate dsm method after IO VM-exit Currently, we only introduce the framework and no function is actually supported Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- hw/acpi/aml-build.c | 2 +- hw/acpi/nvdimm.c

[PATCH 4/6] acpi: allow using acpi named offset for OperationRegion

2016-01-04 Thread Xiao Guangrong
Extend aml_operation_region() to use named object Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- hw/acpi/aml-build.c | 4 ++-- hw/i386/acpi-build.c| 7 --- include/hw/acpi/aml-build.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff

[PATCH 2/6] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-01-04 Thread Xiao Guangrong
IO port 0x0a18 - 0x0a20 in guest is reserved for NVDIMM ACPI emulation, the table, NVDIMM_DSM_MEM_FILE, will be patched into NVDIMM ACPI binary code OSPM uses this port to tell QEMU the final address of the DSM memory and notify QEMU to emulate the DSM method Signed-off-by: Xiao Guangrong

[PATCH 1/6] pc: acpi: bump DSDT/SSDT compliance revision to v2

2016-01-04 Thread Xiao Guangrong
tegers and boots just fine with this change. * WS 2008 and Linux - support rev2 and use 64-bit integers [ Xiao: make dsdt/ssdt be v1 in qemu version <= 2.5 to keep compatible. ] Signed-off-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Xiao Guangrong <guangrong.x.

[PATCH 0/6] NVDIMM ACPI: introduce the framework of QEMU emulated DSM

2016-01-04 Thread Xiao Guangrong
SDT compliance revision to v2 Xiao Guangrong (5): nvdimm acpi: initialize the resource used by NVDIMM ACPI nvdimm acpi: introduce patched dsm memory acpi: allow using acpi named offset for OperationRegion nvdimm acpi: let qemu handle _DSM method nvdimm acpi: emulate dsm method hw/a

[PATCH 5/6] nvdimm acpi: let qemu handle _DSM method

2016-01-04 Thread Xiao Guangrong
If dsm memory is successfully patched, we let qemu fully emulate the dsm method This patch saves _DSM input parameters into dsm memory, tell dsm memory address to QEMU, then fetch the result from the dsm memory Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- hw/ac

How to reserve guest physical region for ACPI

2015-12-27 Thread Xiao Guangrong
Hi Michael, Paolo, Now it is the time to return to the challenge that how to reserve guest physical region internally used by ACPI. Igor suggested that: | An alternative place to allocate reserve from could be high memory. | For pc we have "reserved-memory-end" which currently makes sure |

Re: [PATCH v2 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-24 Thread Xiao Guangrong
On 12/24/2015 04:36 PM, Kai Huang wrote: On 12/23/2015 07:25 PM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao

[PATCH v2 08/11] KVM: MMU: use page track for non-leaf shadow pages

2015-12-23 Thread Xiao Guangrong
non-leaf shadow pages are always write protected, it can be the user of page track Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/kvm/mmu.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/ar

[PATCH v2 06/11] KVM: MMU: let page fault handler be aware tracked page

2015-12-23 Thread Xiao Guangrong
the page table entry present and readonly to make the read access happy mmu_need_write_protect() need to be cooked to avoid page becoming writable when making page table present or sync/prefetch shadow page table entries Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- ar

[PATCH v2 11/11] KVM: MMU: apply page track notifier

2015-12-23 Thread Xiao Guangrong
Register the notifier to receive write track event so that we can update our shadow page table It makes kvm_mmu_pte_write() be the callback of the notifier, no function is changed Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_host.h | 5 +++--

[PATCH v2 10/11] KVM: MMU: clear write-flooding on the fast path of tracked page

2015-12-23 Thread Xiao Guangrong
out of mmu-lock. So that we change the count to atomic_t Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu.c | 25 + arch/x86/kvm/paging_tmpl.h | 4 +++- 3 files chang

[PATCH v2 07/11] KVM: page track: add notifier support

2015-12-23 Thread Xiao Guangrong
by unregister the notifier The callback, node->track_write() is called when a write access on the write tracked page happens Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/kvm_page_tra

[PATCH v2 04/11] KVM: page track: add the framework of guest page tracking

2015-12-23 Thread Xiao Guangrong
, kvm_page_track_create_memslot() and kvm_page_track_free_memslot() are implemented in this patch, they are internally used to initialize and reclaim the memory of the array Currently, only write track mode is supported Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/inclu

[PATCH v2 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-23 Thread Xiao Guangrong
Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/kvm/mmu.c | 26 ---

[PATCH v2 05/11] KVM: page track: introduce kvm_page_track_{add,remove}_page

2015-12-23 Thread Xiao Guangrong
the last user is gone Both of these are called under the protection of kvm->srcu or kvm->slots_lock Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_page_track.h | 13 arch/x86/kvm/page_track.c

[PATCH v2 00/11] KVM: x86: track guest page access

2015-12-23 Thread Xiao Guangrong
GPU shadow page table introduced in KVMGT (1) and native nested IOMMU. This patch can be divided into two parts: - patch 1 ~ patch 7, implement page tracking - others patches apply page tracking to non-leaf shadow page table (1): http://lkml.iu.edu/hypermail/linux/kernel/1510.3/01562.html X

[PATCH v2 01/11] KVM: MMU: rename has_wrprotected_page to mmu_gfn_lpage_is_disallowed

2015-12-23 Thread Xiao Guangrong
end this mechanism for page tracking: if the gfn is tracked then large mapping for that gfn on any level is not allowed. The new name is more straightforward Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- Documentation/virtual/kvm/mmu.txt | 6 +++--- arch/x86/include/asm/k

[PATCH v2 03/11] KVM: MMU: introduce kvm_mmu_slot_gfn_write_protect

2015-12-23 Thread Xiao Guangrong
Split rmap_write_protect() and introduce the function to abstract the write protection based on the slot This function will be used in the later patch Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/kvm/mmu.c | 16 +++- arch/x86/kvm/mmu.h | 2 ++ 2

[PATCH v2 02/11] KVM: MMU: introduce kvm_mmu_gfn_{allow,disallow}_lpage

2015-12-23 Thread Xiao Guangrong
Abstract the common operations from account_shadowed() and unaccount_shadowed(), then introduce kvm_mmu_gfn_disallow_lpage() and kvm_mmu_gfn_allow_lpage() These two functions will be used by page tracking in the later patch Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> ---

Re: [PATCH v9 0/5] implement vNVDIMM

2015-12-21 Thread Xiao Guangrong
On 12/10/2015 11:11 AM, Xiao Guangrong wrote: New version, new week, and unfortunate new ping... :( Ping again to see what happened... -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo inf

Re: [PATCH 08/11] KVM: MMU: use page track for non-leaf shadow pages

2015-12-16 Thread Xiao Guangrong
On 12/17/2015 10:44 AM, Kai Huang wrote: On 12/16/2015 04:39 PM, Xiao Guangrong wrote: On 12/16/2015 03:51 PM, Kai Huang wrote: On 12/15/2015 05:10 PM, Xiao Guangrong wrote: On 12/15/2015 03:52 PM, Kai Huang wrote: static bool __mmu_gfn_lpage_is_disallowed(gfn_t gfn, int level

Re: [PATCH 06/11] KVM: MMU: let page fault handler be aware tracked page

2015-12-16 Thread Xiao Guangrong
On 12/16/2015 03:31 PM, Kai Huang wrote: On 12/15/2015 05:03 PM, Xiao Guangrong wrote: On 12/15/2015 04:11 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: The page fault caused by write access on the write tracked page can not be fixed, it always need to be emulated

Re: [PATCH 08/11] KVM: MMU: use page track for non-leaf shadow pages

2015-12-16 Thread Xiao Guangrong
On 12/16/2015 03:51 PM, Kai Huang wrote: On 12/15/2015 05:10 PM, Xiao Guangrong wrote: On 12/15/2015 03:52 PM, Kai Huang wrote: static bool __mmu_gfn_lpage_is_disallowed(gfn_t gfn, int level, @@ -2140,12 +2150,18 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Xiao Guangrong
On 12/16/2015 04:05 PM, Kai Huang wrote: On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn

Re: [PATCH 06/11] KVM: MMU: let page fault handler be aware tracked page

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 04:11 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: The page fault caused by write access on the write tracked page can not be fixed, it always need to be emulated. page_fault_handle_page_track() is the fast path we introduce here to skip holding mmu-lock

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 04:47 PM, Kai Huang wrote: A further thinking is can we move it to mmu_need_write_protect? Passing can_unsync as parameter to kvm_unsync_pages sounds a little bit odd. + if (s->unsync) continue; WARN_ON(s->role.level != PT_PAGE_TABLE_LEVEL);

Re: [PATCH 04/11] KVM: page track: add the framework of guest page tracking

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 03:06 PM, Kai Huang wrote: Hi Guangrong, I am starting to review this series, and should have some comments or questions, you can determine whether they are valuable :) Thank you very much for your review and breaking the silent on this patchset. ;) +static void

Re: [PATCH 08/11] KVM: MMU: use page track for non-leaf shadow pages

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 03:52 PM, Kai Huang wrote: static bool __mmu_gfn_lpage_is_disallowed(gfn_t gfn, int level, @@ -2140,12 +2150,18 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, hlist_add_head(>hash_link,

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao

Re: [PATCH 07/11] KVM: page track: add notifier support

2015-12-15 Thread Xiao Guangrong
On 12/16/2015 01:53 PM, Jike Song wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Notifier list is introduced so that any node wants to receive the track event can register to the list Two APIs are introduced here: - kvm_page_track_register_notifier(): register the notifier to receive

Re: [PATCH v9 0/5] implement vNVDIMM

2015-12-09 Thread Xiao Guangrong
New version, new week, and unfortunate new ping... :( On 12/02/2015 03:20 PM, Xiao Guangrong wrote: This patchset can be found at: https://github.com/xiaogr/qemu.git nvdimm-v9 It is based on pci branch on Michael's tree and the top commit is: commit 0c73277af7 (vhost-user-test: fix

Re: [PATCH 00/11] KVM: x86: track guest page access

2015-12-05 Thread Xiao Guangrong
Ping... Paolo, any comment? On 12/02/2015 01:00 AM, Xiao Guangrong wrote: On 12/01/2015 06:17 PM, Paolo Bonzini wrote: On 30/11/2015 19:26, Xiao Guangrong wrote: This patchset introduces the feature which allows us to track page access in guest. Currently, only write access tracking

Re: [Qemu-devel] [PATCH v8 0/5] implement vNVDIMM

2015-12-04 Thread Xiao Guangrong
On 12/05/2015 12:38 AM, Vladimir Sementsov-Ogievskiy wrote: On 16.11.2015 13:50, Xiao Guangrong wrote: NVDIMM (A Non-Volatile Dual In-line Memory Module) is going to be supported on Intel's platform. Hi. One question: do this mean, that your qemu emulated nvidimm - pmem solution will work

Re: [PATCH 00/11] KVM: x86: track guest page access

2015-12-01 Thread Xiao Guangrong
On 12/01/2015 06:17 PM, Paolo Bonzini wrote: On 30/11/2015 19:26, Xiao Guangrong wrote: This patchset introduces the feature which allows us to track page access in guest. Currently, only write access tracking is implemented in this version. Four APIs are introduces

[PATCH v9 3/5] nvdimm acpi: build ACPI NFIT table

2015-12-01 Thread Xiao Guangrong
\ nvdimm,memdev=mem1,id=nv1 It is disabled on default Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- default-configs/i386-softmmu.mak | 1 + default-configs/x86_64-softmmu.mak | 1 + hw/acpi/Makefile.objs

[PATCH v9 5/5] nvdimm: add maintain info

2015-12-01 Thread Xiao Guangrong
Add NVDIMM maintainer Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bb1f3e4..7e82340 100644 --- a/MAINT

[PATCH v9 1/5] nvdimm: implement NVDIMM device abstract

2015-12-01 Thread Xiao Guangrong
Introduce "nvdimm" device which is based on pc-dimm device type Currently, nothing is specific for nvdimm but hotplug is disabled Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- default-configs/i

[PATCH v9 0/5] implement vNVDIMM

2015-12-01 Thread Xiao Guangrong
mdev_pmem) + if (nfit_mem->memdev_pmem) flags |= NDD_ALIASING; You can append another NVDIMM device in guest and do: # cd /sys/bus/nd/devices/ # cd namespace1.0/ # echo `uuidgen` > uuid # echo `expr 1024 \* 1024 \* 128` > size then rel

[PATCH v9 2/5] acpi: support specified oem table id for build_header

2015-12-01 Thread Xiao Guangrong
Let build_header() support specified OEM table id so that we can build multiple SSDT later If the oem table id is not specified (aka, NULL), we use the default id instead as the previous behavior Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Xiao Guangrong <gu

[PATCH v9 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-12-01 Thread Xiao Guangrong
, that means, NVDIMM label data has not been supported yet Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- hw/acpi/nvdimm.c | 106 +++ 1 file changed, 106 inserti

[PATCH 11/11] KVM: MMU: apply page track notifier

2015-11-30 Thread Xiao Guangrong
Register the notifier to receive write track event so that we can update our shadow page table It makes kvm_mmu_pte_write() be the callback of the notifier, no function is changed Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_host.h | 5 +++--

[PATCH 07/11] KVM: page track: add notifier support

2015-11-30 Thread Xiao Guangrong
by unregister the notifier The callback, node->track_write() is called when a write access on the write tracked page happens Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/kvm_page_tra

[PATCH 06/11] KVM: MMU: let page fault handler be aware tracked page

2015-11-30 Thread Xiao Guangrong
the page table entry present and readonly to make the read access happy mmu_need_write_protect() need to be cooked to avoid page becoming writable when making page table present or sync/prefetch shadow page table entries Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- ar

[PATCH 08/11] KVM: MMU: use page track for non-leaf shadow pages

2015-11-30 Thread Xiao Guangrong
non-leaf shadow pages are always write protected, it can be the user of page track Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_page_track.h | 8 + arch/x86/kvm/mmu.c| 26 +--- arch/x86/kvm/page_t

[PATCH 10/11] KVM: MMU: clear write-flooding on the fast path of tracked page

2015-11-30 Thread Xiao Guangrong
out of mmu-lock. So that we change the count to atomic_t Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu.c | 25 + arch/x86/kvm/paging_tmpl.h | 4 +++- 3 files chang

[PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-11-30 Thread Xiao Guangrong
Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/kvm/mmu.c | 26 ---

[PATCH 05/11] KVM: page track: introduce kvm_page_track_{add,remove}_page

2015-11-30 Thread Xiao Guangrong
the last user is gone Both of these are called under the protection of kvm->srcu or kvm->slots_lock Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_page_track.h | 5 ++ arch/x86/kvm/page_track.c | 95 ++

[PATCH 00/11] KVM: x86: track guest page access

2015-11-30 Thread Xiao Guangrong
MMU. This patch can be divided into two parts: - patch 1 ~ patch 7, implement page tracking - others patches apply page tracking to non-leaf shadow page table (1): http://lkml.iu.edu/hypermail/linux/kernel/1510.3/01562.html Xiao Guangrong (11): KVM: MMU: rename has_wrprotected_p

[PATCH 01/11] KVM: MMU: rename has_wrprotected_page to mmu_gfn_lpage_is_disallowed

2015-11-30 Thread Xiao Guangrong
end this mechanism for page tracking: if the gfn is tracked then large mapping for that gfn on any level is not allowed. the new name is more straightforward Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- Documentation/virtual/kvm/mmu.txt | 6 +++--- arch/x86/include/asm/k

[PATCH 04/11] KVM: page track: add the framework of guest page tracking

2015-11-30 Thread Xiao Guangrong
, kvm_page_track_create_memslot() and kvm_page_track_free_memslot() are implemented in this patch, they are internally used to initialize and reclaim the memory of the array Currently, only write track mode is supported Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/include/asm/kvm_

[PATCH 03/11] KVM: MMU: introduce kvm_mmu_slot_gfn_write_protect

2015-11-30 Thread Xiao Guangrong
Split rmap_write_protect() and introduce the function to abstract the write protection based on the slot This function will be used in the later patch Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- arch/x86/kvm/mmu.c | 16 +++- arch/x86/kvm/mmu.h | 2 ++ 2

[PATCH 02/11] KVM: MMU: introduce kvm_mmu_gfn_{allow,disallow}_lpage

2015-11-30 Thread Xiao Guangrong
Abstract the common operations from account_shadowed() and unaccount_shadowed(), then introduce kvm_mmu_gfn_disallow_lpage() and kvm_mmu_gfn_allow_lpage() These two functions will be used by page tracking in the later patch Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> ---

Re: [PATCH v8 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 06:32 PM, Michael S. Tsirkin wrote: On Mon, Nov 16, 2015 at 06:51:02PM +0800, Xiao Guangrong wrote: NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices Forgot to mention: Pls put spec info in code comments near relevant functions, not just the log. Sure, good to me

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 06:38 PM, Michael S. Tsirkin wrote: On Mon, Nov 16, 2015 at 06:50:58PM +0800, Xiao Guangrong wrote: This patchset can be found at: https://github.com/xiaogr/qemu.git nvdimm-v8 It is based on pci branch on Michael's tree and the top commit is: commit e3a4e177d9 (migration

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 04:51 PM, Stefan Hajnoczi wrote: Reviewed-by: Stefan Hajnoczi Thanks for your review Stefan. Will pick up your Reviewed-by in the next version. :) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to

Re: [PATCH v8 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 06:30 PM, Michael S. Tsirkin wrote: On Mon, Nov 16, 2015 at 06:51:02PM +0800, Xiao Guangrong wrote: NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices There is a root device under \_SB and specified NVDIMM devices are under the root device. Each NVDIMM device has _ADR

Re: [PATCH v8 3/5] nvdimm acpi: build ACPI NFIT table

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 06:30 PM, Michael S. Tsirkin wrote: On Mon, Nov 16, 2015 at 06:51:01PM +0800, Xiao Guangrong wrote: NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 structures: - SPA structure, defines the PMEM

Re: [PATCH V3 00/10] KVM: x86: MMU: Clean up x86's mmu code for future work

2015-11-20 Thread Xiao Guangrong
tch 07: Reviewed-by: Xiao Guangrong <guangrong.x...@linux.intel.com> -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 08/10] KVM: x86: MMU: Use for_each_rmap_spte macro instead of pte_list_walk()

2015-11-20 Thread Xiao Guangrong
You just ignored my comment on the previous version... On 11/20/2015 04:47 PM, Takuya Yoshikawa wrote: kvm_mmu_mark_parents_unsync() alone uses pte_list_walk(), witch does nearly the same as the for_each_rmap_spte macro. The only difference is that is_shadow_present_pte() checks cannot be

Re: [PATCH 09/10] KVM: x86: MMU: Move parent_pte handling from kvm_mmu_get_page() to link_shadow_page()

2015-11-20 Thread Xiao Guangrong
You can move this patch to the front of [PATCH 08/10] KVM: x86: MMU: Use for_each_rmap_spte macro instead of pte_list_walk() By moving kvm_mmu_mark_parents_unsync() to the behind of mmu_spte_set() (then the parent spte is present now), you can directly clean up for_each_rmap_spte(). On

Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit in unsync child bitmap

2015-11-18 Thread Xiao Guangrong
On 11/19/2015 08:59 AM, Takuya Yoshikawa wrote: On 2015/11/18 11:44, Xiao Guangrong wrote: On 11/12/2015 07:50 PM, Takuya Yoshikawa wrote: +if (!ret) { +clear_unsync_child_bit(sp, i); +continue; +} else if (ret >

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-18 Thread Xiao Guangrong
On 11/19/2015 04:44 AM, Michael S. Tsirkin wrote: On Wed, Nov 18, 2015 at 05:18:17PM -0200, Eduardo Habkost wrote: On Wed, Nov 18, 2015 at 09:59:34AM +0800, Xiao Guangrong wrote: Ping... Do you have any comment on this patchset? Could it be applied to somewhere if it is okay for you? I

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-17 Thread Xiao Guangrong
Ping... Do you have any comment on this patchset? Could it be applied to somewhere if it is okay for you? Thanks! On 11/16/2015 06:50 PM, Xiao Guangrong wrote: This patchset can be found at: https://github.com/xiaogr/qemu.git nvdimm-v8 It is based on pci branch on Michael's tree

Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit in unsync child bitmap

2015-11-17 Thread Xiao Guangrong
On 11/12/2015 07:50 PM, Takuya Yoshikawa wrote: + if (!ret) { + clear_unsync_child_bit(sp, i); + continue; + } else if (ret > 0) { nr_unsync_leaf += ret;

Re: [PATCH 05/10] KVM: x86: MMU: Use for_each_rmap_spte macro instead of pte_list_walk()

2015-11-17 Thread Xiao Guangrong
On 11/12/2015 07:52 PM, Takuya Yoshikawa wrote: kvm_mmu_mark_parents_unsync() alone uses pte_list_walk(), witch does nearly the same as the for_each_rmap_spte macro. The only difference is that is_shadow_present_pte() checks cannot be placed there because kvm_mmu_mark_parents_unsync() can be

Re: [PATCH 09/10 RFC] KVM: x86: MMU: Move parent_pte handling from kvm_mmu_get_page() to link_shadow_page()

2015-11-17 Thread Xiao Guangrong
On 11/12/2015 07:56 PM, Takuya Yoshikawa wrote: Every time kvm_mmu_get_page() is called with a non-NULL parent_pte argument, link_shadow_page() follows that to set the parent entry so that the new mapping will point to the returned page table. Moving parent_pte handling there allows to clean

Re: [PATCH 07/10] KVM: x86: MMU: Encapsulate the type of rmap-chain head in a new struct

2015-11-17 Thread Xiao Guangrong
On 11/12/2015 07:55 PM, Takuya Yoshikawa wrote: @@ -1720,7 +1724,7 @@ static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu, * this feature. See the comments in kvm_zap_obsolete_pages(). */ list_add(>link, >kvm->arch.active_mmu_pages); -

[PATCH v8 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-11-16 Thread Xiao Guangrong
, that means, NVDIMM label data has not been supported yet Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- hw/acpi/nvdimm.c | 85 1 file changed, 85 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c

[PATCH v8 2/5] acpi: support specified oem table id for build_header

2015-11-16 Thread Xiao Guangrong
Let build_header() support specified OEM table id so that we can build multiple SSDT later If the oem table id is not specified (aka, NULL), we use the default id instead as the previous behavior Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- hw/acpi/aml-build.c

[PATCH v8 3/5] nvdimm acpi: build ACPI NFIT table

2015-11-16 Thread Xiao Guangrong
and Data window are not needed The NVDIMM functionality is controlled by the parameter, 'nvdimm-support', is introduced for PIIX4_PM and ICH9-LPC, it is true on default and it is false on 2.4 and its earlier version to keep compatibility Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.

[PATCH v8 5/5] nvdimm: add maintain info

2015-11-16 Thread Xiao Guangrong
Add NVDIMM maintainer Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9e1fa72..da58bf4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -932,6 +932,13 @@ M: Jiri Pi

[PATCH v8 0/5] implement vNVDIMM

2015-11-16 Thread Xiao Guangrong
# cd /sys/bus/nd/devices/ # cd namespace1.0/ # echo `uuidgen` > uuid # echo `expr 1024 \* 1024 \* 128` > size then reload nd.pmem.ko You can see /dev/pmem1 appears Xiao Guangrong (5): nvdimm: implement NVDIMM device abstract acpi: support specified oem tabl

[PATCH v8 1/5] nvdimm: implement NVDIMM device abstract

2015-11-16 Thread Xiao Guangrong
Introduce "nvdimm" device which is based on pc-dimm device type Currently, nothing is specific for nvdimm but hotplug is disabled Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- default-configs/i386-softmmu.mak | 1 + default-configs/x86_64-softmmu.mak

Ask for ACK (was Re: [Qemu-devel] [PATCH v7 25/35] nvdimm acpi: init the resource used by NVDIMM ACPI)

2015-11-10 Thread Xiao Guangrong
On 11/09/2015 07:13 PM, Igor Mammedov wrote: On Fri, 6 Nov 2015 16:31:43 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: On 11/05/2015 10:49 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 21:33:39 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: On 1

Re: [PATCH v6 11/33] hostmem-file: use whole file size if possible

2015-11-09 Thread Xiao Guangrong
On 11/09/2015 06:17 PM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:05PM +0800, Xiao Guangrong wrote: Use the whole file size if @size is not specified which is useful if we want to directly pass a file to guest Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.

Re: [PATCH v6 09/33] exec: allow file_ram_alloc to work on file

2015-11-09 Thread Xiao Guangrong
On 11/09/2015 06:13 PM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:03PM +0800, Xiao Guangrong wrote: Currently, file_ram_alloc() only works on directory - it creates a file under @path and do mmap on it This patch tries to allow it to work on file directly, if @path

Re: [PATCH v6 07/33] util: introduce qemu_file_get_page_size()

2015-11-09 Thread Xiao Guangrong
On 11/09/2015 06:33 PM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: There are three places use the some logic to get the page size on the file path or file fd This patch introduces qemu_file_get_page_size() to unify the code Signed-off-by: Xiao

Re: [PATCH v6 08/33] exec: allow memory to be allocated from any kind of path

2015-11-09 Thread Xiao Guangrong
On 11/09/2015 06:39 PM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:02PM +0800, Xiao Guangrong wrote: Currently file_ram_alloc() is designed for hugetlbfs, however, the memory of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file locates at DAX enabled

Re: [PATCH v6 19/33] dimm: keep the state of the whole backend memory

2015-11-09 Thread Xiao Guangrong
On 11/09/2015 07:04 PM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:13PM +0800, Xiao Guangrong wrote: QEMU keeps the state of memory of dimm device during live migration, however, it is not enough for nvdimm device as its memory does not contain its label data, so that we should

Re: [PATCH v6 12/33] pc-dimm: remove DEFAULT_PC_DIMMSIZE

2015-11-09 Thread Xiao Guangrong
On 11/09/2015 06:40 PM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:06PM +0800, Xiao Guangrong wrote: It's not used any more Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> You should leave the renames and cleanups off for later. This patchset is large

Re: [PATCH v6 06/33] acpi: add aml_method_serialized

2015-11-09 Thread Xiao Guangrong
On 11/09/2015 07:14 PM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:00PM +0800, Xiao Guangrong wrote: It avoid explicit Mutex and will be used by NVDIMM ACPI Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> I'd rather you squashed these utility p

Re: [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-08 Thread Xiao Guangrong
:13:13PM +0800, Xiao Guangrong wrote: It is used to get the size of the specified file, also qemu_fd_getlength() is introduced to unify the code with raw_getlength() in block/raw-posix.c Signed-off-by: Xiao Guangrong <guangrong.x...@linux.intel.com> --- block/raw-posix.c| 7 +-- i

Re: [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-08 Thread Xiao Guangrong
On 11/06/2015 11:54 PM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote: lseek can not work for all block devices as the man page says: | Some devices are incapable of seeking and POSIX does not specify | which devices must support lseek(). This patch

Re: [PATCH v6 25/33] nvdimm acpi: build ACPI nvdimm devices

2015-11-08 Thread Xiao Guangrong
On 11/09/2015 01:38 AM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:19PM +0800, Xiao Guangrong wrote: NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices There is a root device under \_SB and specified NVDIMM devices are under the root device. Each NVDIMM device has _ADR

Re: [PATCH v6 32/33] nvdimm acpi: support _FIT method

2015-11-08 Thread Xiao Guangrong
On 11/09/2015 01:50 AM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:26PM +0800, Xiao Guangrong wrote: FIT buffer is not completely mapped into guest address space, so a new function, Read FIT, function index 0x, is reserved by QEMU to read the piece of FIT buffer

Re: [PATCH v7 07/35] util: introduce qemu_file_get_page_size()

2015-11-08 Thread Xiao Guangrong
On 11/06/2015 11:36 PM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:09PM +0800, Xiao Guangrong wrote: There are three places use the some logic to get the page size on the file path or file fd Windows did not support file hugepage, so it will return normal page for this case

Re: [PATCH v7 25/35] nvdimm acpi: init the resource used by NVDIMM ACPI

2015-11-06 Thread Xiao Guangrong
On 11/05/2015 10:49 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 21:33:39 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: On 11/05/2015 09:03 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 18:15:31 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: On 1

Re: [PATCH v7 25/35] nvdimm acpi: init the resource used by NVDIMM ACPI

2015-11-06 Thread Xiao Guangrong
On 11/06/2015 04:31 PM, Xiao Guangrong wrote: On 11/05/2015 10:49 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 21:33:39 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: On 11/05/2015 09:03 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 18:15:31 +0800 Xiao Guangrong <gu

Re: [PATCH v7 25/35] nvdimm acpi: init the resource used by NVDIMM ACPI

2015-11-05 Thread Xiao Guangrong
On 11/05/2015 05:58 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:27 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: A page staring from 0xFF0 and IO port 0x0a18 - 0xa1b in guest are ^^ missing one 0??? reserved for NVDIM

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-05 Thread Xiao Guangrong
On 11/06/2015 01:29 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:22PM +0800, Xiao Guangrong wrote: [...] static MemoryRegion *pc_dimm_get_memory_region(DIMMDevice *dimm) { -return host_memory_backend_get_memory(dimm->hostmem, _abort); +Error *local_err = N

Re: [PATCH v7 25/35] nvdimm acpi: init the resource used by NVDIMM ACPI

2015-11-05 Thread Xiao Guangrong
On 11/05/2015 09:03 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 18:15:31 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: On 11/05/2015 05:58 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:27 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: A

Re: [Qemu-devel] [kvm-unit-test RFC] x86: Memory instructions test case

2015-11-04 Thread Xiao Guangrong
l probably break once a new instruction use those opcodes. Tested it on the box on that these instruction are available, it worked. Tested-by: Xiao Guangrong <guangrong.x...@linux.intel.com> -- To unsubscribe from this list: send the line "unsubscribe kvm" in the b

Re: [PATCH v7 27/35] nvdimm acpi: build ACPI nvdimm devices

2015-11-04 Thread Xiao Guangrong
On 11/04/2015 04:56 PM, Igor Mammedov wrote: On Tue, 3 Nov 2015 22:22:40 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: On 11/03/2015 09:13 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:29 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote: NV

Re: [PATCH v7 08/35] exec: allow memory to be allocated from any kind of path

2015-11-04 Thread Xiao Guangrong
On 11/04/2015 08:40 PM, Eduardo Habkost wrote: On Wed, Nov 04, 2015 at 11:12:41AM +0800, Xiao Guangrong wrote: On 11/04/2015 07:00 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote: Currently file_ram_alloc() is designed for hugetlbfs, however

Re: [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-04 Thread Xiao Guangrong
On 11/04/2015 10:44 PM, Eduardo Habkost wrote: On Wed, Nov 04, 2015 at 11:17:09AM +0800, Xiao Guangrong wrote: On 11/04/2015 07:21 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: [...] +size_t qemu_file_getlength(const char *file, Error **errp

Re: [PATCH v7 08/35] exec: allow memory to be allocated from any kind of path

2015-11-03 Thread Xiao Guangrong
On 11/04/2015 07:00 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote: Currently file_ram_alloc() is designed for hugetlbfs, however, the memory of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file locates at DAX enabled filesystem

  1   2   3   4   5   6   7   8   9   10   >