Re: [PATCH 09/15] tools/libs/light: Modify dtbo to domU linux dtbo format

2024-05-01 Thread Anthony PERARD
x, uint32_t domid, void > *overlay_dt, > rc = ERROR_FAIL; > } > > + /* > + * auto_mode doesn't apply to dom0 as dom0 can get the physical > + * description of the hardware. > + */ > +if (domid && auto_mode) { > +if (overlay_op == LIBXL_DT_OVERLAY_ADD) Shouldn't libxl complain if the operation is different? > +rc = modify_overlay_for_domU(gc, overlay_dt, overlay_dt_size); > +} > + > out: > GC_FREE; > return rc; Thanks, -- Anthony PERARD

Re: [PATCH 08/15] tools: Add domain_id and expert mode for overlay operations

2024-05-01 Thread Anthony PERARD
needs a change in the help message of dt-overlay, and something in the man page. (and that argument parsing looks convoluted). > + > +/* User didn't prove any overlay operation. */ I guess you meant "provide" instead of prove. But the comment can be discarded, it doesn't explain anything useful that the error message doesn't already explain. > +if (overlay_ops == NULL) { > +fprintf(stderr, "No overlay operation mode provided\n"); > +return ERROR_FAIL; That should be EXIT_FAILURE instead. (and I realise that the function already return ERROR_FAIL by mistake in several places. (ERROR_FAIL is a libxl error return value of -3, which isn't really a good exit value for CLI programmes.)) Thanks, -- Anthony PERARD

Re: [PATCH 05/15] tools/libs/light: Increase nr_spi to 160

2024-05-01 Thread Anthony PERARD
xl is using that `nr_spis` value and it is probably just given to Xen. So my guess is that Xen could simply take care of the minimum value, gic_number_lines() seems to be a Xen function. Thanks, -- Anthony PERARD

Re: [PATCH 04/15] tools/libs/light: Always enable IOMMU

2024-05-01 Thread Anthony PERARD
info.num_iomem) { > +config->flags |= XEN_DOMCTL_CDF_iommu; Is this doing the same thing as the previous patch? Thanks, -- Anthony PERARD

Re: [PATCH 1/2] tools/{c,o}xenstored: Don't link against libsystemd

2024-05-01 Thread Anthony PERARD
On Fri, Apr 26, 2024 at 09:51:47AM +0100, Anthony PERARD wrote: > Run `systemd-notify --ready` instead. Hopefully, that will be enough. > ($NOTIFY_SOCKET is a socket, and a bit more complicated that I though, > it can start with "@" for example) FTR: If it turns out that cal

Re: [PATCH 3/3] tools/xg: Clean up xend-style overrides for CPU policies

2024-04-30 Thread Anthony PERARD
if ( (rc = xc_cpuid_xend_policy(xch, domid, xend, host, def, cur)) ) > +goto out; > +if ( (rc = xc_msr_policy(xch, domid, msr, host, def, cur)) ) > +goto out; What if `xend` is set, but `msr` isn't? Looks like there's going to be a segv in xc_msr_policy() because it doesn't check that `msr` is actually set. Thanks, -- Anthony PERARD

Re: [PATCH 2/3] tools/xg: Streamline cpu policy serialise/deserialise calls

2024-04-30 Thread Anthony PERARD
tended. > > Signed-off-by: Alejandro Vallejo The patch looks fine beside xen-cpuid.c which might need to tweaked due to change needed in the first patch. Thanks, -- Anthony PERARD

Re: [PATCH 1/3] tools/xg: Move xc_cpu_policy_t to xenguest.h

2024-04-30 Thread Anthony PERARD
_cpu_policy_serialise() to the world anymore, and it could be internal to libxenguest, probably, I haven't check. Thanks, -- Anthony PERARD

Re: [PATCH 2/2] tools: Drop libsystemd as a dependency

2024-04-26 Thread Anthony PERARD
stemd "support", even if it supposed to be disabled by default. So it's better to use AX_ENABLE_SYSTEMD() as this will set the correct help message. And can you add an entry in CHANGELOG? As systemd support isn't automatically enabled with the presence of the libs anymore. Thanks, -- Anthony PERARD

Re: [PATCH] xen-livepatch: fix --force option comparison

2024-04-26 Thread Anthony PERARD
On Fri, Apr 26, 2024 at 09:21:44AM +0200, Roger Pau Monne wrote: > The check for --force option shouldn't be against 0. > > Reported-by: Jan Beulich > Fixes: 62a72092a517 ('livepatch: introduce --force option') > Signed-off-by: Roger Pau Monné Acked-by: Anthony PERARD Thank

Re: [PATCH 1/2] tools/{c,o}xenstored: Don't link against libsystemd

2024-04-26 Thread Anthony PERARD
On Thu, Apr 25, 2024 at 07:16:23PM +0100, Andrew Cooper wrote: > On 25/04/2024 7:06 pm, Anthony PERARD wrote: > > On Thu, Apr 25, 2024 at 06:32:15PM +0100, Andrew Cooper wrote: > >> libsystemd is a giant dependency for one single function, but in the wake > >> of >

Re: [PATCH 1/2] tools/{c,o}xenstored: Don't link against libsystemd

2024-04-25 Thread Anthony PERARD
ted in C and ocaml. Detail to be checked. Otherwise, things won't work. Thanks, -- Anthony PERARD

[XEN PATCH] MAINTAINERS: Update my email address

2024-04-25 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- MAINTAINERS | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d1850c134d..6ba7d2765f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -208,7 +208,7 @@ Maintainers List (try to look for most precise areas

Re: [PATCH v4 1/4] xen-livepatch: fix parameter name parsing

2024-04-24 Thread Anthony PERARD
gt; Fixes: 05bb8afedede ('xen-xsplice: Tool to manipulate xsplice payloads') > Signed-off-by: Roger Pau Monné Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2 5/5] x86: Add --force option to xen-ucode to override microcode version check

2024-04-23 Thread Anthony PERARD
On Tue, Apr 23, 2024 at 04:26:53PM +0100, Fouad Hilly wrote: > On Mon, Apr 22, 2024 at 6:57 PM Anthony PERARD > wrote: > > On Tue, Apr 16, 2024 at 10:15:46AM +0100, Fouad Hilly wrote: > > > diff --git a/tools/misc/xen-ucode.c b/tools/misc/xen-ucode.c > > > index e3c

Re: [PATCH v2 4/5] x86: Use getopt to handle command line args

2024-04-23 Thread Anthony PERARD
On Tue, Apr 23, 2024 at 04:16:10PM +0100, Fouad Hilly wrote: > On Mon, Apr 22, 2024 at 6:48 PM Anthony PERARD > wrote: > > On Tue, Apr 16, 2024 at 10:15:45AM +0100, Fouad Hilly wrote: > > > +if ( argc != 2 ) > > > +goto ext_err; > > > > Why

Re: [PATCH v3 2/4] livepatch: introduce --force option

2024-04-23 Thread Anthony PERARD
is patch. > > Signed-off-by: Roger Pau Monné For the tools: Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2 5/5] x86: Add --force option to xen-ucode to override microcode version check

2024-04-22 Thread Anthony PERARD
" -s, --show-cpu-info show CPU information and exit\n", > + " -s, --show-cpu-info show CPU information and exit\n" > + " -f, --force force to skip micorocde version check\n", > name, name); > } > Thanks, -- Anthony PERARD

Re: [PATCH v2 4/5] x86: Use getopt to handle command line args

2024-04-22 Thread Anthony PERARD
ck that the are actually argument left on the command line, even if in the current patch the only possible outcome is that argv[1] has something that isn't an option. > @@ -152,4 +164,11 @@ int main(int argc, char *argv[]) > close(fd); > > return 0; > + > + ext_err: > + fprintf(stderr, > +"xen-ucode: Xen microcode updating tool\n" > +"Usage: %s [microcode file] [options]\n", argv[0]); Isn't there a usage() function that we could use? > +show_curr_cpu(stderr); Why call show_curr_cpu() on the error path? > +exit(STDERR_FILENO); Still not an exit value. Thanks, -- Anthony PERARD

Re: [PATCH v2 3/5] x86: Add usage() to print out usage message

2024-04-22 Thread Anthony PERARD
just yet. It still is "Usage: %s [ | show-cpu-info]" The current one mean we can run one of: ./xen-ucode ucode.bin ./xen-ucode show-cpu-info The proposed help message in this patch mean we could have one of: ./xen-ucode ucode.bin ./xen-ucode show-cpu-info ./xen-ucode ucode.bin show-cpu-info But that last one is an error. Thanks, -- Anthony PERARD

Re: [PATCH v3 4/4] docs/man: Add xenwatchdog manual page

2024-04-22 Thread Anthony PERARD
On Thu, Apr 11, 2024 at 07:20:23PM +0100, le...@solinno.co.uk wrote: > From: Leigh Brown > > Add a manual page for xenwatchdogd. > > Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v3 2/4] tools/misc: xenwatchdogd enhancements

2024-04-22 Thread Anthony PERARD
instantly reboot > the domain if you enter a zero timeout (or non-numeric parameter), > and prevent the daemon consuming 100% of a CPU due to zero sleep > time. > > Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v3 3/4] tools/misc: Add xenwatchdogd.c copyright notice

2024-04-22 Thread Anthony PERARD
c > + * > + * Watchdog based on Xen hypercall watchdog interface. > + * > + * Copyright 2010 Citrix Ltd > + * Copyright 2024 Leigh Brown > + * > + */ Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v3 1/4] tools/misc: xenwatchdogd: add parse_secs()

2024-04-22 Thread Anthony PERARD
d-off-by: Leigh Brown Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [RFC PATCH v2 2/2] libs/light: expand device model start timeout use

2024-04-22 Thread Anthony PERARD
meout should stay at 10 for the qmp_cmd one. If for some reason that chosen value is to low, we could always have a separate patch to adjust the value. Cheers, -- Anthony PERARD

Re: [RFC PATCH v2 1/2] libs/light: add device model start timeout env var

2024-04-22 Thread Anthony PERARD
> prs->xswait.what = "Device Model"; > prs->xswait.path = DEVICE_MODEL_XS_PATH(gc, > libxl_get_stubdom_id(CTX, domid), domid, "/state"); > -prs->xswait.timeout_ms = LIBXL_DEVICE_MODEL_START_TIMEOUT * 1000; > +prs->xswait.timeout_ms = __libxl_device_model_start_timeout() * > 1000; That value will be use by libxl__xswait_start(). > prs->xswait.callback = pci_remove_qemu_trad_watch_state_cb; > rc = libxl__xswait_start(gc, >xswait); > if (rc) goto out_fail; So, overall, I'm fine with been able to change the timeout via env var, but disabling the timeout might not be easy or possible, even if "-1" might be an option, or -1000 in most case. So, you change the man page to only allow value>0 ? And a timeout of 0 might be best to revert to the default. Thanks, -- Anthony PERARD

Re: [PATCH v2 1/3] hotplug: Update block-tap

2024-04-22 Thread Anthony PERARD
maybe it's not really broken, and the new syntax is better anyway. My guess is that using "script=block-tap,..." might still work, but we should say something in the CHANGELOG to encourage people to move to the new syntax, with "backendtype=tap" to avoid issues. In

Re: [OSSTEST PATCH 00/36] Switch to Debian Bookworm

2024-04-19 Thread Anthony PERARD
On Mon, Apr 08, 2024 at 10:29:08AM +0100, Anthony PERARD wrote: > On Fri, Apr 05, 2024 at 04:54:30PM +0100, Anthony PERARD wrote: > > On Thu, Mar 28, 2024 at 05:54:04PM +, Anthony PERARD wrote: > > > On Mon, Mar 18, 2024 at 04:55:09PM +0000, Anthony PERARD wrote: > &

Re: [PATCH v2] libxl: Enable stubdom cdrom changing

2024-04-17 Thread Anthony PERARD
ronous callback are set. */ > +cdrom_insert_inserted(egc, qmp, NULL, 0); /* must be last */ > +} > } > } > > @@ -1135,17 +1487,22 @@ static void cdrom_insert_addfd_cb(libxl__egc *egc, > /* convenience aliases */ > libxl_device_disk *disk = cis->disk; > > -close(qmp->payload_fd); > -qmp->payload_fd = -1; I think I'd rather keep this here, before the error check. Just call close() conditionally on the value of payload_fd? The thing is, if payload_fd is still set, libxl__ev_qmp* is going to try to submit the fd again, and closing the fd earlier is better. > if (rc) goto out; > > -o = libxl__json_map_get("fdset-id", response, JSON_INTEGER); > -if (!o) { > -rc = ERROR_FAIL; > -goto out; > +/* response non-NULL only for non-stubdom */ > +if (response) { I'm not comfortable with checking the value of `response` to find out if we are on the linux stubdom path. It could be missing for other reason (probably on programming error). There's `cis->stubdom_fdset` that should have a correct value in the linux stubdom case, can we rely on that instead? (Which also refer to why I asked early to init this field) > +close(qmp->payload_fd); > +qmp->payload_fd = -1; > + > +o = libxl__json_map_get("fdset-id", response, JSON_INTEGER); > +if (!o) { > +rc = ERROR_FAIL; > +goto out; > +} > +fdset = libxl__json_object_get_integer(o); > +} else { > +fdset = cis->stubdom_fdset; > } > -fdset = libxl__json_object_get_integer(o); > > devid = libxl__device_disk_dev_number(disk->vdev, NULL, NULL); > qmp->callback = cdrom_insert_inserted; Thanks, -- Anthony PERARD

Re: [PATCH] osstest: increase boot timeout for Debian PV guests

2024-04-15 Thread Anthony PERARD
On Mon, Apr 15, 2024 at 10:33:19AM +0200, Roger Pau Monné wrote: > On Mon, Apr 15, 2024 at 09:15:51AM +0100, Anthony PERARD wrote: > > On Fri, Apr 12, 2024 at 04:11:21PM +0200, Roger Pau Monne wrote: > > > The current timeout of 40s seems to be too low for AMD boxes (pinots

[OSSTEST PATCH] production-config: override mirror url for buster, use archive

2024-04-15 Thread Anthony PERARD
buster-backport isn't available on the main mirror anymore. Signed-off-by: Anthony PERARD --- Notes: I've tested the patch already, so I'll push that soon. production-config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/production-config b/production-config index 6345c40c

Re: [PATCH] osstest: increase boot timeout for Debian PV guests

2024-04-15 Thread Anthony PERARD
meoutFactor", which can increase all timeout for a single machine. (It's use on the cubietruck for example.) Or is it better to just increase boot time for all (or at least those) pv guest? Cheers, -- Anthony PERARD

Re: [RFC PATCH v1 0/2] convert LIBXL_DEVICE_MODEL_START_TIMEOUT to env var

2024-04-11 Thread Anthony PERARD
"b/" missing, and that confuses get_maintainer.pl. It tries to find maintainers for "libs/light/libxl_dm.c" which don't exist. Did you by any chance used "--no-prefix"? It doesn't seems worse it to handle this case as I'm guessing more than on tool rely on those. Cheers, -- Anthony PERARD

Re: [RFC PATCH v1 0/2] convert LIBXL_DEVICE_MODEL_START_TIMEOUT to env var

2024-04-10 Thread Anthony PERARD
r.pl --no-l' There's other way to send patch, like using "scripts/add_maintainers.pl" described on this page: https://wiki.xenproject.org/wiki/Submitting_Xen_Project_Patches#Sending_a_Patch_Series Not sure which one is better. Anyway, I've added the series to my list of patch to look at. But I might miss it next time if I'm not CCed. Cheers, -- Anthony PERARD

Re: [PATCH 5/5] x86: Add --force option to xen-ucode to override microcode version check

2024-04-10 Thread Anthony PERARD
IT_SUCCESS); > +case 'f': > +ucode_flag = XENPF_UCODE_FLAG_FORCE_SET; > +filename = optarg; > +break; > default: > goto ext_err; > } > } > > -filename = argv[1]; > +if ( argc == 2 ) > +filename = argv[1]; Sometime we take filename from argv[1], sometime we don't? The logic is going to be very confusing, takeout of context, only set `filename` from a single place please. Thanks, -- Anthony PERARD

Re: [PATCH 4/5] x86: Use getopt to handle command line args

2024-04-10 Thread Anthony PERARD
gt; +filename = argv[1]; > +if ( filename == NULL ) > { > -show_curr_cpu(stdout); > -return 0; > +printf("File name error\n"); > +goto ext_err; > } > > -filename = argv[1]; > fd = open(filename, O_RDONLY); > if ( fd < 0 ) > { > @@ -149,4 +173,9 @@ int main(int argc, char *argv[]) > close(fd); > > return 0; > + > +ext_err: > +usage(argv[0]); > +show_curr_cpu(stderr); Why is show_curr_cpu() called on an error path? > +exit(STDERR_FILENO); STDERR_FILENO isn't an exit code, it's a file descriptor. Thanks, -- Anthony PERARD

Re: [PATCH v2 0/6] xenwatchdogd bugfixes and enhancements

2024-04-09 Thread Anthony PERARD
bly not need to go into detail, maybe just "improved xenwatchdogd options, see new man page." Cheers, -- Anthony PERARD

Re: [PATCH v2 6/6] docs/man: Add xenwatchdog manual page

2024-04-09 Thread Anthony PERARD
f whether the safe exit option was passed. "whether B<--safe-exit> option" .. I think it's better to call-out the option explicitly. Thanks, -- Anthony PERARD

Re: [PATCH v2 5/6] tools/misc: xenwatchdogd enhancements

2024-04-09 Thread Anthony PERARD
his in a separate patch? > + */ > > #include > #include Nice change overall, it's just the license part that need fixing. Thanks, -- Anthony PERARD

Re: [PATCH v2 4/6] tools/misc: xenwatchdogd: add parse_secs()

2024-04-09 Thread Anthony PERARD
"sleep"); This is parsing the wrong value here, should it be +1 to parse the sleep argument instead of the timeout argument a second time. Also, are you sure you want to start using "optind" here? It's a variable used by getopt(), but we don't use it yet. It almost feel like "optind" happen to be set to 1 by luck. Thanks, -- Anthony PERARD

Re: [PATCH v2 3/6] tools/misc: xenwatchdogd: add static qualifier

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:53AM +, le...@solinno.co.uk wrote: > From: Leigh Brown > > Make all functions except main() static in xenwatchdogd.c. Also make > the remaining global variable static. > > Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2 2/6] tools/misc: rework xenwatchdogd signal handling

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:52AM +, le...@solinno.co.uk wrote: > From: Leigh Brown > > Rework xenwatchdogd signal handling to do the minimum in the signal > handler. This is a very minor enhancement. > > Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD Th

Re: [PATCH v2 1/6] tools/misc: xenwatchdogd: use EXIT_* constants

2024-04-09 Thread Anthony PERARD
On Fri, Mar 29, 2024 at 11:10:51AM +, le...@solinno.co.uk wrote: > From: Leigh Brown > > Use EXIT_SUCCESS/EXIT_FAILURE constants instead of magic numbers. > > Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2] libxl: devd: Spawn QEMU for 9pfs

2024-04-09 Thread Anthony PERARD
kend-pid and qdisk-%u logfile Patch looks fine otherwise: Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH] xen-hvm: Avoid livelock while handling buffered ioreqs

2024-04-09 Thread Anthony PERARD
timer_del(state->buffered_io_timer); > qemu_xen_evtchn_unmask(state->xce_handle, > state->bufioreq_local_port); > +} else { > +timer_mod(state->buffered_io_timer, > + BUFFER_IO_MAX_DELAY + > qemu_clock_get_ms(QEMU_CLOCK_REALTIME)); > } > } Cheers, -- Anthony PERARD

Re: Linux Xen PV CPA W^X violation false-positives

2024-04-08 Thread Anthony PERARD
On Mon, Apr 08, 2024 at 11:22:59AM +0100, Anthony PERARD wrote: > On Thu, Mar 28, 2024 at 02:00:14PM +0100, Jürgen Groß wrote: > > Hi Jason, > > > > On 28.03.24 02:24, Jason Andryuk wrote: > > > On Wed, Mar 27, 2024 at 7:46 AM Jürgen Groß wrote: > > > >

Re: Linux Xen PV CPA W^X violation false-positives

2024-04-08 Thread Anthony PERARD
> int primary) > int do_split, err; > unsigned int level; > pte_t *kpte, old_pte; > + bool nx, rw; > > address = __cpa_addr(cpa, cpa->curpage); > repeat: > - kpte = _lookup_address_cpa(cpa, address, ); > + kpte = _lookup_address_cpa(cpa, address, , , ); > if (!kpte) > return __cpa_process_fault(cpa, address, primary); > > @@ -1619,7 +1648,8 @@ static int __change_page_attr(struct cpa_data *cpa, int > primary) > new_prot = static_protections(new_prot, address, pfn, 1, 0, > CPA_PROTECT); > > - new_prot = verify_rwx(old_prot, new_prot, address, pfn, 1); > + new_prot = verify_rwx(old_prot, new_prot, address, pfn, 1, > + nx, rw); > > new_prot = pgprot_clear_protnone_bits(new_prot); > > diff --git a/arch/x86/virt/svm/sev.c b/arch/x86/virt/svm/sev.c > index cffe1157a90a..9131d80cff36 100644 > --- a/arch/x86/virt/svm/sev.c > +++ b/arch/x86/virt/svm/sev.c > @@ -338,12 +338,13 @@ void snp_dump_hva_rmpentry(unsigned long hva) > { > unsigned long paddr; > unsigned int level; > + bool nx, rw; > pgd_t *pgd; > pte_t *pte; > > pgd = __va(read_cr3_pa()); > pgd += pgd_index(hva); > - pte = lookup_address_in_pgd(pgd, hva, ); > + pte = lookup_address_in_pgd(pgd, hva, , , ); > > if (!pte) { > pr_err("Can't dump RMP entry for HVA %lx: no PTE/PFN found\n", > hva); > -- > 2.35.3 > -- Anthony PERARD

Re: [OSSTEST PATCH 00/36] Switch to Debian Bookworm

2024-04-08 Thread Anthony PERARD
On Fri, Apr 05, 2024 at 04:54:30PM +0100, Anthony PERARD wrote: > On Thu, Mar 28, 2024 at 05:54:04PM +0000, Anthony PERARD wrote: > > On Mon, Mar 18, 2024 at 04:55:09PM +, Anthony PERARD wrote: > > I've now pushed > "production-config: Set Bookworm's d

[OSSTEST PATCH] cr-daily-branch: Actually use Linux 6.1 by default on Arm

2024-04-08 Thread Anthony PERARD
ason $BASE_TAG_LINUX and $BASE_TAG_LINUX_ARM are different, this change would be wrong, but there's shouldn't be a need for them to be different. Fixes: 95ee1714750b ("ap-common: Switch to Linux 6.1 by default on Arm") Signed-off-by: Anthony PERARD --- Notes: Already pushed. ap-common

Re: [OSSTEST PATCH 00/36] Switch to Debian Bookworm

2024-04-05 Thread Anthony PERARD
On Thu, Mar 28, 2024 at 05:54:04PM +, Anthony PERARD wrote: > On Mon, Mar 18, 2024 at 04:55:09PM +0000, Anthony PERARD wrote: I've now pushed "production-config: Set Bookworm's debian-installer version" and these two: > > Switch to Debian Bookworm as default suite >

Re: [PATCH v3 2/2] xen: fix stubdom PCI addr

2024-04-03 Thread Anthony PERARD
arameters > etc), the real BDF needs to be used. > Get the in-stubdomain BDF by looking up relevant PV PCI xenstore > entries. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v3 1/2] hw/xen: detect when running inside stubdomain

2024-04-03 Thread Anthony PERARD
o be done > differently. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [RFC XEN PATCH v6 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi

2024-04-03 Thread Anthony PERARD
OTSUPP in `errno` instead? > +LOGED(ERROR, domid, "xc_domain_gsi_permission gsi=%d", irq); > +} > +} > +if (!is_gsi || rc == -EOPNOTSUPP) { > +rc = xc_domain_irq_permission(ctx->xch, domid, irq, 0); Same here, use `r` instead of `rc`. > +if (rc < 0) { > +LOGED(ERROR, domid, "xc_domain_irq_permission irq=%d", irq); > +} > } > } > Thanks, -- Anthony PERARD

Re: [PATCH v6 2/4] tools: Move MB/GB() to common-macros.h

2024-04-03 Thread Anthony PERARD
rs/init-xenstore-domain.c > +++ b/tools/helpers/init-xenstore-domain.c > @@ -20,7 +20,6 @@ > #include "init-dom-json.h" > > #define LAPIC_BASE_ADDRESS 0xfee0UL > -#define GB(x) ((uint64_t)x << 30) With this change we have this change for GB(memory + 0)

Re: [PATCH v6 1/4] tools/init-xenstore-domain: Replace variable MB() usage

2024-04-03 Thread Anthony PERARD
s change actually fix a bug. When `maxmem` is set, we would have "max_size = maxmem", otherwise, it would be "max_size = memory << 20" The macro should have been written as #define MB(x) ((uint64_t)(x) << 20) This patch could be backported to 4.17 and later, with: Fixes: 134d53f57707 ("tools/init-xenstore-domain: fix memory map for PVH stubdom") Anyway, this patch on it's own looks fine: Reviewed-by: Anthony PERARD -- Anthony PERARD

Re: [PATCH v4 2/5] tools/init-xenstore-domain: Replace variable MB() usage

2024-04-03 Thread Anthony PERARD
((uint64_t)(x) << 20) This patch could be backported to 4.17 and later, with: Fixes: 134d53f57707 ("tools/init-xenstore-domain: fix memory map for PVH stubdom") Anyway, this patch on it's own looks fine: Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

[OSSTEST PATCH 37/36] production-config: Set Bookworm's debian-installer version

2024-04-02 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- I've got this one more patch to add to the series, which I forgot to write. I'll put it before "Switch to Debian Bookworm as default suite" when I'll push the rest of the series. production-config | 1 + 1 file changed, 1 insertion(+) diff --git a/

[OSSTEST PATCH] ap-common: Fix libvirt's git repo URL

2024-04-02 Thread Anthony PERARD
The current URL doesn't work anymore and just timeout, switch to the new main repo URL. Signed-off-by: Anthony PERARD --- Notes: I'll push that later today. Last libvirt test by osstest was on 20 February. ap-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [OSSTEST PATCH 00/36] Switch to Debian Bookworm

2024-03-28 Thread Anthony PERARD
On Mon, Mar 18, 2024 at 04:55:09PM +, Anthony PERARD wrote: > I intend to push this series in two waves. > > First, push up to commit "Temporally switch "qemu-mainline" branch to > Bookworm". This is to test that osstest still works fine if we need to u

Re: [RFC XEN PATCH v6 4/5] libxl: Use gsi instead of irq for mapping pirq

2024-03-28 Thread Anthony PERARD
sion of kernel, still need to use irq */ > +sysfs_path = GCSPRINTF(SYSFS_PCI_DEV"/"PCI_BDF"/irq", pci->domain, > + pci->bus, pci->dev, pci->func); > +} > f = fopen(sysfs_path, "r"); > if (f == NULL) { > LOGED(ERROR, domid, "Couldn't open %s", sysfs_path); With those two things fixed: Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic

2024-03-28 Thread Anthony PERARD
only checked the xen_pt* source files, I don't know if the same applies to "xen-operations.c" or "xen-mapcache.c". Beside this, QEMU built with Xen support still seems to works fine, so adding the objects to `system_ss` instead of `specific_ss` seems alright. Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 16/19] hw/xen/xen_pt: Add missing license

2024-03-27 Thread Anthony PERARD
d Woodhouse > Signed-off-by: Philippe Mathieu-Daudé Fine by me. Looks like there was a license header before: https://xenbits.xen.org/gitweb/?p=qemu-xen-unstable.git;a=blob;f=hw/pass-through.h;h=0b5822414e24d199a064abccc4d378dcaf569bd6;hb=HEAD I don't know why I didn't copied it over here. Acked

Re: [PATCH-for-9.0 v2 15/19] hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources

2024-03-27 Thread Anthony PERARD
remove from the "hw/xen/xen-hvm-common.h" *common* header. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Richard Henderson > Reviewed-by: David Woodhouse Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [RFC PATCH-for-9.0 v2 13/19] hw/xen: Remove use of 'target_ulong' in handle_ioreq()

2024-03-27 Thread Anthony PERARD
were more IOREQ types. So my guess is it isn't relevant anymore, but extending the clamping to 32-bits request should be fine, when using qemu-system-i386 that is, as it is already be done if one use qemu-system-x86_64. So I think the patch is fine, and the tests I've ran so far worked fine. > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 12/19] hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h'

2024-03-27 Thread Anthony PERARD
Mathieu-Daudé > Reviewed-by: David Woodhouse > Reviewed-by: Richard Henderson Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 11/19] hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix

2024-03-27 Thread Anthony PERARD
use > Reviewed-by: Richard Henderson Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [RFC PATCH-for-9.0 v2 09/19] hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of #pragma

2024-03-27 Thread Anthony PERARD
/ + /* last cacheline: 48 bytes */ +} __attribute__((__aligned__(8))); Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 08/19] hw/xen: Remove unused Xen stubs

2024-03-27 Thread Anthony PERARD
f(0){...}`, but there's no guaranty, is there? Cheers, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 05/19] hw/display: Restrict xen_register_framebuffer() call to Xen

2024-03-27 Thread Anthony PERARD
On Tue, Nov 14, 2023 at 03:38:01PM +0100, Philippe Mathieu-Daudé wrote: > Only call xen_register_framebuffer() when Xen is enabled. > > Signed-off-by: Philippe Mathieu-Daudé I don't think this patch is very useful but it's fine, so: Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2 2/2] xen: fix stubdom PCI addr

2024-03-26 Thread Anthony PERARD
hilippe talked about at https://lore.kernel.org/qemu-devel/429a5a27-21b9-45bd-a1a6-a1c2ccc48...@linaro.org/ materialise. Beside the coding style, the patch looks file. Thanks, -- Anthony PERARD

Re: [PATCH v2 1/2] hw/xen: detect when running inside stubdomain

2024-03-26 Thread Anthony PERARD
acy-backend", if possible. (In xen_hvm_init_pc(), a call to xen_register_ioreq() opens another xenstore, as `state->xenstore`.) (There's already been effort to build QEMU without legacy backends, that stubdom check would break in this scenario.) Thanks, -- Anthony PERARD

Re: [OSSTEST PATCH 33/36] make-flight: Keep using buster for L2 guest in nested tests

2024-03-26 Thread Anthony PERARD
On Wed, Mar 20, 2024 at 06:24:18PM +0100, Roger Pau Monné wrote: > On Mon, Mar 18, 2024 at 04:55:42PM +0000, Anthony PERARD wrote: > > When starting the installation of the L2 guest, L0 kills L1. Switching > > the L2 guest back to Debian Buster works fine, so do that to prevent

Re: [OSSTEST PATCH 34/36] Temporally switch "qemu-mainline" branch to Bookworm

2024-03-26 Thread Anthony PERARD
On Wed, Mar 20, 2024 at 06:25:35PM +0100, Roger Pau Monné wrote: > On Mon, Mar 18, 2024 at 04:55:43PM +0000, Anthony PERARD wrote: > > QEMU doesn't build on buster anymore. > > > > This should be remove once bookworm is the default suite. > > Is this change requi

Re: [OSSTEST PATCH 10/36] preseed_create: Workaround fail grub-install on arndale

2024-03-26 Thread Anthony PERARD
On Wed, Mar 20, 2024 at 05:38:17PM +0100, Roger Pau Monné wrote: > On Mon, Mar 18, 2024 at 04:55:19PM +0000, Anthony PERARD wrote: > > grub-installer on arndale-* machine fails with Debian Bookworm. It > > tries to install "grub-pc" which doesn't exist. Skip insta

Backport request for 4.17

2024-03-25 Thread Anthony PERARD
E, I don't think there's be compatibility issue with Xen, and hopefully nothing breaks. Thanks, -- Anthony PERARD

Re: [PATCH v2 5/5] xen/memory, tools: Make init-dom0less consume XEN_DOMCTL_get_mem_map

2024-03-25 Thread Anthony PERARD
ons[i].start >> XC_PAGE_SHIFT; > +p2m = (mem_regions[i].start >> XC_PAGE_SHIFT) + > XENSTORE_PFN_OFFSET; > +} > +} Thanks, -- Anthony PERARD

Re: [XEN PATCH v2 1/1] tools: init scripts: Add missing XENCONSOLED_ARGS variable

2024-03-25 Thread Anthony PERARD
iting the whole command, as it means that we get the command line on an update if it changed. Cheers, -- Anthony PERARD

Re: [PATCH v7 06/14] tools: add support for cache coloring configuration

2024-03-25 Thread Anthony PERARD
em doesn't support it? Shouldn't we also report an error in this case? At least if `num_llc_colors > 0`. Thanks, -- Anthony PERARD

Re: [XEN PATCH v2 1/1] tools: init scripts: Add missing XENCONSOLED_ARGS variable

2024-03-25 Thread Anthony PERARD
ncommons" config file on systemd: # /etc/systemd/system/xenconsoled.service.d/trace_all.conf [Service] Environment=XENCONSOLED_TRACE=all That "xencommons" config file is just there to be compatible with both init system. Cheers, -- Anthony PERARD

Re: [OSSTEST PATCH 02/36] ts-xen-build-prep: Only force git protocol v2 on buster

2024-03-20 Thread Anthony PERARD
On Wed, Mar 20, 2024 at 04:20:00PM +0100, Roger Pau Monné wrote: > On Mon, Mar 18, 2024 at 04:55:11PM +0000, Anthony PERARD wrote: > > Newer version of Debian and thus git would use this automatically, no > > need to force it. > > > > Signed-off-by: Anthony P

Re: [PATCH v2] docs/man: add shutdown reasons to xl (list) man page

2024-03-20 Thread Anthony PERARD
and guest config somewhere, maybe even on a different host for live migration? This is a state that seems to happen as part of a live migration (or `xl save` I guess). I tried to suspend a guest (runnning `systemd suspend`), but xl never reported `ss`, because there's nothing to do I guess. So this state is probably really about migration. Thanks, -- Anthony PERARD

Re: [PATCH RESEND] tools/xl_parse: remove message for tsc mode string

2024-03-20 Thread Anthony PERARD
ked-by: Anthony PERARD Thanks, -- Anthony PERARD

[XEN PATCH] docs/parse-support-md: Handle BulletList

2024-03-19 Thread Anthony PERARD
("SUPPORT.MD: Fix matrix generation after 43c416d0d819 and 77c39a53cf5b") Signed-off-by: Anthony PERARD --- docs/parse-support-md | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/parse-support-md b/docs/parse-support-md index a397637639..b04f62da37 100755 --- a/docs/parse-

[OSSTEST PATCH 23/36] bookworm: Extend ARM clock workaround

2024-03-18 Thread Anthony PERARD
Still broken on arndale, serial stop working early, then the machine timeout when working on creating a xen guest with xen-create-guest. Signed-off-by: Anthony PERARD --- Osstest/Debian.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Osstest/Debian.pm b/Osstest

[OSSTEST PATCH 24/36] ts-nested-setup, setup l1 lvm volume groupe in guest

2024-03-18 Thread Anthony PERARD
LVM in l0 doesn't let us run pvcreate on the host LV, `pvcreate $outer_lvdev` fails with: Cannot use /dev/$l0-vg/l1_gueststorage_outer_lv: device is an LV Signed-off-by: Anthony PERARD --- ts-nested-setup | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ts

[OSSTEST PATCH 36/36] make-hosts-flight: default to bookworm

2024-03-18 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- make-hosts-flight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-hosts-flight b/make-hosts-flight index 63ac7b71..0177f605 100755 --- a/make-hosts-flight +++ b/make-hosts-flight @@ -26,7 +26,7 @@ blessing=$4 buildflight=$5

[OSSTEST PATCH 35/36] Switch to Debian Bookworm as default suite

2024-03-18 Thread Anthony PERARD
build with GCC12") which is only in Xen 4.18. Signed-off-by: Anthony PERARD --- Osstest.pm | 2 +- make-flight | 6 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Osstest.pm b/Osstest.pm index a559ca4e..9ac2dc5c 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -87,7 +87,7

[OSSTEST PATCH 19/36] overlay-bookworm: Import grub's 20_linux_xen from Debian Bookworm

2024-03-18 Thread Anthony PERARD
This is a copy of the file installed, from grub-common package. We are going to edit it shortly. Signed-off-by: Anthony PERARD --- overlay-bookworm/etc/grub.d/20_linux_xen | 379 +++ 1 file changed, 379 insertions(+) create mode 100755 overlay-bookworm/etc/grub.d

[OSSTEST PATCH 30/36] bookworm: Extend guest bootloader workaround

2024-03-18 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Osstest/Debian.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 68f1be60..3545f3fd 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -1176,7 +1176,7 @@ END logm("\$arch is

[OSSTEST PATCH 34/36] Temporally switch "qemu-mainline" branch to Bookworm

2024-03-18 Thread Anthony PERARD
QEMU doesn't build on buster anymore. This should be remove once bookworm is the default suite. Signed-off-by: Anthony PERARD --- make-flight | 5 + 1 file changed, 5 insertions(+) diff --git a/make-flight b/make-flight index d0c950bc..6e88cb13 100755 --- a/make-flight +++ b/make-flight

[OSSTEST PATCH 27/36] ts-debian-fixup: Fix nic names for bookworm

2024-03-18 Thread Anthony PERARD
ols/issues/65 Signed-off-by: Anthony PERARD --- ts-debian-fixup | 15 +++ 1 file changed, 15 insertions(+) diff --git a/ts-debian-fixup b/ts-debian-fixup index 810b3aba..4cf5f980 100755 --- a/ts-debian-fixup +++ b/ts-debian-fixup @@ -142,6 +142,20 @@ sub filesystems () { END } +sub f

[OSSTEST PATCH 17/36] target_editfile: Use the same user to retrieve and send

2024-03-18 Thread Anthony PERARD
xamine-serial-pre step. Signed-off-by: Anthony PERARD --- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 0dded9b2..b86f1d96 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm

[OSSTEST PATCH 25/36] ts-leak-check: add new name for udevd workers

2024-03-18 Thread Anthony PERARD
udevd on Bookworm shows as "(udev-worker)" in the process list. Suppress them. Signed-off-by: Anthony PERARD --- ts-leak-check | 1 + 1 file changed, 1 insertion(+) diff --git a/ts-leak-check b/ts-leak-check index f3cca8aa..023a945f 100755 --- a/ts-leak-check +++ b/ts-leak-check

[OSSTEST PATCH 33/36] make-flight: Keep using buster for L2 guest in nested tests

2024-03-18 Thread Anthony PERARD
cpu#4: > d3v0 vmentry failure (reason 0x8021): Invalid guest state (2) Signed-off-by: Anthony PERARD --- make-flight | 15 ++- mfi-common | 5 +++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/make-flight b/make-flight index 155a0c1f..d0c950bc 100755 --- a/ma

[OSSTEST PATCH 32/36] ts-xen-install: Fix bridge setup, ask to copy MAC addr

2024-03-18 Thread Anthony PERARD
This ask to copy the MAC address from $physif on the bridge. On Debian Bookworm, when running as a Xen guest for nested tests, the bridge does get a random MAC address and a different IP address from DHCP than before setting up the bridge, so the test fails. Signed-off-by: Anthony PERARD

[OSSTEST PATCH 28/36] ts-debian-install: keep avoiding to use pygrub

2024-03-18 Thread Anthony PERARD
mhf". https://github.com/xen-tools/xen-tools/commit/83c37b476a7534c432ecc9941817aeb989677da6 There's "--nopygrub" but that doesn't work due to several issues, so removing "pygrub" from "distributions.conf" is the only way. Signed-off-by: Anthony PERARD ---

[OSSTEST PATCH 16/36] bl_getmenu_open: Read grub.cfg as root

2024-03-18 Thread Anthony PERARD
On bookworm, "/boot/grub/grub.cfg" isn't accessible by user "osstest", so read the file as user "root". Signed-off-by: Anthony PERARD --- Osstest/Debian.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm i

[OSSTEST PATCH 26/36] ts-debian-hvm-install: Allow udev failure in install media

2024-03-18 Thread Anthony PERARD
the installation media, and allow the failure. Once installed, the guest boot fine. Signed-off-by: Anthony PERARD --- Notes: There's a potential fix for the kernel: https://lore.kernel.org/xen-devel/20221209142615.33574-1-jandr...@gmail.com/ ts-debian-hvm-install | 17 ++

[OSSTEST PATCH 29/36] ts-debian-hvm-install: Increase min guest ram size

2024-03-18 Thread Anthony PERARD
to 1 GB. Signed-off-by: Anthony PERARD --- ts-debian-hvm-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install index 44eb3ab1..60c95b37 100755 --- a/ts-debian-hvm-install +++ b/ts-debian-hvm-install @@ -241,7 +241,7 @@ sub prep

[OSSTEST PATCH 31/36] ts-debian-*-install: Replace dots in hostnames by dashs

2024-03-18 Thread Anthony PERARD
is that /etc/resolv.conf contains "search bookworm.guest.osstest" and can't find an IP for "cache". So the installation fails. Also replace ".guest.osstest" in a few other places, even if it may not be an issue. Signed-off-by: Anthony PERARD --- ts-debian-di-install |

  1   2   3   4   5   6   7   8   9   10   >