All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerone Young <jyoung5@us.ibm.com>
To: kvm-ppc@vger.kernel.org
Subject: Re: [kvm-ppc-devel] [PATCH 4 of 4] Add powerpc kvm qemu support
Date: Tue, 22 Jan 2008 19:09:51 +0000	[thread overview]
Message-ID: <1201028991.19557.3.camel@thinkpad> (raw)
In-Reply-To: <1c5b26c965e85986cc93.1200693048@thinkpad>


On Tue, 2008-01-22 at 09:15 -0600, Nathan Lynch wrote:
> Jerone Young wrote:
> > --- /dev/null
> > +++ b/qemu/hw/ppc440_boards_kvm.c
> > @@ -0,0 +1,251 @@
> > +/*
> > + * Qemu PowerPC 440 board emualtion with KVM enlightnments
> 
>                                                 enhancements?
> 
> > + *
> > + * Copyright 2007 IBM Corporation.
> > + * Added by: Jerone Young <jyoung5@us.ibm.com>
> > + *
> > + * This work is licensed under the GNU LGPL license, version 2.
> > + *
> > + */
> > +
> > +/* XXX THIS CODE IS STILL DRAFT! DO NOT POST TO THE LIST! */
> 
> heh

I've cleaned this up in our internal repo. I plan on sending these
patches every friday till we get them in upstream KVM. But it was a last
minute decision to send what we had to the list. Next one will be a LOT
cleaner.

> 
> 
> > +
> > +#include <sys/mman.h>
> > +
> > +#include "hw.h"
> > +#include "ppc.h"
> > +#include "ppc405.h"
> > +#include "pc.h"
> > +#include "qemu-timer.h"
> > +#include "sysemu.h"
> > +#include "exec-all.h"
> > +#include "boards.h"
> > +
> > +#include "qemu-kvm.h"
> > +
> > +#define DEFAULT_RAM_SIZE 32*1024*1024
> 
> You want parentheses around that expression.

I've removed this now. But yes you are right, not having the parentheses
can cause problems if you have DEFAULT_RAM_SIZE^2 or something like
that.

> 
> 
> > +static void bambooKVM_init(ram_addr_t ram_size, int vga_ram_size, 
> > +			const char *boot_device, DisplayState *ds,  
> > +			const char *kernel_filename,
> > +			const char *kernel_cmdline,
> > +			const char *initrd_filename,
> > +			const char *cpu_model)
> > +{
> 
> ....
> 
> > +
> > +	/* XXX insert TLB entries */
> > +	env->gpr[1] = (16<<20) - 8;
> > +	env->gpr[4] = initrd_base;
> > +	env->gpr[5] = initrd_size;
> > +
> > +	/* Set program counter (ip in x86 terms .... but it's ep in ppc) */
> > +	env->nip = ep;
> > +        printf("Program Counter (ep) is being set to 0x%08x\n", ep);
> > +
> > +	/* lock RAM */
> > +	mlock(phys_ram_base, phys_ram_size);
> 
> Do you care if that fails?

Good catch. I'll add a check for it.

> 
> 
> > +
> > +	/* run in kvm */
> > +	/* XXX SMP IS NOT SUPPORTED  YET */
> > +	printf("%s: running kvm functions\n", __func__);
> > +	env->cpu_index = 0;
> > +
> > +	/* XXX need a call to set ep */
> > +	printf("%s: loading kvm registers\n", __func__);
> > +	kvm_load_registers(env);
> > +
> > +	printf("%s: DONE\n", __func__);
> > +}


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

  parent reply	other threads:[~2008-01-22 19:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 21:50 [kvm-ppc-devel] [PATCH 4 of 4] Add powerpc kvm qemu support Jerone Young
2008-01-22 15:15 ` Nathan Lynch
2008-01-22 19:09 ` Jerone Young [this message]
2008-01-25 23:34 ` Jerone Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1201028991.19557.3.camel@thinkpad \
    --to=jyoung5@us.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.