Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1220072 > unrolled thread
| Started by | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| First post | 2015-09-07 13:30 +0200 |
| Last post | 2015-09-08 22:40 +0200 |
| Articles | 3 — 2 participants |
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 8/9] KVM: VMX: introduce set_clear_2nd_exec_ctrl() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-07 13:30 +0200
Re: [PATCH 8/9] KVM: VMX: introduce set_clear_2nd_exec_ctrl() Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2015-09-08 16:40 +0200
Re: [PATCH 8/9] KVM: VMX: introduce set_clear_2nd_exec_ctrl() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-08 22:40 +0200
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2015-09-07 13:30 +0200 |
| Subject | Re: [PATCH 8/9] KVM: VMX: introduce set_clear_2nd_exec_ctrl() |
| Message-ID | <q62My-47x-25@gated-at.bofh.it> |
On 21/08/2015 06:50, Xiao Guangrong wrote:
>
> +static void set_clear_2nd_exec_ctrl(u32 ctrls, bool set)
> +{
> + u32 exec_ctrl = vmcs_read32(SECONDARY_VM_EXEC_CONTROL);
> +
> + if (set)
> + exec_ctrl |= ctrls;
> + else
> + exec_ctrl &= ~ctrls;
> +
> + vmcs_write32(SECONDARY_VM_EXEC_CONTROL, exec_ctrl);
> +}
The second argument is always true. Do you have any plans for it?
Should we instead add functions like vmcs_or32 and vmcs_clear32?
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Xiao Guangrong <guangrong.xiao@linux.intel.com> |
|---|---|
| Date | 2015-09-08 16:40 +0200 |
| Message-ID | <q6sdY-71F-29@gated-at.bofh.it> |
| In reply to | #1220072 |
On 09/07/2015 07:27 PM, Paolo Bonzini wrote:
>
>
> On 21/08/2015 06:50, Xiao Guangrong wrote:
>>
>> +static void set_clear_2nd_exec_ctrl(u32 ctrls, bool set)
>> +{
>> + u32 exec_ctrl = vmcs_read32(SECONDARY_VM_EXEC_CONTROL);
>> +
>> + if (set)
>> + exec_ctrl |= ctrls;
>> + else
>> + exec_ctrl &= ~ctrls;
>> +
>> + vmcs_write32(SECONDARY_VM_EXEC_CONTROL, exec_ctrl);
>> +}
>
> The second argument is always true.
No...
There are 3 places calling this function with set=false:
nested_release_vmcs12(), vmx_disable_pml() and
vmx_cpuid_update()
> Do you have any plans for it?
>
> Should we instead add functions like vmcs_or32 and vmcs_clear32?
>
Sounds good to me, will do it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2015-09-08 22:40 +0200 |
| Message-ID | <q6xQm-6JP-21@gated-at.bofh.it> |
| In reply to | #1220864 |
On 08/09/2015 16:24, Xiao Guangrong wrote: >> >> The second argument is always true. > > No... > > There are 3 places calling this function with set=false: > nested_release_vmcs12(), vmx_disable_pml() and > vmx_cpuid_update() You're right. It's always constant---I don't know why I wrote it's always true, and then suggested vmcs_clear32... Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web