All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size.
@ 2011-08-03 14:42 ` Jan Beulich
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2011-08-03 14:42 UTC (permalink / raw)
  To: anthony.perard, Stefano.Stabellini; +Cc: xen-devel, qemu-devel, agraf

>>> Stefano Stabellini 08/03/11 12:01 AM >>> 
>if (rlimit_as.rlim_max < MCACHE_MAX_SIZE) { 

This condition minimally needs to include what Anthony's original version had.

>if (qemu is priviledged) { 
>rlimit_as.rlim_max = RLIM_INFINITY; 
>rlimit_as.rlim_cur = RLIM_INFINITY; 
>} else { 
>print a warning 
>mapcache->max_mcache_size = rlimit_as.rlim_cur - NON_MCACHE_MEMORY_SIZE; 
>rlimit_as.rlim_cur = rlimit_as.rlim_max; 
>} 
>} else { 

Not printing a warning here means that there are still cases where the
fuzzy upper bound may not be precise enough anymore (hence causing
silent failure). I think the privileged case needs to be handled without
any other surrounding condition, and the warning ought to be prinited
in any case in the non-privileged case.

>rlimit_as.rlim_cur = rlimit_as.rlim_max; 
>} 

Jan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size.
@ 2011-08-03 14:42 ` Jan Beulich
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2011-08-03 14:42 UTC (permalink / raw)
  To: anthony.perard, Stefano.Stabellini; +Cc: xen-devel, qemu-devel, agraf

>>> Stefano Stabellini 08/03/11 12:01 AM >>> 
>if (rlimit_as.rlim_max < MCACHE_MAX_SIZE) { 

This condition minimally needs to include what Anthony's original version had.

>if (qemu is priviledged) { 
>rlimit_as.rlim_max = RLIM_INFINITY; 
>rlimit_as.rlim_cur = RLIM_INFINITY; 
>} else { 
>print a warning 
>mapcache->max_mcache_size = rlimit_as.rlim_cur - NON_MCACHE_MEMORY_SIZE; 
>rlimit_as.rlim_cur = rlimit_as.rlim_max; 
>} 
>} else { 

Not printing a warning here means that there are still cases where the
fuzzy upper bound may not be precise enough anymore (hence causing
silent failure). I think the privileged case needs to be handled without
any other surrounding condition, and the warning ought to be prinited
in any case in the non-privileged case.

>rlimit_as.rlim_cur = rlimit_as.rlim_max; 
>} 

Jan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size.
  2011-08-03 14:42 ` Jan Beulich
@ 2011-08-03 20:57   ` Stefano Stabellini
  -1 siblings, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2011-08-03 20:57 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Anthony Perard, agraf@suse.de, xen-devel@lists.xensource.com,
	qemu-devel@nongnu.org, Stefano Stabellini

On Wed, 3 Aug 2011, Jan Beulich wrote:
> >>> Stefano Stabellini 08/03/11 12:01 AM >>> 
> >if (rlimit_as.rlim_max < MCACHE_MAX_SIZE) { 
> 
> This condition minimally needs to include what Anthony's original version had.

right


> >if (qemu is priviledged) { 
> >rlimit_as.rlim_max = RLIM_INFINITY; 
> >rlimit_as.rlim_cur = RLIM_INFINITY; 
> >} else { 
> >print a warning 
> >mapcache->max_mcache_size = rlimit_as.rlim_cur - NON_MCACHE_MEMORY_SIZE; 
> >rlimit_as.rlim_cur = rlimit_as.rlim_max; 
> >} 
> >} else { 
> 
> Not printing a warning here means that there are still cases where the
> fuzzy upper bound may not be precise enough anymore (hence causing
> silent failure). I think the privileged case needs to be handled without
> any other surrounding condition, and the warning ought to be prinited
> in any case in the non-privileged case.

good idea

> 
> >rlimit_as.rlim_cur = rlimit_as.rlim_max; 
> >} 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size.
@ 2011-08-03 20:57   ` Stefano Stabellini
  0 siblings, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2011-08-03 20:57 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Anthony Perard, agraf@suse.de, xen-devel@lists.xensource.com,
	qemu-devel@nongnu.org, Stefano Stabellini

On Wed, 3 Aug 2011, Jan Beulich wrote:
> >>> Stefano Stabellini 08/03/11 12:01 AM >>> 
> >if (rlimit_as.rlim_max < MCACHE_MAX_SIZE) { 
> 
> This condition minimally needs to include what Anthony's original version had.

right


> >if (qemu is priviledged) { 
> >rlimit_as.rlim_max = RLIM_INFINITY; 
> >rlimit_as.rlim_cur = RLIM_INFINITY; 
> >} else { 
> >print a warning 
> >mapcache->max_mcache_size = rlimit_as.rlim_cur - NON_MCACHE_MEMORY_SIZE; 
> >rlimit_as.rlim_cur = rlimit_as.rlim_max; 
> >} 
> >} else { 
> 
> Not printing a warning here means that there are still cases where the
> fuzzy upper bound may not be precise enough anymore (hence causing
> silent failure). I think the privileged case needs to be handled without
> any other surrounding condition, and the warning ought to be prinited
> in any case in the non-privileged case.

good idea

> 
> >rlimit_as.rlim_cur = rlimit_as.rlim_max; 
> >} 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* hvm_domain_use_pirq() breaks device passthru on xen-4.1
  2011-08-03 20:57   ` Stefano Stabellini
  (?)
@ 2011-08-04 18:44   ` Wei Huang
  2011-08-08  7:36     ` Jan Beulich
  2011-08-16 18:15     ` Stefano Stabellini
  -1 siblings, 2 replies; 7+ messages in thread
From: Wei Huang @ 2011-08-04 18:44 UTC (permalink / raw)
  To: Stefano Stabellini, xen-devel

Hi Stefano,

The recent patch you put into xen-4.1-testing.hg broke device passthru 
on Windows. I bisected the changesets and it turned out to be 23092. The 
NIC can't get the IP address correctly. Changset 23091 worked fine.

Regarding your patch, do we need to differentiate pv-on-hvm guests from 
others? The Windows VM I used is unmodified. I think 
hvm_domain_use_pirq() returned an incorrect answer for such guests.

Thanks,
-Wei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: hvm_domain_use_pirq() breaks device passthru on xen-4.1
  2011-08-04 18:44   ` hvm_domain_use_pirq() breaks device passthru on xen-4.1 Wei Huang
@ 2011-08-08  7:36     ` Jan Beulich
  2011-08-16 18:15     ` Stefano Stabellini
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2011-08-08  7:36 UTC (permalink / raw)
  To: wei.huang2, Stefano Stabellini; +Cc: xen-devel

>>> On 04.08.11 at 20:44, Wei Huang <wei.huang2@amd.com> wrote:
> Hi Stefano,
> 
> The recent patch you put into xen-4.1-testing.hg broke device passthru 
> on Windows. I bisected the changesets and it turned out to be 23092. The 
> NIC can't get the IP address correctly. Changset 23091 worked fine.

With that I'm not really certain whether I should push the merge fix for
my mis-merge of what became 23573:584c2e5e03d9 and the prior
23550:fb5f0febeddc.

Thoughts?

Jan

> Regarding your patch, do we need to differentiate pv-on-hvm guests from 
> others? The Windows VM I used is unmodified. I think 
> hvm_domain_use_pirq() returned an incorrect answer for such guests.
> 
> Thanks,
> -Wei
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com 
> http://lists.xensource.com/xen-devel 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: hvm_domain_use_pirq() breaks device passthru on xen-4.1
  2011-08-04 18:44   ` hvm_domain_use_pirq() breaks device passthru on xen-4.1 Wei Huang
  2011-08-08  7:36     ` Jan Beulich
@ 2011-08-16 18:15     ` Stefano Stabellini
  1 sibling, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2011-08-16 18:15 UTC (permalink / raw)
  To: Wei Huang; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini

On Thu, 4 Aug 2011, Wei Huang wrote:
> Hi Stefano,
> 
> The recent patch you put into xen-4.1-testing.hg broke device passthru 
> on Windows. I bisected the changesets and it turned out to be 23092. The 
> NIC can't get the IP address correctly. Changset 23091 worked fine.
> 
> Regarding your patch, do we need to differentiate pv-on-hvm guests from 
> others? The Windows VM I used is unmodified. I think 
> hvm_domain_use_pirq() returned an incorrect answer for such guests.

The problem is that when qemu enables MSIs for a pt device on behalf of
the guest physdev_map_pirq is called and pirq_emuirq is set to IRQ_PT.
>From that point on hvm_domain_use_pirq is going to return true
incorrectly.
Before 23092 we would also check for the event channel to be bound
before returning true in hvm_domain_use_pirq, but that turns out to be a
problem if a PV on HVM guest disables and unbinds the event channel.

I think that reverting 23092 is the simplest thing to do here, then we
need to find a different way to distinguish MSIs that have to be
injected using the emulated path and the ones that have to be injected
using the PV path.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-16 18:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 14:42 [Qemu-devel] [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size Jan Beulich
2011-08-03 14:42 ` Jan Beulich
2011-08-03 20:57 ` [Qemu-devel] " Stefano Stabellini
2011-08-03 20:57   ` Stefano Stabellini
2011-08-04 18:44   ` hvm_domain_use_pirq() breaks device passthru on xen-4.1 Wei Huang
2011-08-08  7:36     ` Jan Beulich
2011-08-16 18:15     ` Stefano Stabellini

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.