All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wen Congyang <wency@cn.fujitsu.com>
To: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, seabios@seabios.org,
	avi@redhat.com, anthony@codemonkey.ws, kevin@koconnor.net,
	kraxel@redhat.com, eblake@redhat.com, blauwirbel@gmail.com,
	gleb@redhat.com, imammedo@redhat.com
Subject: Re: [RFC PATCH v3 20/19][SeaBIOS] alternative: Use paravirt interface for pci windows
Date: Mon, 24 Sep 2012 14:35:30 +0800	[thread overview]
Message-ID: <505FFF32.7070901@cn.fujitsu.com> (raw)
In-Reply-To: <20120921112006.GD2133@dhcp-192-168-178-175.profitbricks.localdomain>

At 09/21/2012 07:20 PM, Vasilis Liaskovitis Wrote:
> Initialize the 32-bit and 64-bit pci starting offsets from values passed in by
> the qemu paravirt interface QEMU_CFG_PCI_WINDOW. Qemu calculates the starting
> offsets based on initial memory and hotplug-able dimms.

This patch can't be applied if I apply the other patches for seabios. And I
don't find this patch in your tree.

Thanks
Wen Congyang

> 
> Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
> ---
>  src/paravirt.c |    6 ++++++
>  src/paravirt.h |    2 ++
>  src/pciinit.c  |    5 ++---
>  3 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/src/paravirt.c b/src/paravirt.c
> index 2a98d53..390ef30 100644
> --- a/src/paravirt.c
> +++ b/src/paravirt.c
> @@ -346,3 +346,9 @@ void qemu_cfg_romfile_setup(void)
>          dprintf(3, "Found fw_cfg file: %s (size=%d)\n", file->name, file->size);
>      }
>  }
> +
> +void qemu_cfg_get_pci_offsets(u64 *pcimem_start, u64 *pcimem64_start)
> +{
> +    qemu_cfg_read_entry(pcimem_start, QEMU_CFG_PCI_WINDOW, sizeof(u64));
> +    qemu_cfg_read((u8*)(pcimem64_start), sizeof(u64));
> +}
> diff --git a/src/paravirt.h b/src/paravirt.h
> index a284c41..b53ff88 100644
> --- a/src/paravirt.h
> +++ b/src/paravirt.h
> @@ -35,6 +35,7 @@ static inline int kvm_para_available(void)
>  #define QEMU_CFG_BOOT_MENU              0x0e
>  #define QEMU_CFG_MAX_CPUS               0x0f
>  #define QEMU_CFG_FILE_DIR               0x19
> +#define QEMU_CFG_PCI_WINDOW             0x1a
>  #define QEMU_CFG_ARCH_LOCAL             0x8000
>  #define QEMU_CFG_ACPI_TABLES            (QEMU_CFG_ARCH_LOCAL + 0)
>  #define QEMU_CFG_SMBIOS_ENTRIES         (QEMU_CFG_ARCH_LOCAL + 1)
> @@ -65,5 +66,6 @@ struct e820_reservation {
>  u32 qemu_cfg_e820_entries(void);
>  void* qemu_cfg_e820_load_next(void *addr);
>  void qemu_cfg_romfile_setup(void);
> +void qemu_cfg_get_pci_offsets(u64 *pcimem_start, u64 *pcimem64_start);
>  
>  #endif
> diff --git a/src/pciinit.c b/src/pciinit.c
> index 68f302a..64468a0 100644
> --- a/src/pciinit.c
> +++ b/src/pciinit.c
> @@ -592,8 +592,7 @@ static void pci_region_map_entries(struct pci_bus *busses, struct pci_region *r)
>  
>  static void pci_bios_map_devices(struct pci_bus *busses)
>  {
> -    pcimem_start = RamSize;
> -
> +    qemu_cfg_get_pci_offsets(&pcimem_start, &pcimem64_start);
>      if (pci_bios_init_root_regions(busses)) {
>          struct pci_region r64_mem, r64_pref;
>          r64_mem.list = NULL;
> @@ -611,7 +610,7 @@ static void pci_bios_map_devices(struct pci_bus *busses)
>          u64 align_mem = pci_region_align(&r64_mem);
>          u64 align_pref = pci_region_align(&r64_pref);
>  
> -        r64_mem.base = ALIGN(0x100000000LL + RamSizeOver4G, align_mem);
> +        r64_mem.base = ALIGN(pcimem64_start, align_mem);
>          r64_pref.base = ALIGN(r64_mem.base + sum_mem, align_pref);
>          pcimem64_start = r64_mem.base;
>          pcimem64_end = r64_pref.base + sum_pref;


  reply	other threads:[~2012-09-24  6:29 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 11:17 [RFC PATCH v3 00/19] ACPI memory hotplug Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 01/19][SeaBIOS] Add ACPI_EXTRACT_DEVICE* macros Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 02/19][SeaBIOS] Add SSDT memory device support Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 03/19][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 04/19][SeaBIOS] acpi: generate hotplug memory devices Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 05/19] Implement dimm device abstraction Vasilis Liaskovitis
2012-09-24  6:02   ` Wen Congyang
2012-10-23 12:25   ` [Qemu-devel] " Stefan Hajnoczi
2012-10-24  8:06     ` liu ping fan
2012-10-24 10:15       ` Stefan Hajnoczi
2012-10-24 17:16         ` Vasilis Liaskovitis
2012-10-25  8:00           ` liu ping fan
2012-10-31 11:15       ` Avi Kivity
2012-10-31 12:18         ` [Qemu-devel] " Stefan Hajnoczi
2012-10-31 12:34           ` Avi Kivity
2012-10-31 12:34             ` [Qemu-devel] " Stefan Hajnoczi
2012-09-21 11:17 ` [RFC PATCH v3 06/19] Implement "-dimm" command line option Vasilis Liaskovitis
2012-09-22 13:46   ` Blue Swirl
2012-09-24 10:42     ` Vasilis Liaskovitis
2012-09-29 11:13       ` Blue Swirl
2012-10-09 17:04         ` Vasilis Liaskovitis
2012-10-13  8:57           ` Blue Swirl
2012-10-17  9:19             ` Vasilis Liaskovitis
2012-10-17 10:03               ` Avi Kivity
2012-10-18  9:27                 ` Vasilis Liaskovitis
2012-10-18 12:33                   ` Avi Kivity
2012-10-19 17:48                     ` Blue Swirl
2012-10-22 10:55                       ` Avi Kivity
2012-10-22  8:39                     ` Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 07/19] acpi_piix4: Implement memory device hotplug registers Vasilis Liaskovitis
2012-09-22 13:49   ` Blue Swirl
2012-09-21 11:17 ` [RFC PATCH v3 08/19] pc: calculate dimm physical addresses and adjust memory map Vasilis Liaskovitis
2012-09-22 14:15   ` Blue Swirl
2012-09-24 15:27     ` Vasilis Liaskovitis
2012-09-29 11:27       ` Blue Swirl
2012-09-21 11:17 ` [RFC PATCH v3 09/19] pc: Add dimm paravirt SRAT info Vasilis Liaskovitis
2012-09-27  3:55   ` Wen Congyang
2012-09-21 11:17 ` [RFC PATCH v3 10/19] fix live-migration when "populated=on" is missing Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 11/19] Implement qmp and hmp commands for notification lists Vasilis Liaskovitis
2012-09-21 22:03   ` Eric Blake
2012-09-24 14:45     ` Vasilis Liaskovitis
2012-10-23 12:15   ` Stefan Hajnoczi
2012-09-21 11:17 ` [RFC PATCH v3 12/19] Implement "info memory-total" and "query-memory-total" Vasilis Liaskovitis
2012-09-21 22:36   ` Eric Blake
2012-09-21 11:17 ` [RFC PATCH v3 13/19] balloon: update with hotplugged memory Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 14/19][SeaBIOS] Add _OST dimm method Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 15/19] Add _OST dimm support Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 16/19] Update dimm state on reset Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 17/19][SeaBIOS] Implement _PS3 method for memory device Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 18/19] Implement _PS3 for dimm Vasilis Liaskovitis
2012-09-21 11:17 ` [RFC PATCH v3 19/19][SeaBIOS] Calculate pcimem_start and pcimem64_start from SRAT entries Vasilis Liaskovitis
2012-09-21 11:19   ` [RFC PATCH v3 19/19] alternative: Introduce paravirt interface QEMU_CFG_PCI_WINDOW Vasilis Liaskovitis
2012-09-21 11:20   ` [RFC PATCH v3 20/19][SeaBIOS] alternative: Use paravirt interface for pci windows Vasilis Liaskovitis
2012-09-24  6:35     ` Wen Congyang [this message]
2012-09-24 10:46       ` Vasilis Liaskovitis
2012-09-24  6:51   ` [RFC PATCH v3 19/19][SeaBIOS] Calculate pcimem_start and pcimem64_start from SRAT entries Wen Congyang
2012-09-22 14:17 ` [RFC PATCH v3 00/19] ACPI memory hotplug Blue Swirl
2012-10-31 10:58 ` Stefan Hajnoczi
2012-10-31 11:16   ` Avi Kivity
2012-11-01  9:01     ` Vasilis Liaskovitis

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=505FFF32.7070901@cn.fujitsu.com \
    --to=wency@cn.fujitsu.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=eblake@redhat.com \
    --cc=gleb@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    --cc=vasilis.liaskovitis@profitbricks.com \
    /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.