[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] QEMU/helper2.c: Fix multiply issue for int and uint types



> -----Original Message-----
> > >From d71f9be82ec0079aa88f779dea90e475b177e32f Mon Sep 17 00:00:00
> > >2001
> > From: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
> > Date: Mon, 20 Aug 2012 16:45:04 +0800
> > Subject: [PATCH] helper2: fix multiply issue for int and uint types
> >
> > If the two multiply operands are int and uint types separately, the
> > int type will be transformed to uint firstly, which is not the intent
> > in our code piece. The fix is to add (int64_t) transform for the uint
> > type before the multiply.
> >
> > This helps to fix the Xen hypevisor slow booting issue (boots more
> > than 30 minutes) on another Xen hypervisor (the nested virtualization
> > case).
> >
> > Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
> 
> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

Will this patch supposed to be merge in Xen 4.2?

Actually this is a fix for the nested Xen booting up issue, and it is already 
merged in QEMU upstream.

We have several patches to fix issues and enable the nested virtualization for 
Xen on Xen.
They are:

1) QEMU/helper2.c: Fix multiply issue for int and uint types.
This patch is to fix the issue of nested Xen boot up. (in this mail)

2) Xiantao Zhang will (suppose today) send out another patch to fix the L2 
guest booting issue.

3) nvmx: fix resource relinquish for nested VMX.
This patch is to fix the destroy issue (resource is not released, xl list still 
shows the guest) for L1 guest with a L2 guest running in it. (Already sent into 
mailing list)

4) Another patch is already merged by Ian J, which could fix the booting slow 
issue for L2 guest, see:
http://xenbits.xen.org/gitweb/?p=qemu-xen-unstable.git;a=commit;h=effd5676225761abdab90becac519716515c3be4

For the remaining three, will you accept them for Xen 4.2 release?

Thanks,
Dongxiao

> 
> 
> > ---
> >  i386-dm/helper2.c |   16 ++++++++--------
> >  1 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/i386-dm/helper2.c b/i386-dm/helper2.c index
> > c6d049c..c093249 100644
> > --- a/i386-dm/helper2.c
> > +++ b/i386-dm/helper2.c
> > @@ -364,7 +364,7 @@ static void cpu_ioreq_pio(CPUState *env, ioreq_t
> *req)
> >              for (i = 0; i < req->count; i++) {
> >                  tmp = do_inp(env, req->addr, req->size);
> >                  write_physical((target_phys_addr_t) req->data
> > -                  + (sign * i * req->size),
> > +                  + (sign * i * (int64_t)req->size),
> >                    req->size, &tmp);
> >              }
> >          }
> > @@ -376,7 +376,7 @@ static void cpu_ioreq_pio(CPUState *env, ioreq_t
> *req)
> >                  unsigned long tmp = 0;
> >
> >                  read_physical((target_phys_addr_t) req->data
> > -                  + (sign * i * req->size),
> > +                  + (sign * i * (int64_t)req->size),
> >                    req->size, &tmp);
> >                  do_outp(env, req->addr, req->size, tmp);
> >              }
> > @@ -394,13 +394,13 @@ static void cpu_ioreq_move(CPUState *env,
> ioreq_t *req)
> >          if (req->dir == IOREQ_READ) {
> >              for (i = 0; i < req->count; i++) {
> >                  read_physical(req->addr
> > -                  + (sign * i * req->size),
> > +                  + (sign * i * (int64_t)req->size),
> >                    req->size, &req->data);
> >              }
> >          } else if (req->dir == IOREQ_WRITE) {
> >              for (i = 0; i < req->count; i++) {
> >                  write_physical(req->addr
> > -                  + (sign * i * req->size),
> > +                  + (sign * i * (int64_t)req->size),
> >                    req->size, &req->data);
> >              }
> >          }
> > @@ -410,19 +410,19 @@ static void cpu_ioreq_move(CPUState *env,
> ioreq_t *req)
> >          if (req->dir == IOREQ_READ) {
> >              for (i = 0; i < req->count; i++) {
> >                  read_physical(req->addr
> > -                  + (sign * i * req->size),
> > +                  + (sign * i * (int64_t)req->size),
> >                    req->size, &tmp);
> >                  write_physical((target_phys_addr_t )req->data
> > -                  + (sign * i * req->size),
> > +                  + (sign * i * (int64_t)req->size),
> >                    req->size, &tmp);
> >              }
> >          } else if (req->dir == IOREQ_WRITE) {
> >              for (i = 0; i < req->count; i++) {
> >                  read_physical((target_phys_addr_t) req->data
> > -                  + (sign * i * req->size),
> > +                  + (sign * i * (int64_t)req->size),
> >                    req->size, &tmp);
> >                  write_physical(req->addr
> > -                  + (sign * i * req->size),
> > +                  + (sign * i * (int64_t)req->size),
> >                    req->size, &tmp);
> >              }
> >          }
> > --
> > 1.7.1
> >
> >

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.