From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
eddie.dong@intel.com, xen-devel@lists.xen.org,
jun.nakajima@intel.com, ian.jackson@eu.citrix.com
Subject: Re: [PATCH RFC V5 4/5] xen, libxc: Request page fault injection via libxc
Date: Fri, 08 Aug 2014 17:55:03 +0300 [thread overview]
Message-ID: <53E4E4C7.5070404@bitdefender.com> (raw)
In-Reply-To: <53E4FF56020000780002AA71@mail.emea.novell.com>
On 08/08/2014 05:48 PM, Jan Beulich wrote:
>> + if ( seg.attr.fields.dpl != 3 ) /* Guest is not in user mode */
>> + return 0;
>> +
>> +
>
> Double blank line.Didn't I ask you to clean up your patches in this
> regard already?
Not me, but point taken. :)
>> + if ( curr->arch.hvm_vcpu.guest_cr[3]
>> + != d->arch.hvm_domain.fault_info.address_space )
>
> Do you really mean to compare the full CR3 value here, rather than
> just bits 12...51? In which case the address_space field likely would
> better be a GPFN.
You're right, I'll compare the values shifted by PAGE_SHIFT.
>> +}
>> +
>> +static void vmx_inject_pf(void)
>> +{
>> + struct vcpu *curr = current;
>> + struct domain *d = curr->domain;
>> + int errcode = PFEC_user_mode;
>> + uint64_t virtual_address = d->arch.hvm_domain.fault_info.virtual_address;
>> + uint32_t write_access = d->arch.hvm_domain.fault_info.write_access;
>> +
>> + d->arch.hvm_domain.fault_info.address_space = 0;
>> + d->arch.hvm_domain.fault_info.virtual_address = 0;
>> + d->arch.hvm_domain.fault_info.write_access = 0;
>
> Are these necessary? Because ...
>
>> + d->arch.hvm_domain.fault_info.valid = 0;
>
> ... I would hope that this one is properly guarding all uses of the
> other fields.
No, they're not necessary anymore. Thank you for pointing that out.
Thanks,
Razvan Cojocaru
next prev parent reply other threads:[~2014-08-08 14:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 15:58 [PATCH RFC V5 1/5] xen: Emulate with no writes Razvan Cojocaru
2014-08-06 15:58 ` [PATCH RFC V5 2/5] xen: Optimize introspection access to guest state Razvan Cojocaru
2014-08-08 14:27 ` Jan Beulich
2014-08-06 15:58 ` [PATCH RFC V5 3/5] xen: Force-enable relevant MSR events; optimize the number of sent MSR events Razvan Cojocaru
2014-08-08 14:34 ` Jan Beulich
2014-08-08 14:47 ` Razvan Cojocaru
2014-08-08 15:11 ` Jan Beulich
2014-08-11 8:57 ` Razvan Cojocaru
2014-08-06 15:58 ` [PATCH RFC V5 4/5] xen, libxc: Request page fault injection via libxc Razvan Cojocaru
2014-08-07 7:22 ` Razvan Cojocaru
2014-08-08 14:48 ` Jan Beulich
2014-08-08 14:55 ` Razvan Cojocaru [this message]
2014-08-08 21:45 ` Andrei LUTAS
2014-08-06 15:58 ` [PATCH RFC V5 5/5] xen: Handle resumed instruction based on previous mem_event reply Razvan Cojocaru
2014-08-08 14:54 ` Jan Beulich
2014-08-08 14:25 ` [PATCH RFC V5 1/5] xen: Emulate with no writes Jan Beulich
2014-08-08 14:33 ` Razvan Cojocaru
2014-08-08 15:08 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53E4E4C7.5070404@bitdefender.com \
--to=rcojocaru@bitdefender.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=eddie.dong@intel.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.