[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults
- To: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>
- Date: Thu, 22 Nov 2018 09:50:28 +0000
- Accept-language: en-US
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisaila@xxxxxxxxxxxxxxx;
- Cc: "kevin.tian@xxxxxxxxx" <kevin.tian@xxxxxxxxx>, "tamas@xxxxxxxxxxxxx" <tamas@xxxxxxxxxxxxx>, "wei.liu2@xxxxxxxxxx" <wei.liu2@xxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "george.dunlap@xxxxxxxxxxxxx" <george.dunlap@xxxxxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, Mihai Donțu <mdontu@xxxxxxxxxxxxxxx>, Andrei Vlad LUTAS <vlutas@xxxxxxxxxxxxxxx>, "jun.nakajima@xxxxxxxxx" <jun.nakajima@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Anshul Makkar <anshul.makkar@xxxxxxxxxx>
- Delivery-date: Thu, 22 Nov 2018 09:50:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
- Thread-index: AQHUfZQPHpmE6j0fs0GW/eF2dyk+UKVSoaIAgAf61wCAAPnzAA==
- Thread-topic: [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults
On 21.11.2018 20:55, Razvan Cojocaru wrote:
>> + if ( a == v )
>> + continue;
>> +
>> + /* Pause, synced. */
>> + while ( !a->arch.in_host )
> Why not use a->is_running as a way to know whether the vCPU is
> running?
>
> I think the logic of using vcpu_pause and expecting the running vcpu
> to take a vmexit and thus set in_host is wrong because a vcpu that
> wasn't running when vcpu_pause_nosync is called won't get scheduled
> anymore, thus not taking a vmexit and this function will lockup.
We can resolve this by using while ( !vcpu_runnable(a) &&
!a->arch.in_host ), if this is suitable.
~Alex
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|