public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Nadav Amit <namit@cs.technion.ac.il>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, gleb@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/7] KVM: x86: Additional rflags.rf fixes
Date: Mon, 21 Jul 2014 15:28:42 +0300	[thread overview]
Message-ID: <53CD077A.1020409@gmail.com> (raw)
In-Reply-To: <53CD056E.4050203@redhat.com>

On 7/21/14, 3:19 PM, Paolo Bonzini wrote:
> Il 21/07/2014 13:37, Nadav Amit ha scritto:
>> RFLAGS.RF is not handled well by kvm, in both the x86 emulator and vmx code.
>> This flag should be cleared after every instruction emulation (other than
>> IRETD/IRETQ).  It should be set in various conditions as described in Intel SDM
>> 17.3.1.1.  This series of patches addresses the clearing of RF on emulated
>> instructions, the setting the RF upon fault injection.  It does not handle the
>> case of traps and interrupts injection during REP-string, since there is
>> no easy indication whether the first iteration of a rep-string occurred.
>> The value of RF depends on whether the first iteration took place.
>>
>> Thanks for reviewing the patches.
>>
>> Nadav Amit (7):
>>    KVM: x86: Defining missing x86 vectors
>>    KVM: x86: Function for determining exception type
>>    KVM: x86: Clearing rflags.rf upon skipped emulated instruction
>>    KVM: vmx: set rflags.rf during fault injection
>>    KVM: x86: popf emulation should not change RF
>>    KVM: x86: Clear rflags.rf on emulated instructions
>>    KVM: x86: Cleanup of rflags.rf cleaning
>>
>>   arch/x86/include/uapi/asm/kvm.h |  3 +++
>>   arch/x86/kvm/emulate.c          | 13 ++++++++-----
>>   arch/x86/kvm/vmx.c              | 11 ++++++++++-
>>   arch/x86/kvm/x86.c              | 37 +++++++++++++++++++++++++++++++++++++
>>   arch/x86/kvm/x86.h              |  9 +++++++++
>>   5 files changed, 67 insertions(+), 6 deletions(-)
>>
>
> I'm not applying patches 2 and 4 yet.  I have applied the others:
>
>        KVM: x86: Clearing rflags.rf upon skipped emulated instruction
>        KVM: x86: popf emulation should not change RF
>        KVM: x86: Clear rflags.rf on emulated instructions
>        KVM: x86: Cleanup of rflags.rf cleaning
>        KVM: x86: emulator injects #DB when RFLAGS.RF is set
>        KVM: x86: Defining missing x86 vectors
>
> since the remaining two are independent.
>

Thanks for the quick response. I will address the issues you raised.

Please review and apply as well "[PATCH] KVM: x86: emulator injects #DB 
when RFLAGS.RF is set" which was submitted before. ( 
http://www.spinics.net/lists/kvm/msg105858.html ).
as well.

Thanks again,
Nadav


  reply	other threads:[~2014-07-21 12:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 11:37 [PATCH 0/7] KVM: x86: Additional rflags.rf fixes Nadav Amit
2014-07-21 11:37 ` [PATCH 1/7] KVM: x86: Defining missing x86 vectors Nadav Amit
2014-07-21 11:37 ` [PATCH 2/7] KVM: x86: Function for determining exception type Nadav Amit
2014-07-21 12:18   ` Paolo Bonzini
2014-07-21 21:30     ` Nadav Amit
2014-07-22  8:08       ` Paolo Bonzini
2014-07-21 11:37 ` [PATCH 3/7] KVM: x86: Clearing rflags.rf upon skipped emulated instruction Nadav Amit
2014-07-21 11:37 ` [PATCH 4/7] KVM: vmx: set rflags.rf during fault injection Nadav Amit
2014-07-21 12:05   ` Paolo Bonzini
2014-07-21 11:37 ` [PATCH 5/7] KVM: x86: popf emulation should not change RF Nadav Amit
2014-07-21 11:37 ` [PATCH 6/7] KVM: x86: Clear rflags.rf on emulated instructions Nadav Amit
2014-07-21 11:37 ` [PATCH 7/7] KVM: x86: Cleanup of rflags.rf cleaning Nadav Amit
2014-07-21 11:39 ` [PATCH kvm-unit-tests 0/3] x86: Test rflags.rf clearing/setting Nadav Amit
2014-07-21 11:39   ` [PATCH kvm-unit-tests 1/3] x86: Check rflags.rf is cleared after emulation Nadav Amit
2014-07-21 11:39   ` [PATCH kvm-unit-tests 2/3] x86: Test rflags.rf is set upon faults Nadav Amit
2014-07-21 12:24     ` Paolo Bonzini
2014-07-21 11:39   ` [PATCH kvm-unit-tests 3/3] x86: Check RFLAGS.RF on interrupt during REP-str Nadav Amit
2014-07-21 12:25   ` [PATCH kvm-unit-tests 0/3] x86: Test rflags.rf clearing/setting Paolo Bonzini
2014-07-24 11:55     ` [PATCH kvm-unit-tests] x86: Test rflags.rf is set upon faults Nadav Amit
2014-07-24 12:09       ` Paolo Bonzini
2014-07-21 12:19 ` [PATCH 0/7] KVM: x86: Additional rflags.rf fixes Paolo Bonzini
2014-07-21 12:28   ` Nadav Amit [this message]
2014-07-21 12:31     ` Paolo Bonzini
2014-07-24 11:51       ` [PATCH 0/2] KVM: x86: Missing " Nadav Amit
2014-07-24 11:51         ` [PATCH 1/2] KVM: x86: Setting rflags.rf during rep-string emulation Nadav Amit
2014-07-24 11:51         ` [PATCH 2/2] KVM: x86: set rflags.rf during fault injection Nadav Amit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53CD077A.1020409@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=gleb@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namit@cs.technion.ac.il \
    --cc=pbonzini@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox