All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Jan Beulich <JBeulich@suse.com>,
	Paul Durrant <Paul.Durrant@citrix.com>,
	Don Slutz <dslutz@verizon.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 3/5] hvmemul_do_io: If the send to the ioreq server failed do not retry.
Date: Mon, 02 Feb 2015 08:53:06 -0500	[thread overview]
Message-ID: <54CF8142.4050203@terremark.com> (raw)
In-Reply-To: <54CF453A020000780005BC13@mail.emea.novell.com>

On 02/02/15 03:36, Jan Beulich wrote:
>>>> On 30.01.15 at 20:19, <dslutz@verizon.com> wrote:
>> Soon after sending this, I came up with a 2nd way for fix.
>> Change hvm_has_dm() to use hvm_select_ioreq_server().  Then
>> the correct answer will be found, and so will not retry.
>>
>> To avoid 2 calls to hvm_select_ioreq_server(), it makes
>> snes to me to return s.  Also adding a call to hvm_complete_assist_req()
>> would help.  So based on all this is is a possible v2:
> 
> Looks reasonable (awaiting Paul's opinion though) except for
> mechanical aspects:
> 
>> --- a/xen/arch/x86/hvm/hvm.c
>> +++ b/xen/arch/x86/hvm/hvm.c
>> @@ -2507,9 +2507,45 @@ int hvm_buffered_io_send(ioreq_t *p)
>>      return 1;
>>  }
>>
>> -bool_t hvm_has_dm(struct domain *d)
>> +static bool_t hvm_complete_assist_req(ioreq_t *p)
>>  {
...
>> +}
>> +
>> +void *hvm_has_dm(struct domain *d, ioreq_t *p)
> 
> I can't see why this needs to return void * instead of a properly typed
> pointer.
> 

Using "struct hvm_ioreq_server *s" did not build:

In file included from /home/don/xen-master/xen/include/asm/hvm/irq.h:26:0,
                 from /home/don/xen-master/xen/include/asm/hvm/vpt.h:32,
                 from /home/don/xen-master/xen/include/asm/hvm/vlapic.h:27,
                 from /home/don/xen-master/xen/include/asm/hvm/vcpu.h:25,
                 from /home/don/xen-master/xen/include/asm/domain.h:7,
                 from /home/don/xen-master/xen/include/xen/domain.h:6,
                 from /home/don/xen-master/xen/include/xen/sched.h:10,
                 from x86_64/asm-offsets.c:10:
/home/don/xen-master/xen/include/asm/hvm/hvm.h:231:35: error: 'struct
hvm_ioreq_server' declared inside parameter list [-Werror]
/home/don/xen-master/xen/include/asm/hvm/hvm.h:231:35: error: its scope
is only this definition or declaration, which is probably not what you
want [-Werror]
cc1: all warnings being treated as errors

So I went with void * to check the that the code would pass my unit
testing.


No clue why I did not say:

+struct hvm_ioreq_server;
+bool_t hvm_send_assist_req(struct hvm_ioreq_server *s, ioreq_t *p);

Unless I hear otherwise, this is the way I will go.



>> @@ -2571,44 +2607,15 @@ bool_t hvm_send_assist_req_to_ioreq_server(struct hvm_ioreq_server *s,
>>      return 0;
>>  }
>>
>> -static bool_t hvm_complete_assist_req(ioreq_t *p)
>> -{
...
>> -    return 0; /* implicitly bins the i/o operation */
>> -}
> 
> Moving hvm_has_dm() down here would make the patch smaller and
> hence quite a bit easier to review (as one doesn't need to manually
> check the differences between the much larger added/removed
> pieces of code.
> 

Will do.

   -Don Slutz


> Jan
> 

  reply	other threads:[~2015-02-02 13:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  0:52 [PATCH 0/5] Skip unneeded VMENTRY & VMEXIT Don Slutz
2015-01-30  0:52 ` [PATCH 1/5] DEBUG: xentrace: Add debug of HANDLE_PIO Don Slutz
2015-01-30  0:52 ` [PATCH 2/5] xentrace: Adjust IOPORT & MMIO format Don Slutz
2015-01-30  0:52 ` [PATCH 3/5] hvmemul_do_io: If the send to the ioreq server failed do not retry Don Slutz
2015-01-30 10:23   ` Jan Beulich
2015-01-30 18:17     ` Don Slutz
2015-01-30 19:19       ` Don Slutz
2015-02-02  8:36         ` Jan Beulich
2015-02-02 13:53           ` Don Slutz [this message]
2015-02-02  9:51         ` Paul Durrant
2015-02-02 10:04           ` Jan Beulich
2015-02-02 10:06             ` Paul Durrant
2015-02-02 10:14               ` Jan Beulich
2015-02-02 13:54                 ` Don Slutz
2015-01-30 10:37   ` Paul Durrant
2015-01-30 17:51     ` Don Slutz
2015-01-30  0:52 ` [PATCH 4/5] hvm_complete_assist_req: We should not be able to get here on IOREQ_TYPE_PCI_CONFIG Don Slutz
2015-01-30 10:24   ` Jan Beulich
2015-01-30 17:17     ` Don Slutz
2015-01-30  0:52 ` [PATCH 5/5] hvm_complete_assist_req: Tell caller we failed to send Don Slutz
2015-01-30 10:24   ` Jan Beulich
2015-01-30 17:47     ` Don Slutz
2015-01-30 10:40   ` Paul Durrant
2015-01-30 17:48     ` Don Slutz
2015-01-30 10:53   ` Paul Durrant
2015-01-30 17:49     ` Don Slutz

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=54CF8142.4050203@terremark.com \
    --to=dslutz@verizon.com \
    --cc=JBeulich@suse.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.