Re: [PATCH 1/5]KVM: x86, apicv: add APICv register virtualization support

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

 



On 09/18/2012 05:38 PM, Li, Jiongxi wrote:
>> 
>> >
>> > +static int handle_apic_write(struct kvm_vcpu *vcpu) {
>> > +	unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
>> > +	u32 offset = exit_qualification & 0xfff;
>> > +
>> > +	/* APIC-write VM exit is trap-like and thus no need to adjust IP */
>> > +	return kvm_apic_write_nodecode(vcpu, offset) == 0; }
>> 
>> Return 1 here means exit to userspace.  This will go crazy.
>> 
>> You need to return 0 always.  If this is an msr write to a read-only register, you
>> need to inject a #GP (IIRC).
> 
> Return 0 means exit to userspace, so it should return 1, right?
> __vcpu_run
> {
>   while (r>0)
>   {  
>      r = vcpu_enter_guest(vcpu)
>      if (r<=0)
>        break;
>   }
> }

Yes, sorry.  We should switch to a symbolic constant one day, it's
confusing.


-- 
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux