All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Sander Eikelenboom <linux@eikelenboom.it>
Cc: stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
	konrad@kernel.org, david.vrabel@citrix.com,
	Jan Beulich <JBeulich@suse.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH QEMU-XEN] xen/pt: Start with emulated PCI_COMMAND set to zero.
Date: Fri, 12 Jun 2015 09:37:31 -0400	[thread overview]
Message-ID: <20150612133731.GE15651@l.oracle.com> (raw)
In-Reply-To: <1593167293.20150611131934@eikelenboom.it>

On Thu, Jun 11, 2015 at 01:19:34PM +0200, Sander Eikelenboom wrote:
> 
> Thursday, June 11, 2015, 9:47:47 AM, you wrote:
> 
> >>>> On 10.06.15 at 22:53, <konrad@kernel.org> wrote:
> >> --- a/hw/xen/xen_pt.c
> >> +++ b/hw/xen/xen_pt.c
> >> @@ -785,7 +785,9 @@ out:
> >>          xen_host_pci_set_word(&s->real_device, PCI_COMMAND,
> >>                                pci_get_word(d->config + PCI_COMMAND) | cmd);
> >>      }
> >> -
> >> +    /* Until the guest enables the device use d->config values which will
> >> +     * inhibit pci_bar_address & pci_update_mappings from triggering updates.*/
> >> +    pci_set_word(d->config + PCI_COMMAND, 0);
> >>      memory_listener_register(&s->memory_listener, &address_space_memory);
> >>      memory_listener_register(&s->io_listener, &address_space_io);
> >>      XEN_PT_LOG(d,
> 
> > Well, I can see this as something to be tried out as an experiment,
> > but it looks like you mean this to be a proper submission for
> > inclusion upstream? Or maybe not, considering that qemu-devel

I needed to make sure that Sander's test-case is indeed fixed with this.
And it looks like it is which makes further development of this
much simpler since I can reproduce this.

> > wasn't even Cc-ed? In any case - what we need here is a general
> > solution to at least the initialization part of the problem, i.e. all
> > fields we emulate some or all bits for need to have d->config[]
> > updated accordingly (i.e. you need to merge d->config[] and
> > XenPTReg's data field based on the respective XenPTRegInfo's
> > emu_mask, but perhaps simply copying the data field to
> d->>config[] would have the same effect; if it doesn't, we have
> > yet another problem). For the command register this for example
> > means that it is in no way guaranteed that it would end up being
> > zero; its emu_mask however guarantees that the memory and I/O
> > decode bits would start out as zero (which is what you're after).

Right, I hope :-)
> 
> Just tested this patch together with a dom0 kernel which has the dropped kernel patch from Konrad:
> 22d8a8938407cb1342af763e937fdf9ee8daf24a xen/pciback: Don't disable PCI_COMMAND on PCI device reset.
> 
> And this patch does help to prevent the issue from happening.

Yeeey!
>  
> --
> Sander
> 
> > Jan
> 
> 
> 

  reply	other threads:[~2015-06-12 13:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13  9:39 Dom0 linux 4.0 + devel/for-linus-4.1 branch: p2m.c:884:d0v0 gfn_to_mfn failed! gfn=ffffffff001ed type:4 Sander Eikelenboom
2015-04-13  9:50 ` David Vrabel
2015-04-13 11:21   ` Sander Eikelenboom
2015-04-13 12:07     ` David Vrabel
2015-04-13 12:14       ` Sander Eikelenboom
2015-04-13 12:21         ` David Vrabel
2015-04-13 12:27           ` Sander Eikelenboom
2015-04-13 15:11           ` Sander Eikelenboom
2015-04-14  9:44             ` David Vrabel
2015-04-14 20:42             ` Konrad Rzeszutek Wilk
2015-04-15 15:08               ` Sander Eikelenboom
2015-04-15 20:58                 ` Konrad Rzeszutek Wilk
2015-04-15 21:14                   ` Sander Eikelenboom
2015-06-10  1:02                     ` Is: qemu-xen mishandling upper 64-bit BAR compared to qemu-tradWas:Re: " Konrad Rzeszutek Wilk
2015-06-10  8:44                       ` Jan Beulich
2015-06-10 11:13                         ` Stefano Stabellini
2015-06-10 12:02                           ` Jan Beulich
2015-06-10 14:33                             ` Konrad Rzeszutek Wilk
2015-06-10 20:53                             ` [PATCH QEMU-XEN] xen/pt: Start with emulated PCI_COMMAND set to zero konrad
2015-06-11  7:47                               ` Jan Beulich
2015-06-11 11:19                                 ` Sander Eikelenboom
2015-06-12 13:37                                   ` Konrad Rzeszutek Wilk [this message]
2015-06-15 16:19                                 ` Stefano Stabellini
2015-06-15 18:46                                   ` Konrad Rzeszutek Wilk
2015-06-16  7:33                                   ` Jan Beulich
2015-06-24 15:59                                     ` Konrad Rzeszutek Wilk
2015-06-25  7:34                                       ` Jan Beulich
2015-06-25 12:08                                         ` Stefano Stabellini
2015-06-25 17:23                                         ` Konrad Rzeszutek Wilk
2015-06-26  6:10                                           ` Jan Beulich
2015-06-15 16:15                             ` Is: qemu-xen mishandling upper 64-bit BAR compared to qemu-tradWas:Re: Dom0 linux 4.0 + devel/for-linus-4.1 branch: p2m.c:884:d0v0 gfn_to_mfn failed! gfn=ffffffff001ed type:4 Stefano Stabellini

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=20150612133731.GE15651@l.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=konrad@kernel.org \
    --cc=linux@eikelenboom.it \
    --cc=stefano.stabellini@eu.citrix.com \
    --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.