|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] x86/vmx: Introduce a bitfield structure for EPT_VIOLATION EXIT_QUALIFICATIONs
>>> On 30.01.17 at 17:54, <andrew.cooper3@xxxxxxxxxx> wrote:
> This results in rather more readable code. No functional change.
>
> All fields currently specified are included, but commented out as no support
> for their use is present.
I'd rather not see them be commented out: Why should the first user
of them have to touch the structure declaration another time?
> @@ -3792,11 +3789,11 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>
> case EXIT_REASON_EPT_VIOLATION:
> {
> - paddr_t gpa;
> + paddr_t gpa; ept_qual_t q;
>
> __vmread(GUEST_PHYSICAL_ADDRESS, &gpa);
> - __vmread(EXIT_QUALIFICATION, &exit_qualification);
> - ept_handle_violation(exit_qualification, gpa);
> + __vmread(EXIT_QUALIFICATION, &q.raw);
> + ept_handle_violation(q, gpa);
> break;
> }
If you made the union a transparent one, I think you wouldn't have
to touch this code at all.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |