xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Keir (Xen.org)" <keir@xen.org>,
	Chang Jianzhong <changjzh@gmail.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 1/3] x86/HVM: fix forwarding of internally cached requests
Date: Thu, 24 Mar 2016 06:52:25 -0600	[thread overview]
Message-ID: <56F3F11902000078000E01DC@prv-mh.provo.novell.com> (raw)
In-Reply-To: <71131253691d40d5b3cf40fcd9181eed@AMSPEX02CL03.citrite.net>

>>> On 24.03.16 at 12:49, <Paul.Durrant@citrix.com> wrote:
>> From: Jan Beulich [mailto:JBeulich@suse.com]
>> Sent: 24 March 2016 11:29
>> @@ -196,8 +196,22 @@ int hvm_process_io_intercept(const struc
>>          }
>>      }
>> 
>> -    if ( i != 0 && rc == X86EMUL_UNHANDLEABLE )
>> +    if ( unlikely(rc < 0) )
>>          domain_crash(current->domain);
>> +    else if ( i )
>> +    {
>> +        p->count = i;
>> +        rc = X86EMUL_OKAY;
>> +    }
>> +    else if ( rc == X86EMUL_UNHANDLEABLE )
>> +    {
>> +        /*
>> +         * Don't forward entire batches to the device model: This would
>> +         * prevent the internal handlers to see subsequent iterations of
>> +         * the request.
>> +         */
>> +        p->count = 1;
> 
> I guess this is ok. If stdvga is not caching then the accept function would 
> have failed so you won't get here, and if it send the buffered ioreq then you 
> still don't get here because it returns X86EMUL_OKAY.

Good that you thought of this - I had forgotten that stdvga's
MMIO handling now takes this same code path rather than a
fully separate one. I guess I'll steal some of the wording above
for the v2 commit message.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-03-24 12:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 11:21 [PATCH 0/3] x86/HVM: adjustments to internal device emulation Jan Beulich
2016-03-24 11:28 ` [PATCH 1/3] x86/HVM: fix forwarding of internally cached requests Jan Beulich
2016-03-24 11:49   ` Paul Durrant
2016-03-24 12:01     ` Jan Beulich
2016-03-24 12:11       ` Paul Durrant
2016-03-24 12:52     ` Jan Beulich [this message]
2016-03-24 12:58       ` Paul Durrant
2016-03-24 11:29 ` [PATCH 2/3] x86/vLAPIC: vlapic_reg_write() can't fail Jan Beulich
2016-03-24 14:03   ` Andrew Cooper
2016-03-24 11:30 ` [PATCH 3/3] x86/HVM: terminate writes to PM_TMR port Jan Beulich
2016-03-24 14:08   ` Andrew Cooper

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=56F3F11902000078000E01DC@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=changjzh@gmail.com \
    --cc=keir@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).