On Tue, Jun 15, 2010, Gleb Natapov wrote about "Re: [PATCH 7/24] Understanding 
guest pointers to vmcs12 structures":
> > +/*
> > + * Decode the memory-address operand of a vmx instruction, according to the
> > + * Intel spec.
> > + */
>...
> > +static gva_t get_vmx_mem_address(struct kvm_vcpu *vcpu,
> > +                            unsigned long exit_qualification,
> > +                            u32 vmx_instruction_info)
> > +{
>...
> > +   if (is_reg) {
> > +           kvm_queue_exception(vcpu, UD_VECTOR);
> > +           return 0;
> Isn't zero a legitimate address for vmx operation?

Thanks. Please excuse my naivity, but is address 0 actually considered a
usable guest virtual address? If it is, do we have any possible value which is
considered invalid? Perhaps -1ull? I see that -1ull is used in a few places
in vmx.c, for example.

If all gva_t turn out to actually be valid addresses, I'll need to move to a
more complex (and uglier) success flag approach :(

-- 
Nadav Har'El                        |          Sunday, Aug  1 2010, 22 Av 5770
n...@math.technion.ac.il             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |The only "intuitive" interface is the
http://nadav.harel.org.il           |nipple. After that, it's all learned.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to