[PATCH v1] drm/i915/gvt: opregion virtualization for win guest
Zhang, Xiaolin
xiaolin.zhang at intel.com
Fri Oct 20 05:51:21 UTC 2017
Hi Zhenyu,
Thanks your time to review and V2 patch will send out to address your
comment.
BRs
Xiaolin
On 10/20/2017 11:39 AM, Zhenyu Wang wrote:
> On 2017.10.14 02:13:22 +0800, Xiaolin Zhang wrote:
>> this is an enhanced opregion emulation for win guest
>> by filling more struct data members. for simplicity,
>> redefined child_device_config structure.
> Might be more elaborated. It seems this one does contain
> some fixes for e.g header size, version, etc.
>
>> @@ -207,9 +270,8 @@ void intel_vgpu_clean_opregion(struct intel_vgpu *vgpu)
>> map_vgpu_opregion(vgpu, false);
>> free_pages((unsigned long)vgpu_opregion(vgpu)->va,
>> get_order(INTEL_GVT_OPREGION_SIZE));
>> -
>> - vgpu_opregion(vgpu)->va = NULL;
>> }
>> + vgpu_opregion(vgpu)->va = NULL;
>> }
> This is not relate to this, better keep in another one.
>
>>
>> /**
>> @@ -278,22 +340,23 @@ int intel_gvt_init_opregion(struct intel_gvt *gvt)
>> }
>>
>> /* emulated opregion with VBT mailbox only */
>> - header = (struct opregion_header *)gvt->opregion.opregion_va;
>> + buf = (u8 *)gvt->opregion.opregion_va;
>> + header = (struct opregion_header *)buf;
>> memcpy(header->signature, OPREGION_SIGNATURE,
>> sizeof(OPREGION_SIGNATURE));
>> + header->size = 0x8;
>> + header->opregion_ver = 0x02000000;
>> header->mboxes = MBOX_VBT;
>>
>> /* for unknown reason, the value in LID field is incorrect
>> * which block the windows guest, so workaround it by force
>> * setting it to "OPEN"
>> */
>> - buf = (u8 *)gvt->opregion.opregion_va;
>> buf[INTEL_GVT_OPREGION_CLID] = 0x3;
>>
>> /* emulated vbt from virt vbt generation */
>> virt_vbt_generation(&v);
>> - memcpy(gvt->opregion.opregion_va + INTEL_GVT_OPREGION_VBT_OFFSET,
>> - &v, sizeof(struct vbt));
>> + memcpy(buf + INTEL_GVT_OPREGION_VBT_OFFSET, &v, sizeof(struct vbt));
>>
> indent error
>
>> return 0;
>> }
>> --
> looks fine to me, thanks
>
More information about the intel-gvt-dev
mailing list