WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] vmport patch for run Fedora 14 [PATCH V14 00/17] Xen device

To: anthony.perard@xxxxxxxxxx
Subject: [Xen-devel] vmport patch for run Fedora 14 [PATCH V14 00/17] Xen device model support
From: Takeshi HASEGAWA <hasegaw@xxxxxxxxx>
Date: Wed, 27 Apr 2011 05:13:47 +0900
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 26 Apr 2011 13:14:43 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=e1OpyUwGFG0312xgBm1UexrbQapXS0Q4XFikqSqk2OU=; b=chjWZ93hiYCsCGBa1S/2tRrDw8DKZcPcHOFXb5BO1mmcTFguQChQvOARlsLb4lMWjq oP9vg/7xQEXjXpomoux1iZnd4QJaecXvJCPIRzOcKY2xOBtrhMN9TGUKmoKa7MCt5vXY rOcQL0SIw72foSclj7+F5J7aGuJV0T+uKB9nY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=olCcZM7M1qzpQtWe7Etdxg+HKL7lZoc1P/MxAj6NG1YkZL/T2yoy+FgwxZz1VbESIN WqE0v0nLPCJZjB2NiWZhcQ6qNkd2mAa2/YyDOkTOFyfV6tKMfUjdGPtUr8Ytwjk6RdM7 F/Rpk4AGuKaBU4gnsSeIY4sruQ1SzSMN+raC8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Anthony and upstream-qemu testers,

I tried to run upstream-qemu with v14 patch set and found Fedora 14
not bootable on HVM domain.
Now it's running with vmport workaround patch at bottom of this mail.


vmport device enables guests to know some configurations of the
virtual machine itself. Actually it is not mandatory run guests,
so disabled it to avoid qemu crash.

I am not sure whether this fix is best way or not.
In my thought it is ideal to take one of these solutions, but I could not.

1) fix vmport so that it works on Xen.

I need to read vCPU registers, however I could not figure out
how to do that on Xen. ;-)

2) disable vmport device entirely.

I found vmmouse expects initialization of vmport,
therefore additional patch will be needed.


This may be  a side-effect of the change below.

> > > +        /* Xen require only one Qemu VCPU */
> > >          pc_new_cpu(cpu_model);
> >
> > This looks a bit fishy. What is the semantic of -smp 2 or more in Xen
> > mode? If that is an invalid/unused configuration option, catch that and
> > reject it instead of installing this workaround. If it has a valid
> > semantic, please elaborate why you need to restrict the number of
> > instantiated cpus. Just to optimize memory usage?
>
> I thought in a first place that was needed to avoid errors. But it works
> also when we initialise other CPUs. But I prefere to keep it that way to
> save memory and in the case where there is a thread for each cpu that
> will also avoid to have many useless threads.
>
> Also, I use -smp i to initialise the xen's structures related to the
> vcpu.

Thanks,
Takeshi


diff --git a/hw/vmport.c b/hw/vmport.c
index 19010e4..316cf1d 100644
--- a/hw/vmport.c
+++ b/hw/vmport.c
@@ -61,6 +61,9 @@ static uint32_t vmport_ioport_read(void *opaque,
uint32_t addr)
     unsigned char command;
     uint32_t eax;

+    if (env == NULL)
+        return 0;
+
     cpu_synchronize_state(env);

     eax = env->regs[R_EAX];
@@ -85,6 +88,9 @@ static void vmport_ioport_write(void *opaque,
uint32_t addr, uint32_t val)
 {
     CPUState *env = cpu_single_env;

+    if (env == NULL)
+        return;
+
     env->regs[R_EAX] = vmport_ioport_read(opaque, addr);
 }


2011/4/21  <anthony.perard@xxxxxxxxxx>:
> From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
>
> Hi all,
>
> Update of the patch series that address comment from Jan Kiszka.
>
> The change v13->v14:
>  - Remove of ram_size parameter from pc_memory_init
>  - set both below/above_4g_mem_size at the same place in the code.
>
> Change v12->v13:
>  - There are few changes in the xen init code. A xen_hvm_init function is new
>    in this patch set and is call from xenfv:machine->init.
>  -> So "-xen-create -M xenpv" will continue to work as before this patch
>    series.
>  - There is a new reset handler to set env->halted = 0 on the first vcpu.
>  - One change have been made to pc_memory_init, the calculation of
>    below/above_4g_mem_size have been moved to pc_init1. This is to remove a
>    "random" "if (xen()) return;" in pc_memory_init.
>  - xen_map_block is a new function to map RAMBlock that belong to a ROM/RAM of
>    a device.
>  - fix cpu_physical_memory_unmap with mapcache, Because qemu_get_ram_ptr can
>    be called more than one time in cpu_physical_memory_map, qemu_put_ram_ptr
>    need to be called the same amount of time.
>  - Add some trace_* call.
>
>
> This series depends on the series "Introduce "machine" QemuOpts".
>
> You can find a git tree here:
>
> git://xenbits.xen.org/people/aperard/qemu-dm.git qemu-dm-v14
>
>
>
> Anthony PERARD (13):
>  xen: Replace some tab-indents with spaces (clean-up).
>  xen: Make Xen build once.
>  xen: Support new libxc calls from xen unstable.
>  xen: Add initialisation of Xen
>  pc_memory_init: Move memory calculation to the caller.
>  xen: Add xenfv machine
>  piix_pci: Introduces Xen specific call for irq.
>  xen: Introduce Xen Interrupt Controller
>  Introduce qemu_put_ram_ptr
>  configure: Always use 64bits target physical addresses with xen
>    enabled.
>  vl.c: Introduce getter for shutdown_requested and reset_requested.
>  xen: Set running state in xenstore.
>  xen: Add Xen hypercall for sleep state in the cmos_s3 callback.
>
> Arun Sharma (1):
>  xen: Initialize event channels and io rings
>
> John Baboval (2):
>  xen: Adds a cap to the number of map cache entries.
>  pci: Use of qemu_put_ram_ptr in pci_add_option_rom.
>
> Jun Nakajima (1):
>  xen: Introduce the Xen mapcache
>
>  Makefile.target      |   14 +-
>  configure            |   71 ++++++-
>  cpu-common.h         |    1 +
>  exec.c               |   86 +++++++-
>  hw/pc.c              |   17 +--
>  hw/pc.h              |    8 +-
>  hw/pc_piix.c         |   69 ++++++-
>  hw/pci.c             |    2 +
>  hw/piix_pci.c        |   47 ++++-
>  hw/xen.h             |   41 ++++
>  hw/xen_backend.c     |  421 +++++++++++++++++++----------------
>  hw/xen_backend.h     |    6 +-
>  hw/xen_common.h      |  106 ++++++++--
>  hw/xen_disk.c        |  496 ++++++++++++++++++++++-------------------
>  hw/xen_domainbuild.c |    3 +-
>  hw/xen_machine_pv.c  |    1 +
>  hw/xen_nic.c         |  265 ++++++++++++----------
>  sysemu.h             |    2 +
>  trace-events         |   13 +
>  vl.c                 |   12 +
>  xen-all.c            |  605 
> ++++++++++++++++++++++++++++++++++++++++++++++++++
>  xen-mapcache-stub.c  |   44 ++++
>  xen-mapcache.c       |  375 +++++++++++++++++++++++++++++++
>  xen-mapcache.h       |   37 +++
>  xen-stub.c           |   41 ++++
>  25 files changed, 2187 insertions(+), 596 deletions(-)
>  create mode 100644 xen-all.c
>  create mode 100644 xen-mapcache-stub.c
>  create mode 100644 xen-mapcache.c
>  create mode 100644 xen-mapcache.h
>  create mode 100644 xen-stub.c
>
> --
> 1.7.2.5
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>



-- 
Takeshi HASEGAWA <hasegaw@xxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] vmport patch for run Fedora 14 [PATCH V14 00/17] Xen device model support, Takeshi HASEGAWA <=