[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 3/4] mini-os: fix number of pages for PVH
- To: Juergen Gross <jgross@xxxxxxxx>, "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Tue, 21 Jun 2022 08:43:41 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FNrCyn8Mx/7tAkgrwEhkXNSohg3BRnwaYcikUPpOo2Q=; b=kVi+WNOn3gHalNykrmMeiGAKWtM6szLfElAaXQjOCbbjT98C3HdO2uBR1O1p1XA7SEqDjPIyYEcI0dIw3zzG3yFSEclwyK1Je5SuukphOP+FlQvEnEztVc4SiS2CKPCn5VQIg3K0SYDTpdWTruoUhVbwwXSnNe7CDTrr5HgJdE6HF0njrbDnmJfYijb9SDwamJfCtcriLstZvLlccRBc0zU6PYBk9pZRx/4JWEOZezen9dadkIMZRYd5hVStFSIG4/9rzuwq1ljTwHFFU4cb0h4h+bvDN6UXNpZNcEKrIkgjeKoCQRRH9ogUioIsGXlUdbrW3we03mTCiadpe5KPeg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GVlTNc3qWhMJ2+IVzdSGMtm+jRwTiP3Ejc8RvdNu3bChdB32XTsXNdicvQ6fPD4vcdTfMsJbY9VJEvbT2pr+S6zu3uH2TJfSS2OXPfBLXtH+C4cnSR9nwCkyryhDF7e+wzYmKmVTF3J7nyQwnlXR7888btrJO6d7C+cF053KEG2VPbdrOenQ5KnP9wgzOB/3FqQoJnhzHsnyyUremVnBC+6cjpUAkRF+NSRfmZ1AVRJ1NMelhh4IokZeigqrsFPwTHRnGT7ICgQ9abDit9hR4tUPlR8cnn/NuoE5Bvnr01JrkmC61VgkVyf3I5xW3z7v2yO5c9km4xot2UWxYrQzCA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "samuel.thibault@xxxxxxxxxxxx" <samuel.thibault@xxxxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>
- Delivery-date: Tue, 21 Jun 2022 08:44:05 +0000
- Ironport-data: A9a23:B215lK8tcKk4BIaEdTTeDrUDsH+TJUtcMsCJ2f8bNWPcYEJGY0x3m GRLWTiAP/eLMzfwctonPoqx8BkBuMeGmNM1SVM4/is8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9T8mvU2xbuKU5NTsY0idfic5DnZ74f5fs7Rh2NQw34LgW1rlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnaSLVRx4Y5Xno+I2fDB/FwonMYZmwrCSdBBTseTLp6HHW13F5qw2SW0TY8gf8OsxBnxS/ /sFLjxLdgqEm++93LO8TK9rm9gnK87oeogYvxmMzxmAVapgHc+FHvWMvIcItNszrpkm8fL2T swVczdwKj/HZAVCIAw/A5Mihua4wHL4dlW0rXrK+fZouDWInWSd1pCwEofkI9y4WPxrm3i/+ k3X2nrdU0oVYYn3JT2ttyjEavX0tSH0QoUJD5Wj6+VnxlaUwwQ7DRwQVFyg5PW0lEO6c9ZeM FAPvDojq7Ao806mRcW7WAe3yFaUsxhZV9dOHukS7ACW1rGS8wufHnIDTDNKdJohrsBebScj0 0KEm5X1BT1luaCRVVqQ8KzRqSK1P24SN2BqTTAAZRsI5Z/kuo5bs/7UZtNqEarwgtirHzj1m miOtHJn3+VVitMX3aKm+1yBmyirupXCUg8y4EPQQ36h6QR6IoWiYuRE9GTm0BqJF67BJnHpg ZTOs5H2ADwmZX1VqBGwfQ==
- Ironport-hdrordr: A9a23:ed2KnKnGIQZOkInND3rKOuTONqXpDfN1iWdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcIi7SdK9qXO1z+8X3WGIVY3SEDUOy1HYVr2KirGSjAEIeheOu9K1sJ 0NT0EQMqyWMbEXt6fHCUyDYq4dKbq8ge6VbIXlvhFQpGhRAskOgTuRSDzra3GeLzM2Z6bRYa Dsgvav0ADQHEj/AP7aOlA1G8z44/HbnpPvZhALQzQ97hOVsD+u4LnmVzCFwxY3SVp0sPcf2F mAtza8yrSosvm9xBOZ/XTU9Y5qlNzozcYGLNCQi/ISNi7nhm+TFcdcsvy5zXIISdOUmRIXee r30lAd1gNImjXsl1SO0F7QMs/boW8TAjHZuAelaDDY0LHErXoBerZ8bMRiA1rkAgMbza9BOO gg5RPni7NHSRzHhyjz/N7OSlVjkVe1u2MrlaoJg2VYSpZ2Us4YkWUzxjIiLH47JlOy1GnnKp gdMOjMoPJNNV+KZXHQuWdihNSqQ3QoBx+DBkwPoNac3TRalG1wixJw/r1Uol4QsJYmD5VU7e XNNapl0LlIU88NdKp4QOMMW9G+BGDBSQ/FdGiSPVPkHqcaPG+lke+93JwloOWxPJAYxpo7n5 rMFFteqG4pYkrrTdaD2ZVamyq9N1lVnQ6dvv22y6IJyoEUHoCbQBFrYGpe4PeIsrEYHtDRXe q1NdZfH+LjRFGebLp04w==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYhT/O8+kLDI1LXkCy8scmU4sLua1Zi4MA
- Thread-topic: [PATCH v3 3/4] mini-os: fix number of pages for PVH
On 21/06/2022 08:23, Juergen Gross wrote:
> diff --git a/e820.c b/e820.c
> index ad91e00b..49b16878 100644
> --- a/e820.c
> +++ b/e820.c
> @@ -29,6 +29,38 @@
> #include <mini-os/e820.h>
> #include <xen/memory.h>
>
> +static unsigned long e820_initial_reserved_pfns;
> +
> +unsigned long e820_get_current_pages(void)
> +{
> + domid_t domid = DOMID_SELF;
> + long ret;
> +
> + ret = HYPERVISOR_memory_op(XENMEM_current_reservation, &domid);
> + if ( ret < 0 )
> + {
> + xprintk("could not get memory size\n");
%ld ret
Also, xprintk() vs ...
> + do_exit();
> + }
> +
> + return ret - e820_initial_reserved_pfns;
> +}
> +
> +unsigned long e820_get_max_pages(void)
> +{
> + domid_t domid = DOMID_SELF;
> + long ret;
> +
> + ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid);
> + if ( ret < 0 )
> + {
> + printk("Could not get maximum pfn\n");
... printk()?
Shouldn't they both be printk()? Can fix both issues on commit.
~Andrew
|