Re: [PART1 RFC v2 07/10] svm: Add VMEXIT handlers for AVIC

From: Radim KrÄmÃÅ
Date: Thu Mar 10 2016 - 14:34:35 EST


2016-03-09 21:55+0100, Radim KrÄmÃÅ:
> 2016-03-04 14:46-0600, Suravee Suthikulpanit:
>> +static int avic_noaccel_interception(struct vcpu_svm *svm)
>> +{
>> + int ret = 0;
>> + u32 offset = svm->vmcb->control.exit_info_1 & 0xFF0;
>> + u32 rw = (svm->vmcb->control.exit_info_1 >> 32) & 0x1;
>
> Change "u32 rw" to "bool write"
>
>> + u32 vector = svm->vmcb->control.exit_info_2 & 0xFFFFFFFF;
>
> and please #define those masks.

I reconsidered. Other users are being removed, so these masks will be
used only once and properly named variables are better then.

vector isn't used right now ... is the EOI vector you get by reading the
APIC page equal to it?

(Btw. edge EOI hacks for PIT and RTC won't work because AVIC doesn't
exit when TMR=0, but I'd take it slow and tackle those after v3.)