[Devel] [PATCH 0/6] backporting async_pf injection functionality

Kirill Tkhai ktkhai at virtuozzo.com
Mon Sep 25 16:00:41 MSK 2017



On 25.09.2017 15:57, Denis V. Lunev wrote:
> On 09/25/2017 03:47 PM, Kirill Tkhai wrote:
>> Hi, Denis,
>>
>> your patches in base64 format. Could you resend them as plain-text like we
>> usually do?
>>
>> Here is body of the patch 1/6:
>>
>> "X-MS-Exchange-Processed-By-BccFoldering: 15.20.0056.000
>> X-Microsoft-Exchange-Diagnostics:
>> 	1;HE1PR0801MB1338;27:2tKlmOLYPsUB4+tCQ+/VLLnyTS38TwWCV2ZWj5N2k5yUKz/VyQQs2QuWlAhcnCHJG3wiwYtk59+WvZbGgAc5/5I8Nb/S5hdsFssBCa4bX6OWopDBrSyQq5/K2D/CsTmJ
>> MIME-Version: 1.0
>>
>> RnJvbTogV2FucGVuZyBMaSA8d2FucGVuZy5saUBob3RtYWlsLmNvbT4KCiBXQVJOSU5HOiBDUFU6
>> IDMgUElEOiAyODQwIGF0IGFyY2gveDg2L2t2bS92bXguYzoxMDk2NiBuZXN0ZWRfdm14X3ZtZXhp
>> dCsweGRjZC8weGRlMCBba3ZtX2ludGVsXQogQ1BVOiAzIFBJRDogMjg0MCBDb21tOiBxZW11LXN5
>> c3RlbS14ODYgVGFpbnRlZDogRyAgICAgICAgICAgT0UgICA0LjEyLjAtcmMzKyAjMjMKIFJJUDog
>> MDAxMDpuZXN0ZWRfdm14X3ZtZXhpdCsweGRjZC8weGRlMCBba3ZtX2ludGVsXQogQ2FsbCBUcmFj
>> ZToKICA/IGt2bV9jaGVja19hc3luY19wZl9jb21wbGV0aW9uKzB4ZWYvMHgxMjAgW2t2bV0KICA/
>> IHJjdV9yZWFkX2xvY2tfc2NoZWRfaGVsZCsweDc5LzB4ODAKICB2bXhfcXVldWVfZXhjZXB0aW9u
>> KzB4MTA0LzB4MTYwIFtrdm1faW50ZWxdCiAgPyB2bXhfcXVldWVfZXhjZXB0aW9uKzB4MTA0LzB4
>>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ucikpKQogCQlyZXR1
>> cm4gMDsKIAotCW5lc3RlZF92bXhfdm1leGl0KHZjcHUsIHRvX3ZteCh2Y3B1KS0+ZXhpdF9yZWFz
>> b24sCisJbmVzdGVkX3ZteF92bWV4aXQodmNwdSwgRVhJVF9SRUFTT05fRVhDRVBUSU9OX05NSSwK
>> IAkJCSAgdm1jc19yZWFkMzIoVk1fRVhJVF9JTlRSX0lORk8pLAogCQkJICB2bWNzX3JlYWRsKEVY
>> SVRfUVVBTElGSUNBVElPTikpOwogCXJldHVybiAxOwotLSAKMi43LjQKCl9fX19fX19fX19fX19f
>> X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkRldmVsIG1haWxpbmcgbGlzdApEZXZl
>> bEBvcGVudnoub3JnCmh0dHBzOi8vbGlzdHMub3BlbnZ6Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL2Rl
>> dmVsCg=="
>>
>>
>> On 20.09.2017 17:30, Denis Plotnikov wrote:
>>> the patch set is for
>>> 1. Replace Roman's patch avoiding async_pf injection while in the guest mode with
>>>    the similar patch from the mainstream for kernel code consistency
>>> 2. Force a nested vmexit if the injected #PF is async_pf
>>> 3. Let guest support delivery of async_pf from guest mode
>>>
>>> Denis Plotnikov (1):
>>>   Revert "kvm/x86: skip async_pf when in guest mode"
>>>
>>> Wanpeng Li (5):
>>>   KVM: nVMX: Fix exception injection
>>>   KVM: async_pf: Add L1 guest async_pf #PF vmexit handler
>>>   KVM: async_pf: Force a nested vmexit if the injected #PF is async_pf
>>>   KVM: async_pf: avoid async pf injection when in guest mode
>>>   KVM: async_pf: Let guest support delivery of async_pf from guest mode
>>>
>>>  Documentation/virtual/kvm/msr.txt    |  5 ++--
>>>  arch/x86/include/asm/kvm_emulate.h   |  1 +
>>>  arch/x86/include/asm/kvm_host.h      |  4 +++
>>>  arch/x86/include/uapi/asm/kvm_para.h |  1 +
>>>  arch/x86/kernel/kvm.c                |  7 ++++-
>>>  arch/x86/kvm/mmu.c                   | 40 +++++++++++++++++++++++++++--
>>>  arch/x86/kvm/mmu.h                   |  4 +++
>>>  arch/x86/kvm/svm.c                   | 50 +++++++++++-------------------------
>>>  arch/x86/kvm/vmx.c                   | 36 +++++++++++++++++---------
>>>  arch/x86/kvm/x86.c                   | 20 ++++++++++-----
>>>  10 files changed, 109 insertions(+), 59 deletions(-)
> this is somehow broken on your side.
> I have received these thread in plain text, as usual.

Have you seen message sources?


More information about the Devel mailing list