Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1454435 > unrolled thread
| Started by | Wanpeng Li <kernellwp@gmail.com> |
|---|---|
| First post | 2016-08-02 15:50 +0200 |
| Last post | 2016-08-02 15:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 04/14] KVM: x86: dynamic kvm_apic_map Wanpeng Li <kernellwp@gmail.com> - 2016-08-02 15:50 +0200
| From | Wanpeng Li <kernellwp@gmail.com> |
|---|---|
| Date | 2016-08-02 15:50 +0200 |
| Subject | Re: [PATCH v3 04/14] KVM: x86: dynamic kvm_apic_map |
| Message-ID | <s1GZB-4ne-93@gated-at.bofh.it> |
2016-07-13 4:09 GMT+08:00 Radim Krčmář <rkrcmar@redhat.com>:
[...]
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 9880d03f533d..224fc1c5fcc6 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -120,7 +120,7 @@ static inline bool kvm_apic_map_get_logical_dest(struct kvm_apic_map *map,
> switch (map->mode) {
> case KVM_APIC_MODE_X2APIC: {
> u32 offset = (dest_id >> 16) * 16;
> - u32 max_apic_id = ARRAY_SIZE(map->phys_map) - 1;
> + u32 max_apic_id = map->max_apic_id;
>
> if (offset <= max_apic_id) {
> u8 cluster_size = min(max_apic_id - offset + 1, 16U);
> @@ -152,14 +152,22 @@ static void recalculate_apic_map(struct kvm *kvm)
> struct kvm_apic_map *new, *old = NULL;
> struct kvm_vcpu *vcpu;
> int i;
> -
> - new = kzalloc(sizeof(struct kvm_apic_map), GFP_KERNEL);
> + u32 max_id = 255;
If this should be max_id = KVM_MAX_VCPU_ID? I have a patch on hand to
fix it, but I didn't know whether it is your desired behavior or not.
Regards,
Wanpeng Li
Back to top | Article view | linux.kernel
csiph-web