All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Reima Ishii" <ishiir@g.ecc.u-tokyo.ac.jp>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"Jun Nakajima" <jun.nakajima@intel.com>,
	"Kevin Tian" <kevin.tian@intel.com>,
	"Tamas K Lengyel" <tamas@tklengyel.com>,
	"Takahiro Shinagawa" <shina@ecc.u-tokyo.ac.jp>,
	"George Dunlap" <george.dunlap@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2 3/3] x86/vmx: Disallow the use of inactivity states
Date: Fri, 12 Jan 2024 12:04:30 +0100	[thread overview]
Message-ID: <b25c0ff6-b2da-4e5b-b6b9-dca7843816d2@suse.com> (raw)
In-Reply-To: <8225cfd3-73d6-4a93-92b4-185399ab0ad3@citrix.com>

On 12.01.2024 11:43, Andrew Cooper wrote:
> On 12/01/2024 10:37 am, Jan Beulich wrote:
>> On 12.01.2024 00:13, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>>> @@ -1551,7 +1551,10 @@ static void cf_check vmx_set_nonreg_state(struct vcpu *v,
>>>  {
>>>      vmx_vmcs_enter(v);
>>>  
>>> -    __vmwrite(GUEST_ACTIVITY_STATE, nrs->vmx.activity_state);
>>> +    if ( nrs->vmx.activity_state )
>>> +        domain_crash(v->domain, "Attempt to set activity_state %#lx\n",
>>> +                     nrs->vmx.activity_state);
>> Might be useful to log the offending vCPU here?
> 
> Already covered.  the innards of __domain_crash() does:
> 
>     else if ( d == current->domain )
>     {
>         printk("Domain %d (vcpu#%d) crashed on cpu#%d:\n",
>         ...

Except that afaict v != current here at all times (at least as far as
current use of the function goes).

Jan


  reply	other threads:[~2024-01-12 11:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 23:13 [PATCH v2 0/3] x86/vmx: Multiple fixes Andrew Cooper
2024-01-11 23:13 ` [PATCH v2 1/3] x86/vmx: Collect all emtpy VMExit cases together Andrew Cooper
2024-01-12 10:32   ` Jan Beulich
2024-01-11 23:13 ` [PATCH v2 2/3] x86/vmx: Fix IRQ handling for EXIT_REASON_INIT Andrew Cooper
2024-01-12 10:33   ` Jan Beulich
2024-01-11 23:13 ` [PATCH v2 3/3] x86/vmx: Disallow the use of inactivity states Andrew Cooper
2024-01-12 10:37   ` Jan Beulich
2024-01-12 10:43     ` Andrew Cooper
2024-01-12 11:04       ` Jan Beulich [this message]
2024-01-12 11:18         ` Andrew Cooper
2024-01-16 14:27   ` Tamas K Lengyel

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=b25c0ff6-b2da-4e5b-b6b9-dca7843816d2@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ishiir@g.ecc.u-tokyo.ac.jp \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=shina@ecc.u-tokyo.ac.jp \
    --cc=tamas@tklengyel.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.