[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR12MB35006C181165FE3C09E6DCAACA8E9@DM6PR12MB3500.namprd12.prod.outlook.com>
Date: Wed, 20 Jul 2022 19:11:18 +0000
From: Kechen Lu <kechenl@...dia.com>
To: Sean Christopherson <seanjc@...gle.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"chao.gao@...el.com" <chao.gao@...el.com>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
Somdutta Roy <somduttar@...dia.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH v4 6/7] KVM: x86: Add a new guest_debug flag forcing
exit to userspace
> -----Original Message-----
> From: Sean Christopherson <seanjc@...gle.com>
> Sent: Wednesday, July 20, 2022 10:06 AM
> To: Kechen Lu <kechenl@...dia.com>
> Cc: kvm@...r.kernel.org; pbonzini@...hat.com; chao.gao@...el.com;
> vkuznets@...hat.com; Somdutta Roy <somduttar@...dia.com>; linux-
> kernel@...r.kernel.org
> Subject: Re: [RFC PATCH v4 6/7] KVM: x86: Add a new guest_debug flag
> forcing exit to userspace
>
> External email: Use caution opening links or attachments
>
>
> On Tue, Jun 21, 2022, Kechen Lu wrote:
> > For debug and test purposes, there are needs to explicitly make
> > instruction triggered exits could be trapped to userspace. Simply add
> > a new flag for guest_debug interface could achieve this.
> >
> > This patch also fills the userspace accessible field
> > vcpu->run->hw.hardware_exit_reason for userspace to determine the
> > original triggered VM-exits.
>
> This patch belongs in a different series, AFAICT there are no dependencies
> between this and allowing per-vCPU disabling of exits. Allowing userspace to
> exit on "every" instruction exit is going to be much more controversial,
> largely because it will be difficult for KVM to provide a consistent, robust ABI.
> E.g. should KVM exit to userspace if an intercepted instruction is
> encountered by the emualtor?
>
> TL;DR: drop this patch from the next version.
Ack. This patch I introduced as prerequisite for the patch 7 of implementing the selftests for KVM_CAP_X86_DISABLE_EXITS. But yeah, it's not a good practice, I will try to think about a better way to implement the disabled exits testing.
BR,
Kechen
Powered by blists - more mailing lists