[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENT
From: |
Xiao Guangrong |
Subject: |
Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function |
Date: |
Wed, 21 Oct 2015 00:26:35 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 10/20/2015 11:51 PM, Stefan Hajnoczi wrote:
On Mon, Oct 19, 2015 at 08:54:14AM +0800, Xiao Guangrong wrote:
+exit:
+ /* Write our output result to dsm memory. */
+ ((dsm_out *)dsm_ram_addr)->len = out->len;
Missing byteswap?
I thought you were going to remove this field because it wasn't needed
by the guest.
The @len is the size of _DSM result buffer, for example, for the function of
DSM_FUN_IMPLEMENTED the result buffer is 8 bytes, and for
DSM_DEV_FUN_NAMESPACE_LABEL_SIZE the buffer size is 4 bytes. It tells ASL code
how much size of memory we need to return to the _DSM caller.
In _DSM code, it's handled like this:
"RLEN" is @len, “OBUF” is the left memory in DSM page.
/* get @len*/
aml_append(method, aml_store(aml_name("RLEN"), aml_local(6)));
/* @len << 3 to get bits. */
aml_append(method, aml_store(aml_shiftleft(aml_local(6),
aml_int(3)), aml_local(6)));
/* get @len << 3 bits from OBUF, and return it to the caller. */
aml_append(method, aml_create_field(aml_name("ODAT"), aml_int(0),
aml_local(6) , "OBUF"));
Since @len is our internally used, it's not return to guest, so i did not do
byteswap here.
- Re: [Qemu-devel] [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method, (continued)
- Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function, Stefan Hajnoczi, 2015/10/20
- Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function, Michael S. Tsirkin, 2015/10/20
- Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function,
Xiao Guangrong <=
- Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function, Xiao Guangrong, 2015/10/20
- Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function, Stefan Hajnoczi, 2015/10/21
- Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function, Xiao Guangrong, 2015/10/21
- Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function, Igor Mammedov, 2015/10/29
[Qemu-devel] [PATCH v4 30/33] nvdimm acpi: support DSM_DEV_FUN_GET_NAMESPACE_LABEL_DATA, Xiao Guangrong, 2015/10/18
[Qemu-devel] [PATCH v4 31/33] nvdimm acpi: support DSM_DEV_FUN_SET_NAMESPACE_LABEL_DATA, Xiao Guangrong, 2015/10/18
[Qemu-devel] [PATCH v4 33/33] nvdimm: add maintain info, Xiao Guangrong, 2015/10/18
[Qemu-devel] [PATCH v4 32/33] nvdimm: allow using whole backend memory as pmem, Xiao Guangrong, 2015/10/18