Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-12-27 Thread Suravee Suthikulpanit
On 12/22/16 18:16, Jan Beulich wrote: On 19.09.16 at 07:52, wrote: +int svm_avic_init_vcpu(struct vcpu *v) +{ +struct vlapic *vlapic = vcpu_vlapic(v); +struct arch_svm_struct *s = >arch.hvm_svm; + +if ( svm_avic ) +s->avic_bk_pg =

Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-12-22 Thread Jan Beulich
>>> On 19.09.16 at 07:52, wrote: > +int svm_avic_init_vcpu(struct vcpu *v) > +{ > +struct vlapic *vlapic = vcpu_vlapic(v); > +struct arch_svm_struct *s = >arch.hvm_svm; > + > +if ( svm_avic ) > +s->avic_bk_pg = vlapic->regs_page; Why this

Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-11-17 Thread Suravee Suthikulpanit
On 11/17/16 11:18, Konrad Rzeszutek Wilk wrote: On Thu, Nov 17, 2016 at 10:05:58AM -0600, Suravee Suthikulpanit wrote: Konrad, Thanks for the review comments. Got one quick question below. On 10/12/16 15:02, Konrad Rzeszutek Wilk wrote: +int svm_avic_init_vmcb(struct vcpu *v) +{ +

Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-11-17 Thread Konrad Rzeszutek Wilk
On Thu, Nov 17, 2016 at 10:55:52AM -0600, Suravee Suthikulpanit wrote: > Konrad, > > On 10/12/16 15:02, Konrad Rzeszutek Wilk wrote: > > > + > > > > +/* NOTE: Current max index allowed for physical APIC ID table is 255 */ > > > > +#define AVIC_PHY_APIC_ID_MAX0xFF > > > > + > > > > +#define

Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-11-17 Thread Konrad Rzeszutek Wilk
On Thu, Nov 17, 2016 at 10:05:58AM -0600, Suravee Suthikulpanit wrote: > Konrad, > > Thanks for the review comments. Got one quick question below. > > On 10/12/16 15:02, Konrad Rzeszutek Wilk wrote: > > > +int svm_avic_init_vmcb(struct vcpu *v) > > > > +{ > > > > +paddr_t ma; > > > > +

Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-11-17 Thread Suravee Suthikulpanit
Konrad, On 10/12/16 15:02, Konrad Rzeszutek Wilk wrote: + > +/* NOTE: Current max index allowed for physical APIC ID table is 255 */ > +#define AVIC_PHY_APIC_ID_MAX0xFF > + > +#define AVIC_DOORBELL 0xc001011b > +#define AVIC_HPA_MASK ~((0xFFFULL << 52) || 0xFFF) >

Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-11-17 Thread Suravee Suthikulpanit
Konrad, Thanks for the review comments. Got one quick question below. On 10/12/16 15:02, Konrad Rzeszutek Wilk wrote: +int svm_avic_init_vmcb(struct vcpu *v) > +{ > +paddr_t ma; > +u32 apic_id_reg; > +struct arch_svm_struct *s = >arch.hvm_svm; > +struct vmcb_struct *vmcb =

Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-10-14 Thread Konrad Rzeszutek Wilk
. snip.. > diff --git a/xen/arch/x86/hvm/svm/avic.c b/xen/arch/x86/hvm/svm/avic.c > new file mode 100644 > index 000..70bac69 > --- /dev/null > +++ b/xen/arch/x86/hvm/svm/avic.c > @@ -0,0 +1,217 @@ > +#include > +#include > +#include > +#include > +#include > +#include > +#include >

Re: [Xen-devel] [RFC PATCH 5/9] x86/HVM/SVM: Add AVIC initialization code

2016-10-12 Thread Konrad Rzeszutek Wilk
On Mon, Sep 19, 2016 at 12:52:44AM -0500, Suravee Suthikulpanit wrote: > Introduce AVIC base initialization code. This includes: > * Setting up per-VM data structures. > * Setting up per-vCPU data structure. > * Initializing AVIC-related VMCB bit fields. > > This patch also introduces