Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1411461

Re: [PART1 V5 13/13] svm: Manage vcpu load/unload when enable AVIC

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PART1 V5 13/13] svm: Manage vcpu load/unload when enable AVIC
Date 2016-06-01 20:40 +0200
Message-ID <rFjdE-3CV-13@gated-at.bofh.it> (permalink)
References <rvauZ-1pG-3@gated-at.bofh.it> <rvav0-1pG-31@gated-at.bofh.it> <rxi55-5hY-21@gated-at.bofh.it> <rzLYZ-4o9-11@gated-at.bofh.it> <rFjdE-3CV-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 01/06/2016 20:18, Suravee Suthikulpanit wrote:
>>>
>>> +    svm->avic_is_running = is_run;
> 
> Shouldn't we do this below --->
>>>
>>>       /* ID = 0xff (broadcast), ID > 0xff (reserved) */
>>> -    if (h_physical_id >= AVIC_MAX_PHYSICAL_ID_COUNT)
>>> -        return -EINVAL;
>>> +    if (WARN_ON(h_physical_id >= AVIC_MAX_PHYSICAL_ID_COUNT))
>>> +        return;
> 
> <--- HERE

It doesn't really matter because these physical APIC IDs are not
reachable anyway so they don't have the IS_RUNNING field.

The avic_is_running field is only used in avic_vcpu_load, and again only
when h_physical_id is in range.  I left the assignment before the
warning so that avic_vcpu_load does the right thing after a
(hypothetical) migration from an out-of-range physical CPU to an
in-range physical CPU.

Paolo

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PART1 V5 13/13] svm: Manage vcpu load/unload when enable AVIC Paolo Bonzini <pbonzini@redhat.com> - 2016-06-01 20:40 +0200

csiph-web