Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-02 Thread Xiao Guangrong
On 03/02/2016 04:44 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 03:29:33PM +0800, Xiao Guangrong wrote: On 03/02/2016 03:20 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 03:15:19PM +0800, Xiao Guangrong wrote: On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: On Wed, M

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-02 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 03:29:33PM +0800, Xiao Guangrong wrote: > > > On 03/02/2016 03:20 PM, Michael S. Tsirkin wrote: > >On Wed, Mar 02, 2016 at 03:15:19PM +0800, Xiao Guangrong wrote: > >> > >> > >>On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: > >>>On Wed, Mar 02, 2016 at 11:30:10AM +0800,

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 03:20 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 03:15:19PM +0800, Xiao Guangrong wrote: On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 11:30:10AM +0800, Xiao Guangrong wrote: On 03/02/2016 01:09 AM, Michael S. Tsirkin wrote: Can't g

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 03:15 PM, Xiao Guangrong wrote: +in = g_malloc(TARGET_PAGE_SIZE); ugh. manual memory management :( Hmm... Or use GArray? But it is :) Sorry, typo. But it is the static size and we should read all memory out to get the consistent data to avid guest changes it at anytim

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 03:15:19PM +0800, Xiao Guangrong wrote: > > > On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: > >On Wed, Mar 02, 2016 at 11:30:10AM +0800, Xiao Guangrong wrote: > >> > >> > >>On 03/02/2016 01:09 AM, Michael S. Tsirkin wrote: > >> > >>> > >>>Can't guest trigger this? > >>

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 11:30:10AM +0800, Xiao Guangrong wrote: On 03/02/2016 01:09 AM, Michael S. Tsirkin wrote: Can't guest trigger this? If yes, don't put such code in production please: this will fill up disk on the host. Okay, the

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 12:00:42PM +0800, Xiao Guangrong wrote: > > > On 03/02/2016 01:12 AM, Michael S. Tsirkin wrote: > >On Tue, Mar 01, 2016 at 06:56:10PM +0800, Xiao Guangrong wrote: > >>Emulate dsm method after IO VM-exit > >> > >>Currently, we only introduce the framework and no function is

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 11:30:10AM +0800, Xiao Guangrong wrote: > > > On 03/02/2016 01:09 AM, Michael S. Tsirkin wrote: > > > > >Can't guest trigger this? > >If yes, don't put such code in production please: > >this will fill up disk on the host. > > > > Okay, the evil guest can read the IO por

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 01:12 AM, Michael S. Tsirkin wrote: On Tue, Mar 01, 2016 at 06:56:10PM +0800, Xiao Guangrong wrote: Emulate dsm method after IO VM-exit Currently, we only introduce the framework and no function is actually supported Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 01:09 AM, Michael S. Tsirkin wrote: Can't guest trigger this? If yes, don't put such code in production please: this will fill up disk on the host. Okay, the evil guest can read the IO port freely. I will use nvdimm_debug() instead. static void nvdimm_dsm_write(void

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Michael S. Tsirkin
On Tue, Mar 01, 2016 at 06:56:10PM +0800, Xiao Guangrong wrote: > Emulate dsm method after IO VM-exit > > Currently, we only introduce the framework and no function is actually > supported > > Signed-off-by: Xiao Guangrong > --- > hw/acpi/aml-build.c | 2 +- > hw/acpi/nvdimm.c

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Michael S. Tsirkin
On Tue, Mar 01, 2016 at 06:56:10PM +0800, Xiao Guangrong wrote: > Emulate dsm method after IO VM-exit > > Currently, we only introduce the framework and no function is actually > supported > > Signed-off-by: Xiao Guangrong > --- > hw/acpi/aml-build.c | 2 +- > hw/acpi/nvdimm.c

[Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 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 --- hw/acpi/aml-build.c | 2 +- hw/acpi/nvdimm.c| 44 include/hw/acpi/aml-build.h