qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 3/5] nvdimm acpi: let qemu handle _DSM method


From: Xiao Guangrong
Subject: Re: [Qemu-devel] [PATCH v5 3/5] nvdimm acpi: let qemu handle _DSM method
Date: Fri, 4 Mar 2016 23:03:47 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1



On 03/03/2016 09:23 PM, Michael S. Tsirkin wrote:

+     *
+     * They are RAM mapping on host so that these accesses never cause
+     * VM-EXIT.
+     */
+    field = aml_field("NRAM", AML_DWORD_ACC, AML_NOLOCK, AML_PRESERVE);
+    aml_append(field, aml_named_field("HDLE",
+               sizeof(typeof_field(NvdimmDsmIn, handle)) * BITS_PER_BYTE));
+    aml_append(field, aml_named_field("REVS",
+               sizeof(typeof_field(NvdimmDsmIn, revision)) * BITS_PER_BYTE));
+    aml_append(field, aml_named_field("FUNC",
+               sizeof(typeof_field(NvdimmDsmIn, function)) * BITS_PER_BYTE));
+    aml_append(field, aml_named_field("ARG3",
+               (TARGET_PAGE_SIZE - offsetof(NvdimmDsmIn, arg3)) *
+                     BITS_PER_BYTE));

drop the extra () here please, and align BITS_PER_BYTE with
TARGET_PAGE_SIZE.

Michael, the () is necessary here, as it is calculating the number of bits:

(PAGE_SIZE - offset_of_arg3) * BITS_PER_BYTE




reply via email to

[Prev in Thread] Current Thread [Next in Thread]