xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* PVH questions
@ 2013-01-28  1:59 Samuel Thibault
  2013-01-28  2:00 ` Samuel Thibault
  2013-01-28 15:09 ` Stefano Stabellini
  0 siblings, 2 replies; 17+ messages in thread
From: Samuel Thibault @ 2013-01-28  1:59 UTC (permalink / raw)
  To: xen-devel

Hello,

I've had a look at PVH support, and I have a few questions:

- events are still dispatched the PV way through the callback, right?
- I guess FPU errors don't trigger an INT13, so I don't need to handle
that?
- How about the console and store MFNs from the boot info? Are they
still MFNs, or actually PFNs?
- How about PV network in non-copy mode?  It used to be done
with a page transfer, which the frontend would free, does
XENMEM_decrease_reservation still use MFNs, or PFNs?

Samuel

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

* Re: PVH questions
  2013-01-28  1:59 PVH questions Samuel Thibault
@ 2013-01-28  2:00 ` Samuel Thibault
  2013-01-30 14:00   ` Samuel Thibault
  2013-01-28 15:09 ` Stefano Stabellini
  1 sibling, 1 reply; 17+ messages in thread
From: Samuel Thibault @ 2013-01-28  2:00 UTC (permalink / raw)
  To: xen-devel

I forgot:

Samuel Thibault, le Mon 28 Jan 2013 02:59:30 +0100, a écrit :
> - events are still dispatched the PV way through the callback, right?
> - I guess FPU errors don't trigger an INT13, so I don't need to handle
> that?
> - How about the console and store MFNs from the boot info? Are they
> still MFNs, or actually PFNs?
> - How about PV network in non-copy mode?  It used to be done
> with a page transfer, which the frontend would free, does
> XENMEM_decrease_reservation still use MFNs, or PFNs?

- What does hvm_callback_vector mean exactly?

Samuel

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

* Re: PVH questions
  2013-01-28  1:59 PVH questions Samuel Thibault
  2013-01-28  2:00 ` Samuel Thibault
@ 2013-01-28 15:09 ` Stefano Stabellini
  2013-01-28 16:06   ` Konrad Rzeszutek Wilk
                     ` (3 more replies)
  1 sibling, 4 replies; 17+ messages in thread
From: Stefano Stabellini @ 2013-01-28 15:09 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: Konrad Rzeszutek Wilk, xen-devel@lists.xen.org

On Mon, 28 Jan 2013, Samuel Thibault wrote:
> Hello,
> 
> I've had a look at PVH support, and I have a few questions:
> 
> - events are still dispatched the PV way through the callback, right?

No, they are injected as an X86 vector (0xf3).


> - I guess FPU errors don't trigger an INT13, so I don't need to handle
> that?

I think that's right, but Mukesh can confirm this.


> - How about the console and store MFNs from the boot info? Are they
> still MFNs, or actually PFNs?

PFNs


> - How about PV network in non-copy mode?  It used to be done
> with a page transfer, which the frontend would free, does
> XENMEM_decrease_reservation still use MFNs, or PFNs?

PFNs

Mukesh, did I get it right?
Would you be up for writing down these basic pieces of information
regarding the PVH interface on a wiki page? 
So that other kernel hackers like Samuel can port their favourite open
source kernel to it?
Maybe add something about the shared_info page and the grant_table too.

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

* Re: PVH questions
  2013-01-28 15:09 ` Stefano Stabellini
@ 2013-01-28 16:06   ` Konrad Rzeszutek Wilk
  2013-01-28 16:20     ` Jan Beulich
  2013-01-28 16:17   ` Samuel Thibault
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 17+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-01-28 16:06 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Samuel Thibault, xen-devel@lists.xen.org

On Mon, Jan 28, 2013 at 03:09:57PM +0000, Stefano Stabellini wrote:
> On Mon, 28 Jan 2013, Samuel Thibault wrote:
> > Hello,
> > 
> > I've had a look at PVH support, and I have a few questions:
> > 
> > - events are still dispatched the PV way through the callback, right?
> 
> No, they are injected as an X86 vector (0xf3).

This is a non-PVH question, but the X86 vector injection only works
on CPU0 right? Which means that for HVM backends all of the events
are coalesced in one vector and worst yet - they are not perCPU - so
end up with IPI-ing the other CPUs. Stefano, you were the original
author of this - what would be needed to get this to work across
multitple CPUs and such?

> 
> 
> > - I guess FPU errors don't trigger an INT13, so I don't need to handle
> > that?
> 
> I think that's right, but Mukesh can confirm this.
> 
> 
> > - How about the console and store MFNs from the boot info? Are they
> > still MFNs, or actually PFNs?
> 
> PFNs
> 
> 
> > - How about PV network in non-copy mode?  It used to be done
> > with a page transfer, which the frontend would free, does
> > XENMEM_decrease_reservation still use MFNs, or PFNs?
> 
> PFNs
> 
> Mukesh, did I get it right?
> Would you be up for writing down these basic pieces of information
> regarding the PVH interface on a wiki page? 
> So that other kernel hackers like Samuel can port their favourite open
> source kernel to it?
> Maybe add something about the shared_info page and the grant_table too.

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

* Re: PVH questions
  2013-01-28 15:09 ` Stefano Stabellini
  2013-01-28 16:06   ` Konrad Rzeszutek Wilk
@ 2013-01-28 16:17   ` Samuel Thibault
  2013-01-29  2:42   ` Mukesh Rathor
  2013-01-31  1:02   ` Samuel Thibault
  3 siblings, 0 replies; 17+ messages in thread
From: Samuel Thibault @ 2013-01-28 16:17 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Konrad Rzeszutek Wilk, xen-devel@lists.xen.org

Stefano Stabellini, le Mon 28 Jan 2013 15:09:57 +0000, a écrit :
> On Mon, 28 Jan 2013, Samuel Thibault wrote:
> > I've had a look at PVH support, and I have a few questions:
> > 
> > - events are still dispatched the PV way through the callback, right?
> 
> No, they are injected as an X86 vector (0xf3).

Without any error code being pushed on the stack, I guess?

This is a detail that had catched me in the past with vector 0x0f :)

Samuel

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

* Re: PVH questions
  2013-01-28 16:06   ` Konrad Rzeszutek Wilk
@ 2013-01-28 16:20     ` Jan Beulich
  2013-01-28 16:31       ` Stefano Stabellini
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Beulich @ 2013-01-28 16:20 UTC (permalink / raw)
  To: Stefano Stabellini, Konrad Rzeszutek Wilk
  Cc: Samuel Thibault, xen-devel@lists.xen.org

>>> On 28.01.13 at 17:06, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> On Mon, Jan 28, 2013 at 03:09:57PM +0000, Stefano Stabellini wrote:
>> On Mon, 28 Jan 2013, Samuel Thibault wrote:
>> > Hello,
>> > 
>> > I've had a look at PVH support, and I have a few questions:
>> > 
>> > - events are still dispatched the PV way through the callback, right?
>> 
>> No, they are injected as an X86 vector (0xf3).
> 
> This is a non-PVH question, but the X86 vector injection only works
> on CPU0 right? Which means that for HVM backends all of the events
> are coalesced in one vector and worst yet - they are not perCPU - so
> end up with IPI-ing the other CPUs. Stefano, you were the original
> author of this - what would be needed to get this to work across
> multitple CPUs and such?

Iirc the vector callback was added to overcome precisely that
limitation of the original PCI IRQ delivery method.

Jan

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

* Re: PVH questions
  2013-01-28 16:20     ` Jan Beulich
@ 2013-01-28 16:31       ` Stefano Stabellini
  0 siblings, 0 replies; 17+ messages in thread
From: Stefano Stabellini @ 2013-01-28 16:31 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Samuel Thibault, Konrad Rzeszutek Wilk, xen-devel@lists.xen.org,
	Stefano Stabellini

On Mon, 28 Jan 2013, Jan Beulich wrote:
> >>> On 28.01.13 at 17:06, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> > On Mon, Jan 28, 2013 at 03:09:57PM +0000, Stefano Stabellini wrote:
> >> On Mon, 28 Jan 2013, Samuel Thibault wrote:
> >> > Hello,
> >> > 
> >> > I've had a look at PVH support, and I have a few questions:
> >> > 
> >> > - events are still dispatched the PV way through the callback, right?
> >> 
> >> No, they are injected as an X86 vector (0xf3).
> > 
> > This is a non-PVH question, but the X86 vector injection only works
> > on CPU0 right? Which means that for HVM backends all of the events
> > are coalesced in one vector and worst yet - they are not perCPU - so
> > end up with IPI-ing the other CPUs. Stefano, you were the original
> > author of this - what would be needed to get this to work across
> > multitple CPUs and such?
> 
> Iirc the vector callback was added to overcome precisely that
> limitation of the original PCI IRQ delivery method.

That's right: the vector callback should already work on any guest CPUs.

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

* Re: PVH questions
  2013-01-28 15:09 ` Stefano Stabellini
  2013-01-28 16:06   ` Konrad Rzeszutek Wilk
  2013-01-28 16:17   ` Samuel Thibault
@ 2013-01-29  2:42   ` Mukesh Rathor
  2013-01-31  1:02   ` Samuel Thibault
  3 siblings, 0 replies; 17+ messages in thread
From: Mukesh Rathor @ 2013-01-29  2:42 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Samuel Thibault, Konrad Rzeszutek Wilk, xen-devel@lists.xen.org

On Mon, 28 Jan 2013 15:09:57 +0000
Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:

> On Mon, 28 Jan 2013, Samuel Thibault wrote:
> > Hello,
> > 
> > I've had a look at PVH support, and I have a few questions:
> > 
> > - events are still dispatched the PV way through the callback,
> > right?
> 
> No, they are injected as an X86 vector (0xf3).
> 
> 
> > - I guess FPU errors don't trigger an INT13, so I don't need to
> > handle that?
> 
> I think that's right, but Mukesh can confirm this.
> 
> 
> > - How about the console and store MFNs from the boot info? Are they
> > still MFNs, or actually PFNs?
> 
> PFNs
> 
> 
> > - How about PV network in non-copy mode?  It used to be done
> > with a page transfer, which the frontend would free, does
> > XENMEM_decrease_reservation still use MFNs, or PFNs?
> 
> PFNs
> 
> Mukesh, did I get it right?

Yes.

> Would you be up for writing down these basic pieces of information
> regarding the PVH interface on a wiki page? 
> So that other kernel hackers like Samuel can port their favourite open
> source kernel to it?
> Maybe add something about the shared_info page and the grant_table
> too.

Sure. Lets collect questions and I'll do that after my version 2 patch
is out.

thaks,
mukesh

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

* Re: PVH questions
  2013-01-28  2:00 ` Samuel Thibault
@ 2013-01-30 14:00   ` Samuel Thibault
  2013-01-30 14:28     ` Stefano Stabellini
  0 siblings, 1 reply; 17+ messages in thread
From: Samuel Thibault @ 2013-01-30 14:00 UTC (permalink / raw)
  To: xen-devel

Hello,

A couple more questions:

- Does hvm_callback_vector flags designates routing events through
  interrupt vector 0xf3?

- Is PIC/APIC I/O emulated by the hypervisor, as well as PIT?  And does
  hvm_callback_vector designates that fact?

Samuel

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

* Re: PVH questions
  2013-01-30 14:00   ` Samuel Thibault
@ 2013-01-30 14:28     ` Stefano Stabellini
  2013-01-30 14:58       ` Samuel Thibault
  0 siblings, 1 reply; 17+ messages in thread
From: Stefano Stabellini @ 2013-01-30 14:28 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: xen-devel@lists.xen.org

On Wed, 30 Jan 2013, Samuel Thibault wrote:
> Hello,
> 
> A couple more questions:
> 
> - Does hvm_callback_vector flags designates routing events through
>   interrupt vector 0xf3?

XENFEAT_hvm_callback_vector determins the hypervisor capability, while
you need an HVMOP_set_param hypercall to set HVM_PARAM_CALLBACK_IRQ to 
enable it. Actually the vector number can be chosen.


> - Is PIC/APIC I/O emulated by the hypervisor, as well as PIT? 

Yes (hvm_domain_initialise is called for PVH guests). 


>   And does
>   hvm_callback_vector designates that fact?

PVH implies it

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

* Re: PVH questions
  2013-01-30 14:28     ` Stefano Stabellini
@ 2013-01-30 14:58       ` Samuel Thibault
  2013-01-30 16:08         ` Stefano Stabellini
  0 siblings, 1 reply; 17+ messages in thread
From: Samuel Thibault @ 2013-01-30 14:58 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel@lists.xen.org

Stefano Stabellini, le Wed 30 Jan 2013 14:28:39 +0000, a écrit :
> On Wed, 30 Jan 2013, Samuel Thibault wrote:
> > A couple more questions:
> > 
> > - Does hvm_callback_vector flags designates routing events through
> >   interrupt vector 0xf3?
> 
> XENFEAT_hvm_callback_vector determins the hypervisor capability, while
> you need an HVMOP_set_param hypercall to set HVM_PARAM_CALLBACK_IRQ to 
> enable it.

Ok, but I mean: does XENFEAT_hvm_callback_vector mean that
HVM_PARAM_CALLBACK_IRQ can be set?

> Actually the vector number can be chosen.

Ok.

> > - Is PIC/APIC I/O emulated by the hypervisor, as well as PIT? 
> 
> Yes (hvm_domain_initialise is called for PVH guests). 

Ok, good!

> >   And does hvm_callback_vector designates that fact?
> 
> PVH implies it

I know, but there's not "PVH" flag in the hypervisor capabilities,
that's why I'm asking which flag advertises the capability.

Samuel

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

* Re: PVH questions
  2013-01-30 14:58       ` Samuel Thibault
@ 2013-01-30 16:08         ` Stefano Stabellini
  2013-01-30 16:19           ` Samuel Thibault
  2013-01-30 16:22           ` Samuel Thibault
  0 siblings, 2 replies; 17+ messages in thread
From: Stefano Stabellini @ 2013-01-30 16:08 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: xen-devel@lists.xen.org, Stefano Stabellini

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]


> Stefano Stabellini, le Wed 30 Jan 2013 14:28:39 +0000, a écrit :
> > On Wed, 30 Jan 2013, Samuel Thibault wrote:
> > > A couple more questions:
> > > 
> > > - Does hvm_callback_vector flags designates routing events through
> > >   interrupt vector 0xf3?
> > 
> > XENFEAT_hvm_callback_vector determins the hypervisor capability, while
> > you need an HVMOP_set_param hypercall to set HVM_PARAM_CALLBACK_IRQ to 
> > enable it.
> 
> Ok, but I mean: does XENFEAT_hvm_callback_vector mean that
> HVM_PARAM_CALLBACK_IRQ can be set?

Yes.

> > >   And does hvm_callback_vector designates that fact?
> > 
> > PVH implies it
> 
> I know, but there's not "PVH" flag in the hypervisor capabilities,
> that's why I'm asking which flag advertises the capability.

Good point.

It is safe to assume that XENFEAT_hvm_callback_vector means a vector
injection via lapic, therefore Xen has to provide one.  However I
wouldn't assume anything about the presence of an IO-APIC and a PIT,
even though the current patch series would make them available.

In fact you shouldn't have to use them at all: no devices or interrupts
should go through the IO-APIC and you can use the PV timer for timer
interrupts.

I would argue that it might be a good idea not to emulate them at all
for PVH guests to avoid confusions.

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

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

* Re: PVH questions
  2013-01-30 16:08         ` Stefano Stabellini
@ 2013-01-30 16:19           ` Samuel Thibault
  2013-01-30 16:22           ` Samuel Thibault
  1 sibling, 0 replies; 17+ messages in thread
From: Samuel Thibault @ 2013-01-30 16:19 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel@lists.xen.org

Stefano Stabellini, le Wed 30 Jan 2013 16:08:18 +0000, a écrit :
> you can use the PV timer for timer interrupts.

Ah, right, the PV timer is via an event, so it's available, no need for
a PIT indeed.

Samuel

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

* Re: PVH questions
  2013-01-30 16:08         ` Stefano Stabellini
  2013-01-30 16:19           ` Samuel Thibault
@ 2013-01-30 16:22           ` Samuel Thibault
  1 sibling, 0 replies; 17+ messages in thread
From: Samuel Thibault @ 2013-01-30 16:22 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel@lists.xen.org

Stefano Stabellini, le Wed 30 Jan 2013 16:08:18 +0000, a écrit :
> I would argue that it might be a good idea not to emulate them at all
> for PVH guests to avoid confusions.

Well, having a PIT is nice to avoid having to add support for the PV
timer, but that's not very difficult to implement indeed.

Samuel

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

* Re: PVH questions
  2013-01-28 15:09 ` Stefano Stabellini
                     ` (2 preceding siblings ...)
  2013-01-29  2:42   ` Mukesh Rathor
@ 2013-01-31  1:02   ` Samuel Thibault
  2013-01-31  1:06     ` Samuel Thibault
  2013-01-31 11:51     ` Stefano Stabellini
  3 siblings, 2 replies; 17+ messages in thread
From: Samuel Thibault @ 2013-01-31  1:02 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Konrad Rzeszutek Wilk, xen-devel@lists.xen.org

Stefano Stabellini, le Mon 28 Jan 2013 15:09:57 +0000, a écrit :
> On Mon, 28 Jan 2013, Samuel Thibault wrote:
> > Hello,
> > 
> > I've had a look at PVH support, and I have a few questions:
> > 
> > - events are still dispatched the PV way through the callback, right?
> 
> No, they are injected as an X86 vector (0xf3).

But is that mandatory? Can't we still call set_callbacks?

Samuel

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

* Re: PVH questions
  2013-01-31  1:02   ` Samuel Thibault
@ 2013-01-31  1:06     ` Samuel Thibault
  2013-01-31 11:51     ` Stefano Stabellini
  1 sibling, 0 replies; 17+ messages in thread
From: Samuel Thibault @ 2013-01-31  1:06 UTC (permalink / raw)
  To: Stefano Stabellini, xen-devel@lists.xen.org, Mukesh Rathor,
	Konrad Rzeszutek Wilk

Samuel Thibault, le Thu 31 Jan 2013 02:02:28 +0100, a écrit :
> Stefano Stabellini, le Mon 28 Jan 2013 15:09:57 +0000, a écrit :
> > On Mon, 28 Jan 2013, Samuel Thibault wrote:
> > > Hello,
> > > 
> > > I've had a look at PVH support, and I have a few questions:
> > > 
> > > - events are still dispatched the PV way through the callback, right?
> > 
> > No, they are injected as an X86 vector (0xf3).
> 
> But is that mandatory? Can't we still call set_callbacks?

(Mmm, I guess it's not so simple with VMENTER)

Samuel

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

* Re: PVH questions
  2013-01-31  1:02   ` Samuel Thibault
  2013-01-31  1:06     ` Samuel Thibault
@ 2013-01-31 11:51     ` Stefano Stabellini
  1 sibling, 0 replies; 17+ messages in thread
From: Stefano Stabellini @ 2013-01-31 11:51 UTC (permalink / raw)
  To: Samuel Thibault
  Cc: xen-devel@lists.xen.org, Konrad Rzeszutek Wilk,
	Stefano Stabellini

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

On Thu, 31 Jan 2013, Samuel Thibault wrote:
> Stefano Stabellini, le Mon 28 Jan 2013 15:09:57 +0000, a écrit :
> > On Mon, 28 Jan 2013, Samuel Thibault wrote:
> > > Hello,
> > > 
> > > I've had a look at PVH support, and I have a few questions:
> > > 
> > > - events are still dispatched the PV way through the callback, right?
> > 
> > No, they are injected as an X86 vector (0xf3).
> 
> But is that mandatory? Can't we still call set_callbacks?

The vector injection is mandatory, but you can choose the vector
number using HVMOP_set_param HVM_PARAM_CALLBACK_IRQ, like I wrote in
the other email.
HYPERVISOR_set_callbacks shouldn't be called for PVH guests.

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

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

end of thread, other threads:[~2013-01-31 11:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28  1:59 PVH questions Samuel Thibault
2013-01-28  2:00 ` Samuel Thibault
2013-01-30 14:00   ` Samuel Thibault
2013-01-30 14:28     ` Stefano Stabellini
2013-01-30 14:58       ` Samuel Thibault
2013-01-30 16:08         ` Stefano Stabellini
2013-01-30 16:19           ` Samuel Thibault
2013-01-30 16:22           ` Samuel Thibault
2013-01-28 15:09 ` Stefano Stabellini
2013-01-28 16:06   ` Konrad Rzeszutek Wilk
2013-01-28 16:20     ` Jan Beulich
2013-01-28 16:31       ` Stefano Stabellini
2013-01-28 16:17   ` Samuel Thibault
2013-01-29  2:42   ` Mukesh Rathor
2013-01-31  1:02   ` Samuel Thibault
2013-01-31  1:06     ` Samuel Thibault
2013-01-31 11:51     ` Stefano Stabellini

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).