qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v18 08/15] i386: split smm helper (softmmu)


From: Claudio Fontana
Subject: Re: [RFC v18 08/15] i386: split smm helper (softmmu)
Date: Mon, 15 Feb 2021 15:39:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

On 2/15/21 3:13 PM, Paolo Bonzini wrote:
> On 15/02/21 15:05, Claudio Fontana wrote:
>> On 2/15/21 2:30 PM, Paolo Bonzini wrote:
>>> On 15/02/21 13:59, Claudio Fontana wrote:
>>>> Yes. The difference between before the patch and after the patch 
>>>> is that before we were still going through all the code in
>>>> tcg_gen_callN, via the call to gen_helper_rsm macro, only to call
>>>> finally an empty function for CONFIG_USER_ONLY (helper_rsm()
>>>> {}),
>>>>
>>>> while now we do not generate anything, we do not call the
>>>> gen_helper_rsm macro at all, so we don't go through
>>>> tcg_gen_callN.
>>>>
>>>
>>> Can we even have an abort() for such cases?
>>>
>>> Paolo
>>>
>>
>> Hi Paolo,
>>
>> where are you suggesting to have an abort()?
>>
>> You mean that we should abort() QEMU as soon as we detect in
>> translate.c an RSM instruction in user-mode?
> 
> Translating it is okay (it's just a guaranteed SIGILL), but I'm thinking
> of aborting if s->flags & HF_SMM_MASK is true.  Likewise if we see
> CPU_INTERRUPT_SMI.
> 
> Paolo
> 

Ok, will rework as you suggest, thanks!

>>
>>     case 0x1aa: /* rsm */
>>         gen_svm_check_intercept(s, pc_start, SVM_EXIT_RSM);
>>         if (!(s->flags & HF_SMM_MASK))
>>             goto illegal_op;
>>         gen_update_cc_op(s);
>>         gen_jmp_im(s, s->pc - s->cs_base);
>> #ifndef CONFIG_USER_ONLY
>>         gen_helper_rsm(cpu_env);
>> #endif /* CONFIG_USER_ONLY */
>>         gen_eob(s);
>>         break;
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]