lkml.org 
[lkml]   [2015]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] KVM: x86: simplify kvm_apic_map


On 12/02/2015 19:41, Radim Krčmář wrote:
> +static inline void
> +apic_logical_id(struct kvm_apic_map *map, u32 dest_id, u16 *cid, u16 *lid)
> +{
> + BUILD_BUG_ON(KVM_APIC_MODE_XAPIC_CLUSTER != 4);
> + BUILD_BUG_ON(KVM_APIC_MODE_XAPIC_FLAT != 8);
> + BUILD_BUG_ON(KVM_APIC_MODE_X2APIC != 16);
> +

I added

unsigned lid_bits = map->mode;

here (used in the rest of apic_logical_id) and applied the series.

Thanks,

Paolo

> + *cid = dest_id >> map->mode;
> + *lid = dest_id & ((1 << map->mode) - 1);
> +}


\
 
 \ /
  Last update: 2015-04-07 15:01    [W:0.131 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site