Re: [Xen-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.

2015-09-15 Thread Konrad Rzeszutek Wilk
On Tue, Sep 15, 2015 at 02:28:51PM +0100, Stefano Stabellini wrote: > On Tue, 15 Sep 2015, Konrad Rzeszutek Wilk wrote: > > On Tue, Sep 15, 2015 at 11:07:02AM +0100, Stefano Stabellini wrote: > > > CC Konrad > > > > > > On Mon, 14 Sep 2015, Paolo Bonzini wrote: > > > > On 10/09/2015 19:15, Stefano

Re: [Xen-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.

2015-09-15 Thread Paolo Bonzini
On 15/09/2015 15:28, Stefano Stabellini wrote: > >> > 2). Send an follow up patch to change this to abort()? (and wherever else >> > I used >> > assert(..)? > Yes, that would be good. > > >> > 3). Wait till Paolo is done going through the patchset and then revisit >> > 1) or 2)? > I d

Re: [Xen-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.

2015-09-15 Thread Stefano Stabellini
On Tue, 15 Sep 2015, Konrad Rzeszutek Wilk wrote: > On Tue, Sep 15, 2015 at 11:07:02AM +0100, Stefano Stabellini wrote: > > CC Konrad > > > > On Mon, 14 Sep 2015, Paolo Bonzini wrote: > > > On 10/09/2015 19:15, Stefano Stabellini wrote: > > > > + > > > > +switch (reg->size) { > > > > +

Re: [Xen-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.

2015-09-15 Thread Konrad Rzeszutek Wilk
On Tue, Sep 15, 2015 at 11:07:02AM +0100, Stefano Stabellini wrote: > CC Konrad > > On Mon, 14 Sep 2015, Paolo Bonzini wrote: > > On 10/09/2015 19:15, Stefano Stabellini wrote: > > > + > > > +switch (reg->size) { > > > +case 1: rc = xen_host_pci_get_byte(&s->real_device, offset, >

Re: [Xen-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.

2015-09-15 Thread Stefano Stabellini
CC Konrad On Mon, 14 Sep 2015, Paolo Bonzini wrote: > On 10/09/2015 19:15, Stefano Stabellini wrote: > > + > > +switch (reg->size) { > > +case 1: rc = xen_host_pci_get_byte(&s->real_device, offset, > > (uint8_t *)&val); > > A bit ugly, and it relies on the host being little endia

Re: [Xen-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.

2015-09-14 Thread Paolo Bonzini
On 10/09/2015 19:15, Stefano Stabellini wrote: > + > +switch (reg->size) { > +case 1: rc = xen_host_pci_get_byte(&s->real_device, offset, (uint8_t > *)&val); A bit ugly, and it relies on the host being little endian. > +break; > +case 2: rc = xen_host_pc

[Xen-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.

2015-09-10 Thread Stefano Stabellini
From: Konrad Rzeszutek Wilk For a passthrough device we maintain a state of emulated registers value contained within d->config. We also consult the host registers (and apply ro and write masks) whenever the guest access the registers. This is done in xen_pt_pci_write_config and xen_pt_pci_read_c