mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxim Levitsky <mlevitsk@redhat.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Sean Christopherson <seanjc@google.com>,
	Joerg Roedel <joro@8bytes.org>, Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Jim Mattson <jmattson@google.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: SVM: fix task switch emulation on INTn instruction.
Date: Thu, 14 Jul 2022 16:57:56 +0300	[thread overview]
Message-ID: <034401953bc935d997c143153938edb1034b52cd.camel@redhat.com> (raw)
In-Reply-To: <52d44630-21ad-1291-4185-40d5728eaea6@maciej.szmigiero.name>

On Thu, 2022-07-14 at 15:50 +0200, Maciej S. Szmigiero wrote:
> On 14.07.2022 14:44, Maxim Levitsky wrote:
> > Recently KVM's SVM code switched to re-injecting software interrupt events,
> > if something prevented their delivery.
> > 
> > Task switch due to task gate in the IDT, however is an exception
> > to this rule, because in this case, INTn instruction causes
> > a task switch intercept and its emulation completes the INTn
> > emulation as well.
> > 
> > Add a missing case to task_switch_interception for that.
> > 
> > This fixes 32 bit kvm unit test taskswitch2.
> > 
> > Fixes: 7e5b5ef8dca322 ("KVM: SVM: Re-inject INTn instead of retrying the insn on "failure"")
> > 
> > Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
> > ---
> 
> That's a good catch, your patch looks totally sensible to me.
> People running Win 3.x or OS/2 on top of KVM will surely be grateful for it :)

Yes and also people who run 32 bit kvm unit tests :)

BTW, I do have a win98 VM which I run once in a while under KVM.
On Intel it works very well, on AMD, only works without NPT and without MMU
pre-fetching, due to fact that the OS doesn't correctly invalidate TLB entries.

I do need to test KVM with OS/2 on one of the weekends.... ;-)

Thanks for the review,
	Best regards,
		Maxim Levitsky

> 
> Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
> 
> Thanks,
> Maciej
> 



  reply	other threads:[~2022-07-14 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 12:44 Maxim Levitsky
2022-07-14 13:50 ` Maciej S. Szmigiero
2022-07-14 13:57   ` Maxim Levitsky [this message]
2022-07-14 22:40     ` Maciej S. Szmigiero
2022-07-14 23:24       ` Sean Christopherson
2022-07-14 23:36         ` Jim Mattson
2022-07-15  0:00           ` Sean Christopherson
2022-07-14 15:32 ` Paolo Bonzini

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=034401953bc935d997c143153938edb1034b52cd.camel@redhat.com \
    --to=mlevitsk@redhat.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@maciej.szmigiero.name \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --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

all inboxes | Powered by JetHome®